diff options
| author | Felix Fietkau <nbd@openwrt.org> | 2010-09-20 07:45:40 -0400 |
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2010-09-21 11:05:35 -0400 |
| commit | 6e5c2b4e8addfaab8ef54dedaf7b607e1585c35b (patch) | |
| tree | 02a6ffb04e06f658fcb92860b14be41b38b4b99e | |
| parent | 334b06029ed3f5e31d773527d54fb40e3ee571f9 (diff) | |
ath9k: make the driver specific rate control module optional
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>
| -rw-r--r-- | drivers/net/wireless/ath/ath9k/Kconfig | 8 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath9k/Makefile | 2 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath9k/init.c | 2 | ||||
| -rw-r--r-- | drivers/net/wireless/ath/ath9k/rc.h | 11 |
4 files changed, 22 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/Kconfig b/drivers/net/wireless/ath/ath9k/Kconfig index 35f23bdc442f..ad57a6d23110 100644 --- a/drivers/net/wireless/ath/ath9k/Kconfig +++ b/drivers/net/wireless/ath/ath9k/Kconfig | |||
| @@ -32,6 +32,14 @@ config ATH9K_DEBUGFS | |||
| 32 | 32 | ||
| 33 | Also required for changing debug message flags at run time. | 33 | Also required for changing debug message flags at run time. |
| 34 | 34 | ||
| 35 | config ATH9K_RATE_CONTROL | ||
| 36 | bool "Atheros ath9k rate control" | ||
| 37 | depends on ATH9K | ||
| 38 | default y | ||
| 39 | ---help--- | ||
| 40 | Say Y, if you want to use the ath9k specific rate control | ||
| 41 | module instead of minstrel_ht. | ||
| 42 | |||
| 35 | config ATH9K_HTC | 43 | config ATH9K_HTC |
| 36 | tristate "Atheros HTC based wireless cards support" | 44 | tristate "Atheros HTC based wireless cards support" |
| 37 | depends on USB && MAC80211 | 45 | depends on USB && MAC80211 |
diff --git a/drivers/net/wireless/ath/ath9k/Makefile b/drivers/net/wireless/ath/ath9k/Makefile index 4555e9983903..aca01621c205 100644 --- a/drivers/net/wireless/ath/ath9k/Makefile +++ b/drivers/net/wireless/ath/ath9k/Makefile | |||
| @@ -5,8 +5,8 @@ ath9k-y += beacon.o \ | |||
| 5 | recv.o \ | 5 | recv.o \ |
| 6 | xmit.o \ | 6 | xmit.o \ |
| 7 | virtual.o \ | 7 | virtual.o \ |
| 8 | rc.o | ||
| 9 | 8 | ||
| 9 | ath9k-$(CONFIG_ATH9K_RATE_CONTROL) += rc.o | ||
| 10 | ath9k-$(CONFIG_PCI) += pci.o | 10 | ath9k-$(CONFIG_PCI) += pci.o |
| 11 | ath9k-$(CONFIG_ATHEROS_AR71XX) += ahb.o | 11 | ath9k-$(CONFIG_ATHEROS_AR71XX) += ahb.o |
| 12 | ath9k-$(CONFIG_ATH9K_DEBUGFS) += debug.o | 12 | ath9k-$(CONFIG_ATH9K_DEBUGFS) += debug.o |
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index 0364167cbfaf..573899e27b3d 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c | |||
| @@ -654,7 +654,9 @@ void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw) | |||
| 654 | hw->sta_data_size = sizeof(struct ath_node); | 654 | hw->sta_data_size = sizeof(struct ath_node); |
| 655 | hw->vif_data_size = sizeof(struct ath_vif); | 655 | hw->vif_data_size = sizeof(struct ath_vif); |
| 656 | 656 | ||
| 657 | #ifdef CONFIG_ATH9K_RATE_CONTROL | ||
| 657 | hw->rate_control_algorithm = "ath9k_rate_control"; | 658 | hw->rate_control_algorithm = "ath9k_rate_control"; |
| 659 | #endif | ||
| 658 | 660 | ||
| 659 | if (test_bit(ATH9K_MODE_11G, sc->sc_ah->caps.wireless_modes)) | 661 | if (test_bit(ATH9K_MODE_11G, sc->sc_ah->caps.wireless_modes)) |
| 660 | hw->wiphy->bands[IEEE80211_BAND_2GHZ] = | 662 | hw->wiphy->bands[IEEE80211_BAND_2GHZ] = |
diff --git a/drivers/net/wireless/ath/ath9k/rc.h b/drivers/net/wireless/ath/ath9k/rc.h index dc1082654501..268072fd3c1c 100644 --- a/drivers/net/wireless/ath/ath9k/rc.h +++ b/drivers/net/wireless/ath/ath9k/rc.h | |||
| @@ -224,7 +224,18 @@ enum ath9k_internal_frame_type { | |||
| 224 | ATH9K_IFT_UNPAUSE | 224 | ATH9K_IFT_UNPAUSE |
| 225 | }; | 225 | }; |
| 226 | 226 | ||
| 227 | #ifdef CONFIG_ATH9K_RATE_CONTROL | ||
| 227 | int ath_rate_control_register(void); | 228 | int ath_rate_control_register(void); |
| 228 | void ath_rate_control_unregister(void); | 229 | void ath_rate_control_unregister(void); |
| 230 | #else | ||
| 231 | static inline int ath_rate_control_register(void) | ||
| 232 | { | ||
| 233 | return 0; | ||
| 234 | } | ||
| 235 | |||
| 236 | static inline void ath_rate_control_unregister(void) | ||
| 237 | { | ||
| 238 | } | ||
| 239 | #endif | ||
| 229 | 240 | ||
| 230 | #endif /* RC_H */ | 241 | #endif /* RC_H */ |
