wifi: EMLSR client unblocks links in random order when TXOP ends
This commit is contained in:
committed by
Stefano Avallone
parent
38085b4cfd
commit
8c0bb0b2a3
@@ -461,14 +461,16 @@ EmlsrManager::NotifyTxopEnd(uint8_t linkId)
|
||||
|
||||
Simulator::ScheduleNow([=, this]() {
|
||||
// unblock transmissions and resume medium access on other EMLSR links
|
||||
std::set<uint8_t> linkIds;
|
||||
for (auto id : m_staMac->GetLinkIds())
|
||||
{
|
||||
if ((id != linkId) && m_staMac->IsEmlsrLink(id))
|
||||
{
|
||||
m_staMac->UnblockTxOnLink(id, WifiQueueBlockedReason::USING_OTHER_EMLSR_LINK);
|
||||
m_staMac->GetChannelAccessManager(id)->NotifyStopUsingOtherEmlsrLink();
|
||||
linkIds.insert(id);
|
||||
}
|
||||
}
|
||||
m_staMac->UnblockTxOnLink(linkIds, WifiQueueBlockedReason::USING_OTHER_EMLSR_LINK);
|
||||
|
||||
StartMediumSyncDelayTimer(linkId);
|
||||
});
|
||||
|
||||
@@ -1067,14 +1067,18 @@ StaWifiMac::BlockTxOnLink(uint8_t linkId, WifiQueueBlockedReason reason)
|
||||
}
|
||||
|
||||
void
|
||||
StaWifiMac::UnblockTxOnLink(uint8_t linkId, WifiQueueBlockedReason reason)
|
||||
StaWifiMac::UnblockTxOnLink(std::set<uint8_t> linkIds, WifiQueueBlockedReason reason)
|
||||
{
|
||||
NS_LOG_FUNCTION(this << linkId << reason);
|
||||
std::stringstream ss;
|
||||
std::copy(linkIds.cbegin(), linkIds.cend(), std::ostream_iterator<uint16_t>(ss, " "));
|
||||
NS_LOG_FUNCTION(this << ss.str() << reason);
|
||||
|
||||
auto bssid = GetBssid(linkId);
|
||||
auto apAddress = GetWifiRemoteStationManager(linkId)->GetMldAddress(bssid).value_or(bssid);
|
||||
const auto linkId = *linkIds.cbegin();
|
||||
const auto bssid = GetBssid(linkId);
|
||||
const auto apAddress =
|
||||
GetWifiRemoteStationManager(linkId)->GetMldAddress(bssid).value_or(bssid);
|
||||
|
||||
UnblockUnicastTxOnLinks(reason, apAddress, {linkId});
|
||||
UnblockUnicastTxOnLinks(reason, apAddress, linkIds);
|
||||
// the only type of broadcast frames that a non-AP STA can send are management frames
|
||||
for (const auto& [acIndex, ac] : wifiAcList)
|
||||
{
|
||||
@@ -1084,7 +1088,7 @@ StaWifiMac::UnblockTxOnLink(uint8_t linkId, WifiQueueBlockedReason reason)
|
||||
Mac48Address::GetBroadcast(),
|
||||
GetFrameExchangeManager(linkId)->GetAddress(),
|
||||
{},
|
||||
{linkId});
|
||||
linkIds);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -322,12 +322,12 @@ class StaWifiMac : public WifiMac
|
||||
void BlockTxOnLink(uint8_t linkId, WifiQueueBlockedReason reason);
|
||||
|
||||
/**
|
||||
* Unblock transmissions on the given link for the given reason.
|
||||
* Unblock transmissions on the given links for the given reason.
|
||||
*
|
||||
* \param linkId the ID of the given link
|
||||
* \param reason the reason for unblocking transmissions on the given link
|
||||
* \param linkIds the IDs of the given links
|
||||
* \param reason the reason for unblocking transmissions on the given links
|
||||
*/
|
||||
void UnblockTxOnLink(uint8_t linkId, WifiQueueBlockedReason reason);
|
||||
void UnblockTxOnLink(std::set<uint8_t> linkIds, WifiQueueBlockedReason reason);
|
||||
|
||||
protected:
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user