wifi: Add a method to reset the backoff of all ACs

This commit is contained in:
Stefano Avallone
2023-11-20 21:33:13 +01:00
committed by Stefano Avallone
parent 86433f06c7
commit 70df57ab90
2 changed files with 17 additions and 0 deletions

View File

@@ -995,6 +995,18 @@ ChannelAccessManager::ResetBackoff(Ptr<Txop> txop)
txop->GetLink(m_linkId).access = Txop::NOT_REQUESTED;
}
void
ChannelAccessManager::ResetAllBackoffs()
{
NS_LOG_FUNCTION(this);
for (const auto& txop : m_txops)
{
ResetBackoff(txop);
}
m_accessTimeout.Cancel();
}
void
ChannelAccessManager::NotifySleepNow()
{

View File

@@ -329,6 +329,11 @@ class ChannelAccessManager : public Object
*/
void ResetBackoff(Ptr<Txop> txop);
/**
* Reset the backoff for all the DCF/EDCAF. Additionally, cancel the access timeout event.
*/
void ResetAllBackoffs();
/**
* Notify that the given PHY is about to switch to the given operating channel, which is
* used by the given link. This notification is sent by the EMLSR Manager when a PHY object