From e994970c2af1c434854ac5c7a27634ebf582a3ea Mon Sep 17 00:00:00 2001 From: Himanshu Agarwal Date: Thu, 1 Mar 2018 17:30:01 +0530 Subject: [PATCH] qcacld-3.0: Update band to ICM module ICM does not support hw_mode=any at present. When hw_mode is set to any in hostapd.conf, HOST driver choose one band out of 2.4Ghz and 5Ghz based on "acs_freq_band" ini item and update the ACS and PCL channel list accordingly. But currently driver does not send updated band to ICM and so ICM still gets BAND_ALL from HOST driver which is INVALID for ICM module. As a result ICM algorithm does not run and channel selection fails. Send Updated band to ICM and also update channel width accordingly for 2.4Ghz band as it does not support 80/160/80PLUS80 Mhz. Change-Id: I13593a3c59c204d1ff7677e67d96d039c9456568 CRs-Fixed: 2196247 --- core/hdd/src/wlan_hdd_cfg80211.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index 6b6143e8d450..cd8dfa3e3cf5 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -2178,10 +2178,18 @@ static void hdd_get_scan_band(struct hdd_context *hdd_ctx, hdd_err("invalid band"); if (HDD_EXTERNAL_ACS_FREQ_BAND_24GHZ == hdd_ctx->config->external_acs_freq_band) - hdd_update_acs_channel_list(sap_config, BAND_2G); + *band = BAND_2G; else - hdd_update_acs_channel_list(sap_config, BAND_5G); + *band = BAND_5G; + + hdd_update_acs_channel_list(sap_config, *band); } + + if (*band == BAND_2G && + (sap_config->acs_cfg.ch_width == CH_WIDTH_80MHZ || + sap_config->acs_cfg.ch_width == CH_WIDTH_160MHZ || + sap_config->acs_cfg.ch_width == CH_WIDTH_80P80MHZ)) + sap_config->acs_cfg.ch_width = CH_WIDTH_40MHZ; }