ath9k: Fix TX99 config option usage
PATCH 1/1 ath9k: Fix TX99 config option usage
From: Sujith Manoharan <[email protected]>
Use CONFIG_ATH9K_TX99 to properly enclose the tx99 code and make sure that it is not compiled as part of the driver when it is not selected. Move the tx99 code to a new file tx99.c and also add ATH9K_DEBUGFS as a dependency in Kconfig.
This reduces the module size on platforms like OpenWrt where ATH9K_DEBUGFS is selected, but TX99 might be disabled.
Cc Luis R. Rodriguez <[email protected]>
Signed-off-by Sujith Manoharan <[email protected]>
--- drivers/net/wireless/ath/ath9k/Kconfig | 2 +- drivers/net/wireless/ath/ath9k/Makefile | 4 +- drivers/net/wireless/ath/ath9k/ath9k.h | 20 ++- drivers/net/wireless/ath/ath9k/debug.c | 115 +------------- drivers/net/wireless/ath/ath9k/main.c | 130 +--------------- drivers/net/wireless/ath/ath9k/tx99.c | 263 ++++++++++++++++++++++++++++++++ drivers/net/wireless/ath/ath9k/xmit.c | 4 + 7 files changed, 290 insertions(+), 248 deletions(-) create mode 100644 drivers/net/wireless/ath/ath9k/tx99.c
drivers/net/wireless/ath/ath9k/Kconfig +1 -1
@@ -86,7 +86,7 @@ config ATH9K_DFS_CERTIFIED config ATH9K_TX99 bool "Atheros ath9k TX99 testing support" - depends on CFG80211_CERTIFICATION_ONUS + depends on ATH9K_DEBUGFS && CFG80211_CERTIFICATION_ONUS default n ---help--- Say N. This should only be enabled on systems undergoing
drivers/net/wireless/ath/ath9k/Makefile +2 -2
@@ -13,9 +13,9 @@ ath9k-$(CONFIG_ATH9K_PCI) += pci.o ath9k-$(CONFIG_ATH9K_AHB) += ahb.o ath9k-$(CONFIG_ATH9K_DEBUGFS) += debug.o ath9k-$(CONFIG_ATH9K_DFS_DEBUGFS) += dfs_debug.o -ath9k-$(CONFIG_ATH9K_DFS_CERTIFIED) += \ - dfs.o +ath9k-$(CONFIG_ATH9K_DFS_CERTIFIED) += dfs.o ath9k-$(CONFIG_PM_SLEEP) += wow.o +ath9k-$(CONFIG_ATH9K_TX99) += tx99.o obj-$(CONFIG_ATH9K) += ath9k.o
drivers/net/wireless/ath/ath9k/ath9k.h +18 -2
@@ -947,10 +947,25 @@ struct fft_sample_ht20_40 {u8 data[SPECTRAL_HT20_40_NUM_BINS ]; } __packed; -int ath9k_tx99_init (struct ath_softc *sc); -void ath9k_tx99_deinit (struct ath_softc *sc); +/********/ +/* TX99 */ +/********/ + +#ifdef CONFIG_ATH9K_TX99 +void ath9k_tx99_init_debug (struct ath_softc *sc);int ath9k_tx99_send (struct ath_softc *sc,struct sk_buff *skb,struct ath_tx_control *txctl); +#else +static inline void ath9k_tx99_init_debug (struct ath_softc *sc) +{ +} +static inline int ath9k_tx99_send (struct ath_softc *sc, +struct sk_buff *skb, +struct ath_tx_control *txctl) +{ +return 0 ; +} +#endif /* CONFIG_ATH9K_TX99 */ void ath9k_tasklet (unsigned long data);int ath_cabq_update (struct ath_softc *);
@@ -967,6 +982,7 @@ extern bool is_ath9k_unloaded;u8 ath9k_parse_mpdudensity (u8 mpdudensity);irqreturn_t ath_isr (int irq,void *dev); +int ath_reset (struct ath_softc *sc);int ath9k_init_device (u16 devid,struct ath_softc *sc,const struct ath_bus_ops *bus_ops);void ath9k_deinit_device (struct ath_softc *sc);
drivers/net/wireless/ath/ath9k/debug.c +1 -114
133 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/main.c +1 -129
142 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/tx99.c new file +263 -0
263 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/xmit.c +4 -0
@@ -2749,6 +2749,8 @@ void ath_tx_node_cleanup(struct ath_softc *sc, struct ath_node *an) } } +#ifdef CONFIG_ATH9K_TX99 +int ath9k_tx99_send (struct ath_softc *sc,struct sk_buff *skb,struct ath_tx_control *txctl) {
@@ -2791,3 +2793,5 @@ int ath9k_tx99_send(struct ath_softc *sc, struct sk_buff *skb, return 0; } + +#endif /* CONFIG_ATH9K_TX99 */
Signature · 1 line
1.8.4.1