qcacld-3.0: Don't force SCC in AP+AP DFS scenario

Overwrite 2nd AP's channel with 1st AP only when:
1. Current operating mode is single mac
2. or 2nd AP is coming up on 5G band channel

Change-Id: I8260721a5f9b8547d93ed7c6775741e6a8cc2a44
CRs-Fixed: 2427083
This commit is contained in:
Rachit Kankane 2019-04-10 12:12:40 +05:30 • committed by nshrivas
commit 228370de3f
2 changed files with 23 additions and 10 deletions

View file

@ -5085,10 +5085,17 @@ int wlan_hdd_cfg80211_start_bss(struct hdd_adapter *adapter,
config->countryCode[0] = hdd_ctx->reg.alpha2[0];
config->countryCode[1] = hdd_ctx->reg.alpha2[1];
ret = wlan_hdd_sap_cfg_dfs_override(adapter);
if (ret < 0)
goto error;
/* Overwrite second AP's channel with first only when:
* 1. If operating mode is single mac
* 2. or if 2nd AP is coming up on 5G band channel
*/
ret = 0;
if (!policy_mgr_is_hw_dbs_capable(hdd_ctx->psoc) ||
WLAN_REG_IS_5GHZ_CH(config->channel)) {
ret = wlan_hdd_sap_cfg_dfs_override(adapter);
if (ret < 0)
goto error;
}
if (!ret && wlan_reg_is_dfs_ch(hdd_ctx->pdev, config->channel))
hdd_ctx->dev_dfs_cac_status = DFS_CAC_NEVER_DONE;

View file

@ -2195,11 +2195,6 @@ static QDF_STATUS sap_goto_starting(struct sap_context *sap_ctx,
sap_ctx->secondary_ch,
&sap_ctx->ch_params);
}
if (sap_ctx->channel > 14 &&
(sap_ctx->csr_roamProfile.phyMode == eCSR_DOT11_MODE_11g ||
sap_ctx->csr_roamProfile.phyMode ==
eCSR_DOT11_MODE_11g_ONLY))
sap_ctx->csr_roamProfile.phyMode = eCSR_DOT11_MODE_11a;
/*
* when AP2 is started while AP1 is performing ACS, we may not
@ -2212,13 +2207,24 @@ static QDF_STATUS sap_goto_starting(struct sap_context *sap_ctx,
con_ch = sme_get_beaconing_concurrent_operation_channel(
mac_handle, sap_ctx->sessionId);
if (con_ch && wlan_reg_is_dfs_ch(mac_ctx->pdev, con_ch)) {
/* Overwrite second AP's channel with first only when:
* 1. If operating mode is single mac
* 2. or if 2nd AP is coming up on 5G band channel
*/
if ((!policy_mgr_is_hw_dbs_capable(mac_ctx->psoc) ||
WLAN_REG_IS_5GHZ_CH(sap_ctx->channel)) &&
con_ch && wlan_reg_is_dfs_ch(mac_ctx->pdev, con_ch)) {
sap_ctx->channel = con_ch;
wlan_reg_set_channel_params(mac_ctx->pdev,
sap_ctx->channel, 0,
&sap_ctx->ch_params);
}
}
if (sap_ctx->channel > 14 &&
(sap_ctx->csr_roamProfile.phyMode == eCSR_DOT11_MODE_11g ||
sap_ctx->csr_roamProfile.phyMode ==
eCSR_DOT11_MODE_11g_ONLY))
sap_ctx->csr_roamProfile.phyMode = eCSR_DOT11_MODE_11a;
/*
* Transition from SAP_INIT to SAP_STARTING