wifi: Fix Duration/ID setting when TXOP Limit is exceeded

This commit is contained in:
Stefano Avallone
2022-04-01 13:27:30 +02:00
committed by Stefano Avallone
parent c7553687d7
commit 7617186e8f

View File

@@ -455,13 +455,15 @@ QosFrameExchangeManager::GetFrameDurationId (const WifiMacHeader& header, uint32
return FrameExchangeManager::GetFrameDurationId (header, size, txParams, fragmentedPacket);
}
NS_ASSERT (txParams.m_acknowledgment && txParams.m_acknowledgment->acknowledgmentTime != Time::Min ());
// under multiple protection settings, if the TXOP limit is not null, Duration/ID
// is set to cover the remaining TXOP time (Sec. 9.2.5.2 of 802.11-2016).
// The TXOP holder may exceed the TXOP limit in some situations (Sec. 10.22.2.8
// of 802.11-2016)
return std::max (m_edca->GetRemainingTxop ()
- m_phy->CalculateTxDuration (size, txParams.m_txVector, m_phy->GetPhyBand ()),
Seconds (0));
txParams.m_acknowledgment->acknowledgmentTime);
}
Time