aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2017-11-27 12:56:22 -0500
committerKalle Valo <kvalo@qca.qualcomm.com>2017-12-07 09:31:57 -0500
commit9df7ddc3ed25b7d3473f117a0680b9418adb5753 (patch)
tree9b6ae7b7ccbea5571a6d4be4c41bfffad37e2258
parentdafa420360129781744ef48736a6dbed8f622077 (diff)
ath9k: move spectral scan support under a separate config symbol
At the moment, spectral scan support, and with it RELAY, is always enabled with ATH9K[_HTC]_DEBUGFS. Spectral scan support is currently the only user of RELAY in ath9k, and it unconditionally reserves a relay channel. Having debugfs support in ath9k is often useful even on very small embedded routers, where we'd rather like to avoid the code size and RAM usage of the relay support. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/Kconfig14
-rw-r--r--drivers/net/wireless/ath/ath9k/Makefile4
-rw-r--r--drivers/net/wireless/ath/ath9k/common-spectral.h4
3 files changed, 14 insertions, 8 deletions
diff --git a/drivers/net/wireless/ath/ath9k/Kconfig b/drivers/net/wireless/ath/ath9k/Kconfig
index 783a38f1a626..1f3523019509 100644
--- a/drivers/net/wireless/ath/ath9k/Kconfig
+++ b/drivers/net/wireless/ath/ath9k/Kconfig
@@ -61,13 +61,12 @@ config ATH9K_DEBUGFS
61 depends on ATH9K && DEBUG_FS 61 depends on ATH9K && DEBUG_FS
62 select MAC80211_DEBUGFS 62 select MAC80211_DEBUGFS
63 select ATH9K_COMMON_DEBUG 63 select ATH9K_COMMON_DEBUG
64 select RELAY
65 ---help--- 64 ---help---
66 Say Y, if you need access to ath9k's statistics for 65 Say Y, if you need access to ath9k's statistics for
67 interrupts, rate control, etc. 66 interrupts, rate control, etc.
68 67
69 Also required for changing debug message flags at run time. 68 Also required for changing debug message flags at run time and for
70 As well as access to the FFT/spectral data and TX99. 69 TX99.
71 70
72config ATH9K_STATION_STATISTICS 71config ATH9K_STATION_STATISTICS
73 bool "Detailed station statistics" 72 bool "Detailed station statistics"
@@ -177,7 +176,6 @@ config ATH9K_HTC_DEBUGFS
177 bool "Atheros ath9k_htc debugging" 176 bool "Atheros ath9k_htc debugging"
178 depends on ATH9K_HTC && DEBUG_FS 177 depends on ATH9K_HTC && DEBUG_FS
179 select ATH9K_COMMON_DEBUG 178 select ATH9K_COMMON_DEBUG
180 select RELAY
181 ---help--- 179 ---help---
182 Say Y, if you need access to ath9k_htc's statistics. 180 Say Y, if you need access to ath9k_htc's statistics.
183 As well as access to the FFT/spectral data. 181 As well as access to the FFT/spectral data.
@@ -192,3 +190,11 @@ config ATH9K_HWRNG
192 190
193 Say Y, feeds the entropy directly from the WiFi driver to the input 191 Say Y, feeds the entropy directly from the WiFi driver to the input
194 pool. 192 pool.
193
194config ATH9K_COMMON_SPECTRAL
195 bool "Atheros ath9k/ath9k_htc spectral scan support"
196 depends on ATH9K_DEBUGFS || ATH9K_HTC_DEBUGFS
197 select RELAY
198 default n
199 ---help---
200 Say Y to enable access to the FFT/spectral data via debugfs.
diff --git a/drivers/net/wireless/ath/ath9k/Makefile b/drivers/net/wireless/ath/ath9k/Makefile
index d804ce7391a0..f71b2ad8275c 100644
--- a/drivers/net/wireless/ath/ath9k/Makefile
+++ b/drivers/net/wireless/ath/ath9k/Makefile
@@ -62,8 +62,8 @@ ath9k_common-y:= common.o \
62 common-init.o \ 62 common-init.o \
63 common-beacon.o \ 63 common-beacon.o \
64 64
65ath9k_common-$(CONFIG_ATH9K_COMMON_DEBUG) += common-debug.o \ 65ath9k_common-$(CONFIG_ATH9K_COMMON_DEBUG) += common-debug.o
66 common-spectral.o 66ath9k_common-$(CONFIG_ATH9K_COMMON_SPECTRAL) += common-spectral.o
67 67
68ath9k_htc-y += htc_hst.o \ 68ath9k_htc-y += htc_hst.o \
69 hif_usb.o \ 69 hif_usb.o \
diff --git a/drivers/net/wireless/ath/ath9k/common-spectral.h b/drivers/net/wireless/ath/ath9k/common-spectral.h
index 5d1a51d83aa6..303ab470ce34 100644
--- a/drivers/net/wireless/ath/ath9k/common-spectral.h
+++ b/drivers/net/wireless/ath/ath9k/common-spectral.h
@@ -151,7 +151,7 @@ static inline u8 spectral_bitmap_weight(u8 *bins)
151 return bins[0] & 0x3f; 151 return bins[0] & 0x3f;
152} 152}
153 153
154#ifdef CONFIG_ATH9K_COMMON_DEBUG 154#ifdef CONFIG_ATH9K_COMMON_SPECTRAL
155void ath9k_cmn_spectral_init_debug(struct ath_spec_scan_priv *spec_priv, struct dentry *debugfs_phy); 155void ath9k_cmn_spectral_init_debug(struct ath_spec_scan_priv *spec_priv, struct dentry *debugfs_phy);
156void ath9k_cmn_spectral_deinit_debug(struct ath_spec_scan_priv *spec_priv); 156void ath9k_cmn_spectral_deinit_debug(struct ath_spec_scan_priv *spec_priv);
157 157
@@ -183,6 +183,6 @@ static inline int ath_cmn_process_fft(struct ath_spec_scan_priv *spec_priv,
183{ 183{
184 return 0; 184 return 0;
185} 185}
186#endif /* CONFIG_ATH9K_COMMON_DEBUG */ 186#endif /* CONFIG_ATH9K_COMMON_SPECTRAL */
187 187
188#endif /* SPECTRAL_H */ 188#endif /* SPECTRAL_H */