wifi: Fix OR operation with m_incrRetryCountUnderBa

It should be outside of the second argument passed to
GetBaAgreementEstablishedAsOriginator(). Otherwise will likely return BA agreement
(or lack thereof) for the wrong tid and RSM attribute IncrementRetryCountUnderBa
 will not work properly.
This commit is contained in:
DavisRobertson1
2025-07-25 11:05:39 -07:00
committed by Stefano Avallone
parent 69dd55744f
commit 2c504d3a3c
2 changed files with 5 additions and 3 deletions

View File

@@ -1168,9 +1168,9 @@ WifiRemoteStationManager::DoIncrementRetryCountOnTxFailure(WifiRemoteStation* st
const auto& hdr = psdu->GetHeader(0);
if (hdr.IsMgt() || (hdr.IsData() && !hdr.IsQosData()) ||
(hdr.IsQosData() && (!m_wifiMac->GetBaAgreementEstablishedAsOriginator(
hdr.GetAddr1(),
hdr.GetQosTid() || m_incrRetryCountUnderBa))))
(hdr.IsQosData() &&
(!m_wifiMac->GetBaAgreementEstablishedAsOriginator(hdr.GetAddr1(), hdr.GetQosTid()) ||
m_incrRetryCountUnderBa)))
{
psdu->IncrementRetryCount();
}

View File

@@ -168,6 +168,8 @@ WifiTxStatsHelperTest::DoSetup()
void
WifiTxStatsHelperTest::DoRun()
{
Config::SetDefault("ns3::WifiRemoteStationManager::IncrementRetryCountUnderBa",
BooleanValue(true));
std::string dataMode;
std::string ackMode;
if (m_option == SINGLE_LINK_NON_QOS)