wifi: Delete PHY entities before changing PHY band
This commit is contained in:
@@ -631,7 +631,7 @@ Ptr<PhyEntity>
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user