xref: /wlan-dirver/qca-wifi-host-cmn/spectral/dispatcher/inc/wlan_spectral_public_structs.h (revision 1b9674e21e24478fba4530f5ae7396b9555e9c6a)
1 /*
2  * Copyright (c) 2011,2017-2018 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 #include <qdf_types.h>
21 #include "wlan_dfs_ioctl.h"
22 #include <spectral_ioctl.h>
23 
24 #ifndef _WLAN_SPECTRAL_PUBLIC_STRUCTS_H_
25 #define _WLAN_SPECTRAL_PUBLIC_STRUCTS_H_
26 
27 #ifdef WIN32
28 #pragma pack(push, spectral, 1)
29 #define __ATTRIB_PACKED
30 #else
31 #ifndef __ATTRIB_PACKED
32 #define __ATTRIB_PACKED __attribute__ ((packed))
33 #endif
34 #endif
35 
36 #ifndef AH_MAX_CHAINS
37 #define AH_MAX_CHAINS 3
38 #endif
39 
40 #define MAX_NUM_CHANNELS             255
41 #define MAX_SPECTRAL_CHAINS          3
42 #define MAX_NUM_BINS                 520
43 #define SPECTRAL_PHYERR_PARAM_NOVAL  65535
44 /* 5 categories x (lower + upper) bands */
45 #define MAX_INTERF                   10
46 
47 #ifdef SPECTRAL_USE_EMU_DEFAULTS
48 /* Use defaults from emulation */
49 #define SPECTRAL_SCAN_ACTIVE_DEFAULT           (0x0)
50 #define SPECTRAL_SCAN_ENABLE_DEFAULT           (0x0)
51 #define SPECTRAL_SCAN_COUNT_DEFAULT            (0x0)
52 #define SPECTRAL_SCAN_PERIOD_DEFAULT           (250)
53 #define SPECTRAL_SCAN_PRIORITY_DEFAULT         (0x1)
54 #define SPECTRAL_SCAN_FFT_SIZE_DEFAULT         (0x7)
55 #define SPECTRAL_SCAN_GC_ENA_DEFAULT           (0x1)
56 #define SPECTRAL_SCAN_RESTART_ENA_DEFAULT      (0x0)
57 #define SPECTRAL_SCAN_NOISE_FLOOR_REF_DEFAULT  (0xa0)
58 #define SPECTRAL_SCAN_INIT_DELAY_DEFAULT       (0x50)
59 #define SPECTRAL_SCAN_NB_TONE_THR_DEFAULT      (0xc)
60 #define SPECTRAL_SCAN_STR_BIN_THR_DEFAULT      (0x7)
61 #define SPECTRAL_SCAN_WB_RPT_MODE_DEFAULT      (0x0)
62 #define SPECTRAL_SCAN_RSSI_RPT_MODE_DEFAULT    (0x1)
63 #define SPECTRAL_SCAN_RSSI_THR_DEFAULT         (0xf)
64 #define SPECTRAL_SCAN_PWR_FORMAT_DEFAULT       (0x1)
65 #define SPECTRAL_SCAN_RPT_MODE_DEFAULT         (0x2)
66 #define SPECTRAL_SCAN_BIN_SCALE_DEFAULT        (0x1)
67 #define SPECTRAL_SCAN_DBM_ADJ_DEFAULT          (0x0)
68 #define SPECTRAL_SCAN_CHN_MASK_DEFAULT         (0x1)
69 #else
70 /*
71  * Static default values for spectral state and configuration.
72  * These definitions should be treated as temporary. Ideally,
73  * we should get the defaults from firmware - this will be discussed.
74  *
75  * Use defaults from Spectral Hardware Micro-Architecture
76  * document (v1.0)
77  */
78 #define SPECTRAL_SCAN_ACTIVE_DEFAULT           (0)
79 #define SPECTRAL_SCAN_ENABLE_DEFAULT           (0)
80 #define SPECTRAL_SCAN_COUNT_DEFAULT            (0)
81 #define SPECTRAL_SCAN_PERIOD_GEN_I_DEFAULT     (35)
82 #define SPECTRAL_SCAN_PERIOD_GEN_II_DEFAULT    (35)
83 #define SPECTRAL_SCAN_PERIOD_GEN_III_DEFAULT   (224)
84 #define SPECTRAL_SCAN_PRIORITY_DEFAULT         (1)
85 #define SPECTRAL_SCAN_FFT_SIZE_DEFAULT         (7)
86 #define SPECTRAL_SCAN_GC_ENA_DEFAULT           (1)
87 #define SPECTRAL_SCAN_RESTART_ENA_DEFAULT      (0)
88 #define SPECTRAL_SCAN_NOISE_FLOOR_REF_DEFAULT  (-96)
89 #define SPECTRAL_SCAN_INIT_DELAY_DEFAULT       (80)
90 #define SPECTRAL_SCAN_NB_TONE_THR_DEFAULT      (12)
91 #define SPECTRAL_SCAN_STR_BIN_THR_DEFAULT      (8)
92 #define SPECTRAL_SCAN_WB_RPT_MODE_DEFAULT      (0)
93 #define SPECTRAL_SCAN_RSSI_RPT_MODE_DEFAULT    (0)
94 #define SPECTRAL_SCAN_RSSI_THR_DEFAULT         (0xf0)
95 #define SPECTRAL_SCAN_PWR_FORMAT_DEFAULT       (0)
96 #define SPECTRAL_SCAN_RPT_MODE_DEFAULT         (2)
97 #define SPECTRAL_SCAN_BIN_SCALE_DEFAULT        (1)
98 #define SPECTRAL_SCAN_DBM_ADJ_DEFAULT          (1)
99 #define SPECTRAL_SCAN_CHN_MASK_DEFAULT         (1)
100 #endif				/* SPECTRAL_USE_EMU_DEFAULTS */
101 
102 /* The below two definitions apply only to pre-11ac chipsets */
103 #define SPECTRAL_SCAN_SHORT_REPORT_DEFAULT     (1)
104 #define SPECTRAL_SCAN_FFT_PERIOD_DEFAULT       (1)
105 
106 /**
107  * enum wlan_cfg80211_spectral_vendorcmd_handler_idx - Indices to cfg80211
108  * spectral vendor command handlers
109  * @SPECTRAL_SCAN_START_HANDLER_IDX:  Index to SPECTRAL_SCAN_START handler
110  * @SPECTRAL_SCAN_STOP_HANDLER_IDX:  Index to SPECTRAL_SCAN_STOP handler
111  * @SPECTRAL_SCAN_GET_CONFIG_HANDLER_IDX: Index to SPECTRAL_SCAN_GET_CONFIG
112  * handler
113  * @SPECTRAL_SCAN_GET_DIAG_STATS_HANDLER_IDX: Index to
114  * SPECTRAL_SCAN_GET_DIAG_STATS handler
115  * @SPECTRAL_SCAN_GET_CAP_HANDLER_IDX: Index to SPECTRAL_SCAN_GET_CAP handler
116  * @SPECTRAL_SCAN_GET_STATUS_HANDLER_IDX: Index to SPECTRAL_SCAN_GET_STATUS
117  * handler
118  * @SPECTRAL_SCAN_VENDOR_CMD_HANDLER_MAX: Number of cfg80211 spectral
119  * vendor command handlers supported
120  */
121 enum wlan_cfg80211_spectral_vendorcmd_handler_idx {
122 	SPECTRAL_SCAN_START_HANDLER_IDX,
123 	SPECTRAL_SCAN_STOP_HANDLER_IDX,
124 	SPECTRAL_SCAN_GET_CONFIG_HANDLER_IDX,
125 	SPECTRAL_SCAN_GET_DIAG_STATS_HANDLER_IDX,
126 	SPECTRAL_SCAN_GET_CAP_HANDLER_IDX,
127 	SPECTRAL_SCAN_GET_STATUS_HANDLER_IDX,
128 	SPECTRAL_SCAN_VENDOR_CMD_HANDLER_MAX,
129 };
130 
131 /**
132  * enum spectral_debug - Spectral debug level
133  * @DEBUG_SPECTRAL:  Minimal SPECTRAL debug
134  * @DEBUG_SPECTRAL1: Normal SPECTRAL debug
135  * @DEBUG_SPECTRAL2: Maximal SPECTRAL debug
136  * @DEBUG_SPECTRAL3: Matched filterID display
137  * @DEBUG_SPECTRAL4: One time dump of FFT report
138  */
139 enum spectral_debug {
140 	DEBUG_SPECTRAL = 0x00000100,
141 	DEBUG_SPECTRAL1 = 0x00000200,
142 	DEBUG_SPECTRAL2 = 0x00000400,
143 	DEBUG_SPECTRAL3 = 0x00000800,
144 	DEBUG_SPECTRAL4 = 0x00001000,
145 };
146 
147 /**
148  * enum spectral_capability_type - Spectral capability type
149  * @SPECTRAL_CAP_PHYDIAG:              Phydiag capability
150  * @SPECTRAL_CAP_RADAR:                Radar detection capability
151  * @SPECTRAL_CAP_SPECTRAL_SCAN:        Spectral capability
152  * @SPECTRAL_CAP_ADVNCD_SPECTRAL_SCAN: Advanced spectral capability
153  */
154 enum spectral_capability_type {
155 	SPECTRAL_CAP_PHYDIAG,
156 	SPECTRAL_CAP_RADAR,
157 	SPECTRAL_CAP_SPECTRAL_SCAN,
158 	SPECTRAL_CAP_ADVNCD_SPECTRAL_SCAN,
159 };
160 
161 /**
162  * struct spectral_chan_stats - channel status info
163  * @cycle_count:         Cycle count
164  * @channel_load:        Channel load
165  * @per:                 Period
166  * @noisefloor:          Noise floor
167  * @comp_usablity:       Computed usability
168  * @maxregpower:         Maximum allowed regulatory power
169  * @comp_usablity_sec80: Computed usability of secondary 80 Mhz
170  * @maxregpower_sec80:   Max regulatory power of secondary 80 Mhz
171  */
172 struct spectral_chan_stats {
173 	int cycle_count;
174 	int channel_load;
175 	int per;
176 	int noisefloor;
177 	uint16_t comp_usablity;
178 	int8_t maxregpower;
179 	uint16_t comp_usablity_sec80;
180 	int8_t maxregpower_sec80;
181 };
182 
183 /**
184  * struct spectral_diag_stats - spectral diag stats
185  * @spectral_mismatch:             Spectral TLV signature mismatches
186  * @spectral_sec80_sfft_insufflen: Insufficient length when parsing for
187  *                                 Secondary 80 Search FFT report
188  * @spectral_no_sec80_sfft:        Secondary 80 Search FFT report
189  *                                 TLV not found
190  * @spectral_vhtseg1id_mismatch:   VHT Operation Segment 1 ID
191  *                                 mismatches in Search FFT report
192  * @spectral_vhtseg2id_mismatch:   VHT Operation Segment 2 ID
193  *                                 mismatches in Search FFT report
194  */
195 struct spectral_diag_stats {
196 	uint64_t spectral_mismatch;
197 	uint64_t spectral_sec80_sfft_insufflen;
198 	uint64_t spectral_no_sec80_sfft;
199 	uint64_t spectral_vhtseg1id_mismatch;
200 	uint64_t spectral_vhtseg2id_mismatch;
201 };
202 
203 /**
204  * struct spectral_config - spectral config parameters
205  * @ss_fft_period:        Skip interval for FFT reports
206  * @ss_period:            Spectral scan period
207  * @ss_count:             # of reports to return from ss_active
208  * @ss_short_report:      Set to report only 1 set of FFT results
209  * @radar_bin_thresh_sel: Select threshold to classify strong bin for FFT
210  * @ss_spectral_pri:      Priority, and are we doing a noise power cal ?
211  * @ss_fft_size:          Defines the number of FFT data points to compute,
212  *                        defined as a log index num_fft_pts =
213  *                        2^ss_fft_size
214  * @ss_gc_ena:            Set, to enable targeted gain change before
215  *                        starting the spectral scan FFT
216  * @ss_restart_ena:       Set, to enable abort of receive frames when in high
217  *                        priority and a spectral scan is queued
218  * @ss_noise_floor_ref:   Noise floor reference number (signed) for the
219  *                        calculation of bin power (dBm) Though stored as an
220  *                        unsigned this should be treated as a signed 8-bit int.
221  * @ss_init_delay:        Disallow spectral scan triggers after tx/rx packets
222  *                        by setting this delay value to roughly SIFS time
223  *                        period or greater Delay timer count in units of 0.25us
224  * @ss_nb_tone_thr:       Number of strong bins (inclusive) per sub-channel,
225  *                        below which a signal is declared a narrowband tone
226  * @ss_str_bin_thr:       Bin/max_bin ratio threshold over which a bin is
227  *                        declared strong (for spectral scan bandwidth analysis)
228  * @ss_wb_rpt_mode:       Set this bit to report spectral scans as EXT_BLOCKER
229  *                        (phy_error=36), if none of the sub-channels are
230  *                        deemed narrowband
231  * @ss_rssi_rpt_mode:     Set this bit to report spectral scans as EXT_BLOCKER
232  *                        (phy_error=36), if the ADC RSSI is below the
233  *                        threshold ss_rssi_thr
234  * @ss_rssi_thr:          ADC RSSI must be greater than or equal to this
235  *                        threshold (signed Db) to ensure spectral scan
236  *                        reporting with normal phy error codes (please see
237  *                        ss_rssi_rpt_mode above).Though stored as an unsigned
238  *                        value, this should be treated as a signed 8-bit int
239  * @ss_pwr_format:        Format of frequency bin magnitude for spectral scan
240  *                        triggered FFTs 0: linear magnitude
241  *                        1: log magnitude (20*log10(lin_mag), 1/2 dB step size)
242  * @ss_rpt_mode:          Format of per-FFT reports to software for spectral
243  *                        scan triggered FFTs
244  *                        0: No FFT report (only pulse end summary)
245  *                        1: 2-dword summary of metrics for each completed FFT
246  *                        2: 2-dword summary + 1x-oversampled bins(in-band) per
247  *                           FFT
248  *                        3: 2-dword summary + 2x-oversampled bins (all) per FFT
249  * @ss_bin_scale:         Number of LSBs to shift out to scale the FFT bins
250  *                        for spectral scan triggered FFTs
251  * @ss_dbm_adj:           Set (with ss_pwr_format=1), to report bin
252  *                        magnitudes
253  *                        converted to dBm power using the noisefloor
254  *                        calibration results
255  * @ss_chn_mask:          Per chain enable mask to select input ADC for search
256  *                        FFT
257  * @ss_nf_cal:            nf calibrated values for ctl+ext
258  * @ss_nf_pwr:            nf pwr values for ctl+ext
259  * @ss_nf_temp_data:      temperature data taken during nf scan
260  */
261 struct spectral_config {
262 	uint16_t ss_fft_period;
263 	uint16_t ss_period;
264 	uint16_t ss_count;
265 	uint16_t ss_short_report;
266 	uint8_t radar_bin_thresh_sel;
267 	uint16_t ss_spectral_pri;
268 	uint16_t ss_fft_size;
269 	uint16_t ss_gc_ena;
270 	uint16_t ss_restart_ena;
271 	uint16_t ss_noise_floor_ref;
272 	uint16_t ss_init_delay;
273 	uint16_t ss_nb_tone_thr;
274 	uint16_t ss_str_bin_thr;
275 	uint16_t ss_wb_rpt_mode;
276 	uint16_t ss_rssi_rpt_mode;
277 	uint16_t ss_rssi_thr;
278 	uint16_t ss_pwr_format;
279 	uint16_t ss_rpt_mode;
280 	uint16_t ss_bin_scale;
281 	uint16_t ss_dbm_adj;
282 	uint16_t ss_chn_mask;
283 	int8_t ss_nf_cal[AH_MAX_CHAINS * 2];
284 	int8_t ss_nf_pwr[AH_MAX_CHAINS * 2];
285 	int32_t ss_nf_temp_data;
286 };
287 
288 /**
289  * struct spectral_scan_state - State of spectral scan
290  * @is_active:  Is spectral scan active
291  * @is_enabled: Is spectral scan enabled
292  */
293 struct spectral_scan_state {
294 	uint8_t is_active;
295 	uint8_t is_enabled;
296 };
297 
298 /**
299  * enum dcs_int_type - Interference type indicated by DCS
300  * @SPECTRAL_DCS_INT_NONE:  No interference
301  * @SPECTRAL_DCS_INT_CW:  CW interference
302  * @SPECTRAL_DCS_INT_WIFI:  WLAN interference
303  */
304 enum dcs_int_type {
305 	SPECTRAL_DCS_INT_NONE,
306 	SPECTRAL_DCS_INT_CW,
307 	SPECTRAL_DCS_INT_WIFI
308 };
309 
310 /**
311  * struct interf_rsp - Interference record
312  * @interf_type:         eINTERF_TYPE giving type of interference
313  * @interf_min_freq:     Minimum frequency in MHz at which interference has been
314  * found
315  * @interf_max_freq:     Maximum frequency in MHz at which interference has been
316  * found
317  * @advncd_spectral_cap: Advanced spectral capability
318  */
319 struct interf_rsp {
320 	uint8_t interf_type;
321 	uint16_t interf_min_freq;
322 	uint16_t interf_max_freq;
323 } __ATTRIB_PACKED;
324 
325 /**
326  * struct interf_src_rsp - List of interference sources
327  * @count: Number of interference records
328  * @interf: Array of interference records
329  */
330 struct interf_src_rsp {
331 	uint16_t count;
332 	struct interf_rsp interf[MAX_INTERF];
333 } __ATTRIB_PACKED;
334 
335 /**
336  * struct spectral_classifier_params - spectral classifier parameters
337  * @spectral_20_40_mode:  Is AP in 20/40 mode?
338  * @spectral_dc_index:    DC index
339  * @spectral_dc_in_mhz:   DC in MHz
340  * @upper_chan_in_mhz:    Upper channel in MHz
341  * @lower_chan_in_mhz:    Lower channel in MHz
342  */
343 struct spectral_classifier_params {
344 	int spectral_20_40_mode;
345 	int spectral_dc_index;
346 	int spectral_dc_in_mhz;
347 	int upper_chan_in_mhz;
348 	int lower_chan_in_mhz;
349 } __ATTRIB_PACKED;
350 
351 /**
352  * struct spectral_samp_data - Spectral Analysis Messaging Protocol Data format
353  * @spectral_data_len:        Indicates the bin size
354  * @spectral_data_len_sec80:  Indicates the bin size for secondary 80 segment
355  * @spectral_rssi:            Indicates RSSI
356  * @spectral_rssi_sec80:      Indicates RSSI for secondary 80 segment
357  * @spectral_combined_rssi:   Indicates combined RSSI from all antennas
358  * @spectral_upper_rssi:      Indicates RSSI of upper band
359  * @spectral_lower_rssi:      Indicates RSSI of lower band
360  * @spectral_chain_ctl_rssi:  RSSI for control channel, for all antennas
361  * @spectral_chain_ext_rssi:  RSSI for extension channel, for all antennas
362  * @spectral_max_scale:       Indicates scale factor
363  * @spectral_bwinfo:          Indicates bandwidth info
364  * @spectral_tstamp:          Indicates timestamp
365  * @spectral_max_index:       Indicates the index of max magnitude
366  * @spectral_max_index_sec80: Indicates the index of max magnitude for secondary
367  *                            80 segment
368  * @spectral_max_mag:         Indicates the maximum magnitude
369  * @spectral_max_mag_sec80:   Indicates the maximum magnitude for secondary 80
370  *                            segment
371  * @spectral_max_exp:         Indicates the max exp
372  * @spectral_last_tstamp:     Indicates the last time stamp
373  * @spectral_upper_max_index: Indicates the index of max mag in upper band
374  * @spectral_lower_max_index: Indicates the index of max mag in lower band
375  * @spectral_nb_upper:        Not Used
376  * @spectral_nb_lower:        Not Used
377  * @classifier_params:        Indicates classifier parameters
378  * @bin_pwr_count:            Indicates the number of FFT bins
379  * @lb_edge_extrabins:        Number of extra bins on left band edge
380  * @rb_edge_extrabins:        Number of extra bins on right band edge
381  * @bin_pwr_count_sec80:      Indicates the number of FFT bins in secondary 80
382  *                            segment
383  * @bin_pwr:                  Contains FFT magnitudes
384  * @bin_pwr_sec80:            Contains FFT magnitudes for the secondary 80
385  *                            segment
386  * @interf_list:              List of interfernce sources
387  * @noise_floor:              Indicates the current noise floor
388  * @noise_floor_sec80:        Indicates the current noise floor for secondary 80
389  *                            segment
390  * @ch_width:                 Channel width 20/40/80/160 MHz
391  */
392 struct spectral_samp_data {
393 	int16_t spectral_data_len;
394 	int16_t spectral_data_len_sec80;
395 	int16_t spectral_rssi;
396 	int16_t spectral_rssi_sec80;
397 	int8_t spectral_combined_rssi;
398 	int8_t spectral_upper_rssi;
399 	int8_t spectral_lower_rssi;
400 	int8_t spectral_chain_ctl_rssi[MAX_SPECTRAL_CHAINS];
401 	int8_t spectral_chain_ext_rssi[MAX_SPECTRAL_CHAINS];
402 	uint8_t spectral_max_scale;
403 	int16_t spectral_bwinfo;
404 	int32_t spectral_tstamp;
405 	int16_t spectral_max_index;
406 	int16_t spectral_max_index_sec80;
407 	int16_t spectral_max_mag;
408 	int16_t spectral_max_mag_sec80;
409 	uint8_t spectral_max_exp;
410 	int32_t spectral_last_tstamp;
411 	int16_t spectral_upper_max_index;
412 	int16_t spectral_lower_max_index;
413 	uint8_t spectral_nb_upper;
414 	uint8_t spectral_nb_lower;
415 	struct spectral_classifier_params classifier_params;
416 	uint16_t bin_pwr_count;
417 	/*
418 	 * For 11ac chipsets prior to AR900B version 2.0, a max of 512 bins are
419 	 * delivered.  However, there can be additional bins reported for
420 	 * AR900B version 2.0 and QCA9984 as described next:
421 	 *
422 	 * AR900B version 2.0: An additional tone is processed on the right
423 	 * hand side in order to facilitate detection of radar pulses out to
424 	 * the extreme band-edge of the channel frequency.
425 	 * Since the HW design processes four tones at a time,
426 	 * this requires one additional Dword to be added to the
427 	 * search FFT report.
428 	 *
429 	 * QCA9984: When spectral_scan_rpt_mode=2, i.e 2-dword summary +
430 	 * 1x-oversampled bins (in-band) per FFT,
431 	 * then 8 more bins (4 more on left side and 4 more on right side)
432 	 * are added.
433 	 */
434 	uint8_t lb_edge_extrabins;
435 	uint8_t rb_edge_extrabins;
436 	uint16_t bin_pwr_count_sec80;
437 	uint8_t bin_pwr[MAX_NUM_BINS];
438 	uint8_t bin_pwr_sec80[MAX_NUM_BINS];
439 	struct interf_src_rsp interf_list;
440 	int16_t noise_floor;
441 	int16_t noise_floor_sec80;
442 	uint32_t ch_width;
443 	uint8_t spectral_agc_total_gain;
444 	uint8_t spectral_agc_total_gain_sec80;
445 	uint8_t spectral_gainchange;
446 	uint8_t spectral_gainchange_sec80;
447 } __ATTRIB_PACKED;
448 
449 /**
450  * struct spectral_samp_msg - Spectral SAMP message
451  * @signature:          Validates the SAMP message
452  * @freq:               Operating frequency in MHz
453  * @vhtop_ch_freq_seg1: VHT Segment 1 centre frequency in MHz
454  * @vhtop_ch_freq_seg2: VHT Segment 2 centre frequency in MHz
455  * @freq_loading:       How busy was the channel
456  * @dcs_enabled:        Whether DCS is enabled
457  * @int_type:           Interference type indicated by DCS
458  * @macaddr:            Indicates the device interface
459  * @samp_data:          SAMP Data
460  */
461 struct spectral_samp_msg {
462 	uint32_t signature;
463 	uint16_t freq;
464 	uint16_t vhtop_ch_freq_seg1;
465 	uint16_t vhtop_ch_freq_seg2;
466 	uint16_t freq_loading;
467 	uint16_t dcs_enabled;
468 	enum dcs_int_type int_type;
469 	uint8_t macaddr[6];
470 	struct spectral_samp_data samp_data;
471 } __ATTRIB_PACKED;
472 
473 /* Forward declarations */
474 struct wlan_objmgr_pdev;
475 
476 /**
477  * struct spectral_nl_cb - Spectral Netlink callbacks
478  * @get_nbuff:      Get the socket buffer to send the data to the application
479  * @send_nl_bcast:  Send data to the application using netlink broadcast
480  * @send_nl_unicast:  Send data to the application using netlink unicast
481  */
482 struct spectral_nl_cb {
483 	void *(*get_nbuff)(struct wlan_objmgr_pdev *pdev);
484 	int (*send_nl_bcast)(struct wlan_objmgr_pdev *pdev);
485 	int (*send_nl_unicast)(struct wlan_objmgr_pdev *pdev);
486 };
487 #ifdef WIN32
488 #pragma pack(pop, spectral)
489 #endif
490 #ifdef __ATTRIB_PACKED
491 #undef __ATTRIB_PACKED
492 #endif
493 
494 #endif				/* _WLAN_SPECTRAL_PUBLIC_STRUCTS_H_ */
495