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