From f84ccacbd1f671d28730fd1ddb53b48450b52fd6 Mon Sep 17 00:00:00 2001 From: Stefano Avallone Date: Mon, 2 Sep 2024 15:49:31 +0200 Subject: [PATCH] wifi: Check if data can be sent on a link before creating a BAR for that link ...when checking if we can send a BAR to a recipient to which a BAR can only be sent if there exist data qeueud --- src/wifi/model/ht/ht-frame-exchange-manager.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/wifi/model/ht/ht-frame-exchange-manager.cc b/src/wifi/model/ht/ht-frame-exchange-manager.cc index 98925e145..739ade5e1 100644 --- a/src/wifi/model/ht/ht-frame-exchange-manager.cc +++ b/src/wifi/model/ht/ht-frame-exchange-manager.cc @@ -520,7 +520,14 @@ HtFrameExchangeManager::GetBar(AcIndex ac, auto baManager = m_mac->GetQosTxop(ac)->GetBaManager(); for (const auto& [recipient, tid] : baManager->GetSendBarIfDataQueuedList()) { - if (queue->PeekByTidAndAddress(tid, recipient)) + WifiContainerQueueId queueId( + WIFI_QOSDATA_QUEUE, + WIFI_UNICAST, + GetWifiRemoteStationManager()->GetMldAddress(recipient).value_or(recipient), + tid); + // check if data is queued and can be transmitted on this link + if (queue->PeekByTidAndAddress(tid, recipient) && + !m_mac->GetTxBlockedOnLink(QosUtilsMapTidToAc(tid), queueId, m_linkId)) { auto [reqHdr, hdr] = m_mac->GetQosTxop(ac)->PrepareBlockAckRequest(recipient, tid); auto pkt = Create();