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");