From 2652be78ca6ef5cef7b3b15d8b6ce172aeb6d86d Mon Sep 17 00:00:00 2001 From: Stefano Avallone Date: Fri, 24 Nov 2023 14:29:01 +0100 Subject: [PATCH] wifi: Request channel access on links blocked for a temporary reason --- src/wifi/model/txop.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/wifi/model/txop.cc b/src/wifi/model/txop.cc index a9c0e9631..653e922ec 100644 --- a/src/wifi/model/txop.cc +++ b/src/wifi/model/txop.cc @@ -531,8 +531,14 @@ void Txop::Queue(Ptr mpdu) { NS_LOG_FUNCTION(this << *mpdu); - auto linkIds = m_mac->GetMacQueueScheduler()->GetLinkIds(m_queue->GetAc(), mpdu); - std::map hasFramesToTransmit; + + // channel access can be requested on a blocked link, if the reason for blocking the link + // is temporary + auto linkIds = m_mac->GetMacQueueScheduler()->GetLinkIds( + m_queue->GetAc(), + mpdu, + {WifiQueueBlockedReason::USING_OTHER_EMLSR_LINK, + WifiQueueBlockedReason::WAITING_EMLSR_TRANSITION_DELAY}); // ignore the links for which a channel access request event is already running for (auto it = linkIds.begin(); it != linkIds.end();) @@ -549,6 +555,7 @@ Txop::Queue(Ptr mpdu) // save the status of the AC queues before enqueuing the MPDU (required to determine if // backoff is needed) + std::map hasFramesToTransmit; for (const auto linkId : linkIds) { hasFramesToTransmit[linkId] = HasFramesToTransmit(linkId);