rt2x00: fix firmware dependency
PATCH 1/1 rt2x00: fix firmware dependency
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 <[email protected]>
---
drivers/net/wireless/mac80211/rt2x00/Kconfig +6 -0
@@ -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.
drivers/net/wireless/mac80211/rt2x00/rt2x00dev.c +2 -0
@@ -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)
drivers/net/wireless/mac80211/rt2x00/rt2x00lib.h +2 -0
@@ -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);