summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorc_manjee <c_manjee@qti.qualcomm.com>2016-01-07 18:20:26 +0530
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2016-01-08 13:20:28 +0530
commitdcb8137c9a528c078931af13d9f8b2bfadb00a6d (patch)
tree4aa5296af7787e98f27aaba9384cf20a15505878
parentca86ef7dff34e2d50230bf016a08c03b64cd6628 (diff)
qcacld: Avoid Channel 0 in softap acs channel list
If ACS is enabled in hostapd configuration,hostapd sends a list of channels to HDD for softap bring-up. If hostapd finds a invalid/unsupported channel in its channel list, it will send a 0 for that channel. Since HDD always takes the lowest channel as starting channel for scan, the scan will always include 2.4Ghz channels even if channel mode is set to a. Hence HDD should ignore these invalid entries in channel list. CRs-fixed: 959490 Change-Id: Iddaf6c4ba14e22b476f22f1f098faf726f4407ec
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 0aa43948cd1c..66380a0dc580 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -7772,7 +7772,9 @@ static void wlan_hdd_set_acs_ch_range(tsap_Config_t *sap_cfg, bool ht_enabled,
sap_cfg->acs_cfg.end_ch =
sap_cfg->acs_cfg.ch_list[sap_cfg->acs_cfg.ch_list_count - 1];
for (i = 0; i < sap_cfg->acs_cfg.ch_list_count; i++) {
- if (sap_cfg->acs_cfg.start_ch > sap_cfg->acs_cfg.ch_list[i])
+ /* avoid channel 0 as start channel */
+ if (sap_cfg->acs_cfg.start_ch > sap_cfg->acs_cfg.ch_list[i] &&
+ sap_cfg->acs_cfg.ch_list[i] != 0 )
sap_cfg->acs_cfg.start_ch = sap_cfg->acs_cfg.ch_list[i];
if (sap_cfg->acs_cfg.end_ch < sap_cfg->acs_cfg.ch_list[i])
sap_cfg->acs_cfg.end_ch = sap_cfg->acs_cfg.ch_list[i];