wifi: Use std::min to update m_endCcaBusy upon channel switching

This commit is contained in:
Sebastien Deronne
2022-04-23 11:53:03 +02:00
committed by Stefano Avallone
parent 38177f08b0
commit 719d4ff458

View File

@@ -445,11 +445,7 @@ WifiPhyStateHelper::SwitchToChannelSwitching (Time switchingDuration)
break;
}
if (now < m_endCcaBusy)
{
m_endCcaBusy = now;
}
m_endCcaBusy = std::min (now, m_endCcaBusy);
m_stateLogger (now, switchingDuration, WifiPhyState::SWITCHING);
m_previousStateChangeTime = now;
m_startSwitching = now;