Search Linux Wireless

[PATCH v2] rt2x00: fix firmware dependency

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There is no need to always build rt2x00lib.ko including the firmware handlers,
only rt61pci and rt73usb will require the firmware handling. So lets add a new
invisible config option selected by rt61pci and rt73usb to enable the firmware
handling inside rt2x00lib.

Signed-off-by: Ivo van Doorn <IvDoorn@xxxxxxxxx>

---

Patch send again because of mail client problem

diff --git a/drivers/net/wireless/mac80211/rt2x00/Kconfig b/drivers/net/wireless/mac80211/rt2x00/Kconfig
index 6242f15..0528431 100644
--- a/drivers/net/wireless/mac80211/rt2x00/Kconfig
+++ b/drivers/net/wireless/mac80211/rt2x00/Kconfig
@@ -15,6 +15,10 @@ config RT2X00_LIB
 	tristate
 	depends on RT2X00
 
+config RT2X00_LIB_FIRMWARE
+	boolean
+	depends on RT2X00
+
 config RT2400PCI
 	tristate "Ralink rt2400 pci/pcmcia support"
 	depends on RT2X00 && PCI
@@ -39,6 +43,7 @@ config RT61PCI
 	tristate "Ralink rt61 pci/pcmcia support"
 	depends on RT2X00 && FW_LOADER && PCI
 	select RT2X00_LIB
+	select RT2X00_LIB_FIRMWARE
 	select CRC_ITU_T
 	select EEPROM_93CX6
 	---help---
@@ -59,6 +64,7 @@ config RT73USB
 	tristate "Ralink rt73 usb support"
 	depends on RT2X00 && FW_LOADER && USB
 	select RT2X00_LIB
+	select RT2X00_LIB_FIRMWARE
 	select CRC_ITU_T
 	---help---
 	This is an experimental driver for the Ralink rt73 wireless chip.
diff --git a/drivers/net/wireless/mac80211/rt2x00/rt2x00dev.c b/drivers/net/wireless/mac80211/rt2x00/rt2x00dev.c
index 8dacf00..ba27a3e 100644
--- a/drivers/net/wireless/mac80211/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/mac80211/rt2x00/rt2x00dev.c
@@ -40,6 +40,7 @@
 #include "rt2x00.h"
 #include "rt2x00lib.h"
 
+#ifdef CONFIG_RT2X00_LIB_FIRMWARE
 struct fw_entry {
 	u32	chip;
 	char	*name;
@@ -92,6 +93,7 @@ int rt2x00lib_load_firmware_wait(struct rt2x00_dev *rt2x00dev)
 	return -ETIMEDOUT;
 }
 EXPORT_SYMBOL_GPL(rt2x00lib_load_firmware_wait);
+#endif /* CONFIG_RT2X00_LIB_FIRMWARE */
 
 void rt2x00lib_update_tx_stats(struct data_entry *entry,
 	const int status, const int is_ack, const int retry)
diff --git a/drivers/net/wireless/mac80211/rt2x00/rt2x00lib.h b/drivers/net/wireless/mac80211/rt2x00/rt2x00lib.h
index 5ec88a6..9728d5b 100644
--- a/drivers/net/wireless/mac80211/rt2x00/rt2x00lib.h
+++ b/drivers/net/wireless/mac80211/rt2x00/rt2x00lib.h
@@ -30,9 +30,11 @@
 
 #include <linux/firmware.h>
 
+#ifdef CONFIG_RT2X00_LIB_FIRMWARE
 int rt2x00lib_load_firmware(struct rt2x00_dev *rt2x00dev, struct device *dev,
 	void (*cont)(const struct firmware *fw, void *context));
 int rt2x00lib_load_firmware_wait(struct rt2x00_dev *rt2x00dev);
+#endif /* CONFIG_RT2X00_LIB_FIRMWARE */
 
 void rt2x00lib_update_tx_stats(struct data_entry *entry,
 	const int status, const int is_ack, const int retry);
-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux