diff --git a/src/wifi/model/wifi-phy.cc b/src/wifi/model/wifi-phy.cc index d034b29fe..bc3850b59 100644 --- a/src/wifi/model/wifi-phy.cc +++ b/src/wifi/model/wifi-phy.cc @@ -631,7 +631,7 @@ Ptr WifiPhy::GetPhyEntity (WifiModulationClass modulation) const { const auto it = m_phyEntities.find (modulation); - NS_ABORT_MSG_IF (it == m_phyEntities.end (), "Unsupported Wi-Fi modulation class"); + NS_ABORT_MSG_IF (it == m_phyEntities.end (), "Unsupported Wi-Fi modulation class " << modulation); return it->second; } @@ -891,6 +891,10 @@ WifiPhy::ConfigureStandard (WifiPhyStandard standard) return; } + // this function is called when changing PHY band, hence we have to delete + // the previous PHY entities + m_phyEntities.clear (); + switch (standard) { case WIFI_PHY_STANDARD_80211a: