xref: /wlan-driver/qca-wifi-host-cmn/umac/dfs/dispatcher/inc/wlan_dfs_ioctl.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2011, 2016-2021 The Linux Foundation. All rights reserved.
3*5113495bSYour Name  * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
4*5113495bSYour Name  * Copyright (c) 2010, Atheros Communications Inc.
5*5113495bSYour Name  * All Rights Reserved.
6*5113495bSYour Name  *
7*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for
8*5113495bSYour Name  * any purpose with or without fee is hereby granted, provided that the
9*5113495bSYour Name  * above copyright notice and this permission notice appear in all
10*5113495bSYour Name  * copies.
11*5113495bSYour Name  *
12*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
13*5113495bSYour Name  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
14*5113495bSYour Name  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
15*5113495bSYour Name  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
16*5113495bSYour Name  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
17*5113495bSYour Name  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
18*5113495bSYour Name  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19*5113495bSYour Name  * PERFORMANCE OF THIS SOFTWARE.
20*5113495bSYour Name  */
21*5113495bSYour Name 
22*5113495bSYour Name /**
23*5113495bSYour Name  * DOC: This file has dfs IOCTL Defines.
24*5113495bSYour Name  */
25*5113495bSYour Name 
26*5113495bSYour Name #ifndef _DFS_IOCTL_H_
27*5113495bSYour Name #define _DFS_IOCTL_H_
28*5113495bSYour Name 
29*5113495bSYour Name #define DFS_MUTE_TIME            1
30*5113495bSYour Name #define DFS_SET_THRESH           2
31*5113495bSYour Name #define DFS_GET_THRESH           3
32*5113495bSYour Name #define DFS_GET_USENOL           4
33*5113495bSYour Name #define DFS_SET_USENOL           5
34*5113495bSYour Name #define DFS_RADARDETECTS         6
35*5113495bSYour Name #define DFS_BANGRADAR            7
36*5113495bSYour Name #define DFS_SHOW_NOL             8
37*5113495bSYour Name #define DFS_DISABLE_DETECT       9
38*5113495bSYour Name #define DFS_ENABLE_DETECT        10
39*5113495bSYour Name #define DFS_DISABLE_FFT          11
40*5113495bSYour Name #define DFS_ENABLE_FFT           12
41*5113495bSYour Name #define DFS_SET_DEBUG_LEVEL      13
42*5113495bSYour Name #define DFS_GET_NOL              14
43*5113495bSYour Name #define DFS_SET_NOL              15
44*5113495bSYour Name 
45*5113495bSYour Name #define DFS_SET_FALSE_RSSI_THRES 16
46*5113495bSYour Name #define DFS_SET_PEAK_MAG         17
47*5113495bSYour Name #define DFS_IGNORE_CAC           18
48*5113495bSYour Name #define DFS_SET_NOL_TIMEOUT      19
49*5113495bSYour Name #define DFS_GET_CAC_VALID_TIME   20
50*5113495bSYour Name #define DFS_SET_CAC_VALID_TIME   21
51*5113495bSYour Name #define DFS_SHOW_NOLHISTORY      22
52*5113495bSYour Name #define DFS_SHOW_PRECAC_LISTS    23
53*5113495bSYour Name #define DFS_RESET_PRECAC_LISTS   24
54*5113495bSYour Name #define DFS_SET_DISABLE_RADAR_MARKING 25
55*5113495bSYour Name #define DFS_GET_DISABLE_RADAR_MARKING 26
56*5113495bSYour Name 
57*5113495bSYour Name #define DFS_INJECT_SEQUENCE 27
58*5113495bSYour Name #define DFS_ALLOW_HW_PULSES 28
59*5113495bSYour Name #define DFS_SET_PRI_MULTIPILER   29
60*5113495bSYour Name 
61*5113495bSYour Name #define RESTRICTED_80P80_START_FREQ 5660
62*5113495bSYour Name #define RESTRICTED_80P80_END_FREQ 5805
63*5113495bSYour Name 
64*5113495bSYour Name /* Check if the given frequencies are within restricted 80P80 start freq(5660)
65*5113495bSYour Name  * and end freq (5805).
66*5113495bSYour Name  */
67*5113495bSYour Name #define CHAN_WITHIN_RESTRICTED_80P80(cfreq1, cfreq2) \
68*5113495bSYour Name 	((((cfreq1) >= RESTRICTED_80P80_START_FREQ) && \
69*5113495bSYour Name 	  ((cfreq1) <= RESTRICTED_80P80_END_FREQ) && \
70*5113495bSYour Name 	  ((cfreq2) >= RESTRICTED_80P80_START_FREQ) && \
71*5113495bSYour Name 	  ((cfreq2) <= RESTRICTED_80P80_END_FREQ)) ? true : false)
72*5113495bSYour Name 
73*5113495bSYour Name /*
74*5113495bSYour Name  * Spectral IOCTLs use DFS_LAST_IOCTL as the base.
75*5113495bSYour Name  * This must always be the last IOCTL in DFS and have
76*5113495bSYour Name  * the highest value.
77*5113495bSYour Name  */
78*5113495bSYour Name #define DFS_LAST_IOCTL 29
79*5113495bSYour Name 
80*5113495bSYour Name #ifndef DFS_CHAN_MAX
81*5113495bSYour Name #define DFS_CHAN_MAX 25
82*5113495bSYour Name #endif
83*5113495bSYour Name 
84*5113495bSYour Name /**
85*5113495bSYour Name  * struct dfsreq_nolelem - NOL elements.
86*5113495bSYour Name  * @nol_freq:          NOL channel frequency.
87*5113495bSYour Name  * @nol_chwidth:       NOL channel width.
88*5113495bSYour Name  * @nol_start_us:      OS microseconds when the NOL timer started.
89*5113495bSYour Name  * @nol_timeout_ms:    Nol timeout value in msec.
90*5113495bSYour Name  */
91*5113495bSYour Name 
92*5113495bSYour Name struct dfsreq_nolelem {
93*5113495bSYour Name 	uint16_t        nol_freq;
94*5113495bSYour Name 	uint16_t        nol_chwidth;
95*5113495bSYour Name 	uint64_t        nol_start_us;
96*5113495bSYour Name 	uint32_t        nol_timeout_ms;
97*5113495bSYour Name };
98*5113495bSYour Name 
99*5113495bSYour Name struct dfsreq_nolinfo {
100*5113495bSYour Name 	uint32_t  dfs_ch_nchans;
101*5113495bSYour Name 	struct dfsreq_nolelem dfs_nol[DFS_CHAN_MAX];
102*5113495bSYour Name };
103*5113495bSYour Name 
104*5113495bSYour Name /*
105*5113495bSYour Name  * IOCTL parameter types
106*5113495bSYour Name  */
107*5113495bSYour Name 
108*5113495bSYour Name #define DFS_PARAM_FIRPWR  1
109*5113495bSYour Name #define DFS_PARAM_RRSSI   2
110*5113495bSYour Name #define DFS_PARAM_HEIGHT  3
111*5113495bSYour Name #define DFS_PARAM_PRSSI   4
112*5113495bSYour Name #define DFS_PARAM_INBAND  5
113*5113495bSYour Name /* 5413 specific parameters */
114*5113495bSYour Name #define DFS_PARAM_RELPWR  7
115*5113495bSYour Name #define DFS_PARAM_RELSTEP 8
116*5113495bSYour Name #define DFS_PARAM_MAXLEN  9
117*5113495bSYour Name 
118*5113495bSYour Name /**
119*5113495bSYour Name  * struct dfs_ioctl_params - DFS ioctl params.
120*5113495bSYour Name  * @dfs_firpwr:     FIR pwr out threshold.
121*5113495bSYour Name  * @dfs_rrssi:      Radar rssi thresh.
122*5113495bSYour Name  * @dfs_height:     Pulse height thresh.
123*5113495bSYour Name  * @dfs_prssi:      Pulse rssi thresh.
124*5113495bSYour Name  * @dfs_inband:     Inband thresh.
125*5113495bSYour Name  * @dfs_relpwr:     Pulse relative pwr thresh.
126*5113495bSYour Name  * @dfs_relstep:    Pulse relative step thresh.
127*5113495bSYour Name  * @dfs_maxlen:     Pulse max duration.
128*5113495bSYour Name  */
129*5113495bSYour Name struct dfs_ioctl_params {
130*5113495bSYour Name 	int32_t dfs_firpwr;
131*5113495bSYour Name 	int32_t dfs_rrssi;
132*5113495bSYour Name 	int32_t dfs_height;
133*5113495bSYour Name 	int32_t dfs_prssi;
134*5113495bSYour Name 	int32_t dfs_inband;
135*5113495bSYour Name 	int32_t dfs_relpwr;
136*5113495bSYour Name 	int32_t dfs_relstep;
137*5113495bSYour Name 	int32_t dfs_maxlen;
138*5113495bSYour Name };
139*5113495bSYour Name 
140*5113495bSYour Name /* Types of Bangradar commands:
141*5113495bSYour Name  * @DFS_BANGRADAR_FOR_ALL_SUBCHANS          : Bangradar with no arguments.
142*5113495bSYour Name  *                                            All the subchannels in the current
143*5113495bSYour Name  *                                            channel shall be added.
144*5113495bSYour Name  * @DFS_BANGRADAR_FOR_ALL_SUBCHANS_OF_SEGID : Bangradar with 1 (seg_id) argument
145*5113495bSYour Name  *                                            All subchannels of the specific
146*5113495bSYour Name  *                                            seg_id shall be added.
147*5113495bSYour Name  * @DFS_BANGRADAR_FOR_SPECIFIC_SUBCHANS     : Bangradar with all (segment ID,
148*5113495bSYour Name  *                                            is_chirp and frequency offset)
149*5113495bSYour Name  *                                            arguments.
150*5113495bSYour Name  *                                            Only radar infected subchannels
151*5113495bSYour Name  *                                            of the specific seg_id shall be
152*5113495bSYour Name  *                                            added.
153*5113495bSYour Name  *
154*5113495bSYour Name  * (Unless all arguments are given, we cannot determine which specific
155*5113495bSYour Name  * subchannels to simulate the radar on, hence simulate in all subchans).
156*5113495bSYour Name  */
157*5113495bSYour Name enum dfs_bangradar_types {
158*5113495bSYour Name 	DFS_NO_BANGRADAR = 0,
159*5113495bSYour Name 	DFS_BANGRADAR_FOR_ALL_SUBCHANS,
160*5113495bSYour Name 	DFS_BANGRADAR_FOR_ALL_SUBCHANS_OF_SEGID,
161*5113495bSYour Name 	DFS_BANGRADAR_FOR_SPECIFIC_SUBCHANS,
162*5113495bSYour Name 	DFS_INVALID_BANGRADAR_TYPE
163*5113495bSYour Name };
164*5113495bSYour Name 
165*5113495bSYour Name /**
166*5113495bSYour Name  * struct dfs_bangradar_params - DFS bangradar params.
167*5113495bSYour Name  * @bangradar_type: Type of Bangradar.
168*5113495bSYour Name  * @seg_id:         Segment ID information.
169*5113495bSYour Name  * @is_chirp:       Chirp radar or not.
170*5113495bSYour Name  * @freq_offset:    Frequency offset at which radar was found.
171*5113495bSYour Name  * @detector_id:    Detector ID corresponding to primary/agile detectors.
172*5113495bSYour Name  * @is_fh_radar:    Frequency Hopping Radar type or not.
173*5113495bSYour Name  */
174*5113495bSYour Name struct dfs_bangradar_params {
175*5113495bSYour Name 	enum dfs_bangradar_types bangradar_type;
176*5113495bSYour Name 	uint8_t seg_id;
177*5113495bSYour Name 	uint8_t is_chirp;
178*5113495bSYour Name 	int32_t freq_offset;
179*5113495bSYour Name 	uint8_t detector_id;
180*5113495bSYour Name 	uint8_t is_fh_radar;
181*5113495bSYour Name };
182*5113495bSYour Name #define DFS_IOCTL_PARAM_NOVAL  65535
183*5113495bSYour Name #define DFS_IOCTL_PARAM_ENABLE 0x8000
184*5113495bSYour Name 
185*5113495bSYour Name /* Random channel flags */
186*5113495bSYour Name /* Flag to exclude current operating channels */
187*5113495bSYour Name #define DFS_RANDOM_CH_FLAG_NO_CURR_OPE_CH       0x0001 /* 0000 0000 0000 0001 */
188*5113495bSYour Name 
189*5113495bSYour Name /* Flag to exclude weather channels */
190*5113495bSYour Name #define DFS_RANDOM_CH_FLAG_NO_WEATHER_CH        0x0002 /* 0000 0000 0000 0010 */
191*5113495bSYour Name 
192*5113495bSYour Name /* Flag to exclude indoor channels */
193*5113495bSYour Name #define DFS_RANDOM_CH_FLAG_NO_LOWER_5G_CH       0x0004 /* 0000 0000 0000 0100 */
194*5113495bSYour Name 
195*5113495bSYour Name /* Flag to exclude outdoor channels */
196*5113495bSYour Name #define DFS_RANDOM_CH_FLAG_NO_UPEER_5G_CH       0x0008 /* 0000 0000 0000 1000 */
197*5113495bSYour Name 
198*5113495bSYour Name /* Flag to exclude dfs channels */
199*5113495bSYour Name #define DFS_RANDOM_CH_FLAG_NO_DFS_CH            0x0010 /* 0000 0000 0001 0000 */
200*5113495bSYour Name 
201*5113495bSYour Name /* Flag to exclude all 5GHz channels */
202*5113495bSYour Name #define DFS_RANDOM_CH_FLAG_NO_5GHZ_CH           0x0020 /* 0000 0000 0010 0000 */
203*5113495bSYour Name 
204*5113495bSYour Name /* Flag to exclude all 2.4GHz channels */
205*5113495bSYour Name #define DFS_RANDOM_CH_FLAG_NO_2GHZ_CH           0x0040 /* 0000 0000 0100 0000 */
206*5113495bSYour Name 
207*5113495bSYour Name /* Flag to enable Reduced BW Agile DFS */
208*5113495bSYour Name #define DFS_RANDOM_CH_FLAG_ENABLE_REDUCED_BW    0x0080 /* 0000 0000 1000 0000 */
209*5113495bSYour Name 
210*5113495bSYour Name /* Flag to exclude Japan W53 channels */
211*5113495bSYour Name #define DFS_RANDOM_CH_FLAG_NO_JAPAN_W53_CH      0x0100 /* 0000 0001 0000 0000 */
212*5113495bSYour Name 
213*5113495bSYour Name /* Restricted 80P80 MHz is enabled */
214*5113495bSYour Name #define DFS_RANDOM_CH_FLAG_RESTRICTED_80P80_ENABLED 0x0200
215*5113495bSYour Name 						       /* 0000 0010 0000 0000 */
216*5113495bSYour Name 
217*5113495bSYour Name /* Flag to exclude all 6GHz channels */
218*5113495bSYour Name #define DFS_RANDOM_CH_FLAG_NO_6GHZ_CH          0x00400 /* 0000 0100 0000 0000 */
219*5113495bSYour Name 
220*5113495bSYour Name /* Flag to exclude spruce spur adjacent channels */
221*5113495bSYour Name #define DFS_RANDOM_CH_FLAG_NO_SPRUCE_SPUR_ADJ_CH \
222*5113495bSYour Name 		0x0800 /* 0000 1000 0000 0000 */
223*5113495bSYour Name /**
224*5113495bSYour Name  * struct wlan_dfs_caps - DFS capability structure.
225*5113495bSYour Name  * @wlan_dfs_ext_chan_ok:         Can radar be detected on the extension chan?
226*5113495bSYour Name  * @wlan_dfs_combined_rssi_ok:    Can use combined radar RSSI?
227*5113495bSYour Name  * @wlan_dfs_use_enhancement:     This flag is used to indicate if radar
228*5113495bSYour Name  *                                detection scheme should use enhanced chirping
229*5113495bSYour Name  *                                detection algorithm. This flag also determines
230*5113495bSYour Name  *                                if certain radar data should be discarded to
231*5113495bSYour Name  *                                minimize false detection of radar.
232*5113495bSYour Name  * @wlan_strong_signal_diversiry: Strong Signal fast diversity count.
233*5113495bSYour Name  * @wlan_chip_is_bb_tlv:          Chip is BB TLV?
234*5113495bSYour Name  * @wlan_chip_is_over_sampled:    Is Over sampled.
235*5113495bSYour Name  * @wlan_chip_is_ht160:           IS VHT160?
236*5113495bSYour Name  * @wlan_chip_is_false_detect:    Is False detected?
237*5113495bSYour Name  * @wlan_fastdiv_val:             Goes with wlan_strong_signal_diversiry: If we
238*5113495bSYour Name  *                                have fast diversity capability, read off
239*5113495bSYour Name  *                                Strong Signal fast diversity count set in the
240*5113495bSYour Name  *                                ini file, and store so we can restore the
241*5113495bSYour Name  *                                value when radar is disabled.
242*5113495bSYour Name  */
243*5113495bSYour Name struct wlan_dfs_caps {
244*5113495bSYour Name 	uint32_t wlan_dfs_ext_chan_ok:1,
245*5113495bSYour Name 			 wlan_dfs_combined_rssi_ok:1,
246*5113495bSYour Name 			 wlan_dfs_use_enhancement:1,
247*5113495bSYour Name 			 wlan_strong_signal_diversiry:1,
248*5113495bSYour Name 			 wlan_chip_is_bb_tlv:1,
249*5113495bSYour Name 			 wlan_chip_is_over_sampled:1,
250*5113495bSYour Name 			 wlan_chip_is_ht160:1,
251*5113495bSYour Name 			 wlan_chip_is_false_detect:1;
252*5113495bSYour Name 	uint32_t wlan_fastdiv_val;
253*5113495bSYour Name };
254*5113495bSYour Name 
255*5113495bSYour Name /**
256*5113495bSYour Name  * struct wlan_dfs_phyerr_param - DFS Phyerr structure.
257*5113495bSYour Name  * @pe_firpwr:     FIR pwr out threshold.
258*5113495bSYour Name  * @pe_rrssi:      Radar rssi thresh.
259*5113495bSYour Name  * @pe_height:     Pulse height thresh.
260*5113495bSYour Name  * @pe_prssi:      Pulse rssi thresh.
261*5113495bSYour Name  * @pe_inband:     Inband thresh.
262*5113495bSYour Name  * @pe_relpwr:     Relative power threshold in 0.5dB steps.
263*5113495bSYour Name  * @pe_relstep:    Pulse Relative step threshold in 0.5dB steps.
264*5113495bSYour Name  * @pe_maxlen:     Max length of radar sign in 0.8us units.
265*5113495bSYour Name  * @pe_usefir128:  Use the average in-band power measured over 128 cycles.
266*5113495bSYour Name  * @pe_blockradar: Enable to block radar check if pkt detect is done via OFDM
267*5113495bSYour Name  *                 weak signal detect or pkt is detected immediately after tx
268*5113495bSYour Name  *                 to rx transition.
269*5113495bSYour Name  * @pe_enmaxrssi:  Enable to use the max rssi instead of the last rssi during
270*5113495bSYour Name  *                 fine gain changes for radar detection.
271*5113495bSYour Name  */
272*5113495bSYour Name struct wlan_dfs_phyerr_param {
273*5113495bSYour Name 	int32_t    pe_firpwr;
274*5113495bSYour Name 	int32_t    pe_rrssi;
275*5113495bSYour Name 	int32_t    pe_height;
276*5113495bSYour Name 	int32_t    pe_prssi;
277*5113495bSYour Name 	int32_t    pe_inband;
278*5113495bSYour Name 	uint32_t   pe_relpwr;
279*5113495bSYour Name 	uint32_t   pe_relstep;
280*5113495bSYour Name 	uint32_t   pe_maxlen;
281*5113495bSYour Name 	bool       pe_usefir128;
282*5113495bSYour Name 	bool       pe_blockradar;
283*5113495bSYour Name 	bool       pe_enmaxrssi;
284*5113495bSYour Name };
285*5113495bSYour Name 
286*5113495bSYour Name /**
287*5113495bSYour Name  * enum WLAN_DFS_EVENTS - DFS Events that will be sent to userspace
288*5113495bSYour Name  * @WLAN_EV_RADAR_DETECTED: Radar is detected
289*5113495bSYour Name  * @WLAN_EV_CAC_RESET:      CAC started or CAC completed status is reset
290*5113495bSYour Name  * @WLAN_EV_CAC_STARTED:    CAC timer has started
291*5113495bSYour Name  * @WLAN_EV_CAC_COMPLETED:  CAC timer completed
292*5113495bSYour Name  * @WLAN_EV_NOL_STARTED:    NOL started
293*5113495bSYour Name  * @WLAN_EV_NOL_FINISHED:   NOL Completed
294*5113495bSYour Name  * @WLAN_EV_PCAC_STARTED:   PreCAC Started
295*5113495bSYour Name  * @WLAN_EV_PCAC_COMPLETED: PreCAC Completed
296*5113495bSYour Name  *
297*5113495bSYour Name  * DFS events such as radar detected, CAC started,
298*5113495bSYour Name  * CAC completed, NOL started, NOL finished
299*5113495bSYour Name  */
300*5113495bSYour Name enum WLAN_DFS_EVENTS {
301*5113495bSYour Name 	WLAN_EV_RADAR_DETECTED,
302*5113495bSYour Name 	WLAN_EV_CAC_RESET,
303*5113495bSYour Name 	WLAN_EV_CAC_STARTED,
304*5113495bSYour Name 	WLAN_EV_CAC_COMPLETED,
305*5113495bSYour Name 	WLAN_EV_NOL_STARTED,
306*5113495bSYour Name 	WLAN_EV_NOL_FINISHED,
307*5113495bSYour Name 	WLAN_EV_PCAC_STARTED,
308*5113495bSYour Name 	WLAN_EV_PCAC_COMPLETED,
309*5113495bSYour Name };
310*5113495bSYour Name 
311*5113495bSYour Name #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(WLAN_DFS_SYNTHETIC_RADAR)
312*5113495bSYour Name /*
313*5113495bSYour Name  * Structure of Pulse to be injected into the DFS Module
314*5113495bSYour Name  * ******************************************************
315*5113495bSYour Name  * Header
316*5113495bSYour Name  * ======
317*5113495bSYour Name  * ----------|--------------|
318*5113495bSYour Name  * num_pulses| total_len_seq|
319*5113495bSYour Name  * ----------|--------------|
320*5113495bSYour Name  * Buffer Contents per pulse:
321*5113495bSYour Name  * ==========================
322*5113495bSYour Name  * ------|----------|-----------|----------|-----------|---------------|--------
323*5113495bSYour Name  * r_rssi|r_ext_rssi|r_rs_tstamp|r_fulltsf |fft_datalen|total_len_pulse|FFT
324*5113495bSYour Name  *       |          |           |          |           |               |Buffer..
325*5113495bSYour Name  * ------|----------|-----------|----------|-----------|---------------|--------
326*5113495bSYour Name  */
327*5113495bSYour Name 
328*5113495bSYour Name /**
329*5113495bSYour Name  * struct synthetic_pulse - Radar Pulse Structure to be filled on reading the
330*5113495bSYour Name  * user file.
331*5113495bSYour Name  * @r_rssi:          RSSI of the pulse.
332*5113495bSYour Name  * @r_ext_rssi:      Extension Channel RSSI.
333*5113495bSYour Name  * @r_rs_tstamp:     Timestamp.
334*5113495bSYour Name  * @r_fulltsf:       TSF64.
335*5113495bSYour Name  * @fft_datalen:     Total len of FFT.
336*5113495bSYour Name  * @total_len_pulse: Total len of the pulse.
337*5113495bSYour Name  * @fft_buf:         Pointer to fft data.
338*5113495bSYour Name  */
339*5113495bSYour Name 
340*5113495bSYour Name struct synthetic_pulse {
341*5113495bSYour Name 	uint8_t r_rssi;
342*5113495bSYour Name 	uint8_t r_ext_rssi;
343*5113495bSYour Name 	uint32_t r_rs_tstamp;
344*5113495bSYour Name 	uint64_t r_fulltsf;
345*5113495bSYour Name 	uint16_t fft_datalen;
346*5113495bSYour Name 	uint16_t total_len_pulse;
347*5113495bSYour Name 	unsigned char *fft_buf;
348*5113495bSYour Name } qdf_packed;
349*5113495bSYour Name 
350*5113495bSYour Name /**
351*5113495bSYour Name  * struct synthetic_seq - Structure to hold an array of pointers to the
352*5113495bSYour Name  * pulse structure.
353*5113495bSYour Name  * @num_pulses:    Total num of pulses in the sequence.
354*5113495bSYour Name  * @total_len_seq: Total len of the sequence.
355*5113495bSYour Name  * @pulse:         Array of pointers to synthetic_pulse structure.
356*5113495bSYour Name  */
357*5113495bSYour Name 
358*5113495bSYour Name struct synthetic_seq {
359*5113495bSYour Name 	uint8_t num_pulses;
360*5113495bSYour Name 	uint32_t total_len_seq;
361*5113495bSYour Name 	struct synthetic_pulse *pulse[];
362*5113495bSYour Name };
363*5113495bSYour Name 
364*5113495bSYour Name /**
365*5113495bSYour Name  * struct seq_store - Structure to hold an array of pointers to the synthetic
366*5113495bSYour Name  * sequence structure.
367*5113495bSYour Name  * @num_sequence: Total number of "sequence of pulses" in the file.
368*5113495bSYour Name  * @seq_arr:      Array of pointers to synthetic_seq structure.
369*5113495bSYour Name  */
370*5113495bSYour Name 
371*5113495bSYour Name struct seq_store {
372*5113495bSYour Name 	uint8_t num_sequence;
373*5113495bSYour Name 	struct synthetic_seq *seq_arr[];
374*5113495bSYour Name };
375*5113495bSYour Name #endif /* WLAN_DFS_PARTIAL_OFFLOAD && WLAN_DFS_SYNTHETIC_RADAR */
376*5113495bSYour Name 
377*5113495bSYour Name /**
378*5113495bSYour Name  * enum dfs_agile_sm_evt - DFS Agile SM events.
379*5113495bSYour Name  * @DFS_AGILE_SM_EV_AGILE_START: Event to start AGILE PreCAC/RCAC.
380*5113495bSYour Name  * @DFS_AGILE_SM_EV_AGILE_STOP:  Event to stop AGILE PreCAC/RCAC..
381*5113495bSYour Name  * @DFS_AGILE_SM_EV_AGILE_DONE:  Event to complete AGILE PreCAC/RCAC..
382*5113495bSYour Name  * @DFS_AGILE_SM_EV_ADFS_RADAR: Event to restart AGILE PreCAC/RCAC after radar.
383*5113495bSYour Name  */
384*5113495bSYour Name enum dfs_agile_sm_evt {
385*5113495bSYour Name 	DFS_AGILE_SM_EV_AGILE_START = 0,
386*5113495bSYour Name 	DFS_AGILE_SM_EV_AGILE_STOP =  1,
387*5113495bSYour Name 	DFS_AGILE_SM_EV_AGILE_DONE =  2,
388*5113495bSYour Name 	DFS_AGILE_SM_EV_ADFS_RADAR =  3,
389*5113495bSYour Name };
390*5113495bSYour Name 
391*5113495bSYour Name /**
392*5113495bSYour Name  * enum precac_status_for_chan - preCAC status for channels.
393*5113495bSYour Name  * @DFS_NO_PRECAC_COMPLETED_CHANS: None of the channels are preCAC completed.
394*5113495bSYour Name  * @DFS_PRECAC_COMPLETED_CHAN: A given channel is preCAC completed.
395*5113495bSYour Name  * @DFS_PRECAC_REQUIRED_CHAN:  A given channel required preCAC.
396*5113495bSYour Name  * @DFS_INVALID_PRECAC_STATUS: Invalid status.
397*5113495bSYour Name  *
398*5113495bSYour Name  * Note: "DFS_NO_PRECAC_COMPLETED_CHANS" has more priority than
399*5113495bSYour Name  * "DFS_PRECAC_COMPLETED_CHAN". This is because if the preCAC list does not
400*5113495bSYour Name  * have any channel that completed preCAC, "DFS_NO_PRECAC_COMPLETED_CHANS"
401*5113495bSYour Name  * is returned and search for preCAC completion (DFS_PRECAC_COMPLETED_CHAN)
402*5113495bSYour Name  * for a given channel is not done.
403*5113495bSYour Name  */
404*5113495bSYour Name enum precac_status_for_chan {
405*5113495bSYour Name 	DFS_NO_PRECAC_COMPLETED_CHANS,
406*5113495bSYour Name 	DFS_PRECAC_COMPLETED_CHAN,
407*5113495bSYour Name 	DFS_PRECAC_REQUIRED_CHAN,
408*5113495bSYour Name 	DFS_INVALID_PRECAC_STATUS,
409*5113495bSYour Name };
410*5113495bSYour Name 
411*5113495bSYour Name #endif  /* _DFS_IOCTL_H_ */
412