Browse Source

qcacld-3.0: Consider ACS override params only if ACS is enabled

qcacld-2.0 to qcacld-3.0 propagation

Consider the parameters 'acs_channel' and 'acs_dfs_mode' only
when ACS is enabled for that SAP. Otherwise driver is going to
override the channel even if user configures a fixed channel in
hostapd.conf file.

Change-Id: Ibe24828690ace91338ade10fd00c49fc4acdbd81
CRs-Fixed: 1026420
Kondabattini, Ganesh 8 years ago
parent
commit
c846f3a36a
1 changed files with 15 additions and 4 deletions
  1. 15 4
      core/hdd/src/wlan_hdd_hostapd.c

+ 15 - 4
core/hdd/src/wlan_hdd_hostapd.c

@@ -6942,10 +6942,21 @@ int wlan_hdd_cfg80211_start_bss(hdd_adapter_t *pHostapdAdapter,
 
 	pConfig->enOverLapCh = iniConfig->gEnableOverLapCh;
 	pConfig->dtim_period = pBeacon->dtim_period;
-	if (pHddCtx->acs_policy.acs_channel)
-		pConfig->channel = pHddCtx->acs_policy.acs_channel;
-	mode = pHddCtx->acs_policy.acs_dfs_mode;
-	pConfig->acs_dfs_mode = wlan_hdd_get_dfs_mode(mode);
+	hdd_info("acs_mode %d", pConfig->acs_cfg.acs_mode);
+
+	if (pConfig->acs_cfg.acs_mode == true) {
+		hdd_info("acs_channel %d, acs_dfs_mode %d",
+			pHddCtx->acs_policy.acs_channel,
+			pHddCtx->acs_policy.acs_dfs_mode);
+
+		if (pHddCtx->acs_policy.acs_channel)
+			pConfig->channel = pHddCtx->acs_policy.acs_channel;
+		mode = pHddCtx->acs_policy.acs_dfs_mode;
+		pConfig->acs_dfs_mode = wlan_hdd_get_dfs_mode(mode);
+	}
+
+	hdd_info("pConfig->channel %d, pConfig->acs_dfs_mode %d",
+		pConfig->channel, pConfig->acs_dfs_mode);
 
 	hdd_info("****pConfig->dtim_period=%d***",
 		pConfig->dtim_period);