308-v4.16-0001-ath9k-move-spectral-scan-support-under-a-separate-co.patch 3.6 KB

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