Browse Source

qcacld-3.0: Add mlo context to get link info

Currently, Host driver uses vdev object to retrieve
mlo link info. However, there is a need to use
mlo dev context in case of standby link.

This change is to use mlo dev context for fetching
link info, As it is available for both psoc and vdev.

Change-Id: Idccf91eb191a9fc24108648b885d6e9c7832a051
CRs-Fixed: 3568936
Aasir Rasheed 1 year ago
parent
commit
de4b1f31e9

+ 2 - 2
components/mlme/core/src/wlan_mlme_main.c

@@ -2511,7 +2511,7 @@ wlan_get_vdev_link_removed_flag(struct wlan_objmgr_vdev *vdev)
 		return false;
 
 	link_id = wlan_vdev_get_link_id(vdev);
-	link_info = mlo_mgr_get_ap_link_by_link_id(vdev, link_id);
+	link_info = mlo_mgr_get_ap_link_by_link_id(vdev->mlo_dev_ctx, link_id);
 	if (link_info)
 		is_mlo_link_removed =
 			!!qdf_atomic_test_bit(LS_F_AP_REMOVAL_BIT,
@@ -2559,7 +2559,7 @@ wlan_set_vdev_link_removed_flag(struct wlan_objmgr_vdev *vdev, bool removed)
 	}
 
 	link_id = wlan_vdev_get_link_id(vdev);
-	link_info = mlo_mgr_get_ap_link_by_link_id(vdev, link_id);
+	link_info = mlo_mgr_get_ap_link_by_link_id(vdev->mlo_dev_ctx, link_id);
 	if (!link_info) {
 		mlme_legacy_err("link info null, id %d", link_id);
 		return QDF_STATUS_E_INVAL;

+ 3 - 2
components/target_if/connection_mgr/src/target_if_cm_roam_event.c

@@ -817,8 +817,9 @@ target_if_roam_synch_key_event_handler(ol_scn_t scn, uint8_t *event,
 				keys[i].vdev_id = wlan_vdev_get_id(vdev_list);
 				qdf_copy_macaddr((struct qdf_mac_addr *)keys[i].mac_addr.raw,
 						 (struct qdf_mac_addr *)vdev_list->vdev_mlme.linkaddr);
-				link_info = mlo_mgr_get_ap_link_by_link_id(vdev_list,
-									   keys[i].link_id);
+				link_info = mlo_mgr_get_ap_link_by_link_id(
+							vdev_list->mlo_dev_ctx,
+							keys[i].link_id);
 				if (!link_info) {
 					target_if_err("Link info not found for link_id:%d",
 						      keys[i].link_id);

+ 2 - 1
core/hdd/src/wlan_hdd_cfg80211.c

@@ -23485,7 +23485,8 @@ static int wlan_add_key_standby_link(struct hdd_adapter *adapter,
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
 
-	mlo_link_info = mlo_mgr_get_ap_link_by_link_id(vdev, link_id);
+	mlo_link_info = mlo_mgr_get_ap_link_by_link_id(vdev->mlo_dev_ctx,
+						       link_id);
 	if (!mlo_link_info)
 		return QDF_STATUS_E_FAILURE;
 

+ 5 - 3
core/mac/src/pe/lim/lim_utils.c

@@ -9351,7 +9351,8 @@ void lim_extract_ml_info(struct pe_session *session,
 
 	ml_link->vdev_id = wlan_vdev_get_id(session->vdev);
 	ml_link->link_id = wlan_vdev_get_link_id(session->vdev);
-	link_info = mlo_mgr_get_ap_link_by_link_id(session->vdev,
+
+	link_info = mlo_mgr_get_ap_link_by_link_id(session->vdev->mlo_dev_ctx,
 						   ml_link->link_id);
 	if (!link_info)
 		return;
@@ -9368,8 +9369,9 @@ void lim_extract_ml_info(struct pe_session *session,
 
 	for (i = 0; i < ml_partner_info->num_partner_links; i++) {
 		link_id = ml_partner_info->partner_link_info[i].link_id;
-		link_info = mlo_mgr_get_ap_link_by_link_id(session->vdev,
-							   link_id);
+		link_info = mlo_mgr_get_ap_link_by_link_id(
+					session->vdev->mlo_dev_ctx,
+					link_id);
 		if (!link_info)
 			continue;
 

+ 3 - 2
core/mac/src/sys/legacy/src/utils/src/parser_api.c

@@ -12091,8 +12091,9 @@ QDF_STATUS populate_dot11f_assoc_req_mlo_ie(struct mac_context *mac_ctx,
 		p_sta_prof = sta_prof->data;
 		len_remaining = sizeof(sta_prof->data);
 		ml_link_info =
-			mlo_mgr_get_ap_link_by_link_id(pe_session->vdev,
-						       link_info->link_id);
+			mlo_mgr_get_ap_link_by_link_id(
+					pe_session->vdev->mlo_dev_ctx,
+					link_info->link_id);
 		if (!ml_link_info)
 			continue;