From 173af90fddb81ed00dc4df681a2c994e025f84af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Sun, 12 Feb 2023 14:39:20 +0100 Subject: [PATCH] wifi: Abort ongoing reception upon channel switching --- src/wifi/model/wifi-phy.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/wifi/model/wifi-phy.cc b/src/wifi/model/wifi-phy.cc index 64a7a8caa..2f188f0bc 100644 --- a/src/wifi/model/wifi-phy.cc +++ b/src/wifi/model/wifi-phy.cc @@ -1139,11 +1139,7 @@ WifiPhy::GetDelayUntilChannelSwitch() { case WifiPhyState::RX: NS_LOG_DEBUG("drop packet because of channel switching while reception"); - m_endPhyRxEvent.Cancel(); - for (auto& phyEntity : m_phyEntities) - { - phyEntity.second->CancelAllEvents(); - } + AbortCurrentReception(CHANNEL_SWITCHING); break; case WifiPhyState::TX: NS_LOG_DEBUG("channel switching postponed until end of current transmission");