Fix enabling 40/80 MHz bandwidth support in the 6 GHz band

40/80 MHz bandwidth setting was being rejected due to incorrect sanity
check on the channel index. Fix that for the bandwidths larger than 20
MHz.

Fixes: d7c2c5c98c ("AP: Add initial support for 6 GHz band")
Signed-off-by: Pradeep Kumar Chitrapu  <pradeepc@codeaurora.org>
This commit is contained in:
Pradeep Kumar Chitrapu 2020-06-16 00:57:58 -07:00 committed by Jouni Malinen
parent 885097125c
commit a57f98754e

View file

@ -415,7 +415,7 @@ int hostapd_set_freq_params(struct hostapd_freq_params *data,
return -1; return -1;
} }
if (center_idx_to_bw_6ghz(channel) != 0) { if (center_idx_to_bw_6ghz(channel) < 0) {
wpa_printf(MSG_ERROR, wpa_printf(MSG_ERROR,
"Invalid control channel for 6 GHz band"); "Invalid control channel for 6 GHz band");
return -1; return -1;