wifi: Do not loop over unallowed RUs

This commit is contained in:
Sébastien Deronne
2025-01-29 15:59:16 +01:00
parent 9651b2a9c4
commit c2d13ef565
2 changed files with 3 additions and 2 deletions

View File

@@ -152,7 +152,9 @@ SpectrumWifiPhy::GetRuBands(Ptr<WifiSpectrumPhyInterface> spectrumPhyInterface,
{
for (uint32_t i = 0; i < (channelWidth / bw); ++i)
{
for (uint32_t type = 0; type < static_cast<uint32_t>(RuType::RU_TYPE_MAX); ++type)
for (uint32_t type = 0;
type <= static_cast<uint32_t>(WifiRu::GetMaxRuType(WIFI_MOD_CLASS_HE));
++type)
{
auto ruType = static_cast<RuType>(type);
std::size_t nRus = WifiRu::GetNRus(bw, ruType, WIFI_MOD_CLASS_HE);

View File

@@ -228,7 +228,6 @@ class WifiRu
*/
static bool IsEht(RuSpec ru);
private:
/**
* Get the maximum RU type supported by a given modulation class.
*