From: Swarn Singh Date: Fri, 5 Mar 2021 05:10:04 +0000 (+0530) Subject: Add support to return bandwidth for channel 2 of the 6 GHz band X-Git-Tag: hostap_2_10~438 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd2f8151eed0ac22534c2f50633824226af66c60;p=thirdparty%2Fhostap.git Add support to return bandwidth for channel 2 of the 6 GHz band The 6 GHz band operating class 136 is defined to use 20 MHz bandwidth. Return the value accordingly from center_idx_to_bw_6ghz() to cover this special case. Signed-off-by: Jouni Malinen --- diff --git a/src/common/ieee802_11_common.c b/src/common/ieee802_11_common.c index ec174562a..5b80db6d3 100644 --- a/src/common/ieee802_11_common.c +++ b/src/common/ieee802_11_common.c @@ -2232,6 +2232,9 @@ int oper_class_bw_to_int(const struct oper_class_map *map) int center_idx_to_bw_6ghz(u8 idx) { + /* Channel: 2 */ + if (idx == 2) + return 0; /* 20 MHz */ /* channels: 1, 5, 9, 13... */ if ((idx & 0x3) == 0x1) return 0; /* 20 MHz */