wifi: Extend RR MU scheduler to send/solicit EHT PPDUs

This commit is contained in:
Stefano Avallone
2023-01-17 14:09:48 +01:00
parent 2bcadb6034
commit 1e2111161d
2 changed files with 42 additions and 2 deletions

View File

@@ -221,6 +221,15 @@ RrMultiUserScheduler::GetTxVectorForUlMu(Func canbeSolicited)
continue;
}
if (txVector.GetPreambleType() == WIFI_PREAMBLE_EHT_TB &&
!m_apMac->GetEhtSupported(staIt->address))
{
NS_LOG_DEBUG(
"Skipping non-EHT STA because this Trigger Frame is only soliciting EHT STAs");
staIt++;
continue;
}
uint8_t tid = 0;
while (tid < 8)
{
@@ -239,6 +248,17 @@ RrMultiUserScheduler::GetTxVectorForUlMu(Func canbeSolicited)
continue;
}
// if the first candidate STA is an EHT STA, we switch to soliciting EHT TB PPDUs
if (txVector.GetHeMuUserInfoMap().empty())
{
if (m_apMac->GetEhtSupported() && m_apMac->GetEhtSupported(staIt->address))
{
txVector.SetPreambleType(WIFI_PREAMBLE_EHT_TB);
txVector.SetEhtPpduType(0);
}
// TODO otherwise, make sure the TX width does not exceed 160 MHz
}
// prepare the MAC header of a frame that would be sent to the candidate station,
// just for the purpose of retrieving the TXVECTOR used to transmit to that station
WifiMacHeader hdr(WIFI_MAC_QOSDATA);
@@ -616,6 +636,14 @@ RrMultiUserScheduler::TrySendingDlMuPpdu()
{
NS_LOG_DEBUG("Next candidate STA (MAC=" << staIt->address << ", AID=" << staIt->aid << ")");
if (m_txParams.m_txVector.GetPreambleType() == WIFI_PREAMBLE_EHT_MU &&
!m_apMac->GetEhtSupported(staIt->address))
{
NS_LOG_DEBUG("Skipping non-EHT STA because this DL MU PPDU is sent to EHT STAs only");
staIt++;
continue;
}
HeRu::RuType currRuType = (m_candidates.size() < count ? ruType : HeRu::RU_26_TONE);
// check if the AP has at least one frame to be sent to the current station
@@ -670,6 +698,17 @@ RrMultiUserScheduler::TrySendingDlMuPpdu()
}
}
// the first candidate STA determines the preamble type for the DL MU PPDU
if (m_candidates.size() == 1)
{
if (m_apMac->GetEhtSupported() && m_apMac->GetEhtSupported(staIt->address))
{
m_txParams.m_txVector.SetPreambleType(WIFI_PREAMBLE_EHT_MU);
m_txParams.m_txVector.SetEhtPpduType(0); // indicates DL OFDMA transmission
}
// TODO otherwise, make sure the TX width does not exceed 160 MHz
}
// move to the next station in the list
staIt++;
}

View File

@@ -34,8 +34,9 @@ namespace ns3
* transmission if the AP has frames to transmit to at least one station.
* RrMultiUserScheduler assigns RUs of equal size (in terms of tones) to stations to
* which the AP has frames to transmit belonging to the AC who gained access to the
* channel or higher. The maximum number of stations that can be granted an RU
* is configurable. Associated stations are served in a round robin fashion.
* channel or higher. The maximum number of stations that can be granted an RU is
* configurable. Associated stations are served based on their priority. The priority is
* determined by the credits/debits a station gets when it is selected or not for transmission.
*
* \todo Take the supported channel width of the stations into account while selecting
* stations and assigning RUs to them.