Browse Source

qcacld-3.0: Avoid STA CSA to disallowed channel

STA is on 5 GHz 5260, SAP on 6 GHz 6415, GO on 5 GHz 5745.
STA receives CSA event to move to 5540. Then 3 vdevs are
MCC in 5 GHz high band which is not supported by target.
And we should avoid SAP+GO on same band MCC.
Fix by:
1. Check allow concurrency for STA CSA for more than 2 connection
case.
2. change SAP PCL to only includes SCC 5 GHz channel and 2.4
GHz channel to avoid SAP choosing 5 GHz MCC channel if STA+GO is in
SBS mode.

Change-Id: Iadf8cfd215393baf4823c0e7cb6aa3656d8004dd
CRs-Fixed: 3482252
Liangwei Dong 1 year ago
parent
commit
c2b9737b8f

+ 1 - 1
components/cmn_services/policy_mgr/src/wlan_policy_mgr_tables_2x2_dbs_sbs_i.h

@@ -705,7 +705,7 @@ pm_third_connection_pcl_dbs_sbs_2x2_table = {
 	[PM_STA_MODE] = {
 		PM_MAX_PCL_TYPE, PM_MAX_PCL_TYPE, PM_MAX_PCL_TYPE},
 	[PM_SAP_MODE] = {
-		PM_SBS_CH_SCC_CH_5G_24G, PM_SBS_CH, PM_SBS_CH},
+		PM_SBS_CH_2G, PM_SBS_CH, PM_SBS_CH},
 	[PM_P2P_CLIENT_MODE] = {
 		PM_SCC_ON_5_5G_24G, PM_SCC_CH, PM_SCC_CH_24G},
 	[PM_P2P_GO_MODE] = {

+ 14 - 2
core/mac/src/pe/lim/lim_send_sme_rsp_messages.c

@@ -1741,10 +1741,12 @@ prnt_log:
 static bool lim_is_csa_channel_allowed(struct mac_context *mac_ctx,
 				       struct pe_session *session_entry,
 				       qdf_freq_t ch_freq1,
-				       uint32_t ch_freq2)
+				       uint32_t ch_freq2,
+				       enum phy_ch_width new_ch_width)
 {
 	bool is_allowed = true;
 	u32 cnx_count = 0;
+	enum QDF_OPMODE mode;
 
 	if (!session_entry->vdev ||
 	    wlan_cm_is_vdev_disconnecting(session_entry->vdev) ||
@@ -1754,10 +1756,19 @@ static bool lim_is_csa_channel_allowed(struct mac_context *mac_ctx,
 		return false;
 	}
 
+	mode = wlan_vdev_mlme_get_opmode(session_entry->vdev);
 	cnx_count = policy_mgr_get_connection_count(mac_ctx->psoc);
 	if ((cnx_count > 1) && !policy_mgr_is_hw_dbs_capable(mac_ctx->psoc) &&
 	    !policy_mgr_is_interband_mcc_supported(mac_ctx->psoc)) {
 		is_allowed = wlan_reg_is_same_band_freqs(ch_freq1, ch_freq2);
+	} else if (cnx_count > 2) {
+		is_allowed =
+		policy_mgr_allow_concurrency_csa(
+			mac_ctx->psoc, ch_freq2,
+			policy_mgr_convert_device_mode_to_qdf_type(mode),
+			session_entry->vdev_id,
+			policy_mgr_get_bw(new_ch_width), false,
+			CSA_REASON_UNKNOWN);
 	}
 
 	return is_allowed;
@@ -1861,7 +1872,8 @@ void lim_handle_sta_csa_param(struct mac_context *mac_ctx,
 
 	if (!lim_is_csa_channel_allowed(mac_ctx, session_entry,
 					session_entry->curr_op_freq,
-					csa_params->csa_chan_freq)) {
+					csa_params->csa_chan_freq,
+					csa_params->new_ch_width)) {
 		pe_debug("Channel switch is not allowed");
 		goto err;
 	}