From 76cff6af65db510f81e1b688a211f5ea9667dca6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Wed, 21 Feb 2024 19:50:12 +0100 Subject: [PATCH] wifi: Indicate ongoing reception is stopped to interference helper when PHY is reset --- src/wifi/model/wifi-phy.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/wifi/model/wifi-phy.cc b/src/wifi/model/wifi-phy.cc index 7323892a0..daef9f44f 100644 --- a/src/wifi/model/wifi-phy.cc +++ b/src/wifi/model/wifi-phy.cc @@ -413,8 +413,6 @@ WifiPhy::DoDispose() { NS_LOG_FUNCTION(this); - Reset(); - m_device = nullptr; m_mobility = nullptr; m_frameCaptureModel = nullptr; @@ -429,6 +427,9 @@ WifiPhy::DoDispose() m_random = nullptr; m_state = nullptr; + Reset(); + + // this should be done after calling the Reset function for (auto& phyEntity : m_phyEntities) { phyEntity.second = nullptr; @@ -1879,6 +1880,10 @@ WifiPhy::Reset() { NS_LOG_FUNCTION(this); m_currentPreambleEvents.clear(); + if (m_currentEvent && m_interference) + { + m_interference->NotifyRxEnd(Simulator::Now(), GetCurrentFrequencyRange()); + } m_currentEvent = nullptr; for (auto& phyEntity : m_phyEntities) {