Parcourir la source

qcacmn: Add multi group support for dp handles

Add multi group support for dp mlo context handles.

Change-Id: I076003d04db745cfcce4bd879e6d92181bba8ef9
CRs-Fixed: 3343170
Surya Prakash Raajen il y a 2 ans
Parent
commit
4d5db3f69b

+ 7 - 5
umac/cmn_services/obj_mgr/inc/wlan_objmgr_global_obj.h

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2016-2019, 2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -579,17 +579,19 @@ void wlan_objmgr_set_mlo_ctx(struct mlo_mgr_context *ctx);
 /**
  * wlan_objmgr_set_dp_mlo_ctx() - set dp handle in mlo context
  * @dp_handle: Data path module handle
+ * @grp_id: MLO group id which it belongs too
  *
  * Return: void
  */
-void wlan_objmgr_set_dp_mlo_ctx(void *dp_handle);
+void wlan_objmgr_set_dp_mlo_ctx(void *dp_handle, uint8_t grp_id);
 
 /**
  * wlan_objmgr_get_dp_mlo_ctx() - get dp handle from mlo_context
+ * @grp_id: MLO Group id which it belongs to
  *
  * Return: dp handle
  */
-void *wlan_objmgr_get_dp_mlo_ctx(void);
+void *wlan_objmgr_get_dp_mlo_ctx(uint8_t grp_id);
 #else
 static inline struct mlo_mgr_context *wlan_objmgr_get_mlo_ctx(void)
 {
@@ -599,12 +601,12 @@ static inline struct mlo_mgr_context *wlan_objmgr_get_mlo_ctx(void)
 static inline void wlan_objmgr_set_mlo_ctx(struct mlo_mgr_context *ctx)
 {}
 
-static inline void *wlan_objmgr_get_dp_mlo_ctx(void)
+static inline void *wlan_objmgr_get_dp_mlo_ctx(uint8_t grp_id)
 {
 	return NULL;
 }
 
-static inline void wlan_objmgr_set_dp_mlo_ctx(void *dp_handle)
+static inline void wlan_objmgr_set_dp_mlo_ctx(void *dp_handle, uint8_t grp_id)
 {
 }
 #endif /* WLAN_FEATURE_11BE_MLO */

+ 11 - 5
umac/cmn_services/obj_mgr/src/wlan_objmgr_global_obj.c

@@ -1,6 +1,6 @@
 /*
  * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
- * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -913,26 +913,32 @@ void wlan_objmgr_set_mlo_ctx(struct mlo_mgr_context *ctx)
 }
 
 #ifdef WLAN_MLO_MULTI_CHIP
-void wlan_objmgr_set_dp_mlo_ctx(void *dp_handle)
+void wlan_objmgr_set_dp_mlo_ctx(void *dp_handle, uint8_t grp_id)
 {
 	struct mlo_mgr_context *mlo_ctx = wlan_objmgr_get_mlo_ctx();
 
 	if (!mlo_ctx)
 		return;
 
-	mlo_ctx->setup_info.dp_handle = dp_handle;
+	if (grp_id >= mlo_ctx->total_grp)
+		return;
+
+	mlo_ctx->setup_info[grp_id].dp_handle = dp_handle;
 }
 
 qdf_export_symbol(wlan_objmgr_set_dp_mlo_ctx);
 
-void *wlan_objmgr_get_dp_mlo_ctx(void)
+void *wlan_objmgr_get_dp_mlo_ctx(uint8_t grp_id)
 {
 	struct mlo_mgr_context *mlo_ctx = wlan_objmgr_get_mlo_ctx();
 
 	if (!mlo_ctx)
 		return NULL;
 
-	return mlo_ctx->setup_info.dp_handle;
+	if (grp_id >= mlo_ctx->total_grp)
+		return NULL;
+
+	return mlo_ctx->setup_info[grp_id].dp_handle;
 }
 
 qdf_export_symbol(wlan_objmgr_get_dp_mlo_ctx);