Parcourir la source

qcacld-3.0: Don't enable roaming till vdev is up during link switch

During link switch, as part of the disconnect sequence, roaming
is enabled on the other connected vdev and this causes RSO start
to be sent before vdev up is sent on that vdev. This causes
abnormal firmware behavior.

So don't send enable roaming till the vdev is up in case of link
switch. RSO start will be sent as part of the install key sequence.

Change-Id: Ib9fe520ec3d2b5c91fdba192934418e235082a31
CRs-Fixed: 3581618
Pragaspathi Thilagaraj il y a 1 an
Parent
commit
72c6ae5928

+ 9 - 0
components/cmn_services/interface_mgr/src/wlan_if_mgr_roam.c

@@ -37,6 +37,7 @@
 #include "wlan_scan_api.h"
 #include "wlan_mlo_mgr_roam.h"
 #include "wlan_mlo_mgr_sta.h"
+#include "wlan_mlo_mgr_link_switch.h"
 
 #ifdef WLAN_FEATURE_11BE_MLO
 static inline bool
@@ -169,6 +170,14 @@ if_mgr_enable_roaming_on_connected_sta(struct wlan_objmgr_pdev *pdev,
 	struct wlan_objmgr_psoc *psoc;
 	uint8_t vdev_id;
 
+	/*
+	 * When link switch is in progress, don't send RSO Enable before vdev
+	 * is up. RSO Enable will be sent as part of install keys once
+	 * link switch connect sequence is complete.
+	 */
+	if (mlo_mgr_is_link_switch_in_progress(vdev))
+		return QDF_STATUS_SUCCESS;
+
 	psoc = wlan_vdev_get_psoc(vdev);
 	if (!psoc)
 		return QDF_STATUS_E_FAILURE;

+ 16 - 3
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload.c

@@ -4679,8 +4679,21 @@ cm_mlo_roam_switch_for_link(struct wlan_objmgr_pdev *pdev,
 	enum roam_offload_state cur_state = mlme_get_roam_state(psoc, vdev_id);
 
 	if (reason != REASON_ROAM_HANDOFF_DONE &&
-	    reason != REASON_ROAM_ABORT)
+	    reason != REASON_ROAM_ABORT &&
+	    reason != REASON_ROAM_LINK_SWITCH_ASSOC_VDEV_CHANGE) {
+		mlo_debug("CM_RSO: link vdev:%d state switch received with invalid reason:%d",
+			  vdev_id, reason);
 		return QDF_STATUS_E_FAILURE;
+	}
+
+	/*
+	 * change roam state to deinit for assoc vdev that has now changed to
+	 * link vdev
+	 */
+	if (reason == REASON_ROAM_LINK_SWITCH_ASSOC_VDEV_CHANGE) {
+		mlme_set_roam_state(psoc, vdev_id, WLAN_ROAM_DEINIT);
+		return QDF_STATUS_SUCCESS;
+	}
 
 	switch (cur_state) {
 	case WLAN_ROAM_DEINIT:
@@ -4691,8 +4704,8 @@ cm_mlo_roam_switch_for_link(struct wlan_objmgr_pdev *pdev,
 		mlme_set_roam_state(psoc, vdev_id, WLAN_ROAM_DEINIT);
 		break;
 	default:
-		mlme_err("ROAM: MLO Roam synch not allowed in [%d] state",
-			 cur_state);
+		mlme_err("ROAM: vdev:%d MLO Roam synch not allowed in [%d] state reason:%d",
+			 vdev_id, cur_state, reason);
 		return QDF_STATUS_E_FAILURE;
 	}
 

+ 1 - 0
components/umac/mlme/connection_mgr/dispatcher/inc/wlan_cm_roam_public_struct.h

@@ -92,6 +92,7 @@
 #define REASON_ROAM_HANDOFF_DONE                    52
 #define REASON_ROAM_ABORT                           53
 #define REASON_ROAM_SET_PRIMARY                     54
+#define REASON_ROAM_LINK_SWITCH_ASSOC_VDEV_CHANGE   55
 
 #define FILS_MAX_KEYNAME_NAI_LENGTH WLAN_CM_FILS_MAX_KEYNAME_NAI_LENGTH
 #define WLAN_FILS_MAX_REALM_LEN WLAN_CM_FILS_MAX_REALM_LEN