xref: /wlan-dirver/qca-wifi-host-cmn/umac/dfs/dispatcher/inc/wlan_dfs_tgt_api.h (revision 2f4b444fb7e689b83a4ab0e7b3b38f0bf4def8e0)
1 /*
2  * Copyright (c) 2016-2021 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_TGT_API_H_
26 #define _WLAN_DFS_TGT_API_H_
27 
28 #include <wlan_dfs_public_struct.h>
29 
30 #define WLAN_DFS_RESET_TIME_S 7
31 #define WLAN_DFS_WAIT (60 + WLAN_DFS_RESET_TIME_S) /* 60 seconds */
32 #define WLAN_DFS_WAIT_MS ((WLAN_DFS_WAIT) * 1000)  /*in MS*/
33 
34 /* Command id to send test radar to firmware */
35 #define DFS_PHYERR_OFFLOAD_TEST_SET_RADAR 0
36 
37 /* Segment ID corresponding to primary segment */
38 #define SEG_ID_PRIMARY 0
39 
40 /* Segment ID corresponding to secondary segment */
41 #define SEG_ID_SECONDARY 1
42 
43 /* dfs_radar_args_for_unit_test: Radar parameters to be sent in unit test cmd.
44  * @IDX_CMD_ID:          Index id pointing to command id value
45  * @IDX_PDEV_ID:         Index id pointing to pdev id value
46  * @IDX_RADAR_PARAM1_ID: Index pointing to packed arguments value that includes
47  *                         1). Segment ID,
48  *                         2). Chirp information (is chirp or non chirp),
49  *                         3). Frequency offset.
50  *                         4). Detector ID.
51  *
52  * The packed argument structure is:
53  *
54  * ------------------------------32 bits arg----------------------------
55  *
56  * ------------19 bits-------|--2 bits-|-------8 bits------|1 bit|2 bits|
57  * ______________________________________________________________________
58  *|                          |   | |   | | | | | | | | | | |     |   |   |
59  *|------19 Unused bits------| x | | x |x|x|x| |x|x|x|x| |x|  x  | x | x |
60  *|__________________________|___|_|___|_|_|_|_|_|_|_|_|_|_|_____|___|___|
61  *
62  *                           |_________|___________________|_____|_______|
63  *                              det.ID     freq.offset      Chirp  seg.ID
64  *
65  * @DFS_UNIT_TEST_NUM_ARGS:     Number of arguments for bangradar unit test
66  *                              command.
67  * @DFS_MAX_NUM_UNIT_TEST_ARGS: Maximum number of arguments for unit test
68  *                              command in radar simulation.
69  */
70 enum {
71 	IDX_CMD_ID = 0,
72 	IDX_PDEV_ID,
73 	IDX_RADAR_PARAM1_ID,
74 	DFS_UNIT_TEST_NUM_ARGS,
75 	DFS_MAX_NUM_UNIT_TEST_ARGS = DFS_UNIT_TEST_NUM_ARGS
76 };
77 
78 #define SEG_ID_SHIFT         0
79 #define IS_CHIRP_SHIFT       2
80 #define FREQ_OFF_SHIFT       3
81 #define DET_ID_SHIFT        11
82 #define SEG_ID_MASK       0x03
83 #define IS_CHIRP_MASK     0x01
84 #define FREQ_OFFSET_MASK  0xFF
85 #define DET_ID_MASK       0x03
86 
87 /**
88  * struct dfs_emulate_bang_radar_test_cmd - Unit test command structure to send
89  *                                          WMI command to firmware from host
90  *                                          and simulate bangradar event.
91  * @vdev_id: vdev id
92  * @num_args: number of arguments
93  * @args: arguments
94  */
95 struct dfs_emulate_bang_radar_test_cmd {
96 	uint32_t vdev_id;
97 	uint32_t num_args;
98 	uint32_t args[DFS_MAX_NUM_UNIT_TEST_ARGS];
99 };
100 
101 /**
102  * struct vdev_adfs_complete_status - OCAC complete status event param
103  * @vdev_id: Physical device identifier
104  * @chan_freq: Channel number
105  * @chan_width: Channel Width
106  * @center_freq1 : For 20/40/80/160Mhz, it is the center of the corresponding
107  * band. For 80P80/165MHz, it is the center of the left 80MHz.
108  * @center_freq2 : It is valid and non-zero only for 80P80/165MHz. It indicates
109  * the Center Frequency of the right 80MHz segment.
110  * @ocac_status: off channel cac status
111  */
112 struct vdev_adfs_complete_status {
113 	uint32_t vdev_id;
114 	uint32_t chan_freq;
115 	uint32_t chan_width;
116 	uint32_t center_freq1;
117 	uint32_t center_freq2;
118 	uint32_t ocac_status;
119 };
120 
121 extern struct dfs_to_mlme global_dfs_to_mlme;
122 
123 #ifdef DFS_COMPONENT_ENABLE
124 /**
125  * tgt_dfs_set_current_channel_for_freq() - Fill dfs channel structure from
126  *                                          dfs_channel structure.
127  * @pdev: Pointer to DFS pdev object.
128  * @dfs_ch_freq: Frequency in Mhz.
129  * @dfs_ch_flags: Channel flags.
130  * @dfs_ch_flagext: Extended channel flags.
131  * @dfs_ch_ieee: IEEE channel number.
132  * @dfs_ch_vhtop_ch_freq_seg1: Channel Center frequency1.
133  * @dfs_ch_vhtop_ch_freq_seg2: Channel Center frequency2.
134  * @dfs_ch_mhz_freq_seg1:  Channel center frequency of primary segment in MHZ.
135  * @dfs_ch_mhz_freq_seg2:  Channel center frequency of secondary segment in MHZ
136  *                         applicable only for 80+80MHZ mode of operation.
137  * @is_channel_updated: Boolean to represent channel update.
138  */
139 #ifdef CONFIG_CHAN_FREQ_API
140 QDF_STATUS
141 tgt_dfs_set_current_channel_for_freq(struct wlan_objmgr_pdev *pdev,
142 				     uint16_t dfs_ch_freq,
143 				     uint64_t dfs_ch_flags,
144 				     uint16_t dfs_ch_flagext,
145 				     uint8_t dfs_ch_ieee,
146 				     uint8_t dfs_ch_vhtop_ch_freq_seg1,
147 				     uint8_t dfs_ch_vhtop_ch_freq_seg2,
148 				     uint16_t dfs_ch_mhz_freq_seg1,
149 				     uint16_t dfs_ch_mhz_freq_seg2,
150 				     bool *is_channel_updated);
151 #endif
152 
153 /**
154  * tgt_dfs_radar_enable() - Enables the radar.
155  * @pdev: Pointer to DFS pdev object.
156  * @no_cac: If no_cac is 0, it cancels the CAC.
157  * @enable: disable/enable radar
158  *
159  * This is called each time a channel change occurs, to (potentially) enable
160  * the radar code.
161  */
162 QDF_STATUS tgt_dfs_radar_enable(
163 	struct wlan_objmgr_pdev *pdev,
164 	int no_cac, uint32_t opmode, bool enable);
165 
166 /**
167  * tgt_dfs_control()- Used to process ioctls related to DFS.
168  * @pdev: Pointer to DFS pdev object.
169  * @id: Command type.
170  * @indata: Input buffer.
171  * @insize: size of the input buffer.
172  * @outdata: A buffer for the results.
173  * @outsize: Size of the output buffer.
174  */
175 QDF_STATUS tgt_dfs_control(struct wlan_objmgr_pdev *pdev,
176 	u_int id,
177 	void *indata,
178 	uint32_t insize,
179 	void *outdata,
180 	uint32_t *outsize,
181 	int *error);
182 
183 /**
184  * tgt_dfs_get_radars() - Based on the chipset, calls init radar table functions
185  * @pdev: Pointer to DFS pdev object.
186  *
187  * Wrapper function for dfs_get_radars(). This function called from
188  * outside of DFS component.
189  */
190 QDF_STATUS tgt_dfs_get_radars(struct wlan_objmgr_pdev *pdev);
191 
192 /**
193  * tgt_dfs_process_radar_ind() - Process radar found indication.
194  * @pdev: Pointer to DFS pdev object.
195  * @radar_found: radar found info.
196  *
197  * Process radar found indication.
198  *
199  * Return QDF_STATUS.
200  */
201 QDF_STATUS tgt_dfs_process_radar_ind(struct wlan_objmgr_pdev *pdev,
202 		struct radar_found_info *radar_found);
203 #else
204 
205 static inline QDF_STATUS tgt_dfs_radar_enable(
206 	struct wlan_objmgr_pdev *pdev,
207 	int no_cac, uint32_t opmode, bool enable)
208 {
209 	return QDF_STATUS_SUCCESS;
210 }
211 
212 static inline QDF_STATUS tgt_dfs_control(struct wlan_objmgr_pdev *pdev,
213 	u_int id,
214 	void *indata,
215 	uint32_t insize,
216 	void *outdata,
217 	uint32_t *outsize,
218 	int *error)
219 {
220 	return QDF_STATUS_SUCCESS;
221 }
222 
223 static inline QDF_STATUS tgt_dfs_get_radars(struct wlan_objmgr_pdev *pdev)
224 {
225 	return QDF_STATUS_SUCCESS;
226 }
227 
228 static inline QDF_STATUS tgt_dfs_process_radar_ind(
229 		struct wlan_objmgr_pdev *pdev,
230 		struct radar_found_info *radar_found)
231 {
232 	return QDF_STATUS_SUCCESS;
233 }
234 #endif
235 
236 /**
237  * tgt_dfs_process_phyerr() - Process phyerr.
238  * @pdev: Pointer to DFS pdev object.
239  * @buf: Phyerr buffer.
240  * @datalen: phyerr buffer length.
241  * @r_rssi: RSSI.
242  * @r_ext_rssi: Extension channel RSSI.
243  * @r_rs_tstamp: Timestamp.
244  * @r_fulltsf: TSF64.
245  *
246  * Wrapper function for dfs_process_phyerr(). This function called from
247  * outside of DFS component.
248  */
249 QDF_STATUS tgt_dfs_process_phyerr(struct wlan_objmgr_pdev *pdev,
250 	void *buf,
251 	uint16_t datalen,
252 	uint8_t r_rssi,
253 	uint8_t r_ext_rssi,
254 	uint32_t r_rs_tstamp,
255 	uint64_t r_fulltsf);
256 
257 /**
258  * tgt_dfs_process_phyerr_filter_offload() - Process radar event.
259  * Wrapper function for dfs_process_phyerr_filter_offload(). This function
260  * called from outside of DFS component.
261  * @pdev: Pointer to DFS pdev object.
262  * @wlan_radar_event: pointer to radar_event_info.
263  *
264  * Return: QDF_STATUS
265  */
266 QDF_STATUS tgt_dfs_process_phyerr_filter_offload(struct wlan_objmgr_pdev *pdev,
267 	struct radar_event_info *wlan_radar_event);
268 
269 /**
270  * tgt_dfs_is_phyerr_filter_offload() - Is phyerr filter offload.
271  * @psoc: Pointer to psoc object.
272  * @is_phyerr_filter_offload: Pointer to is_phyerr_filter_offload.
273  *
274  * Return: QDF_STATUS
275  */
276 QDF_STATUS tgt_dfs_is_phyerr_filter_offload(struct wlan_objmgr_psoc *psoc,
277 					    bool *is_phyerr_filter_offload);
278 
279 /**
280  * tgt_dfs_destroy_object() - Destroys the DFS object.
281  * @pdev: Pointer to DFS pdev object.
282  *
283  * Wrapper function for  dfs_destroy_object(). This function called from
284  * outside of DFS component.
285  */
286 QDF_STATUS tgt_dfs_destroy_object(struct wlan_objmgr_pdev *pdev);
287 
288 #ifdef MOBILE_DFS_SUPPORT
289 /**
290  * tgt_dfs_set_tx_leakage_threshold() - set tx_leakage_threshold.
291  * @pdev: Pointer to DFS pdev object.
292  *
293  * Return QDF_STATUS.
294  */
295 QDF_STATUS tgt_dfs_set_tx_leakage_threshold(struct wlan_objmgr_pdev *pdev);
296 #else
297 static inline QDF_STATUS tgt_dfs_set_tx_leakage_threshold
298 		(struct wlan_objmgr_pdev *pdev)
299 {
300 	return QDF_STATUS_SUCCESS;
301 }
302 #endif
303 
304 /**
305  * tgt_dfs_is_precac_timer_running() - Check whether precac timer is running.
306  * @pdev: Pointer to DFS pdev object.
307  * @is_precac_timer_running: Pointer to save precac timer value.
308  *
309  * Wrapper function for dfs_is_precac_timer_running(). This function called from
310  * outside of DFS component.
311  */
312 QDF_STATUS tgt_dfs_is_precac_timer_running(struct wlan_objmgr_pdev *pdev,
313 	bool *is_precac_timer_running);
314 
315 /**
316  * tgt_dfs_set_agile_precac_state() - set state for Agile Precac.
317  *
318  * @pdev: Pointer to DFS pdev object.
319  * @agile_precac_state: Agile Precac state
320  *
321  * wrapper function for  dfs_set_agile_precac_state.
322  * This function called from outside of dfs component.
323  */
324 QDF_STATUS tgt_dfs_set_agile_precac_state(struct wlan_objmgr_pdev *pdev,
325 					  int agile_precac_state);
326 
327 /**
328  * tgt_dfs_agile_precac_start() - Start agile precac
329  *
330  * @pdev: Pointer to DFS pdev object.
331  *
332  * wrapper function for  dfs_set_agile_precac_state.
333  * This function called from outside of dfs component.
334  */
335 QDF_STATUS tgt_dfs_agile_precac_start(struct wlan_objmgr_pdev *pdev);
336 
337 /**
338  * tgt_dfs_ocac_complete() - Process off channel cac complete indication.
339  * @pdev: Pointer to DFS pdev object.
340  * @vdev_adfs_complete_status: Off channel CAC complete status.
341  *
342  * wrapper function for  dfs_set_agile_precac_state.
343  * This function called from outside of dfs component.
344  */
345 QDF_STATUS tgt_dfs_ocac_complete(struct wlan_objmgr_pdev *pdev,
346 				 struct vdev_adfs_complete_status *ocac_status);
347 
348 /**
349  * tgt_dfs_find_vht80_precac_chan_freq() - Find VHT80 channel for precac
350  * @pdev: Pointer to DFS pdev object.
351  * @chan_mode: Channel mode.
352  * @ch_freq_seg1_mhz: Segment1 channel freq in MHZ.
353  * @cfreq1: cfreq1.
354  * @cfreq2: cfreq2.
355  * @phy_mode: Precac phymode.
356  * @dfs_set_cfreq2: Precac cfreq2
357  * @set_agile: Agile mode flag.
358  *
359  * wrapper function for  dfs_find_vht80_chan_for_precac_for_freq().
360  */
361 #ifdef CONFIG_CHAN_FREQ_API
362 QDF_STATUS
363 tgt_dfs_find_vht80_precac_chan_freq(struct wlan_objmgr_pdev *pdev,
364 				    uint32_t chan_mode,
365 				    uint16_t ch_freq_mhz_seg1,
366 				    uint32_t *cfreq1,
367 				    uint32_t *cfreq2,
368 				    uint32_t *phy_mode,
369 				    bool *dfs_set_cfreq2,
370 				    bool *set_agile);
371 #endif
372 
373 /**
374  * tgt_dfs_cac_complete() - Process cac complete indication.
375  * @pdev: Pointer to DFS pdev object.
376  * @vdev_id: vdev id.
377  *
378  * Process cac complete indication from firmware.
379  *
380  * Return QDF_STATUS.
381  */
382 QDF_STATUS tgt_dfs_cac_complete(struct wlan_objmgr_pdev *pdev,
383 		uint32_t vdev_id);
384 
385 /**
386  * tgt_dfs_reg_ev_handler() - Register dfs events.
387  * @psoc: Pointer to psoc.
388  *
389  * Register dfs events.
390  *
391  * Return: QDF_STATUS.
392  */
393 QDF_STATUS tgt_dfs_reg_ev_handler(struct wlan_objmgr_psoc *psoc);
394 
395 /**
396  * tgt_dfs_stop() - Clear dfs timers.
397  * @dfs: Pointer to wlan_dfs structure.
398  */
399 QDF_STATUS tgt_dfs_stop(struct wlan_objmgr_pdev *pdev);
400 
401 /**
402 * tgt_dfs_process_emulate_bang_radar_cmd() - Process to emulate dfs bangradar
403 *                                            command.
404 * @pdev: Pointer to DFS pdev object.
405 *
406 * Process  to emulate dfs bangradar command.
407 *
408 * Return: QDF_STATUS.
409 */
410 QDF_STATUS tgt_dfs_process_emulate_bang_radar_cmd(struct wlan_objmgr_pdev *pdev,
411 		struct dfs_emulate_bang_radar_test_cmd *dfs_unit_test);
412 
413 #ifdef MOBILE_DFS_SUPPORT
414 /**
415  * tgt_dfs_set_phyerr_filter_offload() - config phyerr filter offload
416  * @pdev: Pointer to DFS pdev object.
417  *
418  * Return: QDF_STATUS
419  */
420 QDF_STATUS tgt_dfs_set_phyerr_filter_offload(struct wlan_objmgr_pdev *pdev);
421 #else
422 static inline QDF_STATUS tgt_dfs_set_phyerr_filter_offload
423 	(struct wlan_objmgr_pdev *pdev)
424 {
425 	return QDF_STATUS_SUCCESS;
426 }
427 #endif
428 
429 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
430 /**
431  * tgt_dfs_send_avg_params_to_fw() - send average radar parameters to fw.
432  * @pdev: Pointer to DFS pdev object.
433  * @params: Pointer to dfs radar average parameters.
434  *
435  * Return: QDF_STATUS
436  */
437 QDF_STATUS
438 tgt_dfs_send_avg_params_to_fw(struct wlan_objmgr_pdev *pdev,
439 			      struct dfs_radar_found_params *params);
440 #endif
441 
442 /**
443  * tgt_dfs_action_on_status_from_fw() - trigger the action to be taken based on
444  * host dfs status received from fw.
445  * @pdev: Pointer to pdev object.
446  * @status: Pointer to the host dfs status received from fw.
447  *
448  * Return: QDF_STATUS
449  */
450 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
451 QDF_STATUS tgt_dfs_action_on_status_from_fw(struct wlan_objmgr_pdev *pdev,
452 					    uint32_t *status);
453 #else
454 static inline
455 QDF_STATUS tgt_dfs_action_on_status_from_fw(struct wlan_objmgr_pdev *pdev,
456 					    uint32_t *status)
457 {
458 	return QDF_STATUS_SUCCESS;
459 }
460 #endif
461 
462 /**
463  * tgt_dfs_is_radar_enabled() - checks if radar detection is enabled.
464  * @pdev: Pointer to pdev object.
465  * @ignore_dfs: Pointer to check the value. If 1, radar detection is disabled.
466  */
467 void tgt_dfs_is_radar_enabled(struct wlan_objmgr_pdev *pdev, int *ignore_dfs);
468 
469 /**
470  * tgt_dfs_reset_spoof_test() - reset the dfs spoof check variables
471  * @pdev: Pointer to pdev object.
472  *
473  * Return: QDF_STATUS
474  */
475 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
476 QDF_STATUS tgt_dfs_reset_spoof_test(struct wlan_objmgr_pdev *pdev);
477 #else
478 static inline
479 QDF_STATUS tgt_dfs_reset_spoof_test(struct wlan_objmgr_pdev *pdev)
480 {
481 	return QDF_STATUS_SUCCESS;
482 }
483 #endif
484 
485 /**
486  * tgt_dfs_enable_stadfs() - Enable/Disable STADFS capability.
487  * @pdev: Pointer to DFS pdev object.
488  * @val: input value.
489  */
490 #ifdef QCA_SUPPORT_STA_DFS
491 void tgt_dfs_enable_stadfs(struct wlan_objmgr_pdev *pdev, bool val);
492 #else
493 static inline
494 void tgt_dfs_enable_stadfs(struct wlan_objmgr_pdev *pdev, bool val)
495 {
496 }
497 #endif
498 
499 /**
500  * tgt_dfs_is_stadfs_enabled() - Get STADFS capability
501  * @pdev: Pointer to DFS pdev object.
502  *
503  * Return: true if STADFS is enabled, else false.
504  */
505 #ifdef QCA_SUPPORT_STA_DFS
506 bool tgt_dfs_is_stadfs_enabled(struct wlan_objmgr_pdev *pdev);
507 #else
508 static inline
509 bool tgt_dfs_is_stadfs_enabled(struct wlan_objmgr_pdev *pdev)
510 {
511 	return false;
512 }
513 #endif
514 
515 /**
516  * tgt_dfs_is_5ghz_supported_in_pdev() - Check if the input pdev supports 5GHZ.
517  * @pdev: Pointer to DFS pdev object.
518  *
519  * Return: true if the pdev supports 5GHz, else false.
520  */
521 bool tgt_dfs_is_5ghz_supported_in_pdev(struct wlan_objmgr_pdev *pdev);
522 
523 #if defined(WLAN_DFS_FULL_OFFLOAD) && defined(QCA_DFS_NOL_OFFLOAD)
524 /**
525  * tgt_dfs_send_usenol_pdev_param() - Send usenol pdev param to FW.
526  * @pdev: Pointer to pdev object.
527  * @usenol: Value of usenol
528  *
529  * Return: QDF_STATUS
530  */
531 QDF_STATUS tgt_dfs_send_usenol_pdev_param(struct wlan_objmgr_pdev *pdev,
532 					  bool usenol);
533 
534 /**
535  * tgt_dfs_send_subchan_marking() - Send subchannel marking pdev param to FW.
536  * @pdev: Pointer to pdev object.
537  * @subchanmark: Value of subchannel_marking.
538  *
539  * Return: QDF_STATUS
540  */
541 QDF_STATUS tgt_dfs_send_subchan_marking(struct wlan_objmgr_pdev *pdev,
542 					bool subchanmark);
543 #else
544 static inline
545 QDF_STATUS tgt_dfs_send_usenol_pdev_param(struct wlan_objmgr_pdev *pdev,
546 					  bool usenol)
547 {
548 	return QDF_STATUS_SUCCESS;
549 }
550 
551 static inline QDF_STATUS
552 tgt_dfs_send_subchan_marking(struct wlan_objmgr_pdev *pdev, bool subchanmark)
553 {
554 	return QDF_STATUS_SUCCESS;
555 }
556 #endif
557 #ifdef QCA_SUPPORT_AGILE_DFS
558 /**
559  * tgt_dfs_set_fw_adfs_support() - Set FW aDFS support in dfs object.
560  * @pdev: Pointer to pdev object.
561  * @fw_adfs_support_160: aDFS enabled when pdev is on 160/80P80MHz.
562  * @fw_adfs_support_non_160: aDFS enabled when pdev is on 20/40/80MHz.
563  *
564  * Return: void.
565  */
566 void tgt_dfs_set_fw_adfs_support(struct wlan_objmgr_pdev *pdev,
567 				 bool fw_adfs_support_160,
568 				 bool fw_adfs_support_non_160);
569 #else
570 static inline
571 void tgt_dfs_set_fw_adfs_support(struct wlan_objmgr_pdev *pdev,
572 				 bool fw_adfs_support_160,
573 				 bool fw_adfs_support_non_160)
574 {
575 }
576 #endif
577 
578 #ifdef QCA_HW_MODE_SWITCH
579 /**
580  * tgt_dfs_init_tmp_psoc_nol() - Init temporary psoc NOL structure.
581  * @pdev: Pointer to pdev object.
582  * @num_radios: Number of radios in the psoc.
583  *
584  * Return: void.
585  */
586 void tgt_dfs_init_tmp_psoc_nol(struct wlan_objmgr_pdev *pdev,
587 			       uint8_t num_radios);
588 
589 /**
590  * tgt_dfs_deinit_tmp_psoc_nol() - De-init temporary psoc NOL structure.
591  * @pdev: Pointer to pdev object.
592  *
593  * Return: void.
594  */
595 void tgt_dfs_deinit_tmp_psoc_nol(struct wlan_objmgr_pdev *pdev);
596 
597 /**
598  * tgt_dfs_save_dfs_nol_in_psoc() - Save NOL data of given pdev.
599  * @pdev: Pointer to pdev object.
600  * @pdev_id: The pdev ID which will have the NOL data.
601  *
602  * Based on the frequency of the NOL channel, copy it to the target pdev_id
603  * structure in psoc.
604  *
605  * Return: void.
606  */
607 void tgt_dfs_save_dfs_nol_in_psoc(struct wlan_objmgr_pdev *pdev,
608 				  uint8_t pdev_id);
609 
610 /**
611  * tgt_dfs_reinit_nol_from_psoc_copy() - Reinit saved NOL data to corresponding
612  * pdevs.
613  * @pdev: Pointer to pdev object.
614  * @pdev_id: pdev_id of the given pdev.
615  * @low_5ghz_freq: The low 5GHz frequency value of the target pdev id.
616  * @high_5ghz_freq: The high 5GHz frequency value of the target pdev id.
617  *
618  * Return: void.
619  */
620 void tgt_dfs_reinit_nol_from_psoc_copy(struct wlan_objmgr_pdev *pdev,
621 				       uint8_t pdev_id,
622 				       uint16_t low_5ghz_freq,
623 				       uint16_t high_5ghz_freq);
624 
625 /**
626  * tgt_dfs_reinit_precac_lists() - Reinit preCAC lists.
627  * @src_pdev: Source pdev object from which the preCAC list is copied.
628  * @dest_pdev: Destination pdev object to which the preCAC list is copied.
629  * @low_5g_freq: Low 5G frequency value of the destination DFS.
630  * @high_5g_freq: High 5G frequency value of the destination DFS.
631  *
632  * Copy all the preCAC list entries from the source pdev object to the
633  * destination pdev object which fall within the frequency range of
634  * low_5g_freq and high_5g_freq.
635  *
636  * Return: None (void).
637  */
638 void tgt_dfs_reinit_precac_lists(struct wlan_objmgr_pdev *src_pdev,
639 				 struct wlan_objmgr_pdev *dest_pdev,
640 				 uint16_t low_5g_freq,
641 				 uint16_t high_5g_freq);
642 
643 /**
644  * tgt_dfs_complete_deferred_tasks() - Process HW mode switch completion and
645  * handle deferred tasks.
646  * @pdev: Pointer to primary pdev object.
647  *
648  * Return: void.
649  */
650 void tgt_dfs_complete_deferred_tasks(struct wlan_objmgr_pdev *pdev);
651 #else
652 static inline
653 void tgt_dfs_init_tmp_psoc_nol(struct wlan_objmgr_pdev *pdev,
654 			       uint8_t num_radios)
655 {
656 }
657 
658 static inline
659 void tgt_dfs_deinit_tmp_psoc_nol(struct wlan_objmgr_pdev *pdev)
660 {
661 }
662 
663 static inline
664 void tgt_dfs_save_dfs_nol_in_psoc(struct wlan_objmgr_pdev *pdev,
665 				  uint8_t pdev_id)
666 {
667 }
668 
669 static inline
670 void tgt_dfs_reinit_nol_from_psoc_copy(struct wlan_objmgr_pdev *pdev,
671 				       uint8_t pdev_id,
672 				       uint16_t low_5ghz_freq,
673 				       uint16_t high_5ghz_freq)
674 {
675 }
676 
677 static inline
678 void tgt_dfs_reinit_precac_lists(struct wlan_objmgr_pdev *src_pdev,
679 				 struct wlan_objmgr_pdev *dest_pdev,
680 				 uint16_t low_5g_freq,
681 				 uint16_t high_5g_freq)
682 {
683 }
684 
685 static inline
686 void tgt_dfs_complete_deferred_tasks(struct wlan_objmgr_pdev *pdev)
687 {
688 }
689 #endif
690 #endif /* _WLAN_DFS_TGT_API_H_ */
691