From 5072136c8b24855ccbe5067ff0f3373b9f880393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Sun, 21 May 2023 09:54:16 +0200 Subject: [PATCH] wifi: WifiPhy::GetChannelWidth and ChannelWidth attribute return the total width --- src/wifi/model/wifi-phy.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/wifi/model/wifi-phy.cc b/src/wifi/model/wifi-phy.cc index 1443a586c..a0e531ffd 100644 --- a/src/wifi/model/wifi-phy.cc +++ b/src/wifi/model/wifi-phy.cc @@ -129,7 +129,8 @@ WifiPhy::GetTypeId() MakeUintegerChecker(0, 233)) .AddAttribute( "ChannelWidth", - "The width in MHz of the current operating channel (5, 10, 20, 22, 40, 80 or 160).", + "The width in MHz of the current operating channel (5, 10, 20, 22, 40, 80 or 160). " + "If 80+80MHz is used, this corresponds to the total channel width, hence 160 MHz.", TypeId::ATTR_GET, UintegerValue(0), MakeUintegerAccessor(&WifiPhy::GetChannelWidth), @@ -1082,7 +1083,7 @@ WifiPhy::GetChannelNumber() const ChannelWidthMhz WifiPhy::GetChannelWidth() const { - return m_operatingChannel.GetWidth(); + return m_operatingChannel.GetTotalWidth(); } uint8_t