From d1a8ff95054b6f8a0eb651efaa340f3a6e9fb4cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Sun, 11 Oct 2015 08:30:07 +0200 Subject: [PATCH] fix issues with Block Ack Requests in A-MPDUs --- src/wifi/model/mac-low.cc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/wifi/model/mac-low.cc b/src/wifi/model/mac-low.cc index f29db32fc..376065e34 100644 --- a/src/wifi/model/mac-low.cc +++ b/src/wifi/model/mac-low.cc @@ -761,7 +761,7 @@ MacLow::StartTransmission (Ptr packet, { m_txParams.EnableCompressedBlockAck (); } - else + else if (m_currentHdr.IsQosData ()) { //VHT single MPDUs are followed by normal ACKs m_txParams.EnableAck (); @@ -779,7 +779,7 @@ MacLow::StartTransmission (Ptr packet, { m_txParams.EnableCompressedBlockAck (); } - else + else if (m_currentHdr.IsQosData ()) { //VHT single MPDUs are followed by normal ACKs m_txParams.EnableAck (); @@ -1644,7 +1644,14 @@ MacLow::ForwardDown (Ptr packet, const WifiMacHeader* hdr, } m_mpduAggregator->AddHeaderAndPad (newPacket, last, vhtSingleMpdu); - ampdutag.SetNoOfMpdus (queueSize); + if (hdr->IsBlockAckReq ()) + { + ampdutag.SetNoOfMpdus (queueSize - 1); + } + else + { + ampdutag.SetNoOfMpdus (queueSize); + } newPacket->AddPacketTag (ampdutag); if (delay == Seconds (0)) { @@ -1847,7 +1854,7 @@ MacLow::SendRtsForPacket (void) WifiMacTrailer fcs; packet->AddTrailer (fcs); - ForwardDown (packet, &rts, rtsTxVector,preamble); + ForwardDown (packet, &rts, rtsTxVector, preamble); } void