WIP FPC-III support
[linux/fpc-iii.git] / drivers / net / wireless / ath / ath10k / spectral.h
blob5f481f11c6e5b2fb33a6ffe5cdc50f4cd9e04c61
1 /* SPDX-License-Identifier: ISC */
2 /*
3 * Copyright (c) 2013-2015 Qualcomm Atheros, Inc.
4 */
6 #ifndef SPECTRAL_H
7 #define SPECTRAL_H
9 #include "../spectral_common.h"
11 /**
12 * struct ath10k_spec_scan - parameters for Atheros spectral scan
14 * @count: number of scan results requested for manual mode
15 * @fft_size: number of bins to be requested = 2^(fft_size - bin_scale)
17 struct ath10k_spec_scan {
18 u8 count;
19 u8 fft_size;
22 /* enum ath10k_spectral_mode:
24 * @SPECTRAL_DISABLED: spectral mode is disabled
25 * @SPECTRAL_BACKGROUND: hardware sends samples when it is not busy with
26 * something else.
27 * @SPECTRAL_MANUAL: spectral scan is enabled, triggering for samples
28 * is performed manually.
30 enum ath10k_spectral_mode {
31 SPECTRAL_DISABLED = 0,
32 SPECTRAL_BACKGROUND,
33 SPECTRAL_MANUAL,
36 #ifdef CONFIG_ATH10K_SPECTRAL
38 int ath10k_spectral_process_fft(struct ath10k *ar,
39 struct wmi_phyerr_ev_arg *phyerr,
40 const struct phyerr_fft_report *fftr,
41 size_t bin_len, u64 tsf);
42 int ath10k_spectral_start(struct ath10k *ar);
43 int ath10k_spectral_vif_stop(struct ath10k_vif *arvif);
44 int ath10k_spectral_create(struct ath10k *ar);
45 void ath10k_spectral_destroy(struct ath10k *ar);
47 #else
49 static inline int
50 ath10k_spectral_process_fft(struct ath10k *ar,
51 struct wmi_phyerr_ev_arg *phyerr,
52 const struct phyerr_fft_report *fftr,
53 size_t bin_len, u64 tsf)
55 return 0;
58 static inline int ath10k_spectral_start(struct ath10k *ar)
60 return 0;
63 static inline int ath10k_spectral_vif_stop(struct ath10k_vif *arvif)
65 return 0;
68 static inline int ath10k_spectral_create(struct ath10k *ar)
70 return 0;
73 static inline void ath10k_spectral_destroy(struct ath10k *ar)
77 #endif /* CONFIG_ATH10K_SPECTRAL */
79 #endif /* SPECTRAL_H */