فهرست منبع

qcacld-3.0: Correct condition to skip DFS channels

Currently the driver skips the DFS channels if
g_sta_sap_scc_on_dfs_chan = 2 which should not
happen as master mode is supported if this ini
is 2. Driver should only skip the DFS channels
if the ini value is 1.
Fix is to correct the condition for the same.

Change-Id: I9d6c2f2c42f9d9f4f1b5bd080b9cdc5c13e031f2
CRs-Fixed: 2700201
Utkarsh Bhatnagar 4 سال پیش
والد
کامیت
3402879c05
1فایلهای تغییر یافته به همراه7 افزوده شده و 5 حذف شده
  1. 7 5
      core/sap/src/sap_ch_select.c

+ 7 - 5
core/sap/src/sap_ch_select.c

@@ -413,8 +413,7 @@ static bool sap_chan_sel_init(mac_handle_t mac_handle,
 	uint16_t channelnum = 0;
 	struct mac_context *mac = MAC_CONTEXT(mac_handle);
 	bool include_dfs_ch = true;
-	bool sta_sap_scc_on_dfs_chan =
-		policy_mgr_is_sta_sap_scc_allowed_on_dfs_chan(mac->psoc);
+	uint8_t sta_sap_scc_on_dfs_chnl_config_value;
 
 	pSpectInfoParams->numSpectChans =
 		mac->scan.base_channels.numChannels;
@@ -430,6 +429,8 @@ static bool sap_chan_sel_init(mac_handle_t mac_handle,
 
 	pChans = mac->scan.base_channels.channel_freq_list;
 
+	policy_mgr_get_sta_sap_scc_on_dfs_chnl(mac->psoc,
+			&sta_sap_scc_on_dfs_chnl_config_value);
 #if defined(FEATURE_WLAN_STA_AP_MODE_DFS_DISABLE)
 	if (sap_ctx->dfs_ch_disable == true)
 		include_dfs_ch = false;
@@ -462,14 +463,15 @@ static bool sap_chan_sel_init(mac_handle_t mac_handle,
 			continue;
 		}
 
-		if (!include_dfs_ch || sta_sap_scc_on_dfs_chan) {
+		if (!include_dfs_ch ||
+		    sta_sap_scc_on_dfs_chnl_config_value == 1) {
 			if (wlan_reg_is_dfs_for_freq(mac->pdev,
 						     pSpectCh->chan_freq)) {
 				QDF_TRACE(QDF_MODULE_ID_SAP,
 					  QDF_TRACE_LEVEL_INFO_HIGH,
-					  "In %s, DFS Ch %d not considered for ACS. include_dfs_ch %u, sta_sap_scc_on_dfs_chan %d",
+					  "In %s, DFS Ch %d not considered for ACS. include_dfs_ch %u, sta_sap_scc_on_dfs_chnl_config_value %d",
 					  __func__, channel, include_dfs_ch,
-					  sta_sap_scc_on_dfs_chan);
+					  sta_sap_scc_on_dfs_chnl_config_value);
 				continue;
 			}
 		}