aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/init.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-12-17 10:47:56 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-12-19 14:46:55 -0500
commit8a30930563521c9dba73c93b5631be1d0993f78f (patch)
tree859d5bd92689fc934aa6c7eea98f1d37891fb293 /drivers/net/wireless/ath/ath9k/init.c
parent104cfa881006c18af9b118e1631dcf1f8378994a (diff)
ath9k_hw: make bluetooth coexistence support optional at compile time
Many systems (e.g. embedded systems) do not have wifi modules connected to bluetooth modules, so bluetooth coexistence is irrelevant there. With the addition of MCI support, ath9k picked up quite a bit of extra code that can be compiled out this way. This patch redefines ATH9K_HW_CAP_MCI and adds an inline wrapper for querying the bluetooth coexistence scheme, allowing the compiler to eliminate code that uses it, with only very little use of #ifdef. On MIPS this reduces the total size for the modules by about 20k. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/init.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/init.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 58ce67f976f9..abf943557dee 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -425,7 +425,7 @@ static int ath9k_init_btcoex(struct ath_softc *sc)
425 struct ath_hw *ah = sc->sc_ah; 425 struct ath_hw *ah = sc->sc_ah;
426 int r; 426 int r;
427 427
428 switch (sc->sc_ah->btcoex_hw.scheme) { 428 switch (ath9k_hw_get_btcoex_scheme(sc->sc_ah)) {
429 case ATH_BTCOEX_CFG_NONE: 429 case ATH_BTCOEX_CFG_NONE:
430 break; 430 break;
431 case ATH_BTCOEX_CFG_2WIRE: 431 case ATH_BTCOEX_CFG_2WIRE:
@@ -880,10 +880,10 @@ static void ath9k_deinit_softc(struct ath_softc *sc)
880 kfree(sc->sbands[IEEE80211_BAND_5GHZ].channels); 880 kfree(sc->sbands[IEEE80211_BAND_5GHZ].channels);
881 881
882 if ((sc->btcoex.no_stomp_timer) && 882 if ((sc->btcoex.no_stomp_timer) &&
883 sc->sc_ah->btcoex_hw.scheme == ATH_BTCOEX_CFG_3WIRE) 883 ath9k_hw_get_btcoex_scheme(sc->sc_ah) == ATH_BTCOEX_CFG_3WIRE)
884 ath_gen_timer_free(sc->sc_ah, sc->btcoex.no_stomp_timer); 884 ath_gen_timer_free(sc->sc_ah, sc->btcoex.no_stomp_timer);
885 885
886 if (sc->sc_ah->btcoex_hw.scheme == ATH_BTCOEX_CFG_MCI) 886 if (ath9k_hw_get_btcoex_scheme(sc->sc_ah) == ATH_BTCOEX_CFG_MCI)
887 ath_mci_cleanup(sc); 887 ath_mci_cleanup(sc);
888 888
889 for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) 889 for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++)