diff --git a/src/wifi/model/wifi-mac.cc b/src/wifi/model/wifi-mac.cc index 9f9ae2bbf..0b3eea135 100644 --- a/src/wifi/model/wifi-mac.cc +++ b/src/wifi/model/wifi-mac.cc @@ -587,10 +587,8 @@ WifiMac::NotifyChannelSwitching(uint8_t linkId) // the PHY dependent parameters. In any case, this makes no harm ConfigurePhyDependentParameters(linkId); - // SetupPhy not only resets the remote station manager, but also sets the - // default TX mode and MCS, which is required when switching to a channel - // in a different band - GetLink(linkId).stationManager->SetupPhy(GetLink(linkId).phy); + // Reset remote station manager + GetLink(linkId).stationManager->Reset(); } void diff --git a/src/wifi/model/wifi-remote-station-manager.cc b/src/wifi/model/wifi-remote-station-manager.cc index cfaff297e..0e735e4a6 100644 --- a/src/wifi/model/wifi-remote-station-manager.cc +++ b/src/wifi/model/wifi-remote-station-manager.cc @@ -144,6 +144,8 @@ WifiRemoteStationManager::WifiRemoteStationManager() m_shortSlotTimeEnabled(false) { NS_LOG_FUNCTION(this); + m_ssrc.fill(0); + m_slrc.fill(0); } WifiRemoteStationManager::~WifiRemoteStationManager() @@ -168,7 +170,6 @@ WifiRemoteStationManager::SetupPhy(const Ptr phy) // transmit rate for automatic control responses like // acknowledgments. m_wifiPhy = phy; - Reset(); } void @@ -178,7 +179,6 @@ WifiRemoteStationManager::SetupMac(const Ptr mac) // We need to track our MAC because it is the object that knows the // full set of interframe spaces. m_wifiMac = mac; - Reset(); } int64_t