Kaynağa Gözat

qcacld-3.0: Use partner info from pe_session for link switch

After roaming from legacy/1 link ML AP to 3 Link AP, then the
ML pe_session->lim_join_req->partner_info is not updated for
the link vdev.
This causes disconnection after roaming from legacy/1 Link AP to
3 Link AP followed by link switch due to link switch connect
failure.

lim_join_request is used to check partner info in some API.
Use session->partner_info instead of lim_join_request as the
lim_join_request is not valid & could be NULL also after roaming.

Change-Id: I1cb0e386cf715c43bcb8b8e05785c5c7d18f53dd
CRs-Fixed: 3627683
Pragaspathi Thilagaraj 1 yıl önce
ebeveyn
işleme
f3f7453180

+ 4 - 0
core/mac/src/pe/lim/lim_api.c

@@ -3589,6 +3589,10 @@ lim_cm_fill_link_session(struct mac_context *mac_ctx,
 	}
 
 	pe_join_req = pe_session->lim_join_req;
+
+	mlo_roam_copy_partner_info(&pe_join_req->partner_info,
+				   sync_ind, vdev_id, false);
+
 	bss_desc = &pe_session->lim_join_req->bssDescription;
 
 	status = lim_roam_fill_bss_descr(mac_ctx, sync_ind, bss_desc,

+ 20 - 16
core/mac/src/pe/lim/lim_process_assoc_rsp_frame.c

@@ -1745,31 +1745,33 @@ lim_process_assoc_rsp_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_info,
 #endif
 	lim_update_stads_ext_cap(mac_ctx, session_entry, assoc_rsp, sta_ds);
 	/* Update the BSS Entry, this entry was added during preassoc. */
-	if (QDF_STATUS_SUCCESS == lim_sta_send_add_bss(mac_ctx, assoc_rsp,
-			beacon,
-			&session_entry->lim_join_req->bssDescription, true,
-			 session_entry)) {
+	if (QDF_STATUS_SUCCESS ==
+	    lim_sta_send_add_bss(mac_ctx, assoc_rsp, beacon,
+				 &session_entry->lim_join_req->bssDescription,
+				 true, session_entry)) {
 		clean_up_ft_sha384(assoc_rsp, sha384_akm);
 		if (session_entry->limAssocResponseData != assoc_rsp)
 			qdf_mem_free(assoc_rsp);
+
 		qdf_mem_free(beacon);
+
 		return;
-	} else {
-		pe_err("could not update the bss entry");
-		assoc_cnf.resultCode = eSIR_SME_RESOURCES_UNAVAILABLE;
-		assoc_cnf.protStatusCode = STATUS_UNSPECIFIED_FAILURE;
 	}
 
+	pe_err("vdev:%d could not update the bss entry",
+	       session_entry->vdev_id);
+	assoc_cnf.resultCode = eSIR_SME_RESOURCES_UNAVAILABLE;
+	assoc_cnf.protStatusCode = STATUS_UNSPECIFIED_FAILURE;
+
 assocReject:
-	if ((subtype == LIM_ASSOC)
-		|| ((subtype == LIM_REASSOC)
-		&& (session_entry->limMlmState ==
-		    eLIM_MLM_WT_FT_REASSOC_RSP_STATE))) {
+	if (subtype == LIM_ASSOC ||
+	    (subtype == LIM_REASSOC &&
+	     session_entry->limMlmState == eLIM_MLM_WT_FT_REASSOC_RSP_STATE)) {
 		pe_err("Assoc Rejected by the peer mlmestate: %d sessionid: %d Reason: %d MACADDR:"
-			QDF_MAC_ADDR_FMT,
-			session_entry->limMlmState,
-			session_entry->peSessionId,
-			assoc_cnf.resultCode, QDF_MAC_ADDR_REF(hdr->sa));
+			QDF_MAC_ADDR_FMT, session_entry->limMlmState,
+			session_entry->peSessionId, assoc_cnf.resultCode,
+			QDF_MAC_ADDR_REF(hdr->sa));
+
 		session_entry->limMlmState = eLIM_MLM_IDLE_STATE;
 		MTRACE(mac_trace(mac_ctx, TRACE_CODE_MLM_STATE,
 			session_entry->peSessionId,
@@ -1778,6 +1780,7 @@ assocReject:
 			qdf_mem_free(session_entry->pLimMlmJoinReq);
 			session_entry->pLimMlmJoinReq = NULL;
 		}
+
 		if (subtype == LIM_ASSOC) {
 			lim_post_sme_message(mac_ctx, LIM_MLM_ASSOC_CNF,
 				(uint32_t *) &assoc_cnf);
@@ -1797,5 +1800,6 @@ assocReject:
 	qdf_mem_free(assoc_rsp->sha384_ft_subelem.gtk);
 	qdf_mem_free(assoc_rsp->sha384_ft_subelem.igtk);
 	qdf_mem_free(assoc_rsp);
+
 	return;
 }

+ 63 - 59
core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c

@@ -2780,9 +2780,10 @@ lim_process_switch_channel_join_mlo(struct pe_session *session_entry,
 	assoc_rsp.len = 0;
 	mlo_get_assoc_rsp(session_entry->vdev, &assoc_rsp);
 
-	partner_info = &session_entry->lim_join_req->partner_info;
+	partner_info = &session_entry->ml_partner_info;
 	if (!partner_info->num_partner_links) {
-		pe_debug("MLO: num_partner_links is 0");
+		pe_debug("MLO: vdev:%d num_partner_links is 0",
+			 session_entry->vdev_id);
 		return QDF_STATUS_E_INVAL;
 	}
 
@@ -2906,81 +2907,84 @@ lim_process_switch_channel_join_mlo_roam(struct pe_session *session_entry,
 	QDF_STATUS status;
 	struct element_info assoc_rsp = {};
 	struct qdf_mac_addr sta_link_addr;
+	struct element_info link_assoc_rsp;
+	tLimMlmJoinCnf mlm_join_cnf;
+	tLimMlmAssocCnf assoc_cnf;
+	struct qdf_mac_addr bssid;
 	uint8_t link_id = 0;
 
 	assoc_rsp.len = 0;
 	mlo_get_assoc_rsp(session_entry->vdev, &assoc_rsp);
 
-	if (!session_entry->lim_join_req->partner_info.num_partner_links) {
-		pe_debug("MLO_ROAM: num_partner_links is 0");
+	if (!session_entry->ml_partner_info.num_partner_links) {
+		pe_debug("MLO_ROAM: vdev:%d num_partner_links is 0",
+			 session_entry->vdev_id);
 		return QDF_STATUS_E_INVAL;
 	}
+
 	/* Todo: update the sta addr by matching link id */
 	qdf_mem_copy(&sta_link_addr, session_entry->self_mac_addr,
 		     QDF_MAC_ADDR_SIZE);
 
-	pe_err("sta_link_addr" QDF_MAC_ADDR_FMT,
+	pe_err("vdev:%d sta_link_addr" QDF_MAC_ADDR_FMT,
+	       session_entry->vdev_id,
 	       QDF_MAC_ADDR_REF(&sta_link_addr.bytes[0]));
 
-	if (assoc_rsp.len) {
-		struct element_info link_assoc_rsp;
-		tLimMlmJoinCnf mlm_join_cnf;
-		tLimMlmAssocCnf assoc_cnf;
-		struct qdf_mac_addr bssid;
+	if (!assoc_rsp.len)
+		return QDF_STATUS_SUCCESS;
+
+	mlm_join_cnf.resultCode = eSIR_SME_SUCCESS;
+	mlm_join_cnf.protStatusCode = STATUS_SUCCESS;
+	/* Update PE sessionId */
+	mlm_join_cnf.sessionId = session_entry->peSessionId;
+	lim_post_sme_message(mac_ctx, LIM_MLM_JOIN_CNF,
+			     (uint32_t *)&mlm_join_cnf);
+
+	session_entry->limSmeState = eLIM_SME_WT_ASSOC_STATE;
+	pe_debug("MLO_ROAM: reassoc rsp len %d ", assoc_rsp.len);
+
+	link_assoc_rsp.ptr = qdf_mem_malloc(assoc_rsp.len);
+	if (!link_assoc_rsp.ptr)
+		return QDF_STATUS_E_NOMEM;
+
+	link_assoc_rsp.len = assoc_rsp.len;
+	session_entry->limMlmState = eLIM_MLM_WT_REASSOC_RSP_STATE;
+	mlo_get_link_mac_addr_from_reassoc_rsp(session_entry->vdev, &bssid);
+	sir_copy_mac_addr(session_entry->limReAssocbssId, bssid.bytes);
+	link_id = wlan_vdev_get_link_id(session_entry->vdev);
+	pe_debug("MLO ROAM: Generate and process assoc rsp for link_id:%d vdev %d",
+		 link_id, session_entry->vdev_id);
 
-		mlm_join_cnf.resultCode = eSIR_SME_SUCCESS;
-		mlm_join_cnf.protStatusCode = STATUS_SUCCESS;
+	status = util_gen_link_assoc_rsp(assoc_rsp.ptr,
+					 assoc_rsp.len,
+					 true, link_id, sta_link_addr,
+					 link_assoc_rsp.ptr,
+					 assoc_rsp.len,
+					 (qdf_size_t *)&link_assoc_rsp.len);
+	if (QDF_IS_STATUS_ERROR(status)) {
+		pe_err("MLO_ROAM: link vdev:%d link_id:%d assoc rsp generation failed",
+		       session_entry->vdev_id, link_id);
+		assoc_cnf.resultCode = eSIR_SME_INVALID_PARAMETERS;
+		assoc_cnf.protStatusCode = STATUS_UNSPECIFIED_FAILURE;
 		/* Update PE sessionId */
-		mlm_join_cnf.sessionId = session_entry->peSessionId;
-		lim_post_sme_message(mac_ctx, LIM_MLM_JOIN_CNF,
-				     (uint32_t *)&mlm_join_cnf);
-
-		session_entry->limSmeState = eLIM_SME_WT_ASSOC_STATE;
-		pe_debug("MLO_ROAM: reassoc rsp len %d ", assoc_rsp.len);
-
-		link_assoc_rsp.ptr = qdf_mem_malloc(assoc_rsp.len);
-		if (!link_assoc_rsp.ptr)
-			return QDF_STATUS_E_NOMEM;
-
-		link_assoc_rsp.len = assoc_rsp.len;
-		session_entry->limMlmState = eLIM_MLM_WT_REASSOC_RSP_STATE;
-		mlo_get_link_mac_addr_from_reassoc_rsp(session_entry->vdev, &bssid);
-		sir_copy_mac_addr(session_entry->limReAssocbssId, bssid.bytes);
-		link_id = wlan_vdev_get_link_id(session_entry->vdev);
-		pe_debug("MLO ROAM: Generate and process assoc rsp for link vdev %d",
-			 link_id);
-
-		status = util_gen_link_assoc_rsp(assoc_rsp.ptr,
-						 assoc_rsp.len,
-						 true, link_id, sta_link_addr,
-						 link_assoc_rsp.ptr,
-						 assoc_rsp.len,
-						 (qdf_size_t *)&link_assoc_rsp.len);
-
-		if (QDF_IS_STATUS_SUCCESS(status)) {
-			pe_debug("MLO_ROAM: process reassoc rsp for link vdev");
-			lim_process_assoc_rsp_frame(mac_ctx,
-						    link_assoc_rsp.ptr,
-						    (link_assoc_rsp.len - WLAN_MAC_HDR_LEN_3A),
-						    LIM_REASSOC,
-						    session_entry);
-			qdf_mem_free(link_assoc_rsp.ptr);
-		} else {
-			pe_debug("MLO_ROAM: link vdev assoc rsp generation failed");
-			assoc_cnf.resultCode = eSIR_SME_INVALID_PARAMETERS;
-			assoc_cnf.protStatusCode = STATUS_UNSPECIFIED_FAILURE;
-			/* Update PE sessionId */
-			assoc_cnf.sessionId = session_entry->peSessionId;
-			lim_post_sme_message(mac_ctx, LIM_MLM_ASSOC_CNF,
-					     (uint32_t *)&assoc_cnf);
-
-			session_entry->limMlmState = eLIM_MLM_IDLE_STATE;
-			qdf_mem_free(link_assoc_rsp.ptr);
-		}
+		assoc_cnf.sessionId = session_entry->peSessionId;
+		lim_post_sme_message(mac_ctx, LIM_MLM_ASSOC_CNF,
+				     (uint32_t *)&assoc_cnf);
+
+		session_entry->limMlmState = eLIM_MLM_IDLE_STATE;
+		qdf_mem_free(link_assoc_rsp.ptr);
+
+		return status;
 	}
+
+	pe_debug("MLO_ROAM: process reassoc rsp for link vdev");
+	lim_process_assoc_rsp_frame(mac_ctx, link_assoc_rsp.ptr,
+				    (link_assoc_rsp.len - WLAN_MAC_HDR_LEN_3A),
+				    LIM_REASSOC, session_entry);
+	qdf_mem_free(link_assoc_rsp.ptr);
+
 	return QDF_STATUS_SUCCESS;
 }
-
 #else /* (WLAN_FEATURE_ROAM_OFFLOAD) && (WLAN_FEATURE_11BE_MLO) */
 static QDF_STATUS
 lim_process_switch_channel_join_mlo_roam(struct pe_session *session_entry,

+ 13 - 0
core/mac/src/pe/lim/lim_process_sme_req_messages.c

@@ -4405,6 +4405,12 @@ static void lim_fill_ml_info(struct cm_vdev_join_req *req,
 	pe_join_req->assoc_link_id = req->assoc_link_id;
 }
 
+static void lim_copy_ml_partner_info_to_session(struct pe_session *session,
+						struct cm_vdev_join_req *req)
+{
+	session->ml_partner_info = req->partner_info;
+}
+
 void lim_set_emlsr_caps(struct mac_context *mac_ctx, struct pe_session *session)
 {
 	bool emlsr_cap, emlsr_allowed, emlsr_band_check, emlsr_enabled = false;
@@ -4437,6 +4443,11 @@ static void lim_fill_ml_info(struct cm_vdev_join_req *req,
 			     struct join_req *pe_join_req)
 {
 }
+
+static void
+lim_copy_ml_partner_info_to_session(struct pe_session *session,
+				    struct cm_vdev_join_req *req)
+{}
 #endif
 
 static QDF_STATUS
@@ -4505,6 +4516,8 @@ lim_fill_session_params(struct mac_context *mac_ctx,
 		return QDF_STATUS_E_FAILURE;
 	}
 
+	lim_copy_ml_partner_info_to_session(session, req);
+
 	pe_debug("Assoc IE len: %d", req->assoc_ie.len);
 	if (req->assoc_ie.len)
 		QDF_TRACE_HEX_DUMP(QDF_MODULE_ID_PE, QDF_TRACE_LEVEL_DEBUG,

+ 4 - 2
core/mac/src/pe/lim/lim_utils.c

@@ -9381,7 +9381,7 @@ void lim_extract_ml_info(struct pe_session *session,
 	ml_link->link_id = wlan_vdev_get_link_id(session->vdev);
 
 	ml_link->rec_max_simultaneous_links =
-	session->vdev->mlo_dev_ctx->mlo_max_recom_simult_links;
+		session->vdev->mlo_dev_ctx->mlo_max_recom_simult_links;
 
 	link_info = mlo_mgr_get_ap_link_by_link_id(session->vdev->mlo_dev_ctx,
 						   ml_link->link_id);
@@ -9408,6 +9408,7 @@ void lim_extract_ml_info(struct pe_session *session,
 
 		ml_link->partner_info[partner_idx].vdev_id = link_info->vdev_id;
 		ml_link->partner_info[partner_idx].link_id = link_info->link_id;
+
 		qdf_mem_copy(&ml_link->partner_info[partner_idx].channel_info,
 			     link_info->link_chan_info,
 			     sizeof(ml_link->partner_info[partner_idx].channel_info));
@@ -9420,7 +9421,8 @@ void lim_extract_ml_info(struct pe_session *session,
 	}
 
 	ml_link->num_links = partner_idx;
-	pe_debug("Num of partner links: %d", ml_link->num_links);
+	pe_debug("vdev:%d Num of partner links: %d", session->vdev_id,
+		 ml_link->num_links);
 }
 
 void lim_intersect_ap_emlsr_caps(struct mac_context *mac_ctx,

+ 86 - 77
core/mac/src/sys/legacy/src/utils/src/parser_api.c

@@ -3752,28 +3752,32 @@ sir_convert_assoc_resp_frame2_eht_struct(tDot11fAssocResponse *ar,
 
 #ifdef WLAN_FEATURE_11BE_MLO
 static QDF_STATUS
-sir_convert_assoc_resp_to_partner_mlo_struct(struct pe_session *session_entry,
-					     struct mlo_partner_info *partner_info,
-					     struct mlo_partner_info *ml_partner_info)
+sir_copy_assoc_rsp_partner_info_to_session(struct pe_session *session_entry,
+					   struct mlo_partner_info *partner_info)
 {
 	uint16_t i, partner_idx = 0, j, link_id;
 	struct mlo_link_info *link_info;
+	struct mlo_partner_info *ml_partner_info =
+			&session_entry->ml_partner_info;
 
 	link_info = mlo_mgr_get_ap_link(session_entry->vdev);
 	if (!link_info)
 		return QDF_STATUS_E_FAILURE;
 
+	/* Clear the Partner info already filled from the join request */
+	qdf_mem_zero(ml_partner_info, sizeof(*ml_partner_info));
 	for (i = 1; i < WLAN_MAX_ML_BSS_LINKS; i++) {
 		link_id = link_info[i].link_id;
 		for (j = 0; j < partner_info->num_partner_links; j++) {
-			if (partner_info->partner_link_info[j].link_id == link_id) {
-				ml_partner_info->partner_link_info[partner_idx++] =
-							partner_info->partner_link_info[j];
-				break;
-			}
+			if (partner_info->partner_link_info[j].link_id !=
+			    link_id)
+				continue;
+
+			ml_partner_info->partner_link_info[partner_idx++] =
+					partner_info->partner_link_info[j];
+			break;
 		}
 	}
-
 	ml_partner_info->num_partner_links = partner_idx;
 
 	return QDF_STATUS_SUCCESS;
@@ -3799,80 +3803,85 @@ sir_convert_assoc_resp_frame2_mlo_struct(struct mac_context *mac,
 	QDF_STATUS status = QDF_STATUS_SUCCESS;
 	struct mlo_partner_info partner_info;
 
-	if (ar->mlo_ie.present) {
-		status = util_find_mlie(frame + WLAN_ASSOC_RSP_IES_OFFSET,
-					frame_len - WLAN_ASSOC_RSP_IES_OFFSET,
-					&ml_ie, &ml_ie_total_len);
-		if (QDF_IS_STATUS_SUCCESS(status)) {
-			ml_ie_info = &p_assoc_rsp->mlo_ie.mlo_ie;
-			util_get_bvmlie_persta_partner_info(ml_ie,
-					       ml_ie_total_len,
-					       &partner_info);
-			sir_convert_assoc_resp_to_partner_mlo_struct(session_entry,
-								     &partner_info,
-								     &session_entry->ml_partner_info);
-			if (!wlan_cm_is_roam_sync_in_progress(mac->psoc, session_entry->vdev_id)) {
-				session_entry->ml_partner_info.num_partner_links =
-				QDF_MIN(
-				session_entry->ml_partner_info.num_partner_links,
-				session_entry->lim_join_req->partner_info.num_partner_links);
-			}
-			util_get_bvmlie_mldmacaddr(ml_ie, ml_ie_total_len,
-						   &mld_mac_addr);
-			qdf_mem_copy(ml_ie_info->mld_mac_addr,
-				     mld_mac_addr.bytes, QDF_MAC_ADDR_SIZE);
+	if (ar->mlo_ie.present)
+		return status;
 
-			util_get_mlie_common_info_len(ml_ie, ml_ie_total_len,
-					       &ml_ie_info->common_info_length);
-
-			util_get_bvmlie_primary_linkid(ml_ie, ml_ie_total_len,
-						       &link_id_found,
-						       &link_id);
-			util_get_bvmlie_msd_cap(ml_ie, ml_ie_total_len,
-						&msd_cap_found, &msd_cap);
-			if (msd_cap_found) {
-				ml_ie_info->medium_sync_delay_info_present =
-								msd_cap_found;
-				ml_ie_info->medium_sync_delay_info.medium_sync_duration =
-				  QDF_GET_BITS(
-				     msd_cap,
-				     WLAN_ML_BV_CINFO_MEDMSYNCDELAYINFO_DURATION_IDX,
-				     WLAN_ML_BV_CINFO_MEDMSYNCDELAYINFO_DURATION_BITS);
-				ml_ie_info->medium_sync_delay_info.medium_sync_ofdm_ed_thresh =
-				  QDF_GET_BITS(
-				     msd_cap,
-				     WLAN_ML_BV_CINFO_MEDMSYNCDELAYINFO_OFDMEDTHRESH_IDX,
-				     WLAN_ML_BV_CINFO_MEDMSYNCDELAYINFO_OFDMEDTHRESH_BITS);
-				ml_ie_info->medium_sync_delay_info.medium_sync_max_txop_num =
-				  QDF_GET_BITS(
-				     msd_cap,
-				     WLAN_ML_BV_CINFO_MEDMSYNCDELAYINFO_MAXTXOPS_IDX,
-				     WLAN_ML_BV_CINFO_MEDMSYNCDELAYINFO_MAXTXOPS_BITS);
-			}
-			util_get_bvmlie_eml_cap(ml_ie, ml_ie_total_len,
-						&eml_cap_found, &eml_cap);
-			if (eml_cap_found) {
-				ml_ie_info->eml_capab_present = eml_cap_found;
-				ml_ie_info->eml_capabilities_info.emlsr_support =
-				  QDF_GET_BITS(eml_cap,
+	status = util_find_mlie(frame + WLAN_ASSOC_RSP_IES_OFFSET,
+				frame_len - WLAN_ASSOC_RSP_IES_OFFSET,
+				&ml_ie, &ml_ie_total_len);
+	if (QDF_IS_STATUS_ERROR(status))
+		return status;
+
+	ml_ie_info = &p_assoc_rsp->mlo_ie.mlo_ie;
+	util_get_bvmlie_persta_partner_info(ml_ie, ml_ie_total_len,
+					    &partner_info);
+
+	sir_copy_assoc_rsp_partner_info_to_session(session_entry,
+						   &partner_info);
+
+	if (!wlan_cm_is_roam_sync_in_progress(mac->psoc,
+					      session_entry->vdev_id)) {
+		session_entry->ml_partner_info.num_partner_links =
+		QDF_MIN(
+		session_entry->ml_partner_info.num_partner_links,
+		session_entry->lim_join_req->partner_info.num_partner_links);
+	}
+	util_get_bvmlie_mldmacaddr(ml_ie, ml_ie_total_len,
+				   &mld_mac_addr);
+	qdf_mem_copy(ml_ie_info->mld_mac_addr,
+		     mld_mac_addr.bytes, QDF_MAC_ADDR_SIZE);
+
+	util_get_mlie_common_info_len(ml_ie, ml_ie_total_len,
+				      &ml_ie_info->common_info_length);
+
+	util_get_bvmlie_primary_linkid(ml_ie, ml_ie_total_len,
+				       &link_id_found, &link_id);
+	util_get_bvmlie_msd_cap(ml_ie, ml_ie_total_len,
+				&msd_cap_found, &msd_cap);
+	if (msd_cap_found) {
+		ml_ie_info->medium_sync_delay_info_present =
+						msd_cap_found;
+		ml_ie_info->medium_sync_delay_info.medium_sync_duration =
+		  QDF_GET_BITS(
+		     msd_cap,
+		     WLAN_ML_BV_CINFO_MEDMSYNCDELAYINFO_DURATION_IDX,
+		     WLAN_ML_BV_CINFO_MEDMSYNCDELAYINFO_DURATION_BITS);
+		ml_ie_info->medium_sync_delay_info.medium_sync_ofdm_ed_thresh =
+		  QDF_GET_BITS(
+		     msd_cap,
+		     WLAN_ML_BV_CINFO_MEDMSYNCDELAYINFO_OFDMEDTHRESH_IDX,
+		     WLAN_ML_BV_CINFO_MEDMSYNCDELAYINFO_OFDMEDTHRESH_BITS);
+		ml_ie_info->medium_sync_delay_info.medium_sync_max_txop_num =
+		  QDF_GET_BITS(
+		     msd_cap,
+		     WLAN_ML_BV_CINFO_MEDMSYNCDELAYINFO_MAXTXOPS_IDX,
+		     WLAN_ML_BV_CINFO_MEDMSYNCDELAYINFO_MAXTXOPS_BITS);
+	}
+	util_get_bvmlie_eml_cap(ml_ie, ml_ie_total_len,
+				&eml_cap_found, &eml_cap);
+	if (eml_cap_found) {
+		ml_ie_info->eml_capab_present = eml_cap_found;
+		ml_ie_info->eml_capabilities_info.emlsr_support =
+			QDF_GET_BITS(eml_cap,
 				     WLAN_ML_BV_CINFO_EMLCAP_EMLSRSUPPORT_IDX,
 				     WLAN_ML_BV_CINFO_EMLCAP_EMLSRSUPPORT_BITS);
-				ml_ie_info->eml_capabilities_info.transition_timeout =
-				  QDF_GET_BITS(eml_cap,
+
+		ml_ie_info->eml_capabilities_info.transition_timeout =
+			QDF_GET_BITS(eml_cap,
 				     WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_IDX,
 				     WLAN_ML_BV_CINFO_EMLCAP_TRANSTIMEOUT_BITS);
-			}
-
-			ml_ie_info->num_sta_profile =
-			      session_entry->ml_partner_info.num_partner_links;
-			ml_ie_info->link_id_info_present = link_id_found;
-			ml_ie_info->link_id = link_id;
-			pe_debug("Partner link count: %d, Link id: %d, MLD mac addr: " QDF_MAC_ADDR_FMT,
-				 ml_ie_info->num_sta_profile,
-				 ml_ie_info->link_id,
-				 QDF_MAC_ADDR_REF(ml_ie_info->mld_mac_addr));
-		}
 	}
+
+	ml_ie_info->num_sta_profile =
+			session_entry->ml_partner_info.num_partner_links;
+	ml_ie_info->link_id_info_present = link_id_found;
+	ml_ie_info->link_id = link_id;
+
+	pe_debug("vdev:%d Partner link count: %d, Link id: %d, MLD mac addr: " QDF_MAC_ADDR_FMT,
+		 session_entry->vdev_id,
+		 ml_ie_info->num_sta_profile, ml_ie_info->link_id,
+		 QDF_MAC_ADDR_REF(ml_ie_info->mld_mac_addr));
+
 	return status;
 }