]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Fix enabling 40/80 MHz bandwidth support in the 6 GHz band
authorPradeep Kumar Chitrapu <pradeepc@codeaurora.org>
Tue, 16 Jun 2020 07:57:58 +0000 (00:57 -0700)
committerJouni Malinen <j@w1.fi>
Wed, 15 Jul 2020 21:08:58 +0000 (00:08 +0300)
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: d7c2c5c98c4f ("AP: Add initial support for 6 GHz band")
Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
src/common/hw_features_common.c

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