From: Amith A Date: Mon, 8 Apr 2024 09:11:16 +0000 (+0530) Subject: Make selection of current opclass more generic for 20 MHz UNI-III channels X-Git-Tag: hostap_2_11~126 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=195cc3d919503fb0d699d9a56a58a72602b25f51;p=thirdparty%2Fhostap.git Make selection of current opclass more generic for 20 MHz UNI-III channels According to IEEE Std 802.11-2020, Operating classes Table E-2 (Europe) and Table E-6 (China) map channels in the range 149 to 161 to the global operating class 125, while Table E-1 (United States) maps these channels to global operating classes 125 and 124 as well. The global operating class 125 contains all channels from the global operating class 124 and some additional channels. Hence, to make the selection of the current operating class generic, use operating class 125 for all 20 MHz channels in the range 149 to 161. Signed-off-by: Amith A --- diff --git a/src/common/ieee802_11_common.c b/src/common/ieee802_11_common.c index 7c3a21fe5..9a78b6344 100644 --- a/src/common/ieee802_11_common.c +++ b/src/common/ieee802_11_common.c @@ -1487,8 +1487,6 @@ ieee80211_freq_to_channel_ext(unsigned int freq, int sec_channel, *op_class = 126; else if (sec_channel == -1) *op_class = 127; - else if (freq <= 5805) - *op_class = 124; else *op_class = 125;