Linux 4.4.145
[linux/fpc-iii.git] / drivers / net / wireless / ath / ath10k / spectral.h
blob89b0ad769d4f98388b619ab7736debd6894749db
1 /*
2 * Copyright (c) 2013 Qualcomm Atheros, Inc.
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 #ifndef SPECTRAL_H
18 #define SPECTRAL_H
20 #include "../spectral_common.h"
22 /**
23 * struct ath10k_spec_scan - parameters for Atheros spectral scan
25 * @count: number of scan results requested for manual mode
26 * @fft_size: number of bins to be requested = 2^(fft_size - bin_scale)
28 struct ath10k_spec_scan {
29 u8 count;
30 u8 fft_size;
33 /* enum ath10k_spectral_mode:
35 * @SPECTRAL_DISABLED: spectral mode is disabled
36 * @SPECTRAL_BACKGROUND: hardware sends samples when it is not busy with
37 * something else.
38 * @SPECTRAL_MANUAL: spectral scan is enabled, triggering for samples
39 * is performed manually.
41 enum ath10k_spectral_mode {
42 SPECTRAL_DISABLED = 0,
43 SPECTRAL_BACKGROUND,
44 SPECTRAL_MANUAL,
47 #ifdef CONFIG_ATH10K_DEBUGFS
49 int ath10k_spectral_process_fft(struct ath10k *ar,
50 struct wmi_phyerr_ev_arg *phyerr,
51 const struct phyerr_fft_report *fftr,
52 size_t bin_len, u64 tsf);
53 int ath10k_spectral_start(struct ath10k *ar);
54 int ath10k_spectral_vif_stop(struct ath10k_vif *arvif);
55 int ath10k_spectral_create(struct ath10k *ar);
56 void ath10k_spectral_destroy(struct ath10k *ar);
58 #else
60 static inline int
61 ath10k_spectral_process_fft(struct ath10k *ar,
62 struct wmi_phyerr_ev_arg *phyerr,
63 const struct phyerr_fft_report *fftr,
64 size_t bin_len, u64 tsf)
66 return 0;
69 static inline int ath10k_spectral_start(struct ath10k *ar)
71 return 0;
74 static inline int ath10k_spectral_vif_stop(struct ath10k_vif *arvif)
76 return 0;
79 static inline int ath10k_spectral_create(struct ath10k *ar)
81 return 0;
84 static inline void ath10k_spectral_destroy(struct ath10k *ar)
88 #endif /* CONFIG_ATH10K_DEBUGFS */
90 #endif /* SPECTRAL_H */