From d220d8aa299d82ff6158f36c568affed8a2aa39f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Sun, 2 Oct 2016 04:38:54 +0200 Subject: [PATCH] wifi: (fixes #2514) Fix maximum transmission time for VHT A-MPDUs --- RELEASE_NOTES | 1 + src/wifi/model/mac-low.cc | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index d141cc418..838042172 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -126,6 +126,7 @@ Bugs fixed - Bug 2500 - Ipv[4,6]RawSocket ignores IpTtl tag - Bug 2507 - ConfigStore RawTextConfigLoad doesn't reset stream error state - Bug 2508 - Duplicate of bug 2507 +- Bug 2514 - The maximum transmission time for VHT A-MPDUs is not correct - No BugId - Arp logging: label with request or reply properly Known issues diff --git a/src/wifi/model/mac-low.cc b/src/wifi/model/mac-low.cc index 4a6c37b0c..e80c37f1b 100644 --- a/src/wifi/model/mac-low.cc +++ b/src/wifi/model/mac-low.cc @@ -2914,6 +2914,7 @@ MacLow::StopMpduAggregation (Ptr peekedPacket, WifiMacHeader peeke } WifiPreamble preamble; + Time aPPDUMaxTime = MilliSeconds (10); uint8_t tid = GetTid (peekedPacket, peekedHdr); AcIndex ac = QosUtilsMapTidToAc (tid); @@ -2922,6 +2923,7 @@ MacLow::StopMpduAggregation (Ptr peekedPacket, WifiMacHeader peeke if (m_currentTxVector.GetMode ().GetModulationClass () == WIFI_MOD_CLASS_VHT) { preamble = WIFI_PREAMBLE_VHT; + aPPDUMaxTime = MicroSeconds (5484); } else if (m_phy->GetGreenfield () && m_stationManager->GetGreenfieldSupported (m_currentHdr.GetAddr1 ())) { @@ -2940,8 +2942,8 @@ MacLow::StopMpduAggregation (Ptr peekedPacket, WifiMacHeader peeke preamble = WIFI_PREAMBLE_LONG; } - //An HT STA shall not transmit a PPDU that has a duration that is greater than aPPDUMaxTime (10 milliseconds) - if (m_phy->CalculateTxDuration (aggregatedPacket->GetSize () + peekedPacket->GetSize () + peekedHdr.GetSize () + WIFI_MAC_FCS_LENGTH, m_currentTxVector, preamble, m_phy->GetFrequency ()) > MilliSeconds (10)) + //A STA shall not transmit a PPDU that has a duration that is greater than aPPDUMaxTime + if (m_phy->CalculateTxDuration (aggregatedPacket->GetSize () + peekedPacket->GetSize () + peekedHdr.GetSize () + WIFI_MAC_FCS_LENGTH, m_currentTxVector, preamble, m_phy->GetFrequency ()) > aPPDUMaxTime) { NS_LOG_DEBUG ("no more packets can be aggregated to satisfy PPDU <= aPPDUMaxTime"); return true;