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 <jouni@codeaurora.org>
This commit is contained in:
Swarn Singh 2021-03-05 10:40:04 +05:30 committed by Jouni Malinen
parent 6b4e32da89
commit cd2f8151ee

View 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 */