瀏覽代碼

qcacld-3.0: Populate partner info from roam sync ind to pe session

3-link ML connection/roaming expects link id to generate link
specific (re)assoc response from received (re)assoc response.
This info is fetched from pe_session but it's not populated
properly in case of roaming. Roam sync indication carries all
links info whereas the assoc rsp generation API expects the
link info for which it has to be generated.
Copy partner link info only from roam sync indication to
pe_session to cater the same.

Change-Id: I75c9a42688f7613ca3f1afab8afe77622bb659aa
CRs-Fixed: 3412939
Srinivas Dasari 2 年之前
父節點
當前提交
18b0b2c910

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

@@ -461,6 +461,14 @@ cm_fill_bssid_freq_info(uint8_t vdev_id,
 
 	return QDF_STATUS_SUCCESS;
 }
+
+static void
+cm_mlo_roam_copy_partner_info(struct wlan_cm_connect_resp *connect_rsp,
+			      struct roam_offload_synch_ind *roam_synch_data)
+{
+	mlo_roam_copy_partner_info(&connect_rsp->ml_parnter_info,
+				   roam_synch_data, WLAN_INVALID_VDEV_ID);
+}
 #else
 static QDF_STATUS
 cm_fill_bssid_freq_info(uint8_t vdev_id,
@@ -472,6 +480,12 @@ cm_fill_bssid_freq_info(uint8_t vdev_id,
 
 	return QDF_STATUS_SUCCESS;
 }
+
+static void
+cm_mlo_roam_copy_partner_info(struct wlan_cm_connect_resp *connect_rsp,
+			      struct roam_offload_synch_ind *roam_synch_data)
+{
+}
 #endif
 
 static void
@@ -991,7 +1005,7 @@ cm_fw_roam_sync_propagation(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id,
 	if (wlan_vdev_mlme_is_mlo_vdev(vdev))
 		policy_mgr_move_vdev_from_disabled_to_connection_tbl(psoc,
 								     vdev_id);
-	mlo_roam_copy_partner_info(connect_rsp, roam_synch_data);
+	cm_mlo_roam_copy_partner_info(connect_rsp, roam_synch_data);
 	mlo_roam_init_cu_bpcc(vdev, roam_synch_data);
 	mlo_roam_set_link_id(vdev, roam_synch_data);
 

+ 8 - 5
components/umac/mlme/mlo_mgr/inc/wlan_mlo_mgr_roam.h

@@ -149,15 +149,17 @@ QDF_STATUS mlo_enable_rso(struct wlan_objmgr_pdev *pdev,
 /**
  * mlo_roam_copy_partner_info - copy partner link info to connect response
  *
+ * @partner_info: Destination buffer to fill partner info from roam sync ind
  * @sync_ind: roam sync ind pointer
- * @connect_rsp: connect resp structure pointer
+ * @skip_vdev_id: Skip to copy the link info corresponds to this vdev_id
  *
  * This api will be called to copy partner link info to connect response.
  *
  * Return: none
  */
-void mlo_roam_copy_partner_info(struct wlan_cm_connect_resp *connect_rsp,
-				struct roam_offload_synch_ind *sync_ind);
+void mlo_roam_copy_partner_info(struct mlo_partner_info *partner_info,
+				struct roam_offload_synch_ind *sync_ind,
+				uint8_t skip_vdev_id);
 
 /**
  * mlo_roam_init_cu_bpcc() - init cu bpcc per roam sync data
@@ -428,8 +430,9 @@ QDF_STATUS mlo_enable_rso(struct wlan_objmgr_pdev *pdev,
 }
 
 static inline void
-mlo_roam_copy_partner_info(struct wlan_cm_connect_resp *connect_rsp,
-			   struct roam_offload_synch_ind *sync_ind)
+mlo_roam_copy_partner_info(struct mlo_partner_info *partner_info,
+			   struct roam_offload_synch_ind *sync_ind,
+			   uint8_t skip_vdev_id)
 {}
 
 static inline

+ 19 - 22
components/umac/mlme/mlo_mgr/src/wlan_mlo_mgr_roam.c

@@ -500,36 +500,33 @@ QDF_STATUS mlo_enable_rso(struct wlan_objmgr_pdev *pdev,
 }
 
 void
-mlo_roam_copy_partner_info(struct wlan_cm_connect_resp *connect_rsp,
-			   struct roam_offload_synch_ind *sync_ind)
+mlo_roam_copy_partner_info(struct mlo_partner_info *partner_info,
+			   struct roam_offload_synch_ind *sync_ind,
+			   uint8_t skip_vdev_id)
 {
-	uint8_t i;
-	struct mlo_partner_info *partner_info;
+	uint8_t i, j;
+	struct mlo_link_info *link;
 
 	if (!sync_ind)
 		return;
 
-	partner_info = &connect_rsp->ml_parnter_info;
+	for (i = 0, j = 0; i < sync_ind->num_setup_links; i++) {
+		if (sync_ind->ml_link[i].vdev_id == skip_vdev_id)
+			continue;
+		link = &partner_info->partner_link_info[j];
+		link->link_id = sync_ind->ml_link[i].link_id;
+		link->vdev_id = sync_ind->ml_link[i].vdev_id;
 
-	for (i = 0; i < sync_ind->num_setup_links; i++) {
-		partner_info->partner_link_info[i].link_id =
-			sync_ind->ml_link[i].link_id;
-		partner_info->partner_link_info[i].vdev_id =
-			sync_ind->ml_link[i].vdev_id;
-
-		qdf_copy_macaddr(
-			&partner_info->partner_link_info[i].link_addr,
-			&sync_ind->ml_link[i].link_addr);
-		partner_info->partner_link_info[i].chan_freq =
-				sync_ind->ml_link[i].channel.mhz;
+		qdf_copy_macaddr(&link->link_addr,
+				 &sync_ind->ml_link[i].link_addr);
+		link->chan_freq = sync_ind->ml_link[i].channel.mhz;
 		mlo_debug("vdev_id %d link_id %d freq %d bssid" QDF_MAC_ADDR_FMT,
-			  sync_ind->ml_link[i].vdev_id,
-			  sync_ind->ml_link[i].link_id,
-			  sync_ind->ml_link[i].channel.mhz,
-			  QDF_MAC_ADDR_REF(sync_ind->ml_link[i].link_addr.bytes));
+			  link->vdev_id, link->link_id, link->chan_freq,
+			  QDF_MAC_ADDR_REF(link->link_addr.bytes));
+		j++;
 	}
-	partner_info->num_partner_links = sync_ind->num_setup_links;
-	mlo_debug("num_setup_links %d", sync_ind->num_setup_links);
+	partner_info->num_partner_links = j;
+	mlo_debug("num_setup_links %d", partner_info->num_partner_links);
 }
 
 void mlo_roam_init_cu_bpcc(struct wlan_objmgr_vdev *vdev,

+ 2 - 16
core/mac/src/pe/lim/lim_api.c

@@ -2652,22 +2652,8 @@ static void
 lim_mlo_roam_copy_partner_info_to_session(struct pe_session *session,
 					  struct roam_offload_synch_ind *sync_ind)
 {
-	uint8_t i;
-	struct mlo_partner_info partner_info;
-
-	if (!sync_ind)
-		return;
-
-	for (i = 0; i < sync_ind->num_setup_links; i++) {
-		partner_info.partner_link_info[i].link_id =
-			sync_ind->ml_link[i].link_id;
-		qdf_copy_macaddr(
-			&partner_info.partner_link_info[i].link_addr,
-			&sync_ind->ml_link[i].link_addr);
-	}
-
-	session->ml_partner_info = partner_info;
-	session->ml_partner_info.num_partner_links = sync_ind->num_setup_links;
+	mlo_roam_copy_partner_info(&session->ml_partner_info,
+				   sync_ind, sync_ind->roamed_vdev_id);
 }
 
 static QDF_STATUS