wifi: Disable protection for DL MU PPDUs including more than one PSDU

...until MU-RTS is implemented
This commit is contained in:
Stefano Avallone
2022-04-14 09:36:16 +02:00
committed by Tom Henderson
parent 0816eebc29
commit a863f8f8ea

View File

@@ -58,6 +58,30 @@ WifiDefaultProtectionManager::TryAddMpdu (Ptr<const WifiMacQueueItem> mpdu,
{
NS_LOG_FUNCTION (this << *mpdu << &txParams);
// TB PPDUs need no protection (the soliciting Trigger Frame can be protected
// by an MU-RTS). Until MU-RTS is implemented, we disable protection also for:
// - Trigger Frames
// - DL MU PPDUs containing more than one PSDU
if (txParams.m_txVector.IsUlMu ()
|| mpdu->GetHeader ().IsTrigger ()
|| (txParams.m_txVector.IsDlMu () && txParams.GetPsduInfoMap ().size () > 1))
{
if (txParams.m_protection)
{
NS_ASSERT (txParams.m_protection->method == WifiProtection::NONE);
return nullptr;
}
return std::unique_ptr<WifiProtection> (new WifiNoProtection);
}
// If we are adding a second PSDU to a DL MU PPDU, switch to no protection
// (until MU-RTS is implemented)
if (txParams.m_txVector.IsDlMu () && txParams.GetPsduInfoMap ().size () == 1
&& txParams.GetPsduInfo (mpdu->GetHeader ().GetAddr1 ()) == nullptr)
{
return std::unique_ptr<WifiProtection> (new WifiNoProtection);
}
// if the current protection method (if any) is already RTS/CTS or CTS-to-Self,
// it will not change by adding an MPDU
if (txParams.m_protection
@@ -100,6 +124,12 @@ WifiDefaultProtectionManager::TryAggregateMsdu (Ptr<const WifiMacQueueItem> msdu
NS_ASSERT (txParams.m_protection->method == WifiProtection::NONE);
// No protection for TB PPDUs
if (txParams.m_txVector.IsUlMu ())
{
return nullptr;
}
std::unique_ptr<WifiProtection> protection;
protection = GetPsduProtection (msdu->GetHeader (), txParams.GetSizeIfAggregateMsdu (msdu).second,
txParams.m_txVector);