Jelajahi Sumber

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
Liangwei Dong 3 tahun lalu
induk
melakukan
641ff5696e
1 mengubah file dengan 6 tambahan dan 3 penghapusan
  1. 6 3
      core/sap/src/sap_module.c

+ 6 - 3
core/sap/src/sap_module.c

@@ -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);