xref: /wlan-dirver/qca-wifi-host-cmn/umac/dfs/dispatcher/inc/wlan_dfs_ucfg_api.h (revision 11f5a63a6cbdda84849a730de22f0a71e635d58c)
1 /*
2  * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved.
3  *
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 /**
21  * DOC: This file has the DFS dispatcher API which is exposed to outside of DFS
22  * component.
23  */
24 
25 #ifndef _WLAN_DFS_UCFG_API_H_
26 #define _WLAN_DFS_UCFG_API_H_
27 
28 #include <wlan_objmgr_psoc_obj.h>
29 #include <wlan_objmgr_pdev_obj.h>
30 #include <wlan_dfs_ioctl.h>
31 
32 /**
33  * struct dfs_to_mlme - These are MLME function pointer used by DFS component.
34  * @pdev_component_obj_attach:         Attach DFS object to PDEV.
35  * @pdev_component_obj_detach:         Detach DFS object from PDEV.
36  * @pdev_get_comp_private_obj:         Get DFS object from PDEV.
37  * @dfs_start_rcsa:                    Send RCSA to RootAP.
38  * @mlme_mark_dfs:                     Calls dfs_action function.
39  * @mlme_start_csa:                    Sends CSA.
40  * @mlme_proc_cac:                     Process the CAC completion event.
41  * @mlme_deliver_event_up_after_cac:   Send a CAC timeout, VAP up event to user
42  *                                     space
43  * @mlme_get_dfs_ch_nchans:            Get number of channels in the channel
44  *                                     list.
45  * @mlme_get_extchan:                  Gets the extension channel.
46  * @mlme_set_no_chans_available:       Sets no_chans_available flag.
47  * @mlme_ieee2mhz:                     Gets Channel freq from ieee number.
48  * @mlme_find_dot11_channel:           Find dot11 channel.
49  * @mlme_get_dfs_ch_channels:          Get the channel list.
50  * @mlme_dfs_ch_flags_ext:             Gets channel extension flag.
51  * @mlme_channel_change_by_precac:     Channel change triggered by PreCAC.
52  * @mlme_precac_chan_change_csa:       Channel change triggered by PrCAC using
53  *                                     Channel Switch Announcement.
54  * @mlme_nol_timeout_notification:     NOL timeout notification.
55  * @mlme_clist_update:                 Updates the channel list.
56  * @mlme_is_opmode_sta:                Check if pdev opmode is STA.
57  * @mlme_get_cac_timeout:              Gets the CAC timeout.
58  * @mlme_rebuild_chan_list_with_non_dfs_channel: Rebuild channels with non-dfs
59  *                                     channels.
60  * @mlme_restart_vaps_with_non_dfs_chan: Restart vaps with non-dfs channel.
61  * @mlme_check_allowed_prim_chanlist:  Check whether the given channel is
62  *                                     present in the primary allowed channel
63  *                                     list or not.
64  * @mlme_update_scan_channel_list:     Update the scan channel list sent to FW.
65  * @mlme_bringdown_vaps:               Bringdown vaps if no chans is present.
66  * @mlme_dfs_deliver_event:            Deliver DFS events to user space
67  * @mlme_precac_chan_change_csa_for_freq:Channel change triggered by PrCAC using
68  *                                     Channel Switch Announcement.
69  * @mlme_mark_dfs_for_freq:            Mark DFS channel frequency as radar.
70  * @mlme_get_extchan_for_freq:         Get the extension channel.
71  * @mlme_find_dot11_chan_for_freq:     Find a channel pointer.
72  * @mlme_get_dfs_channels_for_freq:    Get DFS channels from current channel
73  *                                     list.
74  * @mlme_get_cac_timeout_for_freq:     Get CAC timeout for a given channel
75  *                                     frequency.
76  */
77 struct dfs_to_mlme {
78 	QDF_STATUS (*pdev_component_obj_attach)(struct wlan_objmgr_pdev *pdev,
79 			enum wlan_umac_comp_id id,
80 			void *comp_priv_obj,
81 			QDF_STATUS status);
82 	QDF_STATUS (*pdev_component_obj_detach)(struct wlan_objmgr_pdev *pdev,
83 			enum wlan_umac_comp_id id,
84 			void *comp_priv_obj);
85 	QDF_STATUS (*dfs_start_rcsa)(struct wlan_objmgr_pdev *pdev,
86 			bool *wait_for_csa);
87 #ifdef CONFIG_CHAN_NUM_API
88 	QDF_STATUS (*mlme_mark_dfs)(struct wlan_objmgr_pdev *pdev,
89 			uint8_t ieee,
90 			uint16_t freq,
91 			uint8_t vhtop_ch_freq_seg2,
92 			uint64_t flags);
93 #endif
94 #ifdef CONFIG_CHAN_FREQ_API
95 	QDF_STATUS (*mlme_mark_dfs_for_freq)(struct wlan_objmgr_pdev *pdev,
96 					     uint8_t ieee,
97 					     uint16_t freq,
98 					     uint16_t ic_mhz_freq_seg2,
99 					     uint64_t flags);
100 #endif
101 #ifdef CONFIG_CHAN_NUM_API
102 	QDF_STATUS (*mlme_start_csa)(struct wlan_objmgr_pdev *pdev,
103 			uint8_t ieee_chan, uint16_t freq,
104 			uint8_t cfreq2, uint64_t flags);
105 #endif
106 #ifdef CONFIG_CHAN_FREQ_API
107 	QDF_STATUS (*mlme_start_csa_for_freq)(struct wlan_objmgr_pdev *pdev,
108 					      uint8_t ieee_chan, uint16_t freq,
109 					      uint16_t cfreq2, uint64_t flags);
110 #endif
111 
112 	QDF_STATUS (*mlme_proc_cac)(struct wlan_objmgr_pdev *pdev);
113 	QDF_STATUS (*mlme_deliver_event_up_after_cac)(
114 			struct wlan_objmgr_pdev *pdev);
115 	QDF_STATUS (*mlme_get_dfs_ch_nchans)(struct wlan_objmgr_pdev *pdev,
116 			int *nchans);
117 #ifdef CONFIG_CHAN_NUM_API
118 	QDF_STATUS (*mlme_get_extchan)(struct wlan_objmgr_pdev *pdev,
119 			uint16_t *dfs_ch_freq,
120 			uint64_t *dfs_ch_flags,
121 			uint16_t *dfs_ch_flagext,
122 			uint8_t *dfs_ch_ieee,
123 			uint8_t *dfs_ch_vhtop_ch_freq_seg1,
124 			uint8_t *dfs_ch_vhtop_ch_freq_seg2);
125 #endif
126 #ifdef CONFIG_CHAN_FREQ_API
127 	QDF_STATUS (*mlme_get_extchan_for_freq)(struct wlan_objmgr_pdev *pdev,
128 						uint16_t *dfs_ch_freq,
129 						uint64_t *dfs_ch_flags,
130 						uint16_t *dfs_ch_flagext,
131 						uint8_t *dfs_ch_ieee,
132 						uint8_t *dfs_vhtop_ch_freq_seg1,
133 						uint8_t *dfs_vhtop_ch_freq_seg2,
134 						uint16_t *dfs_ch_mhz_freq_seg1,
135 						uint16_t *dfs_ch_mhz_freq_seg2);
136 #endif
137 	QDF_STATUS (*mlme_set_no_chans_available)(struct wlan_objmgr_pdev *pdev,
138 			int val);
139 	QDF_STATUS (*mlme_ieee2mhz)(struct wlan_objmgr_pdev *pdev,
140 			int ieee,
141 			uint64_t flag,
142 			int *freq);
143 #ifdef CONFIG_CHAN_NUM_API
144 	QDF_STATUS (*mlme_find_dot11_channel)(struct wlan_objmgr_pdev *pdev,
145 			uint8_t ieee,
146 			uint8_t des_cfreq2,
147 			int mode,
148 			uint16_t *dfs_ch_freq,
149 			uint64_t *dfs_ch_flags,
150 			uint16_t *dfs_ch_flagext,
151 			uint8_t *dfs_ch_ieee,
152 			uint8_t *dfs_ch_vhtop_ch_freq_seg1,
153 			uint8_t *dfs_ch_vhtop_ch_freq_seg2);
154 #endif
155 #ifdef CONFIG_CHAN_FREQ_API
156 	QDF_STATUS (*mlme_find_dot11_chan_for_freq)(struct wlan_objmgr_pdev *,
157 						    uint16_t freq,
158 						    uint16_t des_cfreq2_mhz,
159 						    int mode,
160 						    uint16_t *dfs_ch_freq,
161 						    uint64_t *dfs_ch_flags,
162 						    uint16_t *dfs_ch_flagext,
163 						    uint8_t *dfs_ch_ieee,
164 						    uint8_t *dfs_ch_freq_seg1,
165 						    uint8_t *dfs_ch_freq_seg2,
166 						    uint16_t *dfs_cfreq1_mhz,
167 						    uint16_t *dfs_cfreq2_mhz);
168 #endif
169 #ifdef CONFIG_CHAN_NUM_API
170 	QDF_STATUS (*mlme_get_dfs_ch_channels)(struct wlan_objmgr_pdev *pdev,
171 			uint16_t *dfs_ch_freq,
172 			uint64_t *dfs_ch_flags,
173 			uint16_t *dfs_ch_flagext,
174 			uint8_t *dfs_ch_ieee,
175 			uint8_t *dfs_ch_vhtop_ch_freq_seg1,
176 			uint8_t *dfs_ch_vhtop_ch_freq_seg2,
177 			int index);
178 #endif
179 #ifdef CONFIG_CHAN_FREQ_API
180 	QDF_STATUS (*mlme_get_dfs_channels_for_freq)(
181 			struct wlan_objmgr_pdev *pdev,
182 			uint16_t *dfs_chan_freq,
183 			uint64_t *dfs_chan_flags,
184 			uint16_t *dfs_chan_flagext,
185 			uint8_t *dfs_chan_ieee,
186 			uint8_t *dfs_chan_vhtop_ch_freq_seg1,
187 			uint8_t *dfs_chan_vhtop_ch_freq_seg2,
188 			uint16_t *dfs_chan_mhz_freq_seg1,
189 			uint16_t *dfs_chan_mhz_freq_seg2,
190 			int index);
191 #endif
192 	QDF_STATUS (*mlme_dfs_ch_flags_ext)(struct wlan_objmgr_pdev *pdev,
193 			uint16_t *flag_ext);
194 	QDF_STATUS (*mlme_channel_change_by_precac)(
195 			struct wlan_objmgr_pdev *pdev);
196 #ifdef WLAN_DFS_PRECAC_AUTO_CHAN_SUPPORT
197 #ifdef CONFIG_CHAN_FREQ_API
198 	QDF_STATUS
199 	    (*mlme_precac_chan_change_csa_for_freq)(struct wlan_objmgr_pdev *,
200 						    uint16_t des_chan_freq,
201 						    enum wlan_phymode des_mode);
202 #endif
203 #ifdef CONFIG_CHAN_NUM_API
204 	QDF_STATUS
205 		(*mlme_precac_chan_change_csa)(struct wlan_objmgr_pdev *,
206 					       uint8_t des_chan,
207 					       enum wlan_phymode des_mode);
208 #endif
209 #endif
210 	QDF_STATUS (*mlme_nol_timeout_notification)(
211 			struct wlan_objmgr_pdev *pdev);
212 	QDF_STATUS (*mlme_clist_update)(struct wlan_objmgr_pdev *pdev,
213 			void *nollist,
214 			int nentries);
215 	bool (*mlme_is_opmode_sta)(struct wlan_objmgr_pdev *pdev);
216 #ifdef CONFIG_CHAN_NUM_API
217 	QDF_STATUS (*mlme_get_cac_timeout)(struct wlan_objmgr_pdev *pdev,
218 			uint16_t dfs_ch_freq,
219 			uint8_t c_vhtop_ch_freq_seg2,
220 			uint64_t dfs_ch_flags,
221 			int *cac_timeout);
222 #endif
223 #ifdef CONFIG_CHAN_FREQ_API
224 	QDF_STATUS
225 	    (*mlme_get_cac_timeout_for_freq)(struct wlan_objmgr_pdev *pdev,
226 					     uint16_t dfs_ch_freq,
227 					     uint16_t c_vhtop_ch_freq_seg2,
228 					     uint64_t dfs_ch_flags,
229 					     int *cac_timeout);
230 #endif
231 	QDF_STATUS (*mlme_rebuild_chan_list_with_non_dfs_channels)
232 			(struct wlan_objmgr_pdev *pdev);
233 	QDF_STATUS (*mlme_restart_vaps_with_non_dfs_chan)
234 			(struct wlan_objmgr_pdev *pdev, int no_chans_avail);
235 	bool (*mlme_check_allowed_prim_chanlist)
236 			(struct wlan_objmgr_pdev *pdev, uint32_t chan);
237 	QDF_STATUS (*mlme_update_scan_channel_list)
238 			(struct wlan_objmgr_pdev *pdev);
239 	QDF_STATUS (*mlme_bringdown_vaps)
240 			(struct wlan_objmgr_pdev *pdev);
241 	void (*mlme_dfs_deliver_event)
242 			(struct wlan_objmgr_pdev *pdev,
243 			 uint16_t freq,
244 			 enum WLAN_DFS_EVENTS event);
245 };
246 
247 extern struct dfs_to_mlme global_dfs_to_mlme;
248 
249 /**
250  * wlan_dfs_pdev_obj_create_notification() - DFS pdev object create handler.
251  * @pdev: Pointer to DFS pdev object.
252  */
253 QDF_STATUS wlan_dfs_pdev_obj_create_notification(struct wlan_objmgr_pdev *pdev,
254 		void *arg);
255 
256 /**
257  * wlan_dfs_pdev_obj_destroy_notification() - DFS pdev object delete handler.
258  * @pdev: Pointer to DFS pdev object.
259  */
260 QDF_STATUS wlan_dfs_pdev_obj_destroy_notification(struct wlan_objmgr_pdev *pdev,
261 		void *arg);
262 
263 /**
264  * ucfg_dfs_is_ap_cac_timer_running() - Returns the dfs cac timer.
265  * @pdev: Pointer to DFS pdev object.
266  * @is_ap_cac_timer_running: Pointer to save dfs_cac_timer_running value.
267  *
268  * Wrapper function for dfs_is_ap_cac_timer_running().
269  * This function called from outside of dfs component.
270  */
271 QDF_STATUS ucfg_dfs_is_ap_cac_timer_running(struct wlan_objmgr_pdev *pdev,
272 		int *is_ap_cac_timer_running);
273 
274 /**
275  * ucfg_dfs_getnol() - Wrapper function for dfs_get_nol()
276  * @pdev: Pointer to DFS pdev object.
277  * @dfs_nolinfo: Pointer to dfsreq_nolinfo structure.
278  *
279  * Wrapper function for dfs_getnol().
280  * This function called from outside of dfs component.
281  */
282 QDF_STATUS ucfg_dfs_getnol(struct wlan_objmgr_pdev *pdev, void *dfs_nolinfo);
283 
284 /**
285  * ucfg_dfs_override_cac_timeout() -  Override the default CAC timeout.
286  * @pdev: Pointer to DFS pdev object.
287  * @cac_timeout: CAC timeout value.
288  *
289  * Wrapper function for dfs_override_cac_timeout().
290  * This function called from outside of dfs component.
291  */
292 QDF_STATUS ucfg_dfs_override_cac_timeout(struct wlan_objmgr_pdev *pdev,
293 		int cac_timeout, int *status);
294 
295 /**
296  * ucfg_dfs_get_override_cac_timeout() -  Get override CAC timeout value.
297  * @pdev: Pointer to DFS pdev object.
298  * @cac_timeout: Pointer to save the CAC timeout value.
299  *
300  * Wrapper function for dfs_get_override_cac_timeout().
301  * This function called from outside of dfs component.
302  */
303 QDF_STATUS ucfg_dfs_get_override_cac_timeout(struct wlan_objmgr_pdev *pdev,
304 		int *cac_timeout, int *status);
305 
306 /**
307  * ucfg_dfs_get_override_precac_timeout() - Get precac timeout.
308  * @pdev: Pointer to DFS pdev object.
309  * @precac_timeout: Get precac timeout value in this variable.
310  *
311  * Wrapper function for dfs_get_override_precac_timeout().
312  * This function called from outside of dfs component.
313  */
314 QDF_STATUS ucfg_dfs_get_override_precac_timeout(struct wlan_objmgr_pdev *pdev,
315 		int *precac_timeout);
316 
317 /**
318  * ucfg_dfs_override_precac_timeout() - Override the default precac timeout.
319  * @pdev: Pointer to DFS pdev object.
320  * @precac_timeout: Precac timeout value.
321  *
322  * Wrapper function for dfs_override_precac_timeout().
323  * This function called from outside of dfs component.
324  */
325 QDF_STATUS ucfg_dfs_override_precac_timeout(struct wlan_objmgr_pdev *pdev,
326 		int precac_timeout);
327 
328 /**
329  * ucfg_dfs_set_precac_enable() - Set precac enable flag.
330  * @pdev: Pointer to DFS pdev object.
331  * @value: input value for dfs_legacy_precac_ucfg flag.
332  *
333  * Wrapper function for dfs_set_precac_enable().
334  * This function called from outside of dfs component.
335  */
336 QDF_STATUS ucfg_dfs_set_precac_enable(struct wlan_objmgr_pdev *pdev,
337 				      uint32_t value);
338 
339 /**
340  * ucfg_dfs_get_legacy_precac_enable() - Get the legacy precac enable flag.
341  * @pdev: Pointer to DFS pdev object.
342  * @buff: Pointer to save precac_enable value.
343  *
344  * Wrapper function for dfs_is_legacy_precac_enabled() and returns the
345  * legacy precac enable flag for partial offload chipsets.
346  * This function called from outside of dfs component.
347  */
348 QDF_STATUS ucfg_dfs_get_legacy_precac_enable(struct wlan_objmgr_pdev *pdev,
349 					     bool *buff);
350 
351 /**
352  * ucfg_dfs_get_agile_precac_enable() - Get agile precac enable flag.
353  * @pdev: Pointer to DFS pdev object.
354  * @buff: Pointer to save dfs_agile_precac_ucfg value.
355  *
356  * Wrapper function for dfs_is_legacy_precac_enabled().
357  * This function called from outside of dfs component.
358  *
359  * Return:
360  * * QDF_STATUS_SUCCESS: Successfully able to get agile precac flag.
361  * * QDF_STATUS_E_FAILURE: Failed to get agile precac flag.
362  */
363 QDF_STATUS ucfg_dfs_get_agile_precac_enable(struct wlan_objmgr_pdev *pdev,
364 					    bool *buff);
365 
366 #ifdef WLAN_DFS_PRECAC_AUTO_CHAN_SUPPORT
367 /**
368  * ucfg_dfs_set_precac_intermediate_chan() - Set intermediate channel
369  *                                           for preCAC.
370  * @pdev: Pointer to DFS pdev object.
371  * @value: Channel number of intermediate channel
372  *
373  * Wrapper function for dfs_set_precac_intermediate_chan().
374  * This function is called from outside of dfs component.
375  *
376  * Return:
377  * * QDF_STATUS_SUCCESS  : Successfully set intermediate channel.
378  * * QDF_STATUS_E_FAILURE: Failed to set intermediate channel.
379  */
380 QDF_STATUS ucfg_dfs_set_precac_intermediate_chan(struct wlan_objmgr_pdev *pdev,
381 						 uint32_t value);
382 
383 /**
384  * ucfg_dfs_get_precac_intermediate_chan() - Get intermediate channel
385  *						for preCAC.
386  * @pdev: Pointer to DFS pdev object.
387  * @buff: Pointer to Channel number of intermediate channel.
388  *
389  * Wrapper function for dfs_get_precac_intermediate_chan().
390  * This function is called from outside of dfs component.
391  *
392  * Return: Configured intermediate precac channel.
393  */
394 QDF_STATUS ucfg_dfs_get_precac_intermediate_chan(struct wlan_objmgr_pdev *pdev,
395 						 int *buff);
396 
397 /**
398  * ucfg_dfs_get_precac_chan_state() - Get precac status for the given channel.
399  * @pdev: Pointer to DFS pdev object.
400  * @precac_chan: Channel number for which precac state needs to be determined.
401  *
402  * Wrapper function for dfs_get_precac_chan_state().
403  * This function called from outside of dfs component.
404  *
405  * Return: Precac state of the given channel.
406  */
407 #ifdef CONFIG_CHAN_NUM_API
408 enum precac_chan_state
409 ucfg_dfs_get_precac_chan_state(struct wlan_objmgr_pdev *pdev,
410 			       uint8_t precac_chan);
411 #endif
412 
413 /**
414  * ucfg_dfs_get_precac_chan_state_for_freq() - Get precac status for the
415  * given channel.
416  * @pdev: Pointer to DFS pdev object.
417  * @precac_chan: Channel frequency for which precac state needs to be
418  *               determined.
419  *
420  * Wrapper function for dfs_get_precac_chan_state().
421  * This function called from outside of dfs component.
422  *
423  * Return: Precac state of the given channel.
424  */
425 #ifdef CONFIG_CHAN_FREQ_API
426 enum precac_chan_state
427 ucfg_dfs_get_precac_chan_state_for_freq(struct wlan_objmgr_pdev *pdev,
428 					uint16_t precac_freq);
429 #endif
430 
431 #endif
432 
433 #ifdef QCA_MCL_DFS_SUPPORT
434 /**
435  * ucfg_dfs_update_config() - Update DFS user config.
436  * @psoc: Pointer to psoc.
437  * @req: DFS user config.
438  *
439  * Return: QDF_STATUS
440  */
441 QDF_STATUS ucfg_dfs_update_config(struct wlan_objmgr_psoc *psoc,
442 		struct dfs_user_config *req);
443 #else
444 static inline QDF_STATUS ucfg_dfs_update_config(struct wlan_objmgr_psoc *psoc,
445 		struct dfs_user_config *req)
446 {
447 	return QDF_STATUS_SUCCESS;
448 }
449 #endif
450 
451 /**
452  * ucfg_dfs_set_override_status_timeout() - override the value of host dfs
453  * status wait timeout.
454  * @pdev: Pointer to DFS pdev object.
455  * @status_timeout: timeout value.
456  *
457  * Wrapper function for dfs_set_override_status_timeout().
458  * This function called from outside of dfs component.
459  *
460  * Return: QDF_STATUS
461  */
462 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
463 QDF_STATUS ucfg_dfs_set_override_status_timeout(struct wlan_objmgr_pdev *pdev,
464 					    int status_timeout);
465 #else
466 static inline
467 QDF_STATUS ucfg_dfs_set_override_status_timeout(struct wlan_objmgr_pdev *pdev,
468 					    int status_timeout)
469 {
470 	return QDF_STATUS_SUCCESS;
471 }
472 #endif
473 
474 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(WLAN_DFS_SYNTHETIC_RADAR)
475 /**
476  * ucfg_dfs_allow_hw_pulses() - Set or unset dfs-allow_hw_pulses
477  * which isolates synthetic radar pulse detection from actual radar detection.
478  * @pdev: Pointer to DFS pdev object.
479  * @allow_hw_pulses: Allow synthetic pulse detection true/false.
480  *
481  * Wrapper function for dfs_set_allow_hw_pulses().
482  * This function called from outside of dfs component.
483  *
484  * Return: void
485  */
486 void ucfg_dfs_allow_hw_pulses(struct wlan_objmgr_pdev *pdev,
487 			      bool allow_hw_pulses);
488 
489 /**
490  * ucfg_dfs_is_hw_pulses_allowed() - Check if actual radar detection is allowed
491  * or synthetic pulse detection is enabled.
492  * @pdev: Pointer to DFS pdev object.
493  *
494  * Wrapper function for dfs_is_hw_pulses_allowed().
495  * This function called from outside of dfs component.
496  *
497  * Return: bool
498  */
499 bool ucfg_dfs_is_hw_pulses_allowed(struct wlan_objmgr_pdev *pdev);
500 #else
501 static inline
502 void ucfg_dfs_allow_hw_pulses(struct wlan_objmgr_pdev *pdev,
503 			      bool allow_hw_pulses)
504 {
505 }
506 
507 static inline
508 bool ucfg_dfs_is_hw_pulses_allowed(struct wlan_objmgr_pdev *pdev)
509 {
510 	return true;
511 }
512 #endif
513 
514 /**
515  * ucfg_dfs_get_override_status_timeout() - Get the value of host dfs status
516  * wait timeout.
517  * @pdev: Pointer to DFS pdev object.
518  * @status_timeout: Pointer to save the timeout value.
519  *
520  * Wrapper function for dfs_get_override_status_timeout().
521  * This function called from outside of dfs component.
522  *
523  * Return: QDF_STATUS
524  */
525 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
526 QDF_STATUS ucfg_dfs_get_override_status_timeout(struct wlan_objmgr_pdev *pdev,
527 						int *status_timeout);
528 #else
529 static inline
530 QDF_STATUS ucfg_dfs_get_override_status_timeout(struct wlan_objmgr_pdev *pdev,
531 						int *status_timeout)
532 {
533 	return QDF_STATUS_SUCCESS;
534 }
535 #endif
536 
537 /**
538  * ucfg_dfs_set_nol_subchannel_marking() - Set or unset NOL subchannel marking.
539  * @pdev: Pointer to DFS pdev object.
540  * @nol_subchannel_marking: Set NOL subchannel marking based on this value.
541  *
542  * Wrapper function for dfs_set_nol_subchannel_marking().
543  * This function is called from outside of dfs component.
544  *
545  * Return: QDF_STATUS
546  */
547 QDF_STATUS ucfg_dfs_set_nol_subchannel_marking(struct wlan_objmgr_pdev *pdev,
548 					       bool nol_subchannel_marking);
549 
550 /**
551  * ucfg_dfs_get_nol_subchannel_marking() - Get the value of NOL subchannel
552  * marking.
553  * @pdev: Pointer to DFS pdev object.
554  * @nol_subchannel_marking: Store the value of  NOL subchannel marking.
555  *
556  * Wrapper function for dfs_get_nol_subchannel_marking().
557  * This function is called from outside of dfs component.
558  *
559  * Return: QDF_STATUS
560  */
561 QDF_STATUS ucfg_dfs_get_nol_subchannel_marking(struct wlan_objmgr_pdev *pdev,
562 					       bool *nol_subchannel_marking);
563 /**
564  * ucfg_dfs_reinit_timers() - Init DFS timers.
565  * @pdev: Pointer to wlan_objmgr_pdev structure.
566  *
567  * Wrapper function to reset CAC, NOL, DFS Test Timer and ZeroCAC Timer.
568  * This is invoked per pdev to reinitialize timers after HW Mode Switch is
569  * triggered.
570  */
571 QDF_STATUS ucfg_dfs_reinit_timers(struct wlan_objmgr_pdev *pdev);
572 
573 /**
574  * ucfg_dfs_reset_agile_config() - Reset ADFS config.
575  * @pdev: Pointer to wlan_objmgr_pdev structure.
576  *
577  * Wrapper function to reset Agile DFS config such as the variables which hold
578  * information about the state of the preCAC timer, active precac
579  * dfs index and OCAC status. It is invoked before HW Mode switch is triggered
580  * to ensure ADFS config is in a well known consistent state.
581  */
582 #ifdef QCA_SUPPORT_AGILE_DFS
583 QDF_STATUS ucfg_dfs_reset_agile_config(struct wlan_objmgr_psoc *psoc);
584 #else
585 static inline QDF_STATUS ucfg_dfs_reset_agile_config(struct wlan_objmgr_psoc
586 						    *psoc)
587 {
588 	return QDF_STATUS_SUCCESS;
589 }
590 #endif
591 #endif /* _WLAN_DFS_UCFG_API_H_ */
592