From a92660a00e102df6dd1a6500c758407a730f7b8e Mon Sep 17 00:00:00 2001 From: Kiran Kumar Lokere Date: Thu, 10 Sep 2020 20:40:02 -0700 Subject: [PATCH] Work around Supported Operating Classes element issues for 6 GHz 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 --- src/common/ieee802_11_common.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/common/ieee802_11_common.c b/src/common/ieee802_11_common.c index c0c569bc6..9c536cc5f 100644 --- a/src/common/ieee802_11_common.c +++ b/src/common/ieee802_11_common.c @@ -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 } };