瀏覽代碼

qcacld-3.0: Handle GO start on DFS chan

Auto usercase allow AGO to start on DFS channel.
We need to do similar CAC allow/disallow check in GO mode
as we do in SAP mode. We should skip CAC as DFS master
functionality may be disabled based on INI configuration.
Merge the SAP CAC allow logic to GO interface.

Change-Id: Iba89b8b3f170d6ffe97f53198ad041e7ceb41b44
CRs-Fixed: 2474391
Liangwei Dong 5 年之前
父節點
當前提交
e7478e97d5
共有 1 個文件被更改,包括 3 次插入6 次删除
  1. 3 6
      core/hdd/src/wlan_hdd_hostapd.c

+ 3 - 6
core/hdd/src/wlan_hdd_hostapd.c

@@ -5096,10 +5096,11 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
 
 	ucfg_policy_mgr_get_mcc_scc_switch(hdd_ctx->psoc, &mcc_to_scc_switch);
 
-	if (adapter->device_mode == QDF_SAP_MODE) {
+	if (adapter->device_mode == QDF_SAP_MODE ||
+	    adapter->device_mode == QDF_P2P_GO_MODE) {
 		ie = wlan_get_ie_ptr_from_eid(WLAN_EID_COUNTRY,
 					      beacon->tail, beacon->tail_len);
-		if (ie) {
+		if ((adapter->device_mode == QDF_SAP_MODE) && ie) {
 			if (ie[1] < IEEE80211_COUNTRY_IE_MIN_LEN) {
 				hdd_err("Invalid Country IE len: %d", ie[1]);
 				ret = -EINVAL;
@@ -5172,10 +5173,6 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
 		wlansap_set_dfs_preferred_channel_location(mac_handle);
 
 		wlan_hdd_set_sap_mcc_chnl_avoid(hdd_ctx);
-	} else if (adapter->device_mode == QDF_P2P_GO_MODE) {
-		config->countryCode[0] = hdd_ctx->reg.alpha2[0];
-		config->countryCode[1] = hdd_ctx->reg.alpha2[1];
-		config->ieee80211d = 0;
 	} else {
 		config->ieee80211d = 0;
 	}