diff --git a/src/wifi/model/channel-access-manager.cc b/src/wifi/model/channel-access-manager.cc index f5590886f..2aab6b7d5 100644 --- a/src/wifi/model/channel-access-manager.cc +++ b/src/wifi/model/channel-access-manager.cc @@ -1268,16 +1268,11 @@ void ChannelAccessManager::NotifyOffNow() { NS_LOG_FUNCTION(this); - // Cancel timeout - if (m_accessTimeout.IsPending()) - { - m_accessTimeout.Cancel(); - } - // Reset backoffs + ResetAllBackoffs(); for (auto txop : m_txops) { - txop->NotifyOff(); + txop->NotifyOff(m_linkId); } } diff --git a/src/wifi/model/txop.cc b/src/wifi/model/txop.cc index aae7452fd..9518a5731 100644 --- a/src/wifi/model/txop.cc +++ b/src/wifi/model/txop.cc @@ -810,9 +810,9 @@ Txop::NotifySleep(uint8_t linkId) } void -Txop::NotifyOff() +Txop::NotifyOff(uint8_t linkId) { - NS_LOG_FUNCTION(this); + NS_LOG_FUNCTION(this << linkId); } void diff --git a/src/wifi/model/txop.h b/src/wifi/model/txop.h index fde9d6f93..471a12107 100644 --- a/src/wifi/model/txop.h +++ b/src/wifi/model/txop.h @@ -330,9 +330,11 @@ class Txop : public Object */ virtual void NotifySleep(uint8_t linkId); /** - * When off operation occurs, the queue gets cleaned up. + * Notify that the given link is switched off. + * + * @param linkId the ID of the given link */ - virtual void NotifyOff(); + virtual void NotifyOff(uint8_t linkId); /** * When wake up operation occurs on a link, channel access on that link * will be restarted.