]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Add support to return bandwidth for channel 2 of the 6 GHz band
authorSwarn Singh <swarnkum@codeaurora.org>
Fri, 5 Mar 2021 05:10:04 +0000 (10:40 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 11 Mar 2021 22:12:16 +0000 (00:12 +0200)
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 <jouni@codeaurora.org>
src/common/ieee802_11_common.c

index ec174562a95ac25485607d70714fc6d3a3602cfe..5b80db6d3b83c2adc5affd5e201e9cb46df0157f 100644 (file)
@@ -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 */