wifi: Do not switch main PHY if aux PHY CCA is not used and switch back delay < PIFS
This commit is contained in:
@@ -640,7 +640,14 @@ AdvancedEmlsrManager::RequestMainPhyToSwitch(uint8_t linkId, AcIndex aci, const
|
||||
GetChannelForMainPhy(linkId).GetTotalWidth()))
|
||||
{
|
||||
// cannot use aux PHY CCA
|
||||
minDelay += GetStaMac()->GetWifiPhy(linkId)->GetPifs();
|
||||
const auto pifs = GetStaMac()->GetWifiPhy(linkId)->GetPifs();
|
||||
if (m_switchMainPhyBackDelay < pifs)
|
||||
{
|
||||
NS_LOG_DEBUG(
|
||||
"Main PHY has to perform CCA but switch main PHY back delay is less than PIFS");
|
||||
return false;
|
||||
}
|
||||
minDelay += pifs;
|
||||
}
|
||||
minDelay = std::max(delay, minDelay);
|
||||
|
||||
|
||||
@@ -2732,8 +2732,9 @@ EmlsrUlTxopTest::DoSetup()
|
||||
UintegerValue(m_auxPhyChannelWidth));
|
||||
Config::SetDefault("ns3::DefaultEmlsrManager::SwitchAuxPhy", BooleanValue(false));
|
||||
Config::SetDefault("ns3::AdvancedEmlsrManager::UseAuxPhyCca", BooleanValue(m_useAuxPhyCca));
|
||||
// switch main PHY back delay should be at least a PIFS for the switch to occur
|
||||
Config::SetDefault("ns3::AdvancedEmlsrManager::SwitchMainPhyBackDelay",
|
||||
TimeValue(MilliSeconds(m_switchMainPhyBackDelayTimeout ? 2 : 0)));
|
||||
TimeValue(MicroSeconds(m_switchMainPhyBackDelayTimeout ? 2000 : 30)));
|
||||
Config::SetDefault("ns3::EhtConfiguration::MediumSyncDuration",
|
||||
TimeValue(m_mediumSyncDuration));
|
||||
Config::SetDefault("ns3::EhtConfiguration::MsdMaxNTxops", UintegerValue(m_msdMaxNTxops));
|
||||
|
||||
Reference in New Issue
Block a user