Răsfoiți Sursa

qcacld-3.0: API to provide all link info to mlo mgr

Mlo peer mgr needs all link info including the assoc peer information.
Provide all link info to mlo mgr.

Change-Id: If44572834cbed020cc52366d09e4e8bbb618ee2f
CRs-Fixed: 2999477
bings 3 ani în urmă
părinte
comite
91843d4948
1 a modificat fișierele cu 22 adăugiri și 4 ștergeri
  1. 22 4
      core/mac/src/pe/lim/lim_mlo.c

+ 22 - 4
core/mac/src/pe/lim/lim_mlo.c

@@ -404,6 +404,8 @@ void lim_ap_mlo_sta_peer_ind(struct mac_context *mac,
 	tpSirAssocReq assoc_req;
 	struct wlan_mlo_peer_context *ml_peer;
 	struct wlan_objmgr_peer *peer;
+	struct mlo_partner_info info;
+	struct mlo_link_info *linfo;
 
 	if (!sta) {
 		pe_err("sta ds is null");
@@ -420,10 +422,26 @@ void lim_ap_mlo_sta_peer_ind(struct mac_context *mac,
 
 		if (lim_is_mlo_recv_assoc(sta)) {
 			assoc_req = pe_session->parsedAssocReq[sta->assocId];
-			wlan_mlo_peer_create(pe_session->vdev, peer,
-					     &assoc_req->mlo_info,
-					     assoc_req->assoc_req_buf,
-					     sta->assocId);
+			if (assoc_req->mlo_info.num_partner_links <
+			    QDF_ARRAY_SIZE(
+				assoc_req->mlo_info.partner_link_info)) {
+				qdf_mem_copy(&info, &assoc_req->mlo_info,
+					     sizeof(info));
+				linfo =
+				&info.partner_link_info[info.num_partner_links];
+				linfo->link_id = wlan_vdev_get_link_id(
+							pe_session->vdev);
+				qdf_mem_copy(linfo->link_addr.bytes,
+					     sta->staAddr, QDF_MAC_ADDR_SIZE);
+				info.num_partner_links++;
+				wlan_mlo_peer_create(pe_session->vdev, peer,
+						     &info,
+						     assoc_req->assoc_req_buf,
+						     sta->assocId);
+			} else {
+				pe_err("invalid partner link number %d",
+				       assoc_req->mlo_info.num_partner_links);
+			}
 		} else {
 			ml_peer = wlan_mlo_get_mlpeer_by_aid(
 					pe_session->vdev->mlo_dev_ctx,