Browse Source

qcacmn: Add API to get mlo context from objmgr

Add API to get mlo context from object manager.

Change-Id: Ic037d346842d880d8ef54104ea55391bc7058018
CRs-Fixed: 2964102
Santosh Anbu 4 years ago
parent
commit
4d22cbcab3

+ 17 - 1
umac/cmn_services/obj_mgr/inc/wlan_objmgr_global_obj.h

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2019, 2021 The Linux Foundation. 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
@@ -538,4 +538,20 @@ QDF_STATUS wlan_objmgr_iterate_psoc_list(
 		wlan_objmgr_psoc_handler handler,
 		void *arg, wlan_objmgr_ref_dbgid dbg_id);
 
+/**
+ * wlan_objmgr_get_mlo_ctx() - Get MLO context from global umac object
+ *
+ * This API is used to get MLO context object from the global umac object
+ *
+ * Return: Pointer to the mlo context
+ */
+#ifdef WLAN_FEATURE_11BE_MLO
+struct mlo_mgr_context *wlan_objmgr_get_mlo_ctx(void);
+#else
+static inline struct mlo_mgr_context *wlan_objmgr_get_mlo_ctx(void)
+{
+	return NULL;
+}
+#endif /* WLAN_FEATURE_11BE_MLO */
+
 #endif /* _WLAN_OBJMGR_GLOBAL_OBJ_H_*/

+ 7 - 1
umac/cmn_services/obj_mgr/src/wlan_objmgr_global_obj.c

@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2016-2021 The Linux Foundation. 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
@@ -863,3 +863,9 @@ QDF_STATUS wlan_objmgr_iterate_psoc_list(
 
 qdf_export_symbol(wlan_objmgr_iterate_psoc_list);
 
+#ifdef WLAN_FEATURE_11BE_MLO
+struct mlo_mgr_context *wlan_objmgr_get_mlo_ctx(void)
+{
+	return g_umac_glb_obj->mlo_ctx;
+}
+#endif