From 334260023506e3ae28b1e6f03679df5991d49d9c Mon Sep 17 00:00:00 2001 From: Stefano Avallone Date: Fri, 28 Feb 2025 10:18:22 +0100 Subject: [PATCH] wifi: Ensure aux PHY max modulation class constraint is applied --- src/wifi/model/eht/emlsr-manager.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/wifi/model/eht/emlsr-manager.cc b/src/wifi/model/eht/emlsr-manager.cc index 70905cc6c..9d317721f 100644 --- a/src/wifi/model/eht/emlsr-manager.cc +++ b/src/wifi/model/eht/emlsr-manager.cc @@ -1314,14 +1314,18 @@ EmlsrManager::ApplyMaxChannelWidthAndModClassOnAuxPhys() auto auxPhy = m_staMac->GetWifiPhy(linkId); auto channel = GetChannelForAuxPhy(linkId); - if (linkId == currMainPhyLinkId || !m_staMac->IsEmlsrLink(linkId) || - auxPhy->GetOperatingChannel() == channel) + if (linkId == currMainPhyLinkId || !m_staMac->IsEmlsrLink(linkId)) { - continue; + continue; // main PHY link or not an EMLSR link } auxPhy->SetMaxModulationClassSupported(m_auxPhyMaxModClass); + if (auxPhy->GetOperatingChannel() == channel) + { + continue; + } + NS_LOG_DEBUG("Aux PHY (" << auxPhy << ") is about to switch to " << channel << " to operate on link " << +linkId); // We cannot simply set the new channel, because otherwise the MAC will disable