From 5caef0cd195758de25983a7ee90dc6bc52f55162 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Mon, 18 Apr 2016 18:59:52 +0300 Subject: [PATCH] wifi: (fixes #2376) Process case when new A-MPDU is received and some MPDUs are missing --- RELEASE_NOTES | 1 + src/wifi/model/yans-wifi-phy.cc | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index bdf94d67b..90cd0c30e 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -52,6 +52,7 @@ Bugs fixed - Bug 2352 - Add 'drop oldest' drop policy to WifiMacQueue - Bug 2353 - TCP Vegas implementation - Bug 2375 - Flowmonitor parse crashes when no pkt is received +- Bug 2376 - New A-MPDU might not be received if MPDUs of a previous A-MPDU are lost - Bug 2377 - SocketIpTosTag and SocketIpv6TclassTag may be added twice in UDP - Bug 2378 - A-MPDU variables are not correctly reset in YansWifiPhy when a PLCP preamble/header failed - Bug 2380 - EdcaTxopN fails to retrieve TID for ADDBA requests, ADDBA responses and DELBA frames diff --git a/src/wifi/model/yans-wifi-phy.cc b/src/wifi/model/yans-wifi-phy.cc index efa8d7d99..1d722ab2a 100644 --- a/src/wifi/model/yans-wifi-phy.cc +++ b/src/wifi/model/yans-wifi-phy.cc @@ -671,6 +671,11 @@ YansWifiPhy::StartReceivePreambleAndHeader (Ptr packet, m_mpdusNum--; } } + else if (preamble != WIFI_PREAMBLE_NONE && packet->PeekPacketTag (ampduTag) && m_mpdusNum > 0) + { + NS_LOG_DEBUG ("New A-MPDU started while " << m_mpdusNum << " MPDUs from previous are lost"); + m_mpdusNum = ampduTag.GetRemainingNbOfMpdus (); + } else if (preamble != WIFI_PREAMBLE_NONE && m_mpdusNum > 0 ) { NS_LOG_DEBUG ("Didn't receive the last MPDUs from an A-MPDU " << m_mpdusNum);