wifi: Ensure aux PHY max modulation class constraint is applied

This commit is contained in:
Stefano Avallone
2025-02-28 10:18:22 +01:00
parent 7d6b267751
commit 3342600235

View File

@@ -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