xref: /wlan-driver/qcacld-3.0/components/disa/dispatcher/inc/wlan_disa_obj_mgmt_api.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2018 The Linux Foundation. All rights reserved.
3*5113495bSYour Name  *
4*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for
5*5113495bSYour Name  * any purpose with or without fee is hereby granted, provided that the
6*5113495bSYour Name  * above copyright notice and this permission notice appear in all
7*5113495bSYour Name  * copies.
8*5113495bSYour Name  *
9*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
10*5113495bSYour Name  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
11*5113495bSYour Name  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
12*5113495bSYour Name  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
13*5113495bSYour Name  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
14*5113495bSYour Name  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
15*5113495bSYour Name  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
16*5113495bSYour Name  * PERFORMANCE OF THIS SOFTWARE.
17*5113495bSYour Name  */
18*5113495bSYour Name /**
19*5113495bSYour Name  * DOC: declare utility API related to the disa component
20*5113495bSYour Name  * called by other components
21*5113495bSYour Name  */
22*5113495bSYour Name 
23*5113495bSYour Name #ifndef _WLAN_DISA_OBJ_MGMT_API_H_
24*5113495bSYour Name #define _WLAN_DISA_OBJ_MGMT_API_H_
25*5113495bSYour Name 
26*5113495bSYour Name #include <qdf_types.h>
27*5113495bSYour Name 
28*5113495bSYour Name struct wlan_objmgr_psoc;
29*5113495bSYour Name 
30*5113495bSYour Name /**
31*5113495bSYour Name  * disa_init() - register disa notification handlers.
32*5113495bSYour Name  *
33*5113495bSYour Name  * This function registers disa related notification handlers.
34*5113495bSYour Name  *
35*5113495bSYour Name  * Return: QDF_STATUS_SUCCESS - in case of success else return error
36*5113495bSYour Name  */
37*5113495bSYour Name #ifdef WLAN_FEATURE_DISA
38*5113495bSYour Name QDF_STATUS disa_init(void);
39*5113495bSYour Name #else
disa_init(void)40*5113495bSYour Name static inline QDF_STATUS disa_init(void)
41*5113495bSYour Name {
42*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
43*5113495bSYour Name }
44*5113495bSYour Name #endif
45*5113495bSYour Name 
46*5113495bSYour Name /**
47*5113495bSYour Name  * disa_deinit() - unregister disa notification handlers.
48*5113495bSYour Name  *
49*5113495bSYour Name  * This function unregisters disa related notification handlers.
50*5113495bSYour Name  *
51*5113495bSYour Name  * Return: QDF_STATUS_SUCCESS - in case of success else return error
52*5113495bSYour Name  */
53*5113495bSYour Name #ifdef WLAN_FEATURE_DISA
54*5113495bSYour Name QDF_STATUS disa_deinit(void);
55*5113495bSYour Name #else
disa_deinit(void)56*5113495bSYour Name static inline QDF_STATUS disa_deinit(void)
57*5113495bSYour Name {
58*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
59*5113495bSYour Name }
60*5113495bSYour Name #endif
61*5113495bSYour Name 
62*5113495bSYour Name /**
63*5113495bSYour Name  * disa_psoc_enable() - Trigger psoc enable for DISA
64*5113495bSYour Name  * @psoc: objmgr psoc object
65*5113495bSYour Name  *
66*5113495bSYour Name  * Return: QDF status success or failure
67*5113495bSYour Name  */
68*5113495bSYour Name #ifdef WLAN_FEATURE_DISA
69*5113495bSYour Name QDF_STATUS disa_psoc_enable(struct wlan_objmgr_psoc *psoc);
70*5113495bSYour Name #else
disa_psoc_enable(struct wlan_objmgr_psoc * psoc)71*5113495bSYour Name static inline QDF_STATUS disa_psoc_enable(struct wlan_objmgr_psoc *psoc)
72*5113495bSYour Name {
73*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
74*5113495bSYour Name }
75*5113495bSYour Name #endif
76*5113495bSYour Name 
77*5113495bSYour Name /**
78*5113495bSYour Name  * disa_psoc_disable() - Trigger psoc disable for DISA
79*5113495bSYour Name  * @psoc: objmgr psoc object
80*5113495bSYour Name  *
81*5113495bSYour Name  * Return: QDF status success or failure
82*5113495bSYour Name  */
83*5113495bSYour Name #ifdef WLAN_FEATURE_DISA
84*5113495bSYour Name QDF_STATUS disa_psoc_disable(struct wlan_objmgr_psoc *psoc);
85*5113495bSYour Name #else
disa_psoc_disable(struct wlan_objmgr_psoc * psoc)86*5113495bSYour Name static inline QDF_STATUS disa_psoc_disable(struct wlan_objmgr_psoc *psoc)
87*5113495bSYour Name {
88*5113495bSYour Name 	return QDF_STATUS_SUCCESS;
89*5113495bSYour Name }
90*5113495bSYour Name #endif
91*5113495bSYour Name 
92*5113495bSYour Name /**
93*5113495bSYour Name  * disa_psoc_object_created_notification(): disa psoc create handler
94*5113495bSYour Name  * @psoc: psoc which is going to created by objmgr
95*5113495bSYour Name  * @arg: argument for psoc create handler
96*5113495bSYour Name  *
97*5113495bSYour Name  * Attach psoc private object, register rx/tx ops and event handlers
98*5113495bSYour Name  *
99*5113495bSYour Name  * Return QDF_STATUS status in case of success else return error
100*5113495bSYour Name  */
101*5113495bSYour Name QDF_STATUS disa_psoc_object_created_notification(
102*5113495bSYour Name 		struct wlan_objmgr_psoc *psoc, void *arg);
103*5113495bSYour Name 
104*5113495bSYour Name /**
105*5113495bSYour Name  * disa_psoc_object_destroyed_notification(): disa psoc destroy handler
106*5113495bSYour Name  * @psoc: objmgr object corresponding to psoc which is going to be destroyed
107*5113495bSYour Name  * @arg: argument for psoc destroy handler
108*5113495bSYour Name  *
109*5113495bSYour Name  * Detach and free psoc private object, unregister event handlers
110*5113495bSYour Name  *
111*5113495bSYour Name  * Return QDF_STATUS status in case of success else return error
112*5113495bSYour Name  */
113*5113495bSYour Name QDF_STATUS disa_psoc_object_destroyed_notification(
114*5113495bSYour Name 		struct wlan_objmgr_psoc *psoc, void *arg);
115*5113495bSYour Name 
116*5113495bSYour Name #endif /* end  of _WLAN_DISA_OBJ_MGMT_API_H_ */
117