From 38aed48d265e38a572308578225c2bddf2556842 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Fri, 21 Mar 2025 17:30:51 +0100 Subject: [PATCH] wifi: Get rid of workaround now that HE 6 GHz Band Capabilities element is supported --- src/wifi/model/wifi-mgt-header.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/wifi/model/wifi-mgt-header.h b/src/wifi/model/wifi-mgt-header.h index 1ac5f108a..9e78d2ec6 100644 --- a/src/wifi/model/wifi-mgt-header.h +++ b/src/wifi/model/wifi-mgt-header.h @@ -13,8 +13,10 @@ #include "supported-rates.h" #include "ns3/eht-capabilities.h" +#include "ns3/he-6ghz-band-capabilities.h" #include "ns3/header.h" #include "ns3/multi-link-element.h" +#include "ns3/vht-capabilities.h" #include #include @@ -363,11 +365,9 @@ void WifiMgtHeader>::InitForDeserialization( std::optional& optElem) { - NS_ASSERT(Get()); - auto rates = AllSupportedRates{*Get(), std::nullopt}; - const bool is2_4Ghz = rates.IsSupportedRate( - 1000000 /* 1 Mbit/s */); // TODO: use presence of VHT capabilities IE and HE 6 GHz Band - // Capabilities IE once the later is implemented + auto& vhtCapabilities = Get(); + auto& he6GhzBandCapabilities = Get(); + const auto is2_4Ghz = !vhtCapabilities && !he6GhzBandCapabilities; auto& heCapabilities = Get(); if (heCapabilities) {