Browse Source

qcacld-3.0: Update link_id and vdev_id to link info context

After roaming to 3 Link MLO AP, the link info context is updated
based on link id, but this will cause issue if roamed AP has
different link ids.

So reset the link info context upon roaming and update the link_id
and vdev_id for all the links.

Change-Id: I6e88ed623fa6d068fe7a5ec572cfa132ec72ea6a
CRs-Fixed: 3603945
Pragaspathi Thilagaraj 1 year ago
parent
commit
ca252bd78b

+ 1 - 0
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_fw_sync.c

@@ -439,6 +439,7 @@ cm_roam_update_mlo_mgr_info(struct wlan_objmgr_vdev *vdev,
 	if (!is_multi_link_roam(roam_synch_data))
 		return;
 
+	mlo_mgr_reset_ap_link_info(vdev);
 	for (i = 0; i < roam_synch_data->num_setup_links; i++) {
 		ml_link = &roam_synch_data->ml_link[i];
 

+ 7 - 5
components/umac/mlme/connection_mgr/core/src/wlan_cm_roam_offload_event.c

@@ -533,14 +533,15 @@ QDF_STATUS cm_roam_sync_event_handler_cb(struct wlan_objmgr_vdev *vdev,
 
 	if (MLME_IS_ROAM_SYNCH_IN_PROGRESS(psoc, sync_ind->roamed_vdev_id) &&
 	    !is_multi_link_roam(sync_ind)) {
-		mlme_err("Ignoring RSI since one is already in progress");
+		mlme_err("vdev:%d Ignoring RSI as its already in progress on roamed vdev:%d",
+			 vdev_id, sync_ind->roamed_vdev_id);
 		status = QDF_STATUS_E_FAILURE;
 		goto err;
 	}
 
 	if (!QDF_IS_STATUS_SUCCESS(cm_fw_roam_sync_start_ind(vdev,
 							     sync_ind))) {
-		mlme_err("LFR3: CSR Roam synch cb failed");
+		mlme_err("LFR3: vdev:%d CSR Roam synch cb failed", vdev_id);
 		wlan_cm_free_roam_synch_frame_ind(rso_cfg);
 		goto err;
 	}
@@ -554,7 +555,8 @@ QDF_STATUS cm_roam_sync_event_handler_cb(struct wlan_objmgr_vdev *vdev,
 					(QDF_IEEE80211_3ADDR_HDR_LEN +
 					 MAC_B_PR_SSID_OFFSET);
 		} else {
-			mlme_err("LFR3: MLO: Invalid link Beacon Length");
+			mlme_err("LFR3: MLO: vdev:%d Invalid link Beacon Length",
+				 vdev_id);
 			goto err;
 		}
 	} else if (sync_ind->beacon_probe_resp_length >
@@ -580,14 +582,14 @@ QDF_STATUS cm_roam_sync_event_handler_cb(struct wlan_objmgr_vdev *vdev,
 			(QDF_IEEE80211_3ADDR_HDR_LEN + MAC_B_PR_SSID_OFFSET);
 
 	} else {
-		mlme_err("LFR3: Invalid Beacon Length");
+		mlme_err("LFR3: vdev:%d Invalid Beacon Length", vdev_id);
 		goto err;
 	}
 
 	if (QDF_IS_STATUS_ERROR(cm_roam_pe_sync_callback(sync_ind,
 							 vdev_id,
 							 ie_len))) {
-		mlme_err("LFR3: PE roam synch cb failed");
+		mlme_err("LFR3: vdev:%d PE roam synch cb failed", vdev_id);
 		status = QDF_STATUS_E_BUSY;
 		goto err;
 	}

+ 6 - 6
components/umac/mlme/mlo_mgr/src/wlan_mlo_mgr_roam.c

@@ -307,30 +307,30 @@ void mlo_mgr_roam_update_ap_link_info(struct wlan_objmgr_vdev *vdev,
 				      struct wlan_channel *channel)
 {
 	struct mlo_link_info *link_info;
-	uint8_t iter, link_id;
+	uint8_t iter;
 
 	if (!vdev || !vdev->mlo_dev_ctx || !vdev->mlo_dev_ctx->link_ctx ||
 	    !src_link_info)
 		return;
 
-	link_id = src_link_info->link_id;
 	for (iter = 0; iter < WLAN_MAX_ML_BSS_LINKS; iter++) {
 		link_info = &vdev->mlo_dev_ctx->link_ctx->links_info[iter];
-		if (link_id == link_info->link_id)
+		if (qdf_is_macaddr_zero(&link_info->ap_link_addr))
 			break;
 	}
 
 	if (iter == WLAN_MAX_ML_BSS_LINKS)
 		return;
 
-	qdf_mem_copy(&link_info->ap_link_addr,
-		     src_link_info->link_addr.bytes,
+	link_info->link_id = src_link_info->link_id;
+	link_info->vdev_id = src_link_info->vdev_id;
+	qdf_mem_copy(&link_info->ap_link_addr, src_link_info->link_addr.bytes,
 		     QDF_MAC_ADDR_SIZE);
 	qdf_mem_copy(&link_info->link_addr, src_link_info->self_link_addr.bytes,
 		     QDF_MAC_ADDR_SIZE);
 	qdf_mem_copy(link_info->link_chan_info, channel, sizeof(*channel));
 
-	mlo_debug("link_id: %d, vdev_id:%d freq:%d ap_link_addr:" QDF_MAC_ADDR_FMT " self_link_addr:" QDF_MAC_ADDR_FMT,
+	mlo_debug("link_id: %d, vdev_id:%d freq:%d ap_link_addr: "QDF_MAC_ADDR_FMT", self_link_addr: "QDF_MAC_ADDR_FMT,
 		  link_info->link_id, link_info->vdev_id,
 		  link_info->link_chan_info->ch_freq,
 		  QDF_MAC_ADDR_REF(link_info->ap_link_addr.bytes),