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