From e2bf5b3a9c4040b77f7148268879460359cf2dfb Mon Sep 17 00:00:00 2001 From: Stefano Avallone Date: Thu, 7 Mar 2024 22:48:38 +0100 Subject: [PATCH] wifi: CAM ResetState() should not cancel access timeout Otherwise, access timeout is cancelled when a CTS timeout occurs after that an aux PHY has sent the RTS and while the main PHY is switching to the aux PHY's link. --- src/wifi/model/channel-access-manager.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/wifi/model/channel-access-manager.cc b/src/wifi/model/channel-access-manager.cc index 061ed85fd..f575e5b74 100644 --- a/src/wifi/model/channel-access-manager.cc +++ b/src/wifi/model/channel-access-manager.cc @@ -958,6 +958,12 @@ ChannelAccessManager::NotifySwitchingStartNow(PhyListener* phyListener, Time dur ResetState(); + // Cancel timeout + if (m_accessTimeout.IsPending()) + { + m_accessTimeout.Cancel(); + } + // Reset backoffs for (const auto& txop : m_txops) { @@ -985,12 +991,6 @@ ChannelAccessManager::ResetState() m_lastCtsTimeoutEnd = std::min(m_lastCtsTimeoutEnd, now); InitLastBusyStructs(); - - // Cancel timeout - if (m_accessTimeout.IsPending()) - { - m_accessTimeout.Cancel(); - } } void