wifi: Time::Min () is a safer default value for PPDU duration limits
This commit is contained in:
@@ -542,7 +542,7 @@ MacLow::StartTransmission (Ptr<WifiMacQueueItem> mpdu,
|
||||
Ptr<QosTxop> qosTxop = m_edca.find (QosUtilsMapTidToAc (tid))->second;
|
||||
|
||||
// if a TXOP limit exists, compute the remaining TXOP duration
|
||||
Time txopLimit = Seconds (0);
|
||||
Time txopLimit = Time::Min ();
|
||||
if (m_currentTxop->GetTxopLimit ().IsStrictlyPositive ())
|
||||
{
|
||||
txopLimit = m_currentTxop->GetTxopRemaining () - CalculateOverheadTxTime (mpdu, m_txParams);
|
||||
@@ -662,6 +662,11 @@ MacLow::IsWithinSizeAndTimeLimits (uint32_t mpduSize, Mac48Address receiver, uin
|
||||
{
|
||||
NS_LOG_FUNCTION (this << mpduSize << receiver << +tid << txVector << ampduSize << ppduDurationLimit);
|
||||
|
||||
if (ppduDurationLimit != Time::Min () && ppduDurationLimit.IsNegative ())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
WifiModulationClass modulation = txVector.GetMode ().GetModulationClass ();
|
||||
|
||||
uint32_t maxAmpduSize = 0;
|
||||
|
||||
@@ -113,7 +113,8 @@ public:
|
||||
*
|
||||
* - the time to transmit the resulting PPDU, according to the given TxVector,
|
||||
* does not exceed both the maximum PPDU duration allowed by the corresponding
|
||||
* modulation class (if any) and the given PPDU duration limit (if non null)
|
||||
* modulation class (if any) and the given PPDU duration limit (if distinct from
|
||||
* Time::Min ())
|
||||
*
|
||||
* For now, only non-broadcast QoS Data frames can be aggregated (do not pass
|
||||
* other types of frames to this method). MPDUs to aggregate are looked for
|
||||
@@ -133,7 +134,7 @@ public:
|
||||
*/
|
||||
std::vector<Ptr<WifiMacQueueItem>> GetNextAmpdu (Ptr<const WifiMacQueueItem> mpdu,
|
||||
WifiTxVector txVector,
|
||||
Time ppduDurationLimit = Seconds (0)) const;
|
||||
Time ppduDurationLimit = Time::Min ()) const;
|
||||
|
||||
/**
|
||||
* Deaggregates an A-MPDU by removing the A-MPDU subframe header and padding.
|
||||
|
||||
@@ -85,7 +85,8 @@ public:
|
||||
*
|
||||
* - the time to transmit the resulting PPDU, according to the given TxVector,
|
||||
* does not exceed both the maximum PPDU duration allowed by the corresponding
|
||||
* modulation class (if any) and the given PPDU duration limit (if non null)
|
||||
* modulation class (if any) and the given PPDU duration limit (if distinct from
|
||||
* Time::Min ())
|
||||
*
|
||||
* If it is not possible to aggregate at least two MSDUs, no MSDU is dequeued
|
||||
* from the EDCA queue and a null pointer is returned.
|
||||
@@ -99,7 +100,7 @@ public:
|
||||
*/
|
||||
Ptr<WifiMacQueueItem> GetNextAmsdu (Mac48Address recipient, uint8_t tid,
|
||||
WifiTxVector txVector, uint32_t ampduSize = 0,
|
||||
Time ppduDurationLimit = Seconds (0)) const;
|
||||
Time ppduDurationLimit = Time::Min ()) const;
|
||||
|
||||
/**
|
||||
* Determine the maximum size for an A-MSDU of the given TID that can be sent
|
||||
|
||||
@@ -529,7 +529,7 @@ QosTxop::NotifyAccessGranted (void)
|
||||
else
|
||||
{
|
||||
// compute the limit on the PPDU duration due to the TXOP duration, if any
|
||||
Time ppduDurationLimit = Seconds (0);
|
||||
Time ppduDurationLimit = Time::Min ();
|
||||
if (peekedItem->GetHeader ().IsQosData () && GetTxopLimit ().IsStrictlyPositive ())
|
||||
{
|
||||
MacLowTransmissionParameters params = GetTransmissionParameters (peekedItem);
|
||||
|
||||
@@ -427,7 +427,7 @@ public:
|
||||
* If the peeked frame is a QoS Data frame, it is actually dequeued if it meets
|
||||
* the constraint on the maximum A-MPDU size (by assuming that the frame has to
|
||||
* be aggregated to an existing A-MPDU of the given size) and its transmission
|
||||
* time does not exceed the given PPDU duration limit (if strictly positive).
|
||||
* time does not exceed the given PPDU duration limit (if distinct from Time::Min ()).
|
||||
* If the peeked frame is a unicast QoS Data frame stored in the EDCA queue,
|
||||
* attempt to perform A-MSDU aggregation (while meeting the constraints mentioned
|
||||
* above) if <i>aggregate</i> is true and assign a sequence number to the
|
||||
@@ -441,7 +441,7 @@ public:
|
||||
*/
|
||||
Ptr<WifiMacQueueItem> DequeuePeekedFrame (Ptr<const WifiMacQueueItem> peekedItem, WifiTxVector txVector,
|
||||
bool aggregate = true, uint32_t ampduSize = 0,
|
||||
Time ppduDurationLimit = Seconds (0));
|
||||
Time ppduDurationLimit = Time::Min ());
|
||||
/**
|
||||
* Compute the MacLow transmission parameters for the given frame. Allowed frames
|
||||
* are those handled by a QosTxop (QoS data frames, BlockAckReq frames, ADDBA
|
||||
|
||||
Reference in New Issue
Block a user