From 4ca20707baba9750e4dc0373f8b63cd4525efc3d Mon Sep 17 00:00:00 2001 From: Stefano Avallone Date: Sun, 21 Jun 2020 22:51:58 +0200 Subject: [PATCH] wifi: Backoff is not needed if in sleep mode or off --- src/wifi/model/channel-access-manager.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/wifi/model/channel-access-manager.cc b/src/wifi/model/channel-access-manager.cc index 2592d6723..e8d3aed78 100644 --- a/src/wifi/model/channel-access-manager.cc +++ b/src/wifi/model/channel-access-manager.cc @@ -247,6 +247,12 @@ ChannelAccessManager::NeedBackoffUponAccess (Ptr txop) { NS_LOG_FUNCTION (this << txop); + // No backoff needed if in sleep mode or off + if (m_sleeping || m_off) + { + return false; + } + // the Txop might have a stale value of remaining backoff slots UpdateBackoff ();