]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
ath9k: make the driver specific rate control module optional
authorFelix Fietkau <nbd@openwrt.org>
Mon, 20 Sep 2010 11:45:40 +0000 (13:45 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 21 Sep 2010 15:05:35 +0000 (11:05 -0400)
ath9k can use minstrel_ht instead, so it makes sense to save some space here.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/Kconfig
drivers/net/wireless/ath/ath9k/Makefile
drivers/net/wireless/ath/ath9k/init.c
drivers/net/wireless/ath/ath9k/rc.h

index 35f23bdc442f243e485da8acb70d9f4fecd28977..ad57a6d2311067cc798889fef2336f9e63949511 100644 (file)
@@ -32,6 +32,14 @@ config ATH9K_DEBUGFS
 
          Also required for changing debug message flags at run time.
 
+config ATH9K_RATE_CONTROL
+       bool "Atheros ath9k rate control"
+       depends on ATH9K
+       default y
+       ---help---
+         Say Y, if you want to use the ath9k specific rate control
+         module instead of minstrel_ht.
+
 config ATH9K_HTC
        tristate "Atheros HTC based wireless cards support"
        depends on USB && MAC80211
index 4555e99839032ec10a77c5b729cbc508cdc3fa1e..aca01621c205213a1b6503047f68c6d7da6dc25e 100644 (file)
@@ -5,8 +5,8 @@ ath9k-y +=      beacon.o \
                recv.o \
                xmit.o \
                virtual.o \
-               rc.o
 
+ath9k-$(CONFIG_ATH9K_RATE_CONTROL) += rc.o
 ath9k-$(CONFIG_PCI) += pci.o
 ath9k-$(CONFIG_ATHEROS_AR71XX) += ahb.o
 ath9k-$(CONFIG_ATH9K_DEBUGFS) += debug.o
index 0364167cbfaf9b391042dbcfa5044cadbb6fc9ef..573899e27b3d15f54868c3da410a3acf2a5e2b2a 100644 (file)
@@ -654,7 +654,9 @@ void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
        hw->sta_data_size = sizeof(struct ath_node);
        hw->vif_data_size = sizeof(struct ath_vif);
 
+#ifdef CONFIG_ATH9K_RATE_CONTROL
        hw->rate_control_algorithm = "ath9k_rate_control";
+#endif
 
        if (test_bit(ATH9K_MODE_11G, sc->sc_ah->caps.wireless_modes))
                hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
index dc1082654501145e15cda7f0a9b17395b001d9ef..268072fd3c1c148784f23e432d1bce72de6843d5 100644 (file)
@@ -224,7 +224,18 @@ enum ath9k_internal_frame_type {
        ATH9K_IFT_UNPAUSE
 };
 
+#ifdef CONFIG_ATH9K_RATE_CONTROL
 int ath_rate_control_register(void);
 void ath_rate_control_unregister(void);
+#else
+static inline int ath_rate_control_register(void)
+{
+       return 0;
+}
+
+static inline void ath_rate_control_unregister(void)
+{
+}
+#endif
 
 #endif /* RC_H */