Browse Source

qcacld-3.0: Disallow STA CSA during disconnecting

STA is disconnecting and set rso stop to fw, and start "RSO stop"
timer. But in middle of it, the fw csa event comes, and it clears the
"RSO stop" timer, start “RESTAT” timer.
Finally when the RSO status comes from fw,  it can’t stop the rso
timer. Then the disconnecting is stuck in the state.

Fix by ignore the CSA if CM is in disconnecting or disconnected state.

Change-Id: I63f52d3a58b06ee012a05d5a4f194c32c63ab1f5
CRs-Fixed: 3281072
Liangwei Dong 2 years ago
parent
commit
900c3e4bd8
1 changed files with 11 additions and 1 deletions
  1. 11 1
      core/mac/src/pe/lim/lim_send_sme_rsp_messages.c

+ 11 - 1
core/mac/src/pe/lim/lim_send_sme_rsp_messages.c

@@ -1692,12 +1692,21 @@ 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)
 {
 	bool is_allowed = true;
 	u32 cnx_count = 0;
 
+	if (!session_entry->vdev ||
+	    wlan_cm_is_vdev_disconnecting(session_entry->vdev) ||
+	    wlan_cm_is_vdev_disconnected(session_entry->vdev)) {
+		pe_warn("CSA is ignored, vdev %d is disconnecting/ed",
+			session_entry->vdev_id);
+		return false;
+	}
+
 	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)) {
@@ -1754,7 +1763,8 @@ static void lim_handle_sta_csa_param(struct mac_context *mac_ctx,
 		goto err;
 	}
 
-	if (!lim_is_csa_channel_allowed(mac_ctx, session_entry->curr_op_freq,
+	if (!lim_is_csa_channel_allowed(mac_ctx, session_entry,
+					session_entry->curr_op_freq,
 					csa_params->csa_chan_freq)) {
 		pe_debug("Channel switch is not allowed");
 		goto err;