diff --git a/src/wifi/model/ht/ht-frame-exchange-manager.cc b/src/wifi/model/ht/ht-frame-exchange-manager.cc index b3e7b8882..38f68f913 100644 --- a/src/wifi/model/ht/ht-frame-exchange-manager.cc +++ b/src/wifi/model/ht/ht-frame-exchange-manager.cc @@ -239,10 +239,12 @@ HtFrameExchangeManager::SendAddBaResponse (const MgtAddBaRequestHeader *reqHdr, CreateBlockAckAgreement (&respHdr, originator, reqHdr->GetStartingSequence ()); + auto mpdu = Create (packet, hdr); + //It is unclear which queue this frame should go into. For now we //bung it into the queue corresponding to the TID for which we are //establishing an agreement, and push it to the head. - m_mac->GetQosTxop (reqHdr->GetTid ())->PushFront (packet, hdr); + m_mac->GetQosTxop (reqHdr->GetTid ())->PushFront (mpdu); } uint16_t diff --git a/src/wifi/model/qos-txop.cc b/src/wifi/model/qos-txop.cc index 7e22e5c1c..611531893 100644 --- a/src/wifi/model/qos-txop.cc +++ b/src/wifi/model/qos-txop.cc @@ -579,11 +579,10 @@ QosTxop::GetRemainingTxop (uint8_t linkId) const } void -QosTxop::PushFront (Ptr packet, const WifiMacHeader &hdr) +QosTxop::PushFront (Ptr mpdu) { - NS_LOG_FUNCTION (this << packet << &hdr); - WifiMacTrailer fcs; - Ptr mpdu = Create (packet, hdr); + NS_LOG_FUNCTION (this << *mpdu); + if (!m_queue->PushFront (mpdu)) { NS_LOG_DEBUG ("Queue is full, replace the oldest frame with the ADDBA Request frame"); diff --git a/src/wifi/model/qos-txop.h b/src/wifi/model/qos-txop.h index d76029278..4d197cd23 100644 --- a/src/wifi/model/qos-txop.h +++ b/src/wifi/model/qos-txop.h @@ -212,13 +212,12 @@ public: void ResetBa (Mac48Address recipient, uint8_t tid); /** - * \param packet packet to send. - * \param hdr header of packet to send. + * \param mpdu the given MPDU * - * Store the packet in the front of the internal queue until it + * Store the given MPDU in the front of the internal queue until it * can be sent safely. */ - void PushFront (Ptr packet, const WifiMacHeader &hdr); + void PushFront (Ptr mpdu); /** * Set threshold for block ack mechanism. If number of packets in the