From cd2f8151eed0ac22534c2f50633824226af66c60 Mon Sep 17 00:00:00 2001 From: Swarn Singh Date: Fri, 5 Mar 2021 10:40:04 +0530 Subject: [PATCH] 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 --- src/common/ieee802_11_common.c | 3 +++ 1 file changed, 3 insertions(+) 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 */