OSDN Git Service

ath9k: introduce ATH9K_{PCI,AHB} config options
authorGabor Juhos <juhosg@openwrt.org>
Tue, 12 Apr 2011 16:23:16 +0000 (18:23 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 13 Apr 2011 19:21:34 +0000 (15:21 -0400)
Currently ath9k only available in menuconfig if PCI bus
support is enabled. However the driver is required for
the built-in wireless MACs of the Atheros AR9130/AR9132
SoCs. These SoCs have no PCI controller, the wireless
MAC is connected to the AHB bus on them.

Introduce separated config options for the supported
buses, in order to allow building of ath9h without PCI
bus support.

As a bonus, this patch removes the cross-reference of
the ATHEROS_AR71XX option which is not present in the
kernel.

Cc: Luis R. Rodriguez <lrodriguez@atheros.com>
Cc: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: Gabor Juhos <juhosg@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/ath9k.h

index ad57a6d..d9ff841 100644 (file)
@@ -5,7 +5,7 @@ config ATH9K_COMMON
 
 config ATH9K
        tristate "Atheros 802.11n wireless cards support"
-       depends on PCI && MAC80211
+       depends on MAC80211
        select ATH9K_HW
        select MAC80211_LEDS
        select LEDS_CLASS
@@ -23,6 +23,25 @@ config ATH9K
 
          If you choose to build a module, it'll be called ath9k.
 
+config ATH9K_PCI
+       bool "Atheros ath9k PCI/PCIe bus support"
+       depends on ATH9K && PCI
+       default PCI
+       ---help---
+         This option enables the PCI bus support in ath9k.
+
+         Say Y, if you have a compatible PCI/PCIe wireless card.
+
+config ATH9K_AHB
+       bool "Atheros ath9k AHB bus support"
+       depends on ATH9K
+       default n
+       ---help---
+         This option enables the AHB bus support in ath9k.
+
+         Say Y, if you have a SoC with a compatible built-in
+         wireless MAC. Say N if unsure.
+
 config ATH9K_DEBUGFS
        bool "Atheros ath9k debugging"
        depends on ATH9K && DEBUG_FS
index 4d66ca8..ca4c436 100644 (file)
@@ -6,8 +6,8 @@ ath9k-y +=      beacon.o \
                xmit.o \
 
 ath9k-$(CONFIG_ATH9K_RATE_CONTROL) += rc.o
-ath9k-$(CONFIG_PCI) += pci.o
-ath9k-$(CONFIG_ATHEROS_AR71XX) += ahb.o
+ath9k-$(CONFIG_ATH9K_PCI) += pci.o
+ath9k-$(CONFIG_ATH9K_AHB) += ahb.o
 ath9k-$(CONFIG_ATH9K_DEBUGFS) += debug.o
 
 obj-$(CONFIG_ATH9K) += ath9k.o
index 38835bc..77ad407 100644 (file)
@@ -665,7 +665,7 @@ void ath_radio_disable(struct ath_softc *sc, struct ieee80211_hw *hw);
 bool ath9k_setpower(struct ath_softc *sc, enum ath9k_power_mode mode);
 bool ath9k_uses_beacons(int type);
 
-#ifdef CONFIG_PCI
+#ifdef CONFIG_ATH9K_PCI
 int ath_pci_init(void);
 void ath_pci_exit(void);
 #else
@@ -673,7 +673,7 @@ static inline int ath_pci_init(void) { return 0; };
 static inline void ath_pci_exit(void) {};
 #endif
 
-#ifdef CONFIG_ATHEROS_AR71XX
+#ifdef CONFIG_ATH9K_AHB
 int ath_ahb_init(void);
 void ath_ahb_exit(void);
 #else