Pārlūkot izejas kodu

qcacmn: Restore RSO state to upon link switch failure

RSO is stopped upon receiving link switch request to avoid the
race between link switch and roaming. RSO is enabled again once
link switch operation is successfully completed, i.e. upon connect
complete of the new link.
But link switch may fail due to multiple reasons (e.g. scan
result/partner info is not available for link switch) and the
connection is retained with single link as the other link is
already cleaned up as part of link switch request processing.
RSO is not enabled in such failure cases and thus firmware
doesn't roam even it finds a better candidate.
Restore RSO state to ENABLED upon link switch failure.
Also, cleanup the failed link bit in wlan_connected_links upon
link switch failure.

Change-Id: Ieefd7bf9615c80e7ab6ecdbee5c99d6e52857cc6
CRs-Fixed: 3681892
Srinivas Dasari 1 gadu atpakaļ
vecāks
revīzija
0c96c2267d
1 mainītis faili ar 21 papildinājumiem un 2 dzēšanām
  1. 21 2
      umac/mlo_mgr/src/wlan_mlo_mgr_link_switch.c

+ 21 - 2
umac/mlo_mgr/src/wlan_mlo_mgr_link_switch.c

@@ -449,11 +449,24 @@ mlo_mgr_reset_roam_state_for_link_vdev(struct wlan_objmgr_vdev *vdev,
 		mlo_err("vdev:%d failed to change RSO state to deinit",
 			wlan_vdev_get_id(assoc_vdev));
 }
+
+static void
+mlo_mgr_restore_rso_upon_link_switch_failure(struct wlan_objmgr_vdev *vdev)
+{
+	wlan_cm_roam_state_change(wlan_vdev_get_pdev(vdev),
+				  wlan_vdev_get_id(vdev),
+				  WLAN_ROAM_RSO_ENABLED,
+				  REASON_CONNECT);
+}
 #else
 static inline void
 mlo_mgr_reset_roam_state_for_link_vdev(struct wlan_objmgr_vdev *vdev,
 				       struct wlan_objmgr_vdev *assoc_vdev)
 {}
+
+static inline void
+mlo_mgr_restore_rso_upon_link_switch_failure(struct wlan_objmgr_vdev *vdev)
+{}
 #endif
 
 static QDF_STATUS
@@ -827,12 +840,18 @@ void mlo_mgr_link_switch_connect_done(struct wlan_objmgr_vdev *vdev,
 	struct wlan_mlo_link_switch_req *req;
 
 	req = &vdev->mlo_dev_ctx->link_ctx->last_req;
-	if (QDF_IS_STATUS_SUCCESS(status))
+	if (QDF_IS_STATUS_SUCCESS(status)) {
 		mlo_mgr_link_switch_connect_success_trans_state(vdev);
-	else
+	} else {
+		mlo_update_connected_links(vdev, 0);
 		mlo_err("VDEV %d link switch connect failed", req->vdev_id);
+	}
 
 	mlo_mgr_remove_link_switch_cmd(vdev);
+
+	if (QDF_IS_STATUS_ERROR(status))
+		mlo_mgr_restore_rso_upon_link_switch_failure(
+				wlan_mlo_get_assoc_link_vdev(vdev));
 }
 
 static enum wlan_mlo_link_switch_notify_reason