Explorar el Código

qcacld-3.0: Allow SAP to come up on DFS channel in SCC mode

Allow SAP to come up on DFS channel in STA+SAP concurrency mode
only when g_sta_sap_scc_on_dfs_chan enabled in ini file and also
disable chan_switch_hostapd_rate_enabled when force SCC is enabled.

CRs-Fixed: 2133958
Change-Id: Id1333a49d0538eb4ccfaf3c8498e9ca06671de02
Ganesh Kondabattini hace 7 años
padre
commit
4a7f5b9d9d

+ 2 - 1
core/hdd/src/wlan_hdd_cfg.c

@@ -8326,8 +8326,9 @@ QDF_STATUS hdd_set_policy_mgr_user_cfg(struct hdd_context *hdd_ctx)
 	user_cfg->mcc_to_scc_switch_mode =
 		hdd_ctx->config->WlanMccToSccSwitchMode;
 	user_cfg->sub_20_mhz_enabled = cds_is_sub_20_mhz_enabled();
+	user_cfg->is_sta_sap_scc_allowed_on_dfs_chan =
+		hdd_ctx->config->sta_sap_scc_on_dfs_chan;
 	status = policy_mgr_set_user_cfg(hdd_ctx->hdd_psoc, user_cfg);
-
 	qdf_mem_free(user_cfg);
 
 	return status;

+ 5 - 0
core/hdd/src/wlan_hdd_hostapd.c

@@ -7570,6 +7570,11 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
 	pConfig->chan_switch_hostapd_rate_enabled =
 		iniConfig->chan_switch_hostapd_rate_enabled;
 
+	if (iniConfig->WlanMccToSccSwitchMode !=
+			QDF_MCC_TO_SCC_SWITCH_DISABLE) {
+		pConfig->chan_switch_hostapd_rate_enabled = false;
+	}
+
 	pConfig->enOverLapCh = iniConfig->gEnableOverLapCh;
 	pConfig->dtim_period = pBeacon->dtim_period;
 	pConfig->dfs_beacon_tx_enhanced = iniConfig->dfs_beacon_tx_enhanced;

+ 3 - 1
core/sme/src/csr/csr_api_roam.c

@@ -13855,6 +13855,7 @@ void csr_roam_prepare_bss_params(tpAniSirGlobal pMac, uint32_t sessionId,
 	uint8_t Channel;
 	ePhyChanBondState cbMode = PHY_SINGLE_CHANNEL_CENTERED;
 	struct csr_roam_session *pSession = CSR_GET_SESSION(pMac, sessionId);
+	bool skip_hostapd_rate = !pProfile->chan_switch_hostapd_rate_enabled;
 
 	if (!pSession) {
 		sme_err("session %d not found", sessionId);
@@ -13870,7 +13871,8 @@ void csr_roam_prepare_bss_params(tpAniSirGlobal pMac, uint32_t sessionId,
 		}
 	} else {
 		csr_roam_get_bss_start_parms(pMac, pProfile,
-					     &pSession->bssParams, false);
+					     &pSession->bssParams,
+					     skip_hostapd_rate);
 		/* Use the first SSID */
 		if (pProfile->SSIDs.numOfSSIDs)
 			qdf_mem_copy(&pSession->bssParams.ssId,