wifi: Pass link ID to MU scheduler while notifying channel access

This commit is contained in:
Stefano Avallone
2022-11-30 10:43:26 +01:00
committed by Stefano Avallone
parent 6ec1c431c4
commit 5c1e6e3fab
4 changed files with 16 additions and 9 deletions

View File

@@ -129,8 +129,11 @@ HeFrameExchangeManager::StartFrameExchange(Ptr<QosTxop> edca, Time availableTime
m_mac->GetBaAgreementEstablishedAsOriginator(mpdu->GetHeader().GetAddr1(),
mpdu->GetHeader().GetQosTid()))))
{
txFormat =
m_muScheduler->NotifyAccessGranted(edca, availableTime, initialFrame, m_allowedWidth);
txFormat = m_muScheduler->NotifyAccessGranted(edca,
availableTime,
initialFrame,
m_allowedWidth,
m_linkId);
}
if (txFormat == MultiUserScheduler::SU_TX)

View File

@@ -173,14 +173,16 @@ MultiUserScheduler::TxFormat
MultiUserScheduler::NotifyAccessGranted(Ptr<QosTxop> edca,
Time availableTime,
bool initialFrame,
uint16_t allowedWidth)
uint16_t allowedWidth,
uint8_t linkId)
{
NS_LOG_FUNCTION(this << edca << availableTime << initialFrame << allowedWidth);
NS_LOG_FUNCTION(this << edca << availableTime << initialFrame << allowedWidth << linkId);
m_edca = edca;
m_availableTime = availableTime;
m_initialFrame = initialFrame;
m_allowedWidth = allowedWidth;
m_linkId = linkId;
if (m_accessReqTimer.IsRunning() && m_restartTimerUponAccess)
{

View File

@@ -94,12 +94,14 @@ class MultiUserScheduler : public Object
* of the TXOP. This is used to determine whether the TXOP
* limit can be exceeded
* \param allowedWidth the allowed width in MHz for the next transmission
* \param linkId the ID of the link over which channel access was gained
* \return the format of the next transmission
*/
TxFormat NotifyAccessGranted(Ptr<QosTxop> edca,
Time availableTime,
bool initialFrame,
uint16_t allowedWidth);
uint16_t allowedWidth,
uint8_t linkId);
/**
* Get the information required to perform a DL MU transmission. Note
@@ -164,6 +166,7 @@ class MultiUserScheduler : public Object
Time m_availableTime; //!< the time available for frame exchange
bool m_initialFrame; //!< true if a TXOP is being started
uint16_t m_allowedWidth; //!< the allowed width in MHz for the current transmission
uint8_t m_linkId; //!< the ID of the link over which channel access has been granted
private:
/**

View File

@@ -148,7 +148,7 @@ RrMultiUserScheduler::SelectTxFormat()
{
NS_LOG_FUNCTION(this);
Ptr<const WifiMpdu> mpdu = m_edca->PeekNextMpdu(SINGLE_LINK_OP_ID);
Ptr<const WifiMpdu> mpdu = m_edca->PeekNextMpdu(m_linkId);
if (mpdu && !GetWifiRemoteStationManager()->GetHeSupported(mpdu->GetHeader().GetAddr1()))
{
@@ -582,7 +582,7 @@ RrMultiUserScheduler::TrySendingDlMuPpdu()
uint8_t currTid = wifiAcList.at(primaryAc).GetHighTid();
Ptr<WifiMpdu> mpdu = m_edca->PeekNextMpdu(SINGLE_LINK_OP_ID);
Ptr<WifiMpdu> mpdu = m_edca->PeekNextMpdu(m_linkId);
if (mpdu && mpdu->GetHeader().IsQosData())
{
@@ -655,8 +655,7 @@ RrMultiUserScheduler::TrySendingDlMuPpdu()
// considered TID, since ack sequences for DL MU PPDUs require block ack
if (m_apMac->GetBaAgreementEstablishedAsOriginator(staIt->address, tid))
{
mpdu =
m_apMac->GetQosTxop(ac)->PeekNextMpdu(SINGLE_LINK_OP_ID, tid, staIt->address);
mpdu = m_apMac->GetQosTxop(ac)->PeekNextMpdu(m_linkId, tid, staIt->address);
// we only check if the first frame of the current TID meets the size
// and duration constraints. We do not explore the queues further.