]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Add frequency to operating class determination for 5 GHz channel 144
authorHu Wang <huw@codeaurora.org>
Wed, 25 Aug 2021 09:25:33 +0000 (17:25 +0800)
committerJouni Malinen <j@w1.fi>
Thu, 2 Sep 2021 15:43:10 +0000 (18:43 +0300)
Commit 45c3e729527a ("Add frequency to operating class determination
for 5 GHz 100..140") extends ieee80211_freq_to_channel_ext() with
knowledge of the operating classes for the 5 GHz channels 100..140.

Per "Table E-4 - Global operating classes" in IEEE Std 802.11-2020, 5
GHz channel 144 also maps to same operating classes, so update hostapd
code to reflect the change.

This issue is found when OCV enabled and 4-way-handshake failed due
to client OCI includes op_class 0 for channel 144. This showed
up in following manner in the debug log:

WPA: OCI KDE in EAPOL-Key - hexdump(len=9): dd 07 00 0f ac 0d 00 90 00
Error interpreting OCI: unrecognized opclass/channel pair (0/144)

Signed-off-by: Hu Wang <huw@codeaurora.org>
src/common/ieee802_11_common.c

index b516956458ec0b67839f438dad7eae355382c3cb..bc8caae506224897c4a470e5c13c6559497a8263 100644 (file)
@@ -1011,8 +1011,8 @@ enum hostapd_hw_mode ieee80211_freq_to_channel_ext(unsigned int freq,
                return HOSTAPD_MODE_IEEE80211A;
        }
 
-       /* 5 GHz, channels 100..140 */
-       if (freq >= 5000 && freq <= 5700) {
+       /* 5 GHz, channels 100..144 */
+       if (freq >= 5500 && freq <= 5720) {
                if ((freq - 5000) % 5)
                        return NUM_HOSTAPD_MODES;