0001
0002
0003
0004
0005
0006 #ifndef ATH11K_SPECTRAL_H
0007 #define ATH11K_SPECTRAL_H
0008
0009 #include "../spectral_common.h"
0010 #include "dbring.h"
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 enum ath11k_spectral_mode {
0021 ATH11K_SPECTRAL_DISABLED = 0,
0022 ATH11K_SPECTRAL_BACKGROUND,
0023 ATH11K_SPECTRAL_MANUAL,
0024 };
0025
0026 struct ath11k_spectral {
0027 struct ath11k_dbring rx_ring;
0028
0029 spinlock_t lock;
0030 struct rchan *rfs_scan;
0031 struct dentry *scan_ctl;
0032 struct dentry *scan_count;
0033 struct dentry *scan_bins;
0034 enum ath11k_spectral_mode mode;
0035 u16 count;
0036 u8 fft_size;
0037 bool enabled;
0038 };
0039
0040 #ifdef CONFIG_ATH11K_SPECTRAL
0041
0042 int ath11k_spectral_init(struct ath11k_base *ab);
0043 void ath11k_spectral_deinit(struct ath11k_base *ab);
0044 int ath11k_spectral_vif_stop(struct ath11k_vif *arvif);
0045 void ath11k_spectral_reset_buffer(struct ath11k *ar);
0046 enum ath11k_spectral_mode ath11k_spectral_get_mode(struct ath11k *ar);
0047 struct ath11k_dbring *ath11k_spectral_get_dbring(struct ath11k *ar);
0048
0049 #else
0050
0051 static inline int ath11k_spectral_init(struct ath11k_base *ab)
0052 {
0053 return 0;
0054 }
0055
0056 static inline void ath11k_spectral_deinit(struct ath11k_base *ab)
0057 {
0058 }
0059
0060 static inline int ath11k_spectral_vif_stop(struct ath11k_vif *arvif)
0061 {
0062 return 0;
0063 }
0064
0065 static inline void ath11k_spectral_reset_buffer(struct ath11k *ar)
0066 {
0067 }
0068
0069 static inline
0070 enum ath11k_spectral_mode ath11k_spectral_get_mode(struct ath11k *ar)
0071 {
0072 return ATH11K_SPECTRAL_DISABLED;
0073 }
0074
0075 static inline
0076 struct ath11k_dbring *ath11k_spectral_get_dbring(struct ath11k *ar)
0077 {
0078 return NULL;
0079 }
0080
0081 #endif
0082 #endif