mac80211: update firmware from linux-firmware
[openwrt.git] / package / mac80211 / Makefile
index 35027d3..b275021 100644 (file)
@@ -80,8 +80,7 @@ define KernelPackage/mac80211
 endef
 
 define KernelPackage/mac80211/config
 endef
 
 define KernelPackage/mac80211/config
-       menu "Configuration"
-               depends on PACKAGE_kmod-mac80211
+  if PACKAGE_kmod-mac80211
 
        config PACKAGE_MAC80211_DEBUGFS
                bool "Export mac80211 internals in DebugFS"
 
        config PACKAGE_MAC80211_DEBUGFS
                bool "Export mac80211 internals in DebugFS"
@@ -96,7 +95,7 @@ define KernelPackage/mac80211/config
                bool "Enable 802.11s mesh support"
                default y
 
                bool "Enable 802.11s mesh support"
                default y
 
-       endmenu
+  endif
 endef
 
 define KernelPackage/mac80211/description
 endef
 
 define KernelPackage/mac80211/description
@@ -104,10 +103,9 @@ Generic IEEE 802.11 Networking Stack (mac80211)
 endef
 
 PKG_LINUX_FIRMWARE_NAME:=linux-firmware
 endef
 
 PKG_LINUX_FIRMWARE_NAME:=linux-firmware
-PKG_LINUX_FIRMWARE_VERSION:=375e9548bf75a5664256d47a2f9e14b79181e02d
+PKG_LINUX_FIRMWARE_VERSION:=0d6729f2b0bc6254d3628eb831bc80a36b5a17db
 PKG_LINUX_FIRMWARE_SOURCE:=$(PKG_LINUX_FIRMWARE_NAME)-$(PKG_LINUX_FIRMWARE_VERSION).tar.bz2
 PKG_LINUX_FIRMWARE_PROTO:=git
 PKG_LINUX_FIRMWARE_SOURCE:=$(PKG_LINUX_FIRMWARE_NAME)-$(PKG_LINUX_FIRMWARE_VERSION).tar.bz2
 PKG_LINUX_FIRMWARE_PROTO:=git
-# PKG_LINUX_FIRMWARE_SOURCE_URL:=git://git.infradead.org/users/dwmw2/linux-firmware.git
 PKG_LINUX_FIRMWARE_SOURCE_URL:=git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
 PKG_LINUX_FIRMWARE_SUBDIR:=$(PKG_LINUX_FIRMWARE_NAME)-$(PKG_LINUX_FIRMWARE_VERSION)
 
 PKG_LINUX_FIRMWARE_SOURCE_URL:=git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
 PKG_LINUX_FIRMWARE_SUBDIR:=$(PKG_LINUX_FIRMWARE_NAME)-$(PKG_LINUX_FIRMWARE_VERSION)
 
@@ -217,8 +215,7 @@ $(call KernelPackage/rt2x00/Default)
 endef
 
 define KernelPackage/rt2x00-lib/config
 endef
 
 define KernelPackage/rt2x00-lib/config
-       menu "Configuration"
-               depends PACKAGE_kmod-rt2x00-lib
+  if PACKAGE_kmod-rt2x00-lib
 
        config PACKAGE_RT2X00_LIB_DEBUGFS
                bool "Enable rt2x00 debugfs support"
 
        config PACKAGE_RT2X00_LIB_DEBUGFS
                bool "Enable rt2x00 debugfs support"
@@ -233,7 +230,7 @@ define KernelPackage/rt2x00-lib/config
                help
                  Enable debugging output for all rt2x00 modules
 
                help
                  Enable debugging output for all rt2x00 modules
 
-       endmenu
+  endif
 endef
 
 define KernelPackage/rt2x00-pci
 endef
 
 define KernelPackage/rt2x00-pci
@@ -365,9 +362,7 @@ define KernelPackage/zd1211rw
 endef
 
 define KernelPackage/ath/config
 endef
 
 define KernelPackage/ath/config
-       menu "Configuration"
-               depends on PACKAGE_kmod-ath
-
+  if PACKAGE_kmod-ath
        config ATH_USER_REGD
                bool "Force Atheros drivers to respect the user's regdomain settings"
                help
        config ATH_USER_REGD
                bool "Force Atheros drivers to respect the user's regdomain settings"
                help
@@ -384,8 +379,7 @@ define KernelPackage/ath/config
                help
                  Say Y, if you want to debug atheros wireless drivers.
                  Right now only ath9k makes use of this.
                help
                  Say Y, if you want to debug atheros wireless drivers.
                  Right now only ath9k makes use of this.
-
-       endmenu
+  endif
 endef
 
 define KernelPackage/ath
 endef
 
 define KernelPackage/ath
@@ -636,7 +630,7 @@ define KernelPackage/iwlagn
   DEPENDS:= +kmod-mac80211 @PCI_SUPPORT
   TITLE:=Intel AGN Wireless support
   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/iwlwifi/iwlwifi.ko
   DEPENDS:= +kmod-mac80211 @PCI_SUPPORT
   TITLE:=Intel AGN Wireless support
   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/iwlwifi/iwlwifi.ko
-  AUTOLOAD:=$(call AutoLoad,60,iwlagn)
+  AUTOLOAD:=$(call AutoLoad,60,iwlwifi)
   MENU:=1
 endef
 
   MENU:=1
 endef
 
@@ -645,66 +639,92 @@ define KernelPackage/iwlagn/description
 endef
 
 define KernelPackage/iwlagn/config
 endef
 
 define KernelPackage/iwlagn/config
-       menu "Configuration"
-               depends on PACKAGE_kmod-iwlagn
+  if PACKAGE_kmod-iwlagn
 
        config IWL5000_FW
                bool "Intel 5000 Firmware"
                default y
                help
                  Download and install firmware for:
 
        config IWL5000_FW
                bool "Intel 5000 Firmware"
                default y
                help
                  Download and install firmware for:
-                   Intel 5000 wireless card into /lib/firmware.
+                   Intel Wireless WiFi 5100AGN, 5300AGN, and 5350AGN
 
        config IWL5150_FW
                bool "Intel 5150 Firmware"
                default y
                help
                  Download and install firmware for:
 
        config IWL5150_FW
                bool "Intel 5150 Firmware"
                default y
                help
                  Download and install firmware for:
-                   Intel 5150 wireless card into /lib/firmware.
+                   Intel Wireless WiFi 5150AGN
 
        config IWL1000_FW
                bool "Intel 1000 Firmware"
                default y
                help
                  Download and install firmware for:
 
        config IWL1000_FW
                bool "Intel 1000 Firmware"
                default y
                help
                  Download and install firmware for:
-                   Intel 1000 wireless card into /lib/firmware.
+                   Intel Centrino Wireless-N 1000
 
        config IWL6000_FW
                bool "Intel 6000 Firmware"
                default y
                help
                  Download and install firmware for:
 
        config IWL6000_FW
                bool "Intel 6000 Firmware"
                default y
                help
                  Download and install firmware for:
-                   Intel 6000 wireless card into /lib/firmware.
+                   Intel Centrino Ultimate-N 6300 and Advanced-N 6200
 
        config IWL6050_FW
                bool "Intel 6050 Firmware"
                default y
                help
                  Download and install firmware for:
 
        config IWL6050_FW
                bool "Intel 6050 Firmware"
                default y
                help
                  Download and install firmware for:
-                   Intel 6050 wireless card into /lib/firmware.
+                   Intel Centrino Advanced-N + WiMAX 6250 and Wireless-N + WiMAX 6150
 
        config IWL6005_FW
                bool "Intel 6005 Firmware"
                default y
                help
                  Download and install firmware for:
 
        config IWL6005_FW
                bool "Intel 6005 Firmware"
                default y
                help
                  Download and install firmware for:
-                   Intel 6005 wireless card into /lib/firmware.
+                   Intel Centrino Advanced-N 6205
 
        config IWL6030_FW
                bool "Intel 6030 Firmware"
                default y
                help
                  Download and install firmware for:
 
        config IWL6030_FW
                bool "Intel 6030 Firmware"
                default y
                help
                  Download and install firmware for:
-                   Intel 6030 wireless card into /lib/firmware.
+                   Intel Centrino Advanced-N 6230, Wireless-N 1030, Wireless-N 130 and Advanced-N 6235
 
        config IWL100_FW
                bool "Intel 100 Firmware"
                default y
                help
                  Download and install firmware for:
 
        config IWL100_FW
                bool "Intel 100 Firmware"
                default y
                help
                  Download and install firmware for:
-                   Intel 100 wireless card into /lib/firmware.
+                   Intel Centrino Wireless-N 100
+
+       config IWL2000_FW
+               bool "Intel 2000 Firmware"
+               default y
+               help
+                 Download and install firmware for:
+                   Intel Centrino Wireless-N 2200
+
+       config IWL2030_FW
+               bool "Intel 2030 Firmware"
+               default y
+               help
+                 Download and install firmware for:
+                   Intel Centrino Wireless-N 2230
+
+       config IWL105_FW
+               bool "Intel 105 Firmware"
+               default y
+               help
+                 Download and install firmware for:
+                   Intel Centrino Wireless-N 105
 
 
-       endmenu
+       config IWL135_FW
+               bool "Intel 135 Firmware"
+               default y
+               help
+                 Download and install firmware for:
+                   Intel Centrino Wireless-N 135
+  endif
 endef
 
 define KernelPackage/iwl-legacy
 endef
 
 define KernelPackage/iwl-legacy
@@ -712,7 +732,7 @@ define KernelPackage/iwl-legacy
   DEPENDS:= +kmod-mac80211 @PCI_SUPPORT
   TITLE:=Intel legacy Wireless support
   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/iwlegacy/iwlegacy.ko
   DEPENDS:= +kmod-mac80211 @PCI_SUPPORT
   TITLE:=Intel legacy Wireless support
   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/iwlegacy/iwlegacy.ko
-  AUTOLOAD:=$(call AutoLoad,60,iwl-legacy)
+  AUTOLOAD:=$(call AutoLoad,60,iwlegacy)
 endef
 
 define KernelPackage/iwl-legacy/description
 endef
 
 define KernelPackage/iwl-legacy/description
@@ -852,8 +872,7 @@ define KernelPackage/b43
 endef
 
 define KernelPackage/b43/config
 endef
 
 define KernelPackage/b43/config
-       menu "Configuration"
-               depends on PACKAGE_kmod-b43
+  if PACKAGE_kmod-b43
 
        choice
                prompt "b43 firmware version"
 
        choice
                prompt "b43 firmware version"
@@ -999,7 +1018,7 @@ define KernelPackage/b43/config
 
                  If unsure, say N.
 
 
                  If unsure, say N.
 
-       endmenu
+  endif
 endef
 
 define KernelPackage/b43/description
 endef
 
 define KernelPackage/b43/description
@@ -1019,8 +1038,7 @@ define KernelPackage/b43legacy
 endef
 
 define KernelPackage/b43legacy/config
 endef
 
 define KernelPackage/b43legacy/config
-       menu "Configuration"
-               depends on PACKAGE_kmod-b43legacy
+  if PACKAGE_kmod-b43legacy
 
        config B43LEGACY_FW_SQUASH
                bool "Remove unnecessary firmware files"
 
        config B43LEGACY_FW_SQUASH
                bool "Remove unnecessary firmware files"
@@ -1045,7 +1063,7 @@ define KernelPackage/b43legacy/config
                  Example (keep files for rev2 and rev4):
                    2,4
 
                  Example (keep files for rev2 and rev4):
                    2,4
 
-       endmenu
+  endif
 endef
 
 define KernelPackage/b43legacy/description
 endef
 
 define KernelPackage/b43legacy/description
@@ -1068,17 +1086,23 @@ define KernelPackage/brcmutil/description
 endef
 
 define KernelPackage/brcmutil/config
 endef
 
 define KernelPackage/brcmutil/config
-       menu "Configuration"
-               depends on PACKAGE_kmod-brcmutil
+  if PACKAGE_kmod-brcmutil
 
        config PACKAGE_BRCM80211_DEBUG
                bool "Broadcom wireless driver debugging"
                help
                  Say Y, if you want to debug brcmsmac and brcmfmac wireless driver.
 
 
        config PACKAGE_BRCM80211_DEBUG
                bool "Broadcom wireless driver debugging"
                help
                  Say Y, if you want to debug brcmsmac and brcmfmac wireless driver.
 
-       endmenu
+  endif
 endef
 
 endef
 
+PKG_BRCMSMAC_FW_NAME:=broadcom-wl
+PKG_BRCMSMAC_FW_VERSION:=5.100.138
+PKG_BRCMSMAC_FW_OBJECT:=$(PKG_BRCMSMAC_FW_NAME)-$(PKG_BRCMSMAC_FW_VERSION)/linux/wl_apsta.o
+PKG_BRCMSMAC_FW_SOURCE:=$(PKG_BRCMSMAC_FW_NAME)-$(PKG_BRCMSMAC_FW_VERSION).tar.bz2
+PKG_BRCMSMAC_FW_SOURCE_URL:=http://www.lwfinger.com/b43-firmware/
+PKG_BRCMSMAC_FW_MD5SUM:=f4e357b09eaf5d8b1f1920cf3493a555
+
 define KernelPackage/brcmsmac
   $(call KernelPackage/mac80211/Default)
   TITLE:=Broadcom IEEE802.11n PCIe SoftMAC WLAN driver
 define KernelPackage/brcmsmac
   $(call KernelPackage/mac80211/Default)
   TITLE:=Broadcom IEEE802.11n PCIe SoftMAC WLAN driver
@@ -1086,12 +1110,31 @@ define KernelPackage/brcmsmac
   DEPENDS+= +kmod-mac80211 +@DRIVER_11N_SUPPORT +!TARGET_brcm47xx:kmod-bcma +kmod-lib-cordic +kmod-lib-crc8 +kmod-brcmutil
   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/brcm80211/brcmsmac/brcmsmac.ko
   AUTOLOAD:=$(call AutoLoad,31,brcmsmac)
   DEPENDS+= +kmod-mac80211 +@DRIVER_11N_SUPPORT +!TARGET_brcm47xx:kmod-bcma +kmod-lib-cordic +kmod-lib-crc8 +kmod-brcmutil
   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/brcm80211/brcmsmac/brcmsmac.ko
   AUTOLOAD:=$(call AutoLoad,31,brcmsmac)
+  MENU:=1
 endef
 
 define KernelPackage/brcmsmac/description
  Kernel module for Broadcom IEEE802.11n PCIe Wireless cards
 endef
 
 endef
 
 define KernelPackage/brcmsmac/description
  Kernel module for Broadcom IEEE802.11n PCIe Wireless cards
 endef
 
+define KernelPackage/brcmsmac/config
+  if PACKAGE_kmod-brcmsmac
+
+       config BRCMSMAC_USE_FW_FROM_WL
+               bool "Use firmware extracted from broadcom proprietary driver"
+               default y
+               help
+                 Instead of using the official brcmsmac firmware a firmware
+                 version 666.2 extracted from the proprietary Broadcom driver
+                 is used. This is needed to get core rev 17 used in bcm4716
+                 to work.
+
+                 If unsure, say Y.
+
+  endif
+endef
+
+
 define KernelPackage/brcmfmac
   $(call KernelPackage/mac80211/Default)
   TITLE:=Broadcom IEEE802.11n USB FullMAC WLAN driver
 define KernelPackage/brcmfmac
   $(call KernelPackage/mac80211/Default)
   TITLE:=Broadcom IEEE802.11n USB FullMAC WLAN driver
@@ -1343,7 +1386,6 @@ define KernelPackage/libertas-usb/install
        $(INSTALL_DIR) $(1)/lib/firmware
        $(INSTALL_DATA) \
                $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/usb8388_v9.bin \
        $(INSTALL_DIR) $(1)/lib/firmware
        $(INSTALL_DATA) \
                $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/usb8388_v9.bin \
-               $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/usb8388_v5.bin \
                $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/usb8682.bin \
                $(1)/lib/firmware/
 endef
                $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/usb8682.bin \
                $(1)/lib/firmware/
 endef
@@ -1355,8 +1397,6 @@ define KernelPackage/libertas-sd/install
                $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/sd8385.bin \
                $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/sd8686_v9_helper.bin \
                $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/sd8686_v9.bin \
                $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/sd8385.bin \
                $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/sd8686_v9_helper.bin \
                $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/sd8686_v9.bin \
-               $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/sd8686_v8_helper.bin \
-               $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/sd8686_v8.bin \
                $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/sd8688_helper.bin \
                $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/sd8688.bin \
                $(1)/lib/firmware/libertas
                $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/sd8688_helper.bin \
                $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/sd8688.bin \
                $(1)/lib/firmware/libertas
@@ -1398,7 +1438,10 @@ endef
 
 define KernelPackage/rt2800-pci/install
        $(INSTALL_DIR) $(1)/lib/firmware
 
 define KernelPackage/rt2800-pci/install
        $(INSTALL_DIR) $(1)/lib/firmware
-       $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rt2860.bin $(1)/lib/firmware/
+       $(INSTALL_DATA) \
+               $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rt2860.bin \
+               $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rt3290.bin \
+               $(1)/lib/firmware
 endef
 
 define KernelPackage/rt2800-usb/install
 endef
 
 define KernelPackage/rt2800-usb/install
@@ -1409,9 +1452,9 @@ endef
 define KernelPackage/wl12xx/install
        $(INSTALL_DIR) $(1)/lib/firmware/ti-connectivity
        $(INSTALL_DATA) \
 define KernelPackage/wl12xx/install
        $(INSTALL_DIR) $(1)/lib/firmware/ti-connectivity
        $(INSTALL_DATA) \
-               $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ti-connectivity/wl127x-fw-4-mr.bin \
-               $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ti-connectivity/wl127x-fw-4-plt.bin \
-               $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ti-connectivity/wl127x-fw-4-sr.bin \
+               $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ti-connectivity/wl127x-fw-5-mr.bin \
+               $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ti-connectivity/wl127x-fw-5-plt.bin \
+               $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ti-connectivity/wl127x-fw-5-sr.bin \
                $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ti-connectivity/wl1271-nvs.bin \
                $(1)/lib/firmware/ti-connectivity
 endef
                $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ti-connectivity/wl1271-nvs.bin \
                $(1)/lib/firmware/ti-connectivity
 endef
@@ -1469,14 +1512,26 @@ ifneq ($(CONFIG_IWL6050_FW),)
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-6050-5.ucode $(1)/lib/firmware
 endif
 ifneq ($(CONFIG_IWL6005_FW),)
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-6050-5.ucode $(1)/lib/firmware
 endif
 ifneq ($(CONFIG_IWL6005_FW),)
-       $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-6000g2a-5.ucode $(1)/lib/firmware
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-6000g2a-6.ucode $(1)/lib/firmware
 endif
 ifneq ($(CONFIG_IWL6030_FW),)
 endif
 ifneq ($(CONFIG_IWL6030_FW),)
-       $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-6000g2b-5.ucode $(1)/lib/firmware
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-6000g2b-6.ucode $(1)/lib/firmware
 endif
 ifneq ($(CONFIG_IWL100_FW),)
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-100-5.ucode $(1)/lib/firmware
 endif
 endif
 ifneq ($(CONFIG_IWL100_FW),)
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-100-5.ucode $(1)/lib/firmware
 endif
+ifneq ($(CONFIG_IWL2000_FW),)
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-2000-6.ucode $(1)/lib/firmware
+endif
+ifneq ($(CONFIG_IWL2030_FW),)
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-2030-6.ucode $(1)/lib/firmware
+endif
+ifneq ($(CONFIG_IWL105_FW),)
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-105-6.ucode $(1)/lib/firmware
+endif
+ifneq ($(CONFIG_IWL135_FW),)
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-135-6.ucode $(1)/lib/firmware
+endif
 endef
 
 define KernelPackage/iwl3945/install
 endef
 
 define KernelPackage/iwl3945/install
@@ -1521,10 +1576,15 @@ endef
 
 define KernelPackage/brcmsmac/install
        $(INSTALL_DIR) $(1)/lib/firmware/brcm
 
 define KernelPackage/brcmsmac/install
        $(INSTALL_DIR) $(1)/lib/firmware/brcm
+ifeq ($(CONFIG_BRCMSMAC_USE_FW_FROM_WL),y)
+       tar xjf "$(DL_DIR)/$(PKG_BRCMSMAC_FW_SOURCE)" -C "$(PKG_BUILD_DIR)"
+       b43-fwcutter --brcmsmac -w $(1)/lib/firmware/ $(PKG_BUILD_DIR)/$(PKG_BRCMSMAC_FW_OBJECT)
+else
        $(INSTALL_DATA) \
                $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/bcm43xx-0.fw \
                $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/bcm43xx_hdr-0.fw \
                $(1)/lib/firmware/brcm/
        $(INSTALL_DATA) \
                $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/bcm43xx-0.fw \
                $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/bcm43xx_hdr-0.fw \
                $(1)/lib/firmware/brcm/
+endif
 endef
 
 define KernelPackage/brcmfmac/install
 endef
 
 define KernelPackage/brcmfmac/install