1 From 9df7ddc3ed25b7d3473f117a0680b9418adb5753 Mon Sep 17 00:00:00 2001
2 Message-Id: <9df7ddc3ed25b7d3473f117a0680b9418adb5753.1515610034.git.mschiffer@universe-factory.net>
3 From: Matthias Schiffer <mschiffer@universe-factory.net>
4 Date: Mon, 27 Nov 2017 18:56:22 +0100
5 Subject: [PATCH 1/2] ath9k: move spectral scan support under a separate config
8 At the moment, spectral scan support, and with it RELAY, is always enabled
9 with ATH9K[_HTC]_DEBUGFS. Spectral scan support is currently the only user
10 of RELAY in ath9k, and it unconditionally reserves a relay channel.
12 Having debugfs support in ath9k is often useful even on very small embedded
13 routers, where we'd rather like to avoid the code size and RAM usage of the
16 Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
17 Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
19 drivers/net/wireless/ath/ath9k/Kconfig | 14 ++++++++++----
20 drivers/net/wireless/ath/ath9k/Makefile | 4 ++--
21 drivers/net/wireless/ath/ath9k/common-spectral.h | 4 ++--
22 3 files changed, 14 insertions(+), 8 deletions(-)
24 --- a/drivers/net/wireless/ath/ath9k/Kconfig
25 +++ b/drivers/net/wireless/ath/ath9k/Kconfig
26 @@ -64,13 +64,12 @@ config ATH9K_DEBUGFS
27 depends on ATH9K && DEBUG_FS
28 select MAC80211_DEBUGFS
29 select ATH9K_COMMON_DEBUG
32 Say Y, if you need access to ath9k's statistics for
33 interrupts, rate control, etc.
35 - Also required for changing debug message flags at run time.
36 - As well as access to the FFT/spectral data and TX99.
37 + Also required for changing debug message flags at run time and for
40 config ATH9K_STATION_STATISTICS
41 bool "Detailed station statistics"
42 @@ -181,7 +180,6 @@ config ATH9K_HTC_DEBUGFS
43 bool "Atheros ath9k_htc debugging"
44 depends on ATH9K_HTC && DEBUG_FS
45 select ATH9K_COMMON_DEBUG
48 Say Y, if you need access to ath9k_htc's statistics.
49 As well as access to the FFT/spectral data.
50 @@ -197,3 +195,11 @@ config ATH9K_HWRNG
52 Say Y, feeds the entropy directly from the WiFi driver to the input
55 +config ATH9K_COMMON_SPECTRAL
56 + bool "Atheros ath9k/ath9k_htc spectral scan support"
57 + depends on ATH9K_DEBUGFS || ATH9K_HTC_DEBUGFS
61 + Say Y to enable access to the FFT/spectral data via debugfs.
62 --- a/drivers/net/wireless/ath/ath9k/Makefile
63 +++ b/drivers/net/wireless/ath/ath9k/Makefile
64 @@ -61,8 +61,8 @@ ath9k_common-y:= common.o \
68 -ath9k_common-$(CPTCFG_ATH9K_COMMON_DEBUG) += common-debug.o \
70 +ath9k_common-$(CPTCFG_ATH9K_COMMON_DEBUG) += common-debug.o
71 +ath9k_common-$(CPTCFG_ATH9K_COMMON_SPECTRAL) += common-spectral.o
73 ath9k_htc-y += htc_hst.o \
75 --- a/drivers/net/wireless/ath/ath9k/common-spectral.h
76 +++ b/drivers/net/wireless/ath/ath9k/common-spectral.h
77 @@ -151,7 +151,7 @@ static inline u8 spectral_bitmap_weight(
78 return bins[0] & 0x3f;
81 -#ifdef CPTCFG_ATH9K_COMMON_DEBUG
82 +#ifdef CPTCFG_ATH9K_COMMON_SPECTRAL
83 void ath9k_cmn_spectral_init_debug(struct ath_spec_scan_priv *spec_priv, struct dentry *debugfs_phy);
84 void ath9k_cmn_spectral_deinit_debug(struct ath_spec_scan_priv *spec_priv);
86 @@ -183,6 +183,6 @@ static inline int ath_cmn_process_fft(st
90 -#endif /* CPTCFG_ATH9K_COMMON_DEBUG */
91 +#endif /* CPTCFG_ATH9K_COMMON_SPECTRAL */
93 #endif /* SPECTRAL_H */
96 @@ -116,6 +116,7 @@ ATH9K_PCOEM=
100 +ATH9K_COMMON_SPECTRAL=