From da9fcebe05505af9c3c216649ace05b339e2de24 Mon Sep 17 00:00:00 2001 From: Tom Henderson Date: Thu, 20 Jun 2024 18:38:08 -0700 Subject: [PATCH] wifi: (fixes #1095) Fix reception of WIFI_MOD_CLASS_HR_DSSS --- src/wifi/model/wifi-phy-common.cc | 5 ++++- src/wifi/model/wifi-phy-common.h | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/wifi/model/wifi-phy-common.cc b/src/wifi/model/wifi-phy-common.cc index 58b515568..4c66d3433 100644 --- a/src/wifi/model/wifi-phy-common.cc +++ b/src/wifi/model/wifi-phy-common.cc @@ -218,7 +218,10 @@ GetModulationClassForStandard(WifiStandard standard) modulationClass = WIFI_MOD_CLASS_OFDM; break; case WIFI_STANDARD_80211b: - modulationClass = WIFI_MOD_CLASS_DSSS; + // Although two modulation classes are supported in 802.11b, return the + // numerically greater one defined in the WifiModulationClass enum. + // See issue #1095 for more explanation. + modulationClass = WIFI_MOD_CLASS_HR_DSSS; break; case WIFI_STANDARD_80211g: modulationClass = WIFI_MOD_CLASS_ERP_OFDM; diff --git a/src/wifi/model/wifi-phy-common.h b/src/wifi/model/wifi-phy-common.h index eb1cd04f3..304bbf7af 100644 --- a/src/wifi/model/wifi-phy-common.h +++ b/src/wifi/model/wifi-phy-common.h @@ -666,6 +666,10 @@ bool IsUlMu(WifiPreamble preamble); /** * Return the modulation class corresponding to a given standard. * + * In the case of WIFI_STANDARD_80211b, two modulation classes are supported + * (WIFI_MOD_CLASS_DSSS and WIFI_MOD_CLASS_HR_DSSS); this method will return + * the latter. + * * \param standard the standard * \return the modulation class corresponding to the standard */