wifi: Reduce amount of scheduled operations when switching main PHY
This commit is contained in:
committed by
Stefano Avallone
parent
459a5aa46b
commit
c7b37d1caa
@@ -836,9 +836,8 @@ EhtFrameExchangeManager::ReceiveMpdu(Ptr<const WifiMpdu> mpdu,
|
||||
}
|
||||
|
||||
NS_ASSERT(m_staMac->GetEmlsrManager());
|
||||
Simulator::ScheduleNow(&EmlsrManager::NotifyIcfReceived,
|
||||
m_staMac->GetEmlsrManager(),
|
||||
m_linkId);
|
||||
m_staMac->GetEmlsrManager()->NotifyIcfReceived(m_linkId);
|
||||
|
||||
// we just got involved in a DL TXOP. Check if we are still involved in the TXOP in a
|
||||
// SIFS (we are expected to reply by sending a CTS frame)
|
||||
m_ongoingTxopEnd.Cancel();
|
||||
|
||||
@@ -370,13 +370,15 @@ EmlsrManager::NotifyIcfReceived(uint8_t linkId)
|
||||
return;
|
||||
}
|
||||
|
||||
SwitchMainPhy(linkId, true); // channel switch should occur instantaneously
|
||||
Simulator::ScheduleNow([=, this]() {
|
||||
SwitchMainPhy(linkId, true); // channel switch should occur instantaneously
|
||||
|
||||
// aux PHY received the ICF but main PHY will send the response
|
||||
auto uid = auxPhy->GetPreviouslyRxPpduUid();
|
||||
mainPhy->SetPreviouslyRxPpduUid(uid);
|
||||
// aux PHY received the ICF but main PHY will send the response
|
||||
auto uid = auxPhy->GetPreviouslyRxPpduUid();
|
||||
mainPhy->SetPreviouslyRxPpduUid(uid);
|
||||
|
||||
DoNotifyIcfReceived(linkId);
|
||||
DoNotifyIcfReceived(linkId);
|
||||
});
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user