xref: /wlan-driver/qca-wifi-host-cmn/umac/cp_stats/core/src/wlan_cp_stats_ol_api.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
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 /**
20  * DOC: wlan_cp_stats_ol_api.h
21  *
22  * This header file provide API declarations required for cp stats global
23  * context specific to offload
24  */
25 
26 #ifndef __WLAN_CP_STATS_OL_API_H__
27 #define __WLAN_CP_STATS_OL_API_H__
28 
29 #ifdef QCA_SUPPORT_CP_STATS
30 #include <wlan_objmgr_cmn.h>
31 #include "wlan_cp_stats_defs.h"
32 #include "wlan_cp_stats_ol_api.h"
33 
34 /**
35  * wlan_cp_stats_psoc_obj_init_ol() - private API to init psoc cp stats obj
36  * @psoc_cs: pointer to psoc cp stat object
37  *
38  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
39  */
40 QDF_STATUS wlan_cp_stats_psoc_obj_init_ol(struct psoc_cp_stats *psoc_cs);
41 
42 /**
43  * wlan_cp_stats_psoc_obj_deinit_ol() - private API to deinit psoc cp stats obj
44  * @psoc_cs: pointer to psoc cp stat object
45  *
46  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
47  */
48 QDF_STATUS wlan_cp_stats_psoc_obj_deinit_ol(struct psoc_cp_stats *psoc_cs);
49 
50 /**
51  * wlan_cp_stats_pdev_obj_init_ol() - private API to init pdev cp stats obj
52  * @pdev_cs: pointer to pdev cp stat object
53  *
54  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
55  */
56 QDF_STATUS wlan_cp_stats_pdev_obj_init_ol(struct pdev_cp_stats *pdev_cs);
57 
58 /**
59  * wlan_cp_stats_pdev_obj_deinit_ol() - private API to deinit pdev cp stats obj
60  * @pdev_cs: pointer to pdev cp stat object
61  *
62  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
63  */
64 QDF_STATUS wlan_cp_stats_pdev_obj_deinit_ol(struct pdev_cp_stats *pdev_cs);
65 
66 /**
67  * wlan_cp_stats_vdev_obj_init_ol() - private API to init vdev cp stats obj
68  * @vdev_cs: pointer to vdev cp stat object
69  *
70  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
71  */
72 QDF_STATUS wlan_cp_stats_vdev_obj_init_ol(struct vdev_cp_stats *vdev_cs);
73 
74 /**
75  * wlan_cp_stats_vdev_obj_deinit_ol() - private API to deinit vdev cp stats obj
76  * @vdev_cs: pointer to vdev cp stat object
77  *
78  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
79  */
80 QDF_STATUS wlan_cp_stats_vdev_obj_deinit_ol(struct vdev_cp_stats *vdev_cs);
81 
82 /**
83  * wlan_cp_stats_peer_obj_init_ol() - private API to init peer cp stats obj
84  * @peer_cs: pointer to peer cp stat object
85  *
86  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
87  */
88 QDF_STATUS wlan_cp_stats_peer_obj_init_ol(struct peer_cp_stats *peer_cs);
89 
90 /**
91  * wlan_cp_stats_peer_obj_deinit_ol() - private API to deinit peer cp stats obj
92  * @peer_cs: pointer to peer cp stat object
93  *
94  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
95  */
96 QDF_STATUS wlan_cp_stats_peer_obj_deinit_ol(struct peer_cp_stats *peer_cs);
97 
98 /**
99  * wlan_cp_stats_open_ol() - private API for psoc open
100  * @psoc: pointer to psoc object
101  *
102  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
103  */
104 QDF_STATUS wlan_cp_stats_open_ol(struct wlan_objmgr_psoc *psoc);
105 
106 /**
107  * wlan_cp_stats_close_ol() - private API for psoc close
108  * @psoc: pointer to psoc object
109  *
110  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
111  */
112 QDF_STATUS wlan_cp_stats_close_ol(struct wlan_objmgr_psoc *psoc);
113 
114 /**
115  * wlan_cp_stats_enable_ol() - private API for psoc enable
116  * @psoc: pointer to psoc enable
117  *
118  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
119  */
120 QDF_STATUS wlan_cp_stats_enable_ol(struct wlan_objmgr_psoc *psoc);
121 
122 /**
123  * wlan_cp_stats_disable_ol() - private API for psoc disable
124  * @psoc: pointer to psoc enable
125  *
126  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
127  */
128 QDF_STATUS wlan_cp_stats_disable_ol(struct wlan_objmgr_psoc *psoc);
129 
130 /**
131  * wlan_cp_stats_ctx_init_ol() - private API to initialize cp stat global ctx
132  * @csc: pointer to cp stats global context object
133  *
134  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
135  */
136 QDF_STATUS wlan_cp_stats_ctx_init_ol(struct cp_stats_context *csc);
137 
138 /**
139  * wlan_cp_stats_ctx_deinit_ol() - private API to deinit cp stat global ctx
140  * @csc: pointer to cp stats global context object
141  *
142  * Return: QDF_STATUS_SUCCESS on success, QDF_STATUS_E_** on error
143  */
144 QDF_STATUS wlan_cp_stats_ctx_deinit_ol(struct cp_stats_context *csc);
145 
146 #endif /* QCA_SUPPORT_CP_STATS */
147 #endif /* __WLAN_CP_STATS_OL_API_H__ */
148