Skip to content

Commit 7db999b

Browse files
author
Davide Magrin
committed
wifi: Send MU-RTS if any receiver of a DL MU PPDU is unprotected
Assisted-by: Claude Code (claude-fable-5)
1 parent f2ccf2a commit 7db999b

4 files changed

Lines changed: 543 additions & 2 deletions

File tree

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ been tested on Linux. As of this release, the latest known version to work with
4646
- (dsr) !2762 Fixes header format to comply with RFC4728. Also other minor bug fixes and modernization.
4747
- (zigbee) In the NWK, broadcast initiator devices are now registered in the BTT to avoid receiving retransmissions.
4848
- (wifi) !2945 CTS-to-self frames are now transmitted over the bandwidth of the frame they protect, so that transmissions in the rest of the TXOP are no longer limited to 20 MHz.
49+
- (wifi) !2938 A DL MU PPDU transmitted in a non-initial frame exchange of a TXOP is now protected by an MU-RTS if any of its receivers is unprotected; previously the decision was made per MPDU and such a PPDU could be sent without the configured protection (debug builds failed an assert).
4950

5051
## Release 3.48
5152

src/wifi/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,7 @@ build_lib(
429429
test/wifi-phy-thresholds-test.cc
430430
test/wifi-primary-channels-test.cc
431431
test/wifi-probe-exchange-test.cc
432+
test/wifi-protection-test.cc
432433
test/wifi-queue-scheduler-test.cc
433434
test/wifi-retransmit-test.cc
434435
test/wifi-ru-allocation-test.cc

src/wifi/model/wifi-default-protection-manager.cc

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "ns3/erp-ofdm-phy.h"
2020
#include "ns3/log.h"
2121

22+
#include <algorithm>
2223
#include <type_traits>
2324

2425
namespace ns3
@@ -246,9 +247,15 @@ WifiDefaultProtectionManager::TryAddMpduToMuPpdu(Ptr<const WifiMpdu> mpdu,
246247

247248
const auto& protectedStas = m_mac->GetFrameExchangeManager(m_linkId)->GetProtectedStas();
248249
const auto isProtected = protectedStas.contains(receiver);
249-
bool needMuRts =
250+
// an MU-RTS protects the DL MU PPDU as a whole, hence it is needed if any receiver of the
251+
// PPDU is not yet protected, regardless of which receiver the MPDU being added is for
252+
const auto anyUnprotected =
253+
std::any_of(psduInfoMap.cbegin(), psduInfoMap.cend(), [&protectedStas](const auto& info) {
254+
return !protectedStas.contains(info.first);
255+
});
256+
const auto needMuRts =
250257
(txParams.m_protection && txParams.m_protection->method == WifiProtection::MU_RTS_CTS) ||
251-
(dlMuPpdu && m_sendMuRts && !isProtected &&
258+
(dlMuPpdu && m_sendMuRts && anyUnprotected &&
252259
(!m_singleRtsPerTxop || protectedStas.empty())) ||
253260
(isEmlsrDestination && !isProtected);
254261

0 commit comments

Comments
 (0)