From e7478e97d53453b4bc092cdbfee8234c8e48f7b6 Mon Sep 17 00:00:00 2001 From: Liangwei Dong Date: Wed, 22 May 2019 05:16:46 -0400 Subject: [PATCH] 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 --- core/hdd/src/wlan_hdd_hostapd.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/core/hdd/src/wlan_hdd_hostapd.c b/core/hdd/src/wlan_hdd_hostapd.c index 9ff2d99b5313..efe63a8e31a0 100644 --- a/core/hdd/src/wlan_hdd_hostapd.c +++ b/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; }