From b7ed40cbcf7655e8a5e17e93b0b5e70b4ebac203 Mon Sep 17 00:00:00 2001 From: Stefano Avallone Date: Tue, 11 Jun 2024 11:57:12 +0200 Subject: [PATCH] wifi: When starting UL TXOP on a link, EMLSR client gets unprotected on other links Helps handle cross-link collisions --- src/wifi/model/eht/eht-frame-exchange-manager.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/wifi/model/eht/eht-frame-exchange-manager.cc b/src/wifi/model/eht/eht-frame-exchange-manager.cc index 7e8953159..052d38198 100644 --- a/src/wifi/model/eht/eht-frame-exchange-manager.cc +++ b/src/wifi/model/eht/eht-frame-exchange-manager.cc @@ -1316,6 +1316,19 @@ EhtFrameExchangeManager::CheckEmlsrClientStartingTxop(const WifiMacHeader& hdr, m_mac->BlockUnicastTxOnLinks(WifiQueueBlockedReason::USING_OTHER_EMLSR_LINK, *mldAddress, {linkId}); + + // the AP MLD may have sent an ICF to the EMLSR client on this link while the EMLSR + // client was starting a TXOP on another link. To be safe, besides blocking + // transmissions, remove the EMLSR client from the protected stations on this link + auto linkAddr = + m_mac->GetWifiRemoteStationManager(linkId)->GetAffiliatedStaAddress(*mldAddress); + NS_ASSERT(linkAddr.has_value()); + auto ehtFem = + StaticCast(m_mac->GetFrameExchangeManager(linkId)); + NS_LOG_DEBUG("Remove " << *linkAddr << " from protected STAs"); + ehtFem->m_protectedStas.erase(*linkAddr); + ehtFem->m_sentRtsTo.erase(*linkAddr); + ehtFem->m_sentFrameTo.erase(*linkAddr); } }