wifi: Abort ongoing reception upon channel switching

This commit is contained in:
Sébastien Deronne
2023-02-12 14:39:20 +01:00
committed by Sébastien Deronne
parent 69ee39d063
commit 173af90fdd

View File

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