wifi: Decouple setup PHY/MAC and reset on remote station manager

This commit is contained in:
Stefano Avallone
2023-09-04 21:57:31 +02:00
committed by Stefano Avallone
parent b6b92f8cef
commit 2cff989b38
2 changed files with 4 additions and 6 deletions

View File

@@ -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

View File

@@ -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<WifiPhy> phy)
// transmit rate for automatic control responses like
// acknowledgments.
m_wifiPhy = phy;
Reset();
}
void
@@ -178,7 +179,6 @@ WifiRemoteStationManager::SetupMac(const Ptr<WifiMac> 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