604a6f1585aba2cefe5a95a601411043aafc39c2
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / 309-v4.16-0002-ath10k-move-spectral-scan-support-under-a-separate-c.patch
1 From 42e01cb9cb109fb0bb4743f6c54d6aa67ac39b61 Mon Sep 17 00:00:00 2001
2 Message-Id: <42e01cb9cb109fb0bb4743f6c54d6aa67ac39b61.1515610034.git.mschiffer@universe-factory.net>
3 In-Reply-To: <9df7ddc3ed25b7d3473f117a0680b9418adb5753.1515610034.git.mschiffer@universe-factory.net>
4 References: <9df7ddc3ed25b7d3473f117a0680b9418adb5753.1515610034.git.mschiffer@universe-factory.net>
5 From: Matthias Schiffer <mschiffer@universe-factory.net>
6 Date: Mon, 27 Nov 2017 18:56:23 +0100
7 Subject: [PATCH 2/2] ath10k: move spectral scan support under a separate
8 config symbol
9
10 At the moment, spectral scan support, and with it RELAY, is always enabled
11 with ATH10K_DEBUGFS. Spectral scan support is currently the only user of
12 RELAY in ath10k, and it unconditionally reserves a relay channel.
13
14 Having debugfs support in ath10k is often useful even on very small
15 embedded routers, where we'd rather like to avoid the code size and RAM
16 usage of the relay support. While ath10k-based devices usually have more
17 resources than ath9k-based ones, it makes sense to keep the configuration
18 symmetric to ath9k, so the same base kernel without RELAY can be used for
19 both ath9k and ath10k hardware.
20
21 Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
22 Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
23 ---
24 drivers/net/wireless/ath/ath10k/Kconfig | 9 ++++++++-
25 drivers/net/wireless/ath/ath10k/Makefile | 2 +-
26 drivers/net/wireless/ath/ath10k/spectral.h | 4 ++--
27 3 files changed, 11 insertions(+), 4 deletions(-)
28
29 --- a/drivers/net/wireless/ath/ath10k/Kconfig
30 +++ b/drivers/net/wireless/ath/ath10k/Kconfig
31 @@ -51,12 +51,19 @@ config ATH10K_DEBUG
32 config ATH10K_DEBUGFS
33 bool "Atheros ath10k debugfs support"
34 depends on ATH10K && DEBUG_FS
35 - depends on RELAY
36 ---help---
37 Enabled debugfs support
38
39 If unsure, say Y to make it easier to debug problems.
40
41 +config ATH10K_SPECTRAL
42 + bool "Atheros ath10k spectral scan support"
43 + depends on ATH10K_DEBUGFS
44 + depends on RELAY
45 + default n
46 + ---help---
47 + Say Y to enable access to the FFT/spectral data via debugfs.
48 +
49 config ATH10K_TRACING
50 depends on !KERNEL_3_4
51 bool "Atheros ath10k tracing support"
52 --- a/drivers/net/wireless/ath/ath10k/Makefile
53 +++ b/drivers/net/wireless/ath/ath10k/Makefile
54 @@ -14,7 +14,7 @@ ath10k_core-y += mac.o \
55 p2p.o \
56 swap.o
57
58 -ath10k_core-$(CPTCFG_ATH10K_DEBUGFS) += spectral.o
59 +ath10k_core-$(CPTCFG_ATH10K_SPECTRAL) += spectral.o
60 ath10k_core-$(CPTCFG_NL80211_TESTMODE) += testmode.o
61 ath10k_core-$(CPTCFG_ATH10K_TRACING) += trace.o
62 ath10k_core-$(CPTCFG_ATH10K_THERMAL) += thermal.o
63 --- a/drivers/net/wireless/ath/ath10k/spectral.h
64 +++ b/drivers/net/wireless/ath/ath10k/spectral.h
65 @@ -44,7 +44,7 @@ enum ath10k_spectral_mode {
66 SPECTRAL_MANUAL,
67 };
68
69 -#ifdef CPTCFG_ATH10K_DEBUGFS
70 +#ifdef CPTCFG_ATH10K_SPECTRAL
71
72 int ath10k_spectral_process_fft(struct ath10k *ar,
73 struct wmi_phyerr_ev_arg *phyerr,
74 @@ -85,6 +85,6 @@ static inline void ath10k_spectral_destr
75 {
76 }
77
78 -#endif /* CPTCFG_ATH10K_DEBUGFS */
79 +#endif /* CPTCFG_ATH10K_SPECTRAL */
80
81 #endif /* SPECTRAL_H */
82 --- a/local-symbols
83 +++ b/local-symbols
84 @@ -140,6 +140,7 @@ ATH10K_SDIO=
85 ATH10K_USB=
86 ATH10K_DEBUG=
87 ATH10K_DEBUGFS=
88 +ATH10K_SPECTRAL=
89 ATH10K_TRACING=
90 ATH10K_DFS_CERTIFIED=
91 WCN36XX=