Bugzilla – Bug 2757
802.11n/ac/ax maximum TXOP is not properly enforced
Last modified: 2017-06-26 16:54:39 UTC
Many sources cite 5.424ms as the maximum TXOP duration for 11n/ac; e.g.: http://chimera.labs.oreilly.com/books/1234000001739/ch03.html#section-mac-agg This is about 36000 bytes at 54 Mb/s rate, and 4407 bytes at 6.5 Mb/s rate. However, I am observing 8ms AMPDU durations when running 'wifi-aggregation' example with this simple patch: diff -r 98ce80ed995f src/wifi/model/mac-low.cc --- a/src/wifi/model/mac-low.cc Fri Jun 02 17:13:54 2017 -0700 +++ b/src/wifi/model/mac-low.cc Sat Jun 03 11:16:27 2017 -0700 @@ -1524,6 +1524,7 @@ ampdutag.SetAmpdu (true); Time delay = Seconds (0); Time remainingAmpduDuration = m_phy->CalculateTxDuration (packet->GetSize (), txVector, m_phy->GetFrequency ()); + std::cout << "Remaining " << remainingAmpduDuration.GetSeconds () << std::endl; if (queueSize > 1 || singleMpdu) { txVector.SetAggregation (true); The enforcement is done in MacLow::StopMpduAggregation: if (m_currentTxVector.GetMode ().GetModulationClass () == WIFI_MOD_CLASS_VHT) { aPPDUMaxTime = MicroSeconds (5484); } but the test condition appears to be wrong (limited to VHT).
Tom, you forgot to mention you also need to set the standard to 802.11ac: - wifi.SetStandard (WIFI_PHY_STANDARD_80211n_5GHZ); + wifi.SetStandard (WIFI_PHY_STANDARD_80211ac); I checked and indeed the condition should become: - if (m_currentTxVector.GetMode ().GetModulationClass () == WIFI_MOD_CLASS_VHT) + if (m_stationManager->HasVhtSupported ()) { aPPDUMaxTime = MicroSeconds (5484); } With this change I do not go over 5.484ms. If fine for you, I will push the patch.
I also see you mention 802.11n in the description, this is only for 802.11ac IMO. Please confirm :-)
I think that 11n should be also included. Based on IEEE-802.11ac (Table 8-13c) maximum aPPDUMaxTime duration for 11n/ac is 5484 microseconds, except if Greenfield for 11n is supported. In that case aPPDUMaxTime is 10000 microseconds. So, I guess it should be something like: - Time aPPDUMaxTime = MilliSeconds (10); + Time aPPDUMaxTime = MicroSeconds (5484); + if(m_phy->GetGreenfield ()) + aPPDUMaxTime = MilliSeconds(10); // 10 Milliseconds only for GF (IEEE-802.11ac (Table 8-13c))
(In reply to Ioannis from comment #3) > I think that 11n should be also included. Based on IEEE-802.11ac (Table > 8-13c) > maximum aPPDUMaxTime duration for 11n/ac is 5484 microseconds, except if > Greenfield for 11n is supported. In that case aPPDUMaxTime is 10000 > microseconds. > > So, I guess it should be something like: > > - Time aPPDUMaxTime = MilliSeconds (10); > + Time aPPDUMaxTime = MicroSeconds (5484); > > + if(m_phy->GetGreenfield ()) > + aPPDUMaxTime = MilliSeconds(10); // 10 Milliseconds only for GF > (IEEE-802.11ac (Table 8-13c)) I agree with Ioannis that 11n should be included. My only small suggestion is to change MilliSeconds (10) to MicroSeconds (10000), for future searchability of this value.
OK, I had missed the 802.11n case in the provided link, I agree with the changes and I will prepare a final patch. Any idea what it should be for 802.11ax?
(In reply to sebastien.deronne from comment #5) > OK, I had missed the 802.11n case in the provided link, I agree with the > changes and I will prepare a final patch. Any idea what it should be for > 802.11ax? Based on the latest draft, 11ax will use the same value as 11ac (5484 Microseconds)
Created attachment 2872 [details] patch Here is the final patch, I will push it soon so that it can be part of the next release.
(In reply to sebastien.deronne from comment #7) > Created attachment 2872 [details] > patch > > Here is the final patch, I will push it soon so that it can be part of the > next release. Works for me.
fixed in changeset 12943:05b8f847754d