wifi: Fix rate used to send BlockAckReq frames

Fixes a regression introduced with 1a8b3718
This commit is contained in:
Stefano Avallone
2024-01-31 14:27:05 +01:00
committed by Stefano Avallone
parent 87bb7d7615
commit 17954bc114
3 changed files with 11 additions and 0 deletions

View File

@@ -41,6 +41,7 @@ Release 3-dev
- (wifi) - Stop A-MSDU aggregation when an A-MSDU is found in the queue
- (lr-wpan) !1769 - `DoDispose` SIGSEGV and beacon fixes
- (wifi) - ReportAmpduTxStatus called twice when sending explicit BAR upon missed BlockAck
- (wifi) - Fix regression causing BlockAckReq frames to be sent with data rates instead of control rates
Release 3.40
------------

View File

@@ -25,6 +25,7 @@
#include "ns3/ipv4-address-helper.h"
#include "ns3/log.h"
#include "ns3/mobility-helper.h"
#include "ns3/rng-seed-manager.h"
#include "ns3/ssid.h"
#include "ns3/string.h"
#include "ns3/udp-client-server-helper.h"
@@ -64,6 +65,9 @@ main(int argc, char* argv[])
double minExpectedThroughput = 0;
double maxExpectedThroughput = 0;
RngSeedManager::SetSeed(1);
RngSeedManager::SetRun(5);
CommandLine cmd(__FILE__);
cmd.AddValue("nMpdus", "Number of aggregated MPDUs", nMpdus);
cmd.AddValue("payloadSize", "Payload size in bytes", payloadSize);

View File

@@ -570,6 +570,12 @@ HtFrameExchangeManager::SendMpduFromBaManager(Ptr<WifiMpdu> mpdu,
return false;
}
NS_ABORT_IF(txParams.m_acknowledgment->method != WifiAcknowledgment::BLOCK_ACK);
// the BlockAckReq frame is sent using the same TXVECTOR as the BlockAck frame
auto blockAcknowledgment = static_cast<WifiBlockAck*>(txParams.m_acknowledgment.get());
txParams.m_txVector = blockAcknowledgment->blockAckTxVector;
// we can transmit the BlockAckReq frame
SendPsduWithProtection(GetWifiPsdu(mpdu, txParams.m_txVector), txParams);
return true;