wifi: ML setup fails if the link on which AssocReq was received is not accepted by the AP MLD
This commit is contained in:
@@ -1773,8 +1773,7 @@ ApWifiMac::Receive(Ptr<const WifiMpdu> mpdu, uint8_t linkId)
|
||||
packet->PeekHeader(reassocReq);
|
||||
frame = reassocReq;
|
||||
}
|
||||
ReceiveAssocRequest(frame, from, linkId);
|
||||
if (GetNLinks() > 1)
|
||||
if (ReceiveAssocRequest(frame, from, linkId) && GetNLinks() > 1)
|
||||
{
|
||||
ParseReportedStaInfo(frame, from, linkId);
|
||||
}
|
||||
|
||||
@@ -1248,6 +1248,18 @@ StaWifiMac::ReceiveAssocResp(Ptr<const WifiMpdu> mpdu, uint8_t linkId)
|
||||
m_linkUp();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// If the link on which the (Re)Association Request frame was received cannot be
|
||||
// accepted by the AP MLD, the AP MLD shall treat the multi-link (re)setup as a
|
||||
// failure and shall not accept any requested links. If the link on which the
|
||||
// (Re)Association Request frame was received is accepted by the AP MLD, the
|
||||
// multi-link (re)setup is successful. (Sec. 35.3.5.1 of 802.11be D3.1)
|
||||
NS_LOG_DEBUG("association refused");
|
||||
SetState(REFUSED);
|
||||
StartScanning();
|
||||
return;
|
||||
}
|
||||
|
||||
// if this is an MLD, check if we can setup (other) links
|
||||
if (GetNLinks() > 1)
|
||||
@@ -1325,11 +1337,7 @@ StaWifiMac::ReceiveAssocResp(Ptr<const WifiMpdu> mpdu, uint8_t linkId)
|
||||
for (const auto& id : setupLinks)
|
||||
{
|
||||
GetLink(id).bssid = std::nullopt;
|
||||
// if at least one link was setup, disable the links that were not setup (if any)
|
||||
if (m_state == ASSOCIATED)
|
||||
{
|
||||
GetLink(id).phy->SetOffMode();
|
||||
}
|
||||
GetLink(id).phy->SetOffMode();
|
||||
}
|
||||
if (apMldAddress)
|
||||
{
|
||||
@@ -1338,15 +1346,6 @@ StaWifiMac::ReceiveAssocResp(Ptr<const WifiMpdu> mpdu, uint8_t linkId)
|
||||
}
|
||||
}
|
||||
|
||||
if (m_state == WAIT_ASSOC_RESP)
|
||||
{
|
||||
// if we didn't transition to ASSOCIATED, the request was refused
|
||||
NS_LOG_DEBUG("association refused");
|
||||
SetState(REFUSED);
|
||||
StartScanning();
|
||||
return;
|
||||
}
|
||||
|
||||
SetPmModeAfterAssociation(linkId);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user