Browse Source

qcacld-3.0: Drop CSA if any of the ML links is disconnecting

Currently, host driver sends RSO stop request to firmware when a
disconnect request is received. It waits for the RSO stop response
by running a timer and continue disconnect operation after
getting response/timeout happens.
But if host driver receives CSA event from firmware(via scheduler
thread) and disconnect from userspace(via wpa_supplicant thread)
in parallel, these two get processed in different threads. CSA may
send RSO stop request to firmware but it doesn't have any
wait-for RSO_STOP mechanism.
Disconnect also tries to send RSO_STOP request to firmware but
doesn't send as the RSO state is already moved by CSA.
Disconnect would continue and gets handled in vdev state machine.

When disconnect request is received from userspace, non-assoc
link connection manager state machine is moved to DISCONNECTING
first and then assoc link connection manager SM is moved.
VDEV state machine is not yet aware of the disconnection.
VDEV SM cannot handle this disconnect if VDEV_RESTART(CSA) is
posted to it before posting EV_DOWN(disconnect).
So, avoid posting VDEV_RESTART to VDEV SM if any of the VDEV
is in disconnecting state. Check for the status just before
posting, i.e. after sending RSO_STOP req to firmware to avoid
possible race conditions due to WMI delays.

Change-Id: I7bc876847a8dbc9ccb38128b1fa4dde6af6358d2
CRs-Fixed: 3623360
Srinivas Dasari 1 year ago
parent
commit
ab67083be0
1 changed files with 5 additions and 5 deletions
  1. 5 5
      core/mac/src/pe/lim/lim_send_sme_rsp_messages.c

+ 5 - 5
core/mac/src/pe/lim/lim_send_sme_rsp_messages.c

@@ -2286,11 +2286,6 @@ void lim_handle_sta_csa_param(struct mac_context *mac_ctx,
 				lim_ch_switch, ch_params))
 		goto err;
 
-	if (!wlan_cm_is_vdev_connected(session_entry->vdev)) {
-		pe_info_rl("Ignore CSA, vdev is in not in conncted state");
-		goto err;
-	}
-
 	if (wlan_vdev_mlme_is_mlo_vdev(session_entry->vdev)) {
 		link_id = wlan_vdev_get_link_id(session_entry->vdev);
 		update_csa_link_info(session_entry->vdev, link_id, csa_params);
@@ -2311,6 +2306,11 @@ void lim_handle_sta_csa_param(struct mac_context *mac_ctx,
 						   REASON_DRIVER_DISABLED,
 						   RSO_CHANNEL_SWITCH);
 
+	if (mlo_is_any_link_disconnecting(session_entry->vdev)) {
+		pe_info_rl("Ignore CSA, vdev is in not in conncted state");
+		goto err;
+	}
+
 	lim_prepare_for11h_channel_switch(mac_ctx, session_entry);
 
 	lim_flush_bssid(mac_ctx, session_entry->bssId);