From cb5c18272a568a936aa02c01c1467b5e15f7ba28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Wed, 31 May 2023 20:31:30 +0200 Subject: [PATCH] wifi: Do not use hardcoded 160 MHz to create bands for interference helper --- src/wifi/model/spectrum-wifi-phy.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wifi/model/spectrum-wifi-phy.cc b/src/wifi/model/spectrum-wifi-phy.cc index 564b117b6..7b3e3c224 100644 --- a/src/wifi/model/spectrum-wifi-phy.cc +++ b/src/wifi/model/spectrum-wifi-phy.cc @@ -137,7 +137,7 @@ SpectrumWifiPhy::ComputeBands(Ptr spectrumPhyInterface } else { - for (uint16_t bw = 160; bw >= 20; bw = bw / 2) + for (uint16_t bw = channelWidth; bw >= 20; bw = bw / 2) { for (uint32_t i = 0; i < (channelWidth / bw); ++i) { @@ -154,7 +154,7 @@ SpectrumWifiPhy::GetHeRuBands(Ptr spectrumPhyInterface { HeRuBands heRuBands{}; const auto channelWidth = spectrumPhyInterface->GetChannelWidth(); - for (uint16_t bw = 160; bw >= 20; bw = bw / 2) + for (uint16_t bw = channelWidth; bw >= 20; bw = bw / 2) { for (uint32_t i = 0; i < (channelWidth / bw); ++i) {