1*5113495bSYour Name /*
2*5113495bSYour Name * Copyright (c) 2018-2019 The Linux Foundation. All rights reserved.
3*5113495bSYour Name * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
4*5113495bSYour Name *
5*5113495bSYour Name * Permission to use, copy, modify, and/or distribute this software for
6*5113495bSYour Name * any purpose with or without fee is hereby granted, provided that the
7*5113495bSYour Name * above copyright notice and this permission notice appear in all
8*5113495bSYour Name * copies.
9*5113495bSYour Name *
10*5113495bSYour Name * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11*5113495bSYour Name * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12*5113495bSYour Name * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13*5113495bSYour Name * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14*5113495bSYour Name * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15*5113495bSYour Name * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16*5113495bSYour Name * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17*5113495bSYour Name * PERFORMANCE OF THIS SOFTWARE.
18*5113495bSYour Name */
19*5113495bSYour Name
20*5113495bSYour Name /**
21*5113495bSYour Name * DOC: Contains OCB north bound interface definitions
22*5113495bSYour Name */
23*5113495bSYour Name
24*5113495bSYour Name #ifndef _WLAN_OCB_UCFG_API_H_
25*5113495bSYour Name #define _WLAN_OCB_UCFG_API_H_
26*5113495bSYour Name #include <qdf_types.h>
27*5113495bSYour Name #include "wlan_ocb_public_structs.h"
28*5113495bSYour Name
29*5113495bSYour Name #ifdef WLAN_FEATURE_DSRC
30*5113495bSYour Name /**
31*5113495bSYour Name * ucfg_ocb_set_channel_config() - send OCB config request
32*5113495bSYour Name * @vdev: vdev handle
33*5113495bSYour Name * @config: config parameters
34*5113495bSYour Name * @set_config_cb: callback for set channel config
35*5113495bSYour Name * @arg: arguments for the callback
36*5113495bSYour Name *
37*5113495bSYour Name * Return: QDF_STATUS_SUCCESS on success
38*5113495bSYour Name */
39*5113495bSYour Name QDF_STATUS ucfg_ocb_set_channel_config(struct wlan_objmgr_vdev *vdev,
40*5113495bSYour Name struct ocb_config *config,
41*5113495bSYour Name ocb_sync_callback set_config_cb,
42*5113495bSYour Name void *arg);
43*5113495bSYour Name
44*5113495bSYour Name /**
45*5113495bSYour Name * ucfg_ocb_set_utc_time() - UCFG API to set UTC time
46*5113495bSYour Name * @vdev: vdev handle
47*5113495bSYour Name * @utc: UTC time
48*5113495bSYour Name *
49*5113495bSYour Name * Return: QDF_STATUS_SUCCESS on success
50*5113495bSYour Name */
51*5113495bSYour Name QDF_STATUS ucfg_ocb_set_utc_time(struct wlan_objmgr_vdev *vdev,
52*5113495bSYour Name struct ocb_utc_param *utc);
53*5113495bSYour Name
54*5113495bSYour Name /**
55*5113495bSYour Name * ucfg_ocb_start_timing_advert() - ucfg API to start TA
56*5113495bSYour Name * @vdev: vdev handle
57*5113495bSYour Name * @ta: timing advertisement parameters
58*5113495bSYour Name *
59*5113495bSYour Name * Return: QDF_STATUS_SUCCESS on success
60*5113495bSYour Name */
61*5113495bSYour Name QDF_STATUS ucfg_ocb_start_timing_advert(struct wlan_objmgr_vdev *vdev,
62*5113495bSYour Name struct ocb_timing_advert_param *ta);
63*5113495bSYour Name
64*5113495bSYour Name /**
65*5113495bSYour Name * ucfg_ocb_stop_timing_advert() - ucfg API to stop TA
66*5113495bSYour Name * @vdev: vdev handle
67*5113495bSYour Name * @ta: timing advertisement parameters
68*5113495bSYour Name *
69*5113495bSYour Name * Return: QDF_STATUS_SUCCESS on success
70*5113495bSYour Name */
71*5113495bSYour Name QDF_STATUS ucfg_ocb_stop_timing_advert(struct wlan_objmgr_vdev *vdev,
72*5113495bSYour Name struct ocb_timing_advert_param *ta);
73*5113495bSYour Name
74*5113495bSYour Name /**
75*5113495bSYour Name * ucfg_ocb_get_tsf_timer() - ucfg API to get tsf timer
76*5113495bSYour Name * @vdev: vdev handle
77*5113495bSYour Name * @request: request for TSF timer
78*5113495bSYour Name * @get_tsf_cb: callback for TSF timer response
79*5113495bSYour Name * @arg: argument for the ccallback
80*5113495bSYour Name *
81*5113495bSYour Name * Return: QDF_STATUS_SUCCESS on success
82*5113495bSYour Name */
83*5113495bSYour Name QDF_STATUS ucfg_ocb_get_tsf_timer(struct wlan_objmgr_vdev *vdev,
84*5113495bSYour Name struct ocb_get_tsf_timer_param *request,
85*5113495bSYour Name ocb_sync_callback get_tsf_cb,
86*5113495bSYour Name void *arg);
87*5113495bSYour Name
88*5113495bSYour Name /**
89*5113495bSYour Name * ucfg_ocb_dcc_get_stats() - get DCC stats
90*5113495bSYour Name * @vdev: vdev handle
91*5113495bSYour Name * @request: request for dcc stats
92*5113495bSYour Name * @dcc_get_stats_cb: callback for get dcc stats response
93*5113495bSYour Name * @arg: argument for the ccallback
94*5113495bSYour Name *
95*5113495bSYour Name * Return: QDF_STATUS_SUCCESS on success
96*5113495bSYour Name */
97*5113495bSYour Name QDF_STATUS ucfg_ocb_dcc_get_stats(struct wlan_objmgr_vdev *vdev,
98*5113495bSYour Name struct ocb_dcc_get_stats_param *request,
99*5113495bSYour Name ocb_sync_callback dcc_get_stats_cb,
100*5113495bSYour Name void *arg);
101*5113495bSYour Name
102*5113495bSYour Name /**
103*5113495bSYour Name * ucfg_ocb_dcc_clear_stats() - Clear DCC stats
104*5113495bSYour Name * @vdev: vdev handle
105*5113495bSYour Name * @vdev_id: vdev ID
106*5113495bSYour Name * @bitmap: bitmap for stats to be cleared
107*5113495bSYour Name *
108*5113495bSYour Name * Return: QDF_STATUS_SUCCESS on success
109*5113495bSYour Name */
110*5113495bSYour Name QDF_STATUS ucfg_ocb_dcc_clear_stats(struct wlan_objmgr_vdev *vdev,
111*5113495bSYour Name uint16_t vdev_id,
112*5113495bSYour Name uint32_t bitmap);
113*5113495bSYour Name
114*5113495bSYour Name /**
115*5113495bSYour Name * ucfg_ocb_dcc_update_ndl() - ucfg API to update NDL
116*5113495bSYour Name * @vdev: vdev handle
117*5113495bSYour Name * @request: request parameters
118*5113495bSYour Name * @dcc_update_ndl_cb: callback for update response
119*5113495bSYour Name * @arg: argument for the callback
120*5113495bSYour Name *
121*5113495bSYour Name * Return: QDF_STATUS_SUCCESS on success
122*5113495bSYour Name */
123*5113495bSYour Name QDF_STATUS ucfg_ocb_dcc_update_ndl(struct wlan_objmgr_vdev *vdev,
124*5113495bSYour Name struct ocb_dcc_update_ndl_param *request,
125*5113495bSYour Name ocb_sync_callback dcc_update_ndl_cb,
126*5113495bSYour Name void *arg);
127*5113495bSYour Name
128*5113495bSYour Name /**
129*5113495bSYour Name * ucfg_ocb_register_for_dcc_stats_event() - register dcc stats
130*5113495bSYour Name * events callback
131*5113495bSYour Name * @pdev: pdev handle
132*5113495bSYour Name * @ctx: argument for the callback
133*5113495bSYour Name * @dcc_stats_cb: callback for dcc stats event
134*5113495bSYour Name *
135*5113495bSYour Name * Return: QDF_STATUS_SUCCESS on success
136*5113495bSYour Name */
137*5113495bSYour Name QDF_STATUS ucfg_ocb_register_for_dcc_stats_event(struct wlan_objmgr_pdev *pdev,
138*5113495bSYour Name void *ctx, ocb_sync_callback dcc_stats_cb);
139*5113495bSYour Name
140*5113495bSYour Name /**
141*5113495bSYour Name * ucfg_ocb_init() - OCB module initialization
142*5113495bSYour Name *
143*5113495bSYour Name * Return: QDF_STATUS_SUCCESS on success
144*5113495bSYour Name */
145*5113495bSYour Name QDF_STATUS ucfg_ocb_init(void);
146*5113495bSYour Name
147*5113495bSYour Name /**
148*5113495bSYour Name * ucfg_ocb_deinit() - OCB module deinitialization
149*5113495bSYour Name *
150*5113495bSYour Name * Return: QDF_STATUS_SUCCESS on success
151*5113495bSYour Name */
152*5113495bSYour Name QDF_STATUS ucfg_ocb_deinit(void);
153*5113495bSYour Name
154*5113495bSYour Name /**
155*5113495bSYour Name * ucfg_ocb_config_channel() - Set channel config using after OCB started
156*5113495bSYour Name * @pdev: pdev handle
157*5113495bSYour Name *
158*5113495bSYour Name * Return: QDF_STATUS_SUCCESS on success
159*5113495bSYour Name */
160*5113495bSYour Name QDF_STATUS ucfg_ocb_config_channel(struct wlan_objmgr_pdev *pdev);
161*5113495bSYour Name
162*5113495bSYour Name /**
163*5113495bSYour Name * ucfg_ocb_register_vdev_start() - register callback to start ocb vdev
164*5113495bSYour Name * @pdev: pdev handle
165*5113495bSYour Name * @ocb_start: legacy callback to start ocb vdev
166*5113495bSYour Name *
167*5113495bSYour Name * Return: QDF_STATUS_SUCCESS on success
168*5113495bSYour Name */
169*5113495bSYour Name QDF_STATUS ucfg_ocb_register_vdev_start(struct wlan_objmgr_pdev *pdev,
170*5113495bSYour Name QDF_STATUS (*ocb_start)(struct ocb_config *));
171*5113495bSYour Name
172*5113495bSYour Name /**
173*5113495bSYour Name * ocb_psoc_enable() - Trigger psoc enable for ocb
174*5113495bSYour Name * @psoc: objmgr psoc object
175*5113495bSYour Name *
176*5113495bSYour Name * Return: QDF status success or failure
177*5113495bSYour Name */
178*5113495bSYour Name QDF_STATUS ocb_psoc_enable(struct wlan_objmgr_psoc *psoc);
179*5113495bSYour Name
180*5113495bSYour Name /**
181*5113495bSYour Name * ocb_psoc_disable() - Trigger psoc disable for ocb
182*5113495bSYour Name * @psoc: objmgr psoc object
183*5113495bSYour Name *
184*5113495bSYour Name * Return: QDF status success or failure
185*5113495bSYour Name */
186*5113495bSYour Name QDF_STATUS ocb_psoc_disable(struct wlan_objmgr_psoc *psoc);
187*5113495bSYour Name
188*5113495bSYour Name /**
189*5113495bSYour Name * ucfg_ocb_update_dp_handle() - register DP handle
190*5113495bSYour Name * @soc: soc handle
191*5113495bSYour Name * @dp_soc: data path soc handle
192*5113495bSYour Name *
193*5113495bSYour Name * Return: QDF_STATUS_SUCCESS on success
194*5113495bSYour Name */
195*5113495bSYour Name QDF_STATUS ucfg_ocb_update_dp_handle(struct wlan_objmgr_psoc *soc,
196*5113495bSYour Name void *dp_soc);
197*5113495bSYour Name
198*5113495bSYour Name /**
199*5113495bSYour Name * ucfg_ocb_set_txrx_pdev_id() - register txrx pdev id
200*5113495bSYour Name * @psoc: soc handle
201*5113495bSYour Name * @pdev_id: data path pdev ID
202*5113495bSYour Name *
203*5113495bSYour Name * Return: QDF_STATUS_SUCCESS on success
204*5113495bSYour Name */
205*5113495bSYour Name QDF_STATUS ucfg_ocb_set_txrx_pdev_id(struct wlan_objmgr_psoc *psoc,
206*5113495bSYour Name uint8_t pdev_id);
207*5113495bSYour Name #else
208*5113495bSYour Name /**
209*5113495bSYour Name * ucfg_ocb_init() - OCB module initialization
210*5113495bSYour Name *
211*5113495bSYour Name * Return: QDF_STATUS_SUCCESS on success
212*5113495bSYour Name */
ucfg_ocb_init(void)213*5113495bSYour Name static inline QDF_STATUS ucfg_ocb_init(void)
214*5113495bSYour Name {
215*5113495bSYour Name return QDF_STATUS_SUCCESS;
216*5113495bSYour Name }
217*5113495bSYour Name
218*5113495bSYour Name /**
219*5113495bSYour Name * ucfg_ocb_deinit() - OCB module deinitialization
220*5113495bSYour Name *
221*5113495bSYour Name * Return: QDF_STATUS_SUCCESS on success
222*5113495bSYour Name */
ucfg_ocb_deinit(void)223*5113495bSYour Name static inline QDF_STATUS ucfg_ocb_deinit(void)
224*5113495bSYour Name {
225*5113495bSYour Name return QDF_STATUS_SUCCESS;
226*5113495bSYour Name }
227*5113495bSYour Name
228*5113495bSYour Name /**
229*5113495bSYour Name * ucfg_ocb_config_channel() - Set channel config using after OCB started
230*5113495bSYour Name * @pdev: pdev handle
231*5113495bSYour Name *
232*5113495bSYour Name * Return: QDF_STATUS_SUCCESS on success
233*5113495bSYour Name */
234*5113495bSYour Name static inline QDF_STATUS
ucfg_ocb_config_channel(struct wlan_objmgr_pdev * pdev)235*5113495bSYour Name ucfg_ocb_config_channel(struct wlan_objmgr_pdev *pdev)
236*5113495bSYour Name {
237*5113495bSYour Name return QDF_STATUS_SUCCESS;
238*5113495bSYour Name }
239*5113495bSYour Name
240*5113495bSYour Name /**
241*5113495bSYour Name * ocb_psoc_enable() - Trigger psoc enable for ocb
242*5113495bSYour Name * @psoc: objmgr psoc object
243*5113495bSYour Name *
244*5113495bSYour Name * Return: QDF status success or failure
245*5113495bSYour Name */
246*5113495bSYour Name static inline
ocb_psoc_enable(struct wlan_objmgr_psoc * psoc)247*5113495bSYour Name QDF_STATUS ocb_psoc_enable(struct wlan_objmgr_psoc *psoc)
248*5113495bSYour Name {
249*5113495bSYour Name return QDF_STATUS_SUCCESS;
250*5113495bSYour Name }
251*5113495bSYour Name
252*5113495bSYour Name /**
253*5113495bSYour Name * ocb_psoc_disable() - Trigger psoc disable for ocb
254*5113495bSYour Name * @psoc: objmgr psoc object
255*5113495bSYour Name *
256*5113495bSYour Name * Return: QDF status success or failure
257*5113495bSYour Name */
258*5113495bSYour Name static inline
ocb_psoc_disable(struct wlan_objmgr_psoc * psoc)259*5113495bSYour Name QDF_STATUS ocb_psoc_disable(struct wlan_objmgr_psoc *psoc)
260*5113495bSYour Name {
261*5113495bSYour Name return QDF_STATUS_SUCCESS;
262*5113495bSYour Name }
263*5113495bSYour Name
264*5113495bSYour Name /**
265*5113495bSYour Name * ucfg_ocb_update_dp_handle() - register DP handle
266*5113495bSYour Name * @soc: soc handle
267*5113495bSYour Name * @dp_soc: data path soc handle
268*5113495bSYour Name *
269*5113495bSYour Name * Return: QDF_STATUS_SUCCESS on success
270*5113495bSYour Name */
271*5113495bSYour Name static inline
ucfg_ocb_update_dp_handle(struct wlan_objmgr_psoc * soc,void * dp_soc)272*5113495bSYour Name QDF_STATUS ucfg_ocb_update_dp_handle(struct wlan_objmgr_psoc *soc,
273*5113495bSYour Name void *dp_soc)
274*5113495bSYour Name {
275*5113495bSYour Name return QDF_STATUS_SUCCESS;
276*5113495bSYour Name }
277*5113495bSYour Name
278*5113495bSYour Name /**
279*5113495bSYour Name * ucfg_ocb_set_txrx_pdev_id() - register txrx pdev id
280*5113495bSYour Name * @psoc: soc handle
281*5113495bSYour Name * @pdev_id: data path pdev ID
282*5113495bSYour Name *
283*5113495bSYour Name * Return: QDF_STATUS_SUCCESS on success
284*5113495bSYour Name */
285*5113495bSYour Name static inline
ucfg_ocb_set_txrx_pdev_id(struct wlan_objmgr_psoc * psoc,uint8_t pdev_id)286*5113495bSYour Name QDF_STATUS ucfg_ocb_set_txrx_pdev_id(struct wlan_objmgr_psoc *psoc,
287*5113495bSYour Name uint8_t pdev_id)
288*5113495bSYour Name {
289*5113495bSYour Name return QDF_STATUS_SUCCESS;
290*5113495bSYour Name }
291*5113495bSYour Name #endif
292*5113495bSYour Name #endif
293