qcacld-3.0: Avoid SAP channel change if target freq and bw same

Move the channel frequency and bandwidth check after
wlansap_get_csa_chanwidth_from_phymode API call. The API
may change the target channel bw if SAP works in concurrency
with STA on same channel.

Change-Id: I717c58e4a9e7eb6ea66b0eb56933b5508d4d83c0
CRs-Fixed: 3161386
This commit is contained in:
Liangwei Dong
2022-03-30 16:25:45 +08:00
committed by Madan Koyyalamudi
parent 2832b27d06
commit 641ff5696e

View File

@@ -1427,9 +1427,6 @@ QDF_STATUS wlansap_set_channel_change_with_csa(struct sap_context *sap_ctx,
mac->psoc, sap_ctx->sessionId, POLICY_MGR_BAND_5),
sap_get_csa_reason_str(sap_ctx->csa_reason),
sap_ctx->csa_reason, strict, sap_ctx->sessionId);
if (sap_ctx->chan_freq == target_chan_freq &&
sap_ctx->ch_params.ch_width == target_bw)
return QDF_STATUS_E_FAULT;
state = wlan_reg_get_channel_state_for_freq(mac->pdev,
target_chan_freq);
@@ -1455,6 +1452,12 @@ QDF_STATUS wlansap_set_channel_change_with_csa(struct sap_context *sap_ctx,
wlan_reg_set_channel_params_for_freq(mac->pdev, target_chan_freq, 0,
&tmp_ch_params);
if (sap_ctx->chan_freq == target_chan_freq &&
sap_ctx->ch_params.ch_width == tmp_ch_params.ch_width) {
sap_nofl_debug("target freq and bw %d not changed",
tmp_ch_params.ch_width);
return QDF_STATUS_E_FAULT;
}
is_dfs = wlan_mlme_check_chan_param_has_dfs(
mac->pdev, &tmp_ch_params,
target_chan_freq);