From a57f98754e255e928f5da6b641ca643a75bc2c4a Mon Sep 17 00:00:00 2001 From: Pradeep Kumar Chitrapu Date: Tue, 16 Jun 2020 00:57:58 -0700 Subject: [PATCH] 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: d7c2c5c98c4f ("AP: Add initial support for 6 GHz band") Signed-off-by: Pradeep Kumar Chitrapu --- src/common/hw_features_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/hw_features_common.c b/src/common/hw_features_common.c index f6c67a375..1d9387f70 100644 --- a/src/common/hw_features_common.c +++ b/src/common/hw_features_common.c @@ -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;