ath9k: Use CONFIG_ATH9K_BTCOEX_SUPPORT
authorSujith Manoharan <c_manoha@qca.qualcomm.com>
Wed, 22 Feb 2012 07:10:44 +0000 (12:40 +0530)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 27 Feb 2012 19:06:35 +0000 (14:06 -0500)
This patch uses CONFIG_ATH9K_BTCOEX_SUPPORT to conditionally
compile btcoex-related code in the driver core.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/Makefile
drivers/net/wireless/ath/ath9k/ath9k.h
drivers/net/wireless/ath/ath9k/gpio.c

index da02242499af15d9049b3a2ce7913cb87ade80bc..b3c7b12a3e2c23602a42b0bfe2ef07c09ef6255f 100644 (file)
@@ -3,9 +3,9 @@ ath9k-y +=      beacon.o \
                init.o \
                main.o \
                recv.o \
-               xmit.o \
-               mci.o \
+               xmit.o
 
+ath9k-$(CONFIG_ATH9K_BTCOEX_SUPPORT) += mci.o
 ath9k-$(CONFIG_ATH9K_RATE_CONTROL) += rc.o
 ath9k-$(CONFIG_ATH9K_PCI) += pci.o
 ath9k-$(CONFIG_ATH9K_AHB) += ahb.o
index 23145ce9ea3ff67f1aebe1ac99661eff5e55df95..c2ccba676ecabc4b3f7976f2551a925d25a4837e 100644 (file)
@@ -454,6 +454,7 @@ struct ath_btcoex {
        struct ath_mci_profile mci;
 };
 
+#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
 int ath9k_init_btcoex(struct ath_softc *sc);
 void ath9k_deinit_btcoex(struct ath_softc *sc);
 void ath9k_start_btcoex(struct ath_softc *sc);
@@ -462,6 +463,30 @@ void ath9k_btcoex_timer_resume(struct ath_softc *sc);
 void ath9k_btcoex_timer_pause(struct ath_softc *sc);
 void ath9k_btcoex_handle_interrupt(struct ath_softc *sc, u32 status);
 u16 ath9k_btcoex_aggr_limit(struct ath_softc *sc, u32 max_4ms_framelen);
+#else
+static inline int ath9k_init_btcoex(struct ath_softc *sc)
+{
+       return 0;
+}
+static inline void ath9k_deinit_btcoex(struct ath_softc *sc)
+{
+}
+static inline void ath9k_start_btcoex(struct ath_softc *sc)
+{
+}
+static inline void ath9k_stop_btcoex(struct ath_softc *sc)
+{
+}
+static inline void ath9k_btcoex_handle_interrupt(struct ath_softc *sc,
+                                                u32 status)
+{
+}
+static inline u16 ath9k_btcoex_aggr_limit(struct ath_softc *sc,
+                                         u32 max_4ms_framelen)
+{
+       return 0;
+}
+#endif /* CONFIG_ATH9K_BTCOEX_SUPPORT */
 
 /********************/
 /*   LED Control    */
@@ -655,8 +680,11 @@ struct ath_softc {
        struct ath_beacon_config cur_beacon_conf;
        struct delayed_work tx_complete_work;
        struct delayed_work hw_pll_work;
+
+#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
        struct ath_btcoex btcoex;
        struct ath_mci_coex mci_coex;
+#endif
 
        struct ath_descdma txsdma;
 
index e870251cdd1be46855c52c07e4fce0430495818e..77b3eb7b7a33052ffa64c8a218d8f3d0e70d2424 100644 (file)
@@ -110,6 +110,8 @@ void ath_start_rfkill_poll(struct ath_softc *sc)
                wiphy_rfkill_start_polling(sc->hw->wiphy);
 }
 
+#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
+
 /******************/
 /*     BTCOEX     */
 /******************/
@@ -423,3 +425,5 @@ int ath9k_init_btcoex(struct ath_softc *sc)
 
        return 0;
 }
+
+#endif /* CONFIG_ATH9K_BTCOEX_SUPPORT */