From a0b80af33d95e8c3751bbcd7def3fda43808d3f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Wed, 12 Jun 2024 20:12:34 +0200 Subject: [PATCH] wifi: No need to call SwitchMaybeToCcaBusy upon reception from a non-active PHY interface --- src/wifi/model/spectrum-wifi-phy.cc | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/wifi/model/spectrum-wifi-phy.cc b/src/wifi/model/spectrum-wifi-phy.cc index 0260c877a..242272659 100644 --- a/src/wifi/model/spectrum-wifi-phy.cc +++ b/src/wifi/model/spectrum-wifi-phy.cc @@ -564,6 +564,15 @@ SpectrumWifiPhy::StartRx(Ptr rxParams, m_signalCb(rxParams, senderNodeId, WToDbm(totalRxPowerW), rxDuration); } + if (m_trackSignalsInactiveInterfaces && interface && + (interface != m_currentSpectrumPhyInterface)) + { + NS_LOG_INFO("Received Wi-Fi signal from a non-active PHY interface " + << interface->GetFrequencyRange()); + m_interference->AddForeignSignal(rxDuration, rxPowerW, interface->GetFrequencyRange()); + return; + } + if (!wifiRxParams) { NS_LOG_INFO("Received non Wi-Fi signal"); @@ -584,16 +593,6 @@ SpectrumWifiPhy::StartRx(Ptr rxParams, return; } - if (m_trackSignalsInactiveInterfaces && interface && - (interface != m_currentSpectrumPhyInterface)) - { - NS_LOG_INFO("Received Wi-Fi signal from a non-active PHY interface " - << interface->GetFrequencyRange()); - m_interference->AddForeignSignal(rxDuration, rxPowerW, interface->GetFrequencyRange()); - SwitchMaybeToCcaBusy(nullptr); - return; - } - // Do no further processing if signal is too weak // Current implementation assumes constant RX power over the PPDU duration // Compare received TX power per MHz to normalized RX sensitivity