From f8c534ee3bec059b6755435dd9e60d5d7d575294 Mon Sep 17 00:00:00 2001 From: Amruta Kulkarni Date: Mon, 6 Jun 2022 17:53:24 -0700 Subject: [PATCH] qcacld-3.0: Add link id information in ML probe req When sending ML probe request in the per sta profile info include link id field and set complete profile bit. Change-Id: I71dbb81822a7e7a107247cef4fd07f4898117930 CRs-Fixed: 3212098 --- .../src/pe/lim/lim_send_management_frames.c | 32 ++++++++++++++++--- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/core/mac/src/pe/lim/lim_send_management_frames.c b/core/mac/src/pe/lim/lim_send_management_frames.c index a3160abddf..3c9c20bc52 100644 --- a/core/mac/src/pe/lim/lim_send_management_frames.c +++ b/core/mac/src/pe/lim/lim_send_management_frames.c @@ -155,11 +155,20 @@ lim_populate_ml_probe_req(struct mac_context *mac, struct wlan_ml_probe_req *ml_prb_req = NULL; uint8_t *ml_probe = NULL; uint8_t link = 0; + uint16_t stacontrol = 0; + struct mlo_partner_info partner_info; if (!session || !session->vdev || !session->vdev->mlo_dev_ctx) { pe_err("Null value"); return QDF_STATUS_E_NULL_VALUE; } + + /* if num partner links is > 0 + * means complete profiles were sent by AP + */ + if (session->lim_join_req->partner_info.num_partner_links) + return QDF_STATUS_SUCCESS; + ml_prb_req = qdf_mem_malloc(sizeof(struct wlan_ml_probe_req)); if (!ml_prb_req) return QDF_STATUS_E_NULL_VALUE; @@ -193,13 +202,28 @@ lim_populate_ml_probe_req(struct mac_context *mac, ml_prb_req->mld_id = 0; ml_probe_len++; + stacontrol = htole16(stacontrol); + partner_info = session->lim_join_req->partner_info; + for (link = 0; - link < session->lim_join_req->partner_info.num_partner_links; + link < partner_info.num_partner_links; link++) { ml_prb_req->sta_profile[link].sub_elem_id = 0; - ml_probe_len++; - ml_prb_req->sta_profile[link].per_sta_len = 0; - ml_probe_len++; + ml_prb_req->sta_profile[link].per_sta_len = + WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_SIZE + 2; + ml_probe_len += 2; + + QDF_SET_BITS(stacontrol, + WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_LINKID_IDX, + WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_LINKID_BITS, + partner_info.partner_link_info[link].link_id); + + QDF_SET_BITS(stacontrol, + WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_CMPLTPROF_IDX, + WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_CMPLTPROF_BITS, + 1); + ml_prb_req->sta_profile[link].sta_control = stacontrol; + ml_probe_len += WLAN_ML_BV_LINFO_PERSTAPROF_STACTRL_SIZE; } ml_prb_req->ml_ie_ff.elem_len = ml_probe_len; *ml_probe_req_len = ml_probe_len;