wifi: Aux PHY starts switching when main PHY completes switching

This commit is contained in:
Stefano Avallone
2024-03-04 13:28:43 +01:00
committed by Stefano Avallone
parent e2bf5b3a9c
commit ee4f63a54a
3 changed files with 15 additions and 6 deletions

View File

@@ -101,7 +101,17 @@ DefaultEmlsrManager::NotifyMainPhySwitch(uint8_t currLinkId, uint8_t nextLinkId,
{
// switch channel on Aux PHY so that it operates on the link on which the main PHY was
// operating
SwitchAuxPhy(nextLinkId, currLinkId);
auto auxPhy = GetStaMac()->GetWifiPhy(nextLinkId);
NS_LOG_DEBUG("Aux PHY (" << auxPhy << ") operating on link " << +nextLinkId
<< " will switch to link " << +currLinkId << " in "
<< duration.As(Time::US));
Simulator::Schedule(duration,
&DefaultEmlsrManager::SwitchAuxPhy,
this,
auxPhy,
nextLinkId,
currLinkId);
return;
}

View File

@@ -637,11 +637,9 @@ EmlsrManager::SwitchMainPhy(uint8_t linkId,
}
void
EmlsrManager::SwitchAuxPhy(uint8_t currLinkId, uint8_t nextLinkId)
EmlsrManager::SwitchAuxPhy(Ptr<WifiPhy> auxPhy, uint8_t currLinkId, uint8_t nextLinkId)
{
NS_LOG_FUNCTION(this << currLinkId << nextLinkId);
auto auxPhy = GetStaMac()->GetWifiPhy(currLinkId);
NS_LOG_FUNCTION(this << auxPhy << currLinkId << nextLinkId);
auto newAuxPhyChannel = GetChannelForAuxPhy(nextLinkId);

View File

@@ -337,10 +337,11 @@ class EmlsrManager : public Object
* Switch channel on the Aux PHY operating on the given current link so that it operates
* on the given next link.
*
* \param auxPhy the Aux PHY
* \param currLinkId the ID of the link on which the aux PHY is currently operating
* \param nextLinkId the ID of the link on which the aux PHY will be operating
*/
void SwitchAuxPhy(uint8_t currLinkId, uint8_t nextLinkId);
void SwitchAuxPhy(Ptr<WifiPhy> auxPhy, uint8_t currLinkId, uint8_t nextLinkId);
/**
* Set the CCA ED threshold (if needed) on the given PHY that is switching channel to