diff --git a/src/wifi/model/wifi-default-protection-manager.cc b/src/wifi/model/wifi-default-protection-manager.cc index cf5caafd8..3a05324c6 100644 --- a/src/wifi/model/wifi-default-protection-manager.cc +++ b/src/wifi/model/wifi-default-protection-manager.cc @@ -58,6 +58,30 @@ WifiDefaultProtectionManager::TryAddMpdu (Ptr 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 (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 (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 msdu NS_ASSERT (txParams.m_protection->method == WifiProtection::NONE); + // No protection for TB PPDUs + if (txParams.m_txVector.IsUlMu ()) + { + return nullptr; + } + std::unique_ptr protection; protection = GetPsduProtection (msdu->GetHeader (), txParams.GetSizeIfAggregateMsdu (msdu).second, txParams.m_txVector);