wifi: Cleanup WifiPhy::GetDelayUntilChannelSwitch

This commit is contained in:
Sébastien Deronne
2023-11-12 16:01:02 +01:00
committed by Sébastien Deronne
parent 06ae0752eb
commit db5a727804

View File

@@ -1131,10 +1131,6 @@ WifiPhy::SetOperatingChannel(const ChannelTuple& channelTuple)
Time
WifiPhy::GetDelayUntilChannelSwitch()
{
m_powerRestricted = false;
m_channelAccessRequested = false;
m_currentEvent = nullptr;
m_currentPreambleEvents.clear();
if (!IsInitialized())
{
// this is not channel switch, this is initialization
@@ -1176,6 +1172,9 @@ WifiPhy::DoChannelSwitch()
{
NS_LOG_FUNCTION(this);
m_powerRestricted = false;
m_channelAccessRequested = false;
// Update unspecified parameters with default values
{
auto& [number, width, band, primary20] = m_channelSettings;