1 /* SPDX-License-Identifier: BSD-3-Clause-Clear */
3 * Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
6 #ifndef ATH11K_SPECTRAL_H
7 #define ATH11K_SPECTRAL_H
9 #include "../spectral_common.h"
12 /* enum ath11k_spectral_mode:
14 * @SPECTRAL_DISABLED: spectral mode is disabled
15 * @SPECTRAL_BACKGROUND: hardware sends samples when it is not busy with
17 * @SPECTRAL_MANUAL: spectral scan is enabled, triggering for samples
18 * is performed manually.
20 enum ath11k_spectral_mode {
21 ATH11K_SPECTRAL_DISABLED = 0,
22 ATH11K_SPECTRAL_BACKGROUND,
23 ATH11K_SPECTRAL_MANUAL,
26 struct ath11k_spectral {
27 struct ath11k_dbring rx_ring;
28 /* Protects enabled */
30 struct rchan *rfs_scan; /* relay(fs) channel for spectral scan */
31 struct dentry *scan_ctl;
32 struct dentry *scan_count;
33 struct dentry *scan_bins;
34 enum ath11k_spectral_mode mode;
40 #ifdef CONFIG_ATH11K_SPECTRAL
42 int ath11k_spectral_init(struct ath11k_base *ab);
43 void ath11k_spectral_deinit(struct ath11k_base *ab);
44 int ath11k_spectral_vif_stop(struct ath11k_vif *arvif);
45 void ath11k_spectral_reset_buffer(struct ath11k *ar);
46 enum ath11k_spectral_mode ath11k_spectral_get_mode(struct ath11k *ar);
47 struct ath11k_dbring *ath11k_spectral_get_dbring(struct ath11k *ar);
51 static inline int ath11k_spectral_init(struct ath11k_base *ab)
56 static inline void ath11k_spectral_deinit(struct ath11k_base *ab)
60 static inline int ath11k_spectral_vif_stop(struct ath11k_vif *arvif)
65 static inline void ath11k_spectral_reset_buffer(struct ath11k *ar)
70 enum ath11k_spectral_mode ath11k_spectral_get_mode(struct ath11k *ar)
72 return ATH11K_SPECTRAL_DISABLED;
76 struct ath11k_dbring *ath11k_spectral_get_dbring(struct ath11k *ar)
81 #endif /* CONFIG_ATH11K_SPECTRAL */
82 #endif /* ATH11K_SPECTRAL_H */