wifi: Allow EMLSR Manager to be installed on 11be SLDs with EMLSR activated

This commit is contained in:
Stefano Avallone
2024-11-07 08:37:04 +01:00
parent a50d1fd1a1
commit d83a7313a6
2 changed files with 7 additions and 6 deletions

View File

@@ -149,11 +149,11 @@ WifiMacHelper::Create(Ptr<WifiNetDevice> 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<EmlsrManager>();
staMac->SetEmlsrManager(emlsrManager);

View File

@@ -184,7 +184,8 @@ EmlsrManager::SetWifiMac(Ptr<StaWifiMac> 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");