소스 검색

qcacld-3.0: Set link id correctly for roaming

When handle FW roam sync event, reset link id of every vdev in the MLO,
then set correct link id for the vdev according to roam offload sync
indication event. Otherwise link id may be invalid in vdev.

Change-Id: I91b36d154ab3115815211698b6c5237a3bfa1f5f
CRs-Fixed: 3512507
Bing Sun 1 년 전
부모
커밋
9e659f01b9
1개의 변경된 파일24개의 추가작업 그리고 7개의 파일을 삭제
  1. 24 7
      components/umac/mlme/mlo_mgr/src/wlan_mlo_mgr_roam.c

+ 24 - 7
components/umac/mlme/mlo_mgr/src/wlan_mlo_mgr_roam.c

@@ -31,6 +31,7 @@
 #include <include/wlan_mlme_cmn.h>
 #include <wlan_cm_api.h>
 #include <utils_mlo.h>
+#include <wlan_mlo_mgr_peer.h>
 
 #ifdef WLAN_FEATURE_11BE_MLO
 static bool
@@ -789,14 +790,30 @@ mlo_roam_set_link_id(struct wlan_objmgr_vdev *vdev,
 		     struct roam_offload_synch_ind *sync_ind)
 {
 	uint8_t i;
+	uint8_t j;
+	struct wlan_mlo_dev_context *mlo_dev_ctx;
 
-	for (i = 0; i < sync_ind->num_setup_links; i++) {
-		if (sync_ind->ml_link[i].vdev_id == wlan_vdev_get_id(vdev)) {
-			wlan_vdev_set_link_id(vdev,
-					      sync_ind->ml_link[i].link_id);
-			mlme_debug("Set link for vdev id %d link id %d",
-				   wlan_vdev_get_id(vdev),
-				   sync_ind->ml_link[i].link_id);
+	if (!vdev || !sync_ind || !vdev->mlo_dev_ctx) {
+		mlo_debug("Invalid input");
+		return;
+	}
+
+	mlo_dev_ctx = vdev->mlo_dev_ctx;
+	for (i = 0; i < WLAN_UMAC_MLO_MAX_VDEVS; i++) {
+		vdev = mlo_dev_ctx->wlan_vdev_list[i];
+		if (!vdev)
+			continue;
+
+		wlan_vdev_set_link_id(vdev, WLAN_LINK_ID_INVALID);
+		for (j = 0; j < sync_ind->num_setup_links; j++) {
+			if (sync_ind->ml_link[j].vdev_id ==
+			    wlan_vdev_get_id(vdev)) {
+				wlan_vdev_set_link_id(
+					vdev, sync_ind->ml_link[j].link_id);
+				mlme_debug("Set link for vdev id %d link id %d",
+					   wlan_vdev_get_id(vdev),
+					   sync_ind->ml_link[j].link_id);
+			}
 		}
 	}
 }