Parcourir la source

qcacld-3.0: Check interband MCC for STA CSA

For single-MAC and no-interband MCC scenario, don't switch
channel for STA if the new channel is creating interband-MCC
concurrent combination.

Change-Id: I6886d58dfe8a8845bcded90ab3422b5f79abbe4a
CRs-Fixed: 2711469
Rachit Kankane il y a 4 ans
Parent
commit
b8b4431052
1 fichiers modifiés avec 31 ajouts et 0 suppressions
  1. 31 0
      core/mac/src/pe/lim/lim_send_sme_rsp_messages.c

+ 31 - 0
core/mac/src/pe/lim/lim_send_sme_rsp_messages.c

@@ -1533,6 +1533,31 @@ prnt_log:
 	return QDF_STATUS_SUCCESS;
 }
 
+#ifdef FEATURE_NO_DBS_INTRABAND_MCC_SUPPORT
+static bool lim_is_csa_channel_allowed(struct mac_context *mac_ctx,
+				       qdf_freq_t ch_freq1,
+				       uint32_t ch_freq2)
+{
+	bool is_allowed = true;
+	u32 cnx_count = 0;
+
+	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);
+	}
+
+	return is_allowed;
+}
+#else
+static bool lim_is_csa_channel_allowed(struct mac_context *mac_ctx,
+				       qdf_freq_t ch_freq1,
+				       uint32_t ch_freq2)
+{
+	return true;
+}
+#endif
+
 /**
  * lim_handle_csa_offload_msg() - Handle CSA offload message
  * @mac_ctx:         pointer to global adapter context
@@ -1582,6 +1607,12 @@ void lim_handle_csa_offload_msg(struct mac_context *mac_ctx,
 		pe_debug("Invalid role to handle CSA");
 		goto err;
 	}
+
+	if (!lim_is_csa_channel_allowed(mac_ctx, session_entry->curr_op_freq,
+					csa_params->csa_chan_freq)) {
+		pe_debug("Channel switch is not allowed");
+		goto err;
+	}
 	/*
 	 * on receiving channel switch announcement from AP, delete all
 	 * TDLS peers before leaving BSS and proceed for channel switch