]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Work around Supported Operating Classes element issues for 6 GHz
authorKiran Kumar Lokere <klokere@codeaurora.org>
Fri, 11 Sep 2020 03:40:02 +0000 (20:40 -0700)
committerJouni Malinen <j@w1.fi>
Tue, 22 Sep 2020 20:05:13 +0000 (23:05 +0300)
IEEE Std 802.11 specifies that the Operating Classes field terminates
immediately before the OneHundredAndThirty Delimiter (i.e., an octet
with value 130). Move the operating class value 130 last in the global
op_class array so that it gets added as the last entry into the
Supported Operating Clases element and the 6 GHz operating class is
parsed in that element by implementation that stop at the assumed
OneHundredAndThirty Delimiter.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/common/ieee802_11_common.c

index c0c569bc6c14b98dfc5b6739de4593bf8dc225ee..9c536cc5f34f0425d2d5881839ce763814218e62 100644 (file)
@@ -1872,7 +1872,6 @@ const struct oper_class_map global_op_class[] = {
         */
        { HOSTAPD_MODE_IEEE80211A, 128, 36, 161, 4, BW80, P2P_SUPP },
        { HOSTAPD_MODE_IEEE80211A, 129, 50, 114, 16, BW160, P2P_SUPP },
-       { HOSTAPD_MODE_IEEE80211A, 130, 36, 161, 4, BW80P80, P2P_SUPP },
        { HOSTAPD_MODE_IEEE80211A, 131, 1, 233, 4, BW20, P2P_SUPP },
 
        /*
@@ -1884,6 +1883,12 @@ const struct oper_class_map global_op_class[] = {
        { HOSTAPD_MODE_IEEE80211AD, 181, 9, 13, 1, BW4320, P2P_SUPP },
        { HOSTAPD_MODE_IEEE80211AD, 182, 17, 20, 1, BW6480, P2P_SUPP },
        { HOSTAPD_MODE_IEEE80211AD, 183, 25, 27, 1, BW8640, P2P_SUPP },
+
+       /* Keep the operating class 130 as the last entry as a workaround for
+        * the OneHundredAndThirty Delimiter value used in the Supported
+        * Operating Classes element to indicate the end of the Operating
+        * Classes field. */
+       { HOSTAPD_MODE_IEEE80211A, 130, 36, 161, 4, BW80P80, P2P_SUPP },
        { -1, 0, 0, 0, 0, BW20, NO_P2P_SUPP }
 };