diff --git a/src/wifi/model/mac-low.cc b/src/wifi/model/mac-low.cc index 464ed44db..9c3733673 100644 --- a/src/wifi/model/mac-low.cc +++ b/src/wifi/model/mac-low.cc @@ -542,7 +542,7 @@ MacLow::StartTransmission (Ptr mpdu, Ptr 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; diff --git a/src/wifi/model/mpdu-aggregator.h b/src/wifi/model/mpdu-aggregator.h index fd18697fb..a7d481961 100644 --- a/src/wifi/model/mpdu-aggregator.h +++ b/src/wifi/model/mpdu-aggregator.h @@ -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> GetNextAmpdu (Ptr 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. diff --git a/src/wifi/model/msdu-aggregator.h b/src/wifi/model/msdu-aggregator.h index e55a8957c..bb8a88e6d 100644 --- a/src/wifi/model/msdu-aggregator.h +++ b/src/wifi/model/msdu-aggregator.h @@ -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 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 diff --git a/src/wifi/model/qos-txop.cc b/src/wifi/model/qos-txop.cc index 98c55665f..65890408c 100644 --- a/src/wifi/model/qos-txop.cc +++ b/src/wifi/model/qos-txop.cc @@ -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); diff --git a/src/wifi/model/qos-txop.h b/src/wifi/model/qos-txop.h index 4ff491142..b2a1a119e 100644 --- a/src/wifi/model/qos-txop.h +++ b/src/wifi/model/qos-txop.h @@ -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 aggregate is true and assign a sequence number to the @@ -441,7 +441,7 @@ public: */ Ptr DequeuePeekedFrame (Ptr 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