diff --git a/src/wifi/model/he/he-frame-exchange-manager.cc b/src/wifi/model/he/he-frame-exchange-manager.cc index 501ed4860..b58fb8ed7 100644 --- a/src/wifi/model/he/he-frame-exchange-manager.cc +++ b/src/wifi/model/he/he-frame-exchange-manager.cc @@ -129,8 +129,11 @@ HeFrameExchangeManager::StartFrameExchange(Ptr 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) diff --git a/src/wifi/model/he/multi-user-scheduler.cc b/src/wifi/model/he/multi-user-scheduler.cc index 29810ef53..847110da5 100644 --- a/src/wifi/model/he/multi-user-scheduler.cc +++ b/src/wifi/model/he/multi-user-scheduler.cc @@ -173,14 +173,16 @@ MultiUserScheduler::TxFormat MultiUserScheduler::NotifyAccessGranted(Ptr 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) { diff --git a/src/wifi/model/he/multi-user-scheduler.h b/src/wifi/model/he/multi-user-scheduler.h index 5d9eb1973..b98400840 100644 --- a/src/wifi/model/he/multi-user-scheduler.h +++ b/src/wifi/model/he/multi-user-scheduler.h @@ -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 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: /** diff --git a/src/wifi/model/he/rr-multi-user-scheduler.cc b/src/wifi/model/he/rr-multi-user-scheduler.cc index 6c56e8897..4b01ed5be 100644 --- a/src/wifi/model/he/rr-multi-user-scheduler.cc +++ b/src/wifi/model/he/rr-multi-user-scheduler.cc @@ -148,7 +148,7 @@ RrMultiUserScheduler::SelectTxFormat() { NS_LOG_FUNCTION(this); - Ptr mpdu = m_edca->PeekNextMpdu(SINGLE_LINK_OP_ID); + Ptr 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 mpdu = m_edca->PeekNextMpdu(SINGLE_LINK_OP_ID); + Ptr 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.