diff --git a/src/wifi/helper/wifi-mac-helper.cc b/src/wifi/helper/wifi-mac-helper.cc index 4f81f5b92..da6648ba8 100644 --- a/src/wifi/helper/wifi-mac-helper.cc +++ b/src/wifi/helper/wifi-mac-helper.cc @@ -149,11 +149,11 @@ WifiMacHelper::Create(Ptr device, WifiStandard standard) const staMac->SetAssocManager(assocManager); } - // create and install the EMLSR Manager if this is an EHT non-AP MLD with EMLSR activated - if (BooleanValue emlsrActivated; - standard >= WIFI_STANDARD_80211be && staMac && staMac->GetNLinks() > 1 && - device->GetEhtConfiguration()->GetAttributeFailSafe("EmlsrActivated", emlsrActivated) && - emlsrActivated.Get()) + // create and install the EMLSR Manager if this is an EHT non-AP device with EMLSR activated + // and association type set to ML setup + if (standard >= WIFI_STANDARD_80211be && staMac && + device->GetEhtConfiguration()->m_emlsrActivated && + staMac->GetAssocType() == WifiAssocType::ML_SETUP) { auto emlsrManager = m_emlsrManager.Create(); staMac->SetEmlsrManager(emlsrManager); diff --git a/src/wifi/model/eht/emlsr-manager.cc b/src/wifi/model/eht/emlsr-manager.cc index b27a97f3c..efcb951f4 100644 --- a/src/wifi/model/eht/emlsr-manager.cc +++ b/src/wifi/model/eht/emlsr-manager.cc @@ -184,7 +184,8 @@ EmlsrManager::SetWifiMac(Ptr mac) m_staMac = mac; NS_ABORT_MSG_IF(!m_staMac->GetEhtConfiguration(), "EmlsrManager requires EHT support"); - NS_ABORT_MSG_IF(m_staMac->GetNLinks() <= 1, "EmlsrManager can only be installed on MLDs"); + NS_ABORT_MSG_IF(!m_staMac->GetEhtConfiguration()->m_emlsrActivated, + "EmlsrManager requires EMLSR to be activated"); NS_ABORT_MSG_IF(m_staMac->GetTypeOfStation() != STA, "EmlsrManager can only be installed on non-AP MLDs");