1 /*
2  * Copyright (c) 2021-2023, Qualcomm Innovation Center, Inc. All rights reserved.
3  *
4  * Permission to use, copy, modify, and/or distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  */
16 
17 #ifndef _WIFI_RADAR_DEFS_I_H_
18 #define _WIFI_RADAR_DEFS_I_H_
19 
20 #include <wlan_objmgr_cmn.h>
21 #include <wlan_objmgr_global_obj.h>
22 #include <wlan_objmgr_psoc_obj.h>
23 #include <wlan_objmgr_pdev_obj.h>
24 #include <wlan_objmgr_vdev_obj.h>
25 #include <wlan_objmgr_peer_obj.h>
26 #include <qdf_list.h>
27 #include <qdf_timer.h>
28 #include <qdf_util.h>
29 #include <qdf_types.h>
30 #include <wlan_wifi_radar_utils_api.h>
31 
32 /**
33  * wlan_wifi_radar_psoc_obj_create_handler() -
34  * psoc object create handler for WiFi Radar
35  * @psoc: pointer to psoc object
36  * @arg: void pointer in case it needs arguments
37  *
38  * Return: status of object creation
39  */
40 QDF_STATUS
41 wlan_wifi_radar_psoc_obj_create_handler(
42 struct wlan_objmgr_psoc *psoc, void *arg);
43 
44 /**
45  * wlan_wifi_radar_psoc_obj_destroy_handler() -
46  * psoc object destroy handler for WiFi Radar
47  * @psoc: pointer to psoc object
48  * @arg: void pointer in case it needs arguments
49  *
50  * Return: status of destroy object
51  */
52 QDF_STATUS
53 wlan_wifi_radar_psoc_obj_destroy_handler(
54 struct wlan_objmgr_psoc *psoc, void *arg);
55 
56 /**
57  * wlan_wifi_radar_pdev_obj_create_handler() -
58  * pdev object create handler for WiFi Radar
59  * @pdev: pointer to pdev object
60  * @arg: void pointer in case it needs arguments
61  *
62  * Return: status of object creation
63  */
64 QDF_STATUS
65 wlan_wifi_radar_pdev_obj_create_handler(
66 struct wlan_objmgr_pdev *pdev, void *arg);
67 
68 /**
69  * wlan_wifi_radar_pdev_obj_destroy_handler() -
70  * pdev object destroy handler for WiFi Radar
71  * @pdev: pointer to pdev object
72  * @arg: void pointer in case it needs arguments
73  *
74  * Return: status of destroy object
75  */
76 QDF_STATUS
77 wlan_wifi_radar_pdev_obj_destroy_handler(
78 struct wlan_objmgr_pdev *pdev, void *arg);
79 
80 /**
81  * wlan_wifi_radar_peer_obj_create_handler() -
82  * peer object create handler for WiFi Radar
83  * @peer: pointer to peer object
84  * @arg: void pointer in case it needs arguments
85  *
86  * Return: status of object creation
87  */
88 QDF_STATUS
89 wlan_wifi_radar_peer_obj_create_handler(
90 struct wlan_objmgr_peer *peer, void *arg);
91 
92 /**
93  * wlan_wifi_radar_peer_obj_destroy_handler() -
94  * peer object destroy handler for WiFi radar
95  * @peer: pointer to peer object
96  * @arg: void pointer in case it needs arguments
97  *
98  * Return: status ofi destroy object
99  */
100 QDF_STATUS
101 wlan_wifi_radar_peer_obj_destroy_handler(
102 struct wlan_objmgr_peer *peer, void *arg);
103 
104 /**
105  * wifi_radar_streamfs_init() - stream filesystem init
106  * @pdev: pointer to pdev object
107  *
108  * Return: status of fs init
109  */
110 QDF_STATUS
111 wifi_radar_streamfs_init(struct wlan_objmgr_pdev *pdev);
112 
113 /**
114  * wifi_radar_streamfs_remove() - stream filesystem remove
115  * @pdev: pointer to pdev object
116  *
117  * Return: status of fs remove
118  */
119 QDF_STATUS
120 wifi_radar_streamfs_remove(struct wlan_objmgr_pdev *pdev);
121 
122 /**
123  * wifi_radar_streamfs_write() - write to stream filesystem
124  * @pa: pointer to pdev_cfr object
125  * @write_data: Pointer to data
126  * @write_len: data len
127  *
128  * Return: status of fs write
129  */
130 QDF_STATUS
131 wifi_radar_streamfs_write(
132 struct pdev_cfr *pa, const void *write_data,
133 size_t write_len);
134 
135 /**
136  * wifi_radar_streamfs_flush() - flush the write to streamfs
137  * @pa: pointer to pdev_cfr object
138  *
139  * Return: status of fs flush
140  */
141 QDF_STATUS
142 wifi_radar_streamfs_flush(struct pdev_cfr *pa);
143 #endif
144