From: Hu Wang Date: Wed, 25 Aug 2021 09:25:33 +0000 (+0800) Subject: Add frequency to operating class determination for 5 GHz channel 144 X-Git-Tag: hostap_2_10~179 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a95144cf34661f6ba89f142737727a545ba76642;p=thirdparty%2Fhostap.git 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 --- 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;