diff --git a/src/devices/wifi/edca-txop-n.cc b/src/devices/wifi/edca-txop-n.cc index ebd4bdf92..5abc900bd 100644 --- a/src/devices/wifi/edca-txop-n.cc +++ b/src/devices/wifi/edca-txop-n.cc @@ -33,7 +33,6 @@ #include "msdu-aggregator.h" #include "mgt-headers.h" #include "qos-blocked-destinations.h" -#include "block-ack-manager.h" NS_LOG_COMPONENT_DEFINE ("EdcaTxopN"); @@ -320,10 +319,9 @@ EdcaTxopN::NotifyAccessGranted (void) NS_LOG_DEBUG ("queue is empty"); return; } - struct Bar bar; - if (m_baManager->HasBar (bar)) + if (m_baManager->HasBar (m_currentBar)) { - SendBlockAckRequest (bar); + SendBlockAckRequest (m_currentBar); return; } /* check if packets need retransmission are stored in BlockAckManager */ @@ -378,6 +376,10 @@ EdcaTxopN::NotifyAccessGranted (void) StartAccessIfNeeded (); NS_LOG_DEBUG ("tx broadcast"); } + else if (m_currentHdr.GetType() == WIFI_MAC_CTL_BACKREQ) + { + SendBlockAckRequest (m_currentBar); + } else { if (m_currentHdr.IsQosData () && m_currentHdr.IsQosBlockAck ()) diff --git a/src/devices/wifi/edca-txop-n.h b/src/devices/wifi/edca-txop-n.h index eca09604f..a58631387 100644 --- a/src/devices/wifi/edca-txop-n.h +++ b/src/devices/wifi/edca-txop-n.h @@ -32,6 +32,7 @@ #include "qos-utils.h" #include "dcf.h" #include "ctrl-headers.h" +#include "block-ack-manager.h" #include #include @@ -221,6 +222,7 @@ private: enum BlockAckType m_blockAckType; Time m_currentPacketTimestamp; uint16_t m_blockAckInactivityTimeout; + struct Bar m_currentBar; }; } //namespace ns3