wifi: Pass link ID to MultiUserScheduer::GetWifiRemoteStationManager()
This commit is contained in:
committed by
Stefano Avallone
parent
de32153254
commit
97ade1957c
@@ -146,9 +146,9 @@ MultiUserScheduler::SetWifiMac(Ptr<ApWifiMac> mac)
|
||||
}
|
||||
|
||||
Ptr<WifiRemoteStationManager>
|
||||
MultiUserScheduler::GetWifiRemoteStationManager() const
|
||||
MultiUserScheduler::GetWifiRemoteStationManager(uint8_t linkId) const
|
||||
{
|
||||
return m_apMac->GetWifiRemoteStationManager();
|
||||
return m_apMac->GetWifiRemoteStationManager(linkId);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -227,7 +227,10 @@ MultiUserScheduler::GetDlMuInfo()
|
||||
// check that all the addressed stations support HE
|
||||
for (auto& psdu : m_dlInfo.psduMap)
|
||||
{
|
||||
NS_ABORT_MSG_IF(!GetWifiRemoteStationManager()->GetHeSupported(psdu.second->GetAddr1()),
|
||||
auto receiver = psdu.second->GetAddr1();
|
||||
auto linkId = m_apMac->IsAssociated(receiver);
|
||||
NS_ABORT_MSG_IF(!linkId, "Station " << receiver << " should be associated");
|
||||
NS_ABORT_MSG_IF(!GetWifiRemoteStationManager(*linkId)->GetHeSupported(receiver),
|
||||
"Station " << psdu.second->GetAddr1() << " does not support HE");
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -121,11 +121,12 @@ class MultiUserScheduler : public Object
|
||||
|
||||
protected:
|
||||
/**
|
||||
* Get the station manager attached to the AP.
|
||||
* Get the station manager attached to the AP on the given link.
|
||||
*
|
||||
* \return the station manager attached to the AP
|
||||
* \param linkId the ID of the given link
|
||||
* \return the station manager attached to the AP on the given link
|
||||
*/
|
||||
Ptr<WifiRemoteStationManager> GetWifiRemoteStationManager() const;
|
||||
Ptr<WifiRemoteStationManager> GetWifiRemoteStationManager(uint8_t linkId) const;
|
||||
|
||||
/**
|
||||
* Get an MPDU containing the given Trigger Frame.
|
||||
|
||||
@@ -150,7 +150,8 @@ RrMultiUserScheduler::SelectTxFormat()
|
||||
|
||||
Ptr<const WifiMpdu> mpdu = m_edca->PeekNextMpdu(m_linkId);
|
||||
|
||||
if (mpdu && !GetWifiRemoteStationManager()->GetHeSupported(mpdu->GetHeader().GetAddr1()))
|
||||
if (mpdu && !GetWifiRemoteStationManager(SINGLE_LINK_OP_ID)
|
||||
->GetHeSupported(mpdu->GetHeader().GetAddr1()))
|
||||
{
|
||||
return SU_TX;
|
||||
}
|
||||
@@ -265,7 +266,7 @@ RrMultiUserScheduler::GetTxVectorForUlMu(Func canbeSolicited)
|
||||
hdr.SetAddr1(staIt->address);
|
||||
hdr.SetAddr2(m_apMac->GetAddress());
|
||||
WifiTxVector suTxVector =
|
||||
GetWifiRemoteStationManager()->GetDataTxVector(hdr, m_allowedWidth);
|
||||
GetWifiRemoteStationManager(SINGLE_LINK_OP_ID)->GetDataTxVector(hdr, m_allowedWidth);
|
||||
txVector.SetHeMuUserInfo(staIt->aid,
|
||||
{HeRu::RuSpec(), // assigned later by FinalizeTxVector
|
||||
suTxVector.GetMode().GetMcsValue(),
|
||||
@@ -313,8 +314,8 @@ RrMultiUserScheduler::TrySendingBsrpTf()
|
||||
|
||||
m_txParams.Clear();
|
||||
// set the TXVECTOR used to send the Trigger Frame
|
||||
m_txParams.m_txVector =
|
||||
m_apMac->GetWifiRemoteStationManager()->GetRtsTxVector(m_triggerMacHdr.GetAddr1());
|
||||
m_txParams.m_txVector = m_apMac->GetWifiRemoteStationManager(SINGLE_LINK_OP_ID)
|
||||
->GetRtsTxVector(m_triggerMacHdr.GetAddr1());
|
||||
|
||||
if (!m_heFem->TryAddMpdu(item, m_txParams, m_availableTime))
|
||||
{
|
||||
@@ -430,8 +431,8 @@ RrMultiUserScheduler::TrySendingBasicTf()
|
||||
|
||||
m_txParams.Clear();
|
||||
// set the TXVECTOR used to send the Trigger Frame
|
||||
m_txParams.m_txVector =
|
||||
m_apMac->GetWifiRemoteStationManager()->GetRtsTxVector(m_triggerMacHdr.GetAddr1());
|
||||
m_txParams.m_txVector = m_apMac->GetWifiRemoteStationManager(SINGLE_LINK_OP_ID)
|
||||
->GetRtsTxVector(m_triggerMacHdr.GetAddr1());
|
||||
|
||||
if (!m_heFem->TryAddMpdu(item, m_txParams, m_availableTime))
|
||||
{
|
||||
@@ -693,8 +694,8 @@ RrMultiUserScheduler::TrySendingDlMuPpdu()
|
||||
// An RU of the computed size is tentatively assigned to the candidate
|
||||
// station, so that the TX duration can be correctly computed.
|
||||
WifiTxVector suTxVector =
|
||||
GetWifiRemoteStationManager()->GetDataTxVector(mpdu->GetHeader(),
|
||||
m_allowedWidth);
|
||||
GetWifiRemoteStationManager(SINGLE_LINK_OP_ID)
|
||||
->GetDataTxVector(mpdu->GetHeader(), m_allowedWidth);
|
||||
WifiTxVector txVectorCopy = m_txParams.m_txVector;
|
||||
|
||||
m_txParams.m_txVector.SetHeMuUserInfo(staIt->aid,
|
||||
|
||||
@@ -285,7 +285,8 @@ TestMultiUserScheduler::ComputeWifiTxVector()
|
||||
}
|
||||
m_txVector.SetChannelWidth(bw);
|
||||
m_txVector.SetGuardInterval(m_apMac->GetHeConfiguration()->GetGuardInterval().GetNanoSeconds());
|
||||
m_txVector.SetTxPowerLevel(GetWifiRemoteStationManager()->GetDefaultTxPowerLevel());
|
||||
m_txVector.SetTxPowerLevel(
|
||||
GetWifiRemoteStationManager(SINGLE_LINK_OP_ID)->GetDefaultTxPowerLevel());
|
||||
|
||||
const std::map<uint16_t, Mac48Address>& staList = m_apMac->GetStaList();
|
||||
NS_ABORT_MSG_IF(staList.size() != 4, "There must be 4 associated stations");
|
||||
|
||||
Reference in New Issue
Block a user