wlan_spectral_public_structs.h 20 KB

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