From 4705aa9f3b8d54abf44585e9c4f0c6e56a62ee0b Mon Sep 17 00:00:00 2001 From: Stefano Avallone Date: Fri, 7 Oct 2022 17:09:18 +0200 Subject: [PATCH] wifi: Remove unused GetChannelWidthForTransmission functions --- src/wifi/model/wifi-phy-common.cc | 32 ------------------------------- src/wifi/model/wifi-phy-common.h | 25 ------------------------ 2 files changed, 57 deletions(-) diff --git a/src/wifi/model/wifi-phy-common.cc b/src/wifi/model/wifi-phy-common.cc index 3784ff167..6253fa942 100644 --- a/src/wifi/model/wifi-phy-common.cc +++ b/src/wifi/model/wifi-phy-common.cc @@ -70,38 +70,6 @@ ConvertGuardIntervalToNanoSeconds(WifiMode mode, bool htShortGuardInterval, Time return gi; } -uint16_t -GetChannelWidthForTransmission(WifiMode mode, uint16_t maxAllowedChannelWidth) -{ - WifiModulationClass modulationClass = mode.GetModulationClass(); - if (maxAllowedChannelWidth > 20 && - (modulationClass == WifiModulationClass::WIFI_MOD_CLASS_OFDM // all non-HT OFDM control and - // management frames - || modulationClass == - WifiModulationClass::WIFI_MOD_CLASS_ERP_OFDM)) // special case of beacons at 2.4 GHz - { - return 20; - } - // at 2.4 GHz basic rate can be non-ERP DSSS - if (modulationClass == WifiModulationClass::WIFI_MOD_CLASS_DSSS || - modulationClass == WifiModulationClass::WIFI_MOD_CLASS_HR_DSSS) - { - return 22; - } - return maxAllowedChannelWidth; -} - -uint16_t -GetChannelWidthForTransmission(WifiMode mode, - uint16_t operatingChannelWidth, - uint16_t maxSupportedChannelWidth) -{ - return GetChannelWidthForTransmission(mode, - (operatingChannelWidth < maxSupportedChannelWidth) - ? operatingChannelWidth - : maxSupportedChannelWidth); -} - WifiPreamble GetPreambleForTransmission(WifiModulationClass modulation, bool useShortPreamble) { diff --git a/src/wifi/model/wifi-phy-common.h b/src/wifi/model/wifi-phy-common.h index d7111a07c..6b043fd3e 100644 --- a/src/wifi/model/wifi-phy-common.h +++ b/src/wifi/model/wifi-phy-common.h @@ -475,31 +475,6 @@ uint16_t ConvertGuardIntervalToNanoSeconds(WifiMode mode, */ WifiPreamble GetPreambleForTransmission(WifiModulationClass modulation, bool useShortPreamble); -/** - * Return the channel width that is allowed based on the selected mode and the given - * maximum channel width. This is especially useful when using non-HT modes with - * HT/VHT/HE capable stations (with default width above 20 MHz). - * - * \param mode selected WifiMode - * \param maxAllowedChannelWidth maximum channel width allowed for the transmission - * \return channel width adapted to the selected mode - */ -uint16_t GetChannelWidthForTransmission(WifiMode mode, uint16_t maxAllowedChannelWidth); -/** - * Return the channel width that is allowed based on the selected mode, the current - * width of the operating channel and the maximum channel width supported by the - * receiver. This is especially useful when using non-HT modes with HT/VHT/HE - * capable stations (with default width above 20 MHz). - * - * \param mode selected WifiMode - * \param operatingChannelWidth operating channel width - * \param maxSupportedChannelWidth maximum channel width supported by the receiver - * \return channel width adapted to the selected mode - */ -uint16_t GetChannelWidthForTransmission(WifiMode mode, - uint16_t operatingChannelWidth, - uint16_t maxSupportedChannelWidth); - /** * Return whether the modulation class of the selected mode for the * control answer frame is allowed.