From e780a145d79d5e044d4c856b2530b41d33dac767 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Deronne?= Date: Wed, 28 Dec 2016 13:39:02 +0100 Subject: [PATCH] wifi: Improve how VHT operational channel width is calculated to fill in VhtOperation --- src/wifi/model/ap-wifi-mac.cc | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/wifi/model/ap-wifi-mac.cc b/src/wifi/model/ap-wifi-mac.cc index b2078f56a..9de2c1736 100644 --- a/src/wifi/model/ap-wifi-mac.cc +++ b/src/wifi/model/ap-wifi-mac.cc @@ -245,23 +245,17 @@ ApWifiMac::IsNonGfHtStasPresent (void) const uint32_t ApWifiMac::GetVhtOperationalChannelWidth (void) const { - uint32_t channelWidth = 160; - bool hasVht = false; + uint32_t channelWidth = m_phy->GetChannelWidth (); for (std::list::const_iterator i = m_staList.begin (); i != m_staList.end (); i++) { if (m_stationManager->GetVhtSupported (*i)) { - hasVht = true; if (m_stationManager->GetChannelWidthSupported (*i) < channelWidth) { channelWidth = m_stationManager->GetChannelWidthSupported (*i); } } } - if (!hasVht) - { - channelWidth = m_phy->GetChannelWidth (); - } return channelWidth; }