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
This commit is contained in:
Stefano Avallone
2024-09-02 15:49:31 +02:00
parent ea55edc384
commit f84ccacbd1

View File

@@ -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<Packet>();