From a95144cf34661f6ba89f142737727a545ba76642 Mon Sep 17 00:00:00 2001 From: Hu Wang Date: Wed, 25 Aug 2021 17:25:33 +0800 Subject: [PATCH] Add frequency to operating class determination for 5 GHz channel 144 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 --- src/common/ieee802_11_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/ieee802_11_common.c b/src/common/ieee802_11_common.c index b51695645..bc8caae50 100644 --- a/src/common/ieee802_11_common.c +++ b/src/common/ieee802_11_common.c @@ -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;