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) {