mac80211: b43: add support for firmware 784.2
[openwrt/openwrt.git] / package / kernel / mac80211 / Makefile
index 558618412f64f40d00698bfeb595e94d398eb6e4..20da959238b28c3acaf20595a6919b4b90fa8af0 100644 (file)
@@ -10,11 +10,11 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=mac80211
 
-PKG_VERSION:=2014-01-23.1
-PKG_RELEASE:=3
+PKG_VERSION:=2014-05-22
+PKG_RELEASE:=1
 PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
 PKG_BACKPORT_VERSION:=
-PKG_MD5SUM:=8db16edbdaf4abc2e9c2f3b6c86736a6
+PKG_MD5SUM:=367937d4f8c05cb36ca989ee26abc3df
 
 PKG_SOURCE:=compat-wireless-$(PKG_VERSION)$(PKG_BACKPORT_VERSION).tar.bz2
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
@@ -39,6 +39,7 @@ PKG_CONFIG_DEPENDS:= \
        CONFIG_PACKAGE_MAC80211_DEBUGFS \
        CONFIG_PACKAGE_MAC80211_MESH \
        CONFIG_PACKAGE_ATH_DEBUG \
+       CONFIG_PACKAGE_ATH_DFS \
        CONFIG_PACKAGE_B43_DEBUG \
        CONFIG_PACKAGE_B43_PIO \
        CONFIG_PACKAGE_B43_N_PHY \
@@ -103,12 +104,12 @@ Generic IEEE 802.11 Networking Stack (mac80211)
 endef
 
 PKG_LINUX_FIRMWARE_NAME:=linux-firmware
-PKG_LINUX_FIRMWARE_VERSION:=f8c22c692bdee57a20b092e647464ff6176df3ed
-PKG_LINUX_FIRMWARE_SOURCE:=$(PKG_LINUX_FIRMWARE_NAME)-$(PKG_LINUX_FIRMWARE_VERSION).tar.bz2
+PKG_LINUX_FIRMWARE_VERSION:=7f388b4885cf64d6b7833612052d20d4197af96f
+PKG_LINUX_FIRMWARE_SOURCE:=$(PKG_LINUX_FIRMWARE_NAME)-2014-06-04-$(PKG_LINUX_FIRMWARE_VERSION).tar.bz2
 PKG_LINUX_FIRMWARE_PROTO:=git
-PKG_LINUX_FIRMWARE_SOURCE_URL:=git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
+PKG_LINUX_FIRMWARE_SOURCE_URL:=https://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_MIRROR_MD5SUM:=e219333f01835c6e556875a9e0deb3f9
+#PKG_LINUX_FIRMWARE_MIRROR_MD5SUM:=e219333f01835c6e556875a9e0deb3f9
 
 define Download/linux-firmware
   FILE:=$(PKG_LINUX_FIRMWARE_SOURCE)
@@ -321,7 +322,7 @@ endef
 
 define KernelPackage/rt2800-soc
 $(call KernelPackage/rt2x00/Default)
-  DEPENDS += @(TARGET_ramips_rt288x||TARGET_ramips_rt305x) +kmod-rt2800-mmio +kmod-rt2800-lib
+  DEPENDS += @(TARGET_ramips_rt288x||TARGET_ramips_rt305x||TARGET_ramips_rt3883||TARGET_ramips_mt7620n||TARGET_ramips_mt7620a) +kmod-rt2800-mmio +kmod-rt2800-lib
   TITLE += (RT28xx/RT3xxx SoC)
   FILES := \
        $(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00soc.ko \
@@ -356,8 +357,8 @@ define KernelPackage/rtl8180
   $(call KernelPackage/rtl818x/Default)
   DEPENDS+= @PCI_SUPPORT
   TITLE+= (RTL8180 PCI)
-  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rtl818x/rtl8180/rtl8180.ko
-  AUTOLOAD:=$(call AutoProbe,rtl8180)
+  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rtl818x/rtl8180/rtl818x_pci.ko
+  AUTOLOAD:=$(call AutoProbe,rtl818x_pci)
 endef
 
 define KernelPackage/rtl8187
@@ -369,15 +370,12 @@ $(call KernelPackage/rtl818x/Default)
 endef
 
 define KernelPackage/rtlwifi/config
-       menu "Configuration"
-               depends on PACKAGE_kmod-rtlwifi
-
        config PACKAGE_RTLWIFI_DEBUG
                bool "Realtek wireless debugging"
+               depends on PACKAGE_kmod-rtlwifi
                help
                  Say Y, if you want to debug realtek wireless drivers.
 
-       endmenu
 endef
 
 define KernelPackage/rtlwifi
@@ -385,7 +383,7 @@ define KernelPackage/rtlwifi
   TITLE:=Realtek common driver part
   DEPENDS+= @(PCI_SUPPORT||USB_SUPPORT) +kmod-mac80211 +@DRIVER_11N_SUPPORT
   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rtlwifi/rtlwifi.ko
-  MENU:=1
+  HIDDEN:=1
 endef
 
 define KernelPackage/rtlwifi-pci
@@ -425,6 +423,8 @@ endef
 define KernelPackage/rtl8192ce/install
        $(INSTALL_DIR) $(1)/lib/firmware/rtlwifi
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rtlwifi/rtl8192cfw.bin $(1)/lib/firmware/rtlwifi
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rtlwifi/rtl8192cfwU.bin $(1)/lib/firmware/rtlwifi
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rtlwifi/rtl8192cfwU_B.bin $(1)/lib/firmware/rtlwifi
 endef
 
 define KernelPackage/rtl8192se
@@ -464,6 +464,9 @@ endef
 define KernelPackage/rtl8192cu/install
        $(INSTALL_DIR) $(1)/lib/firmware/rtlwifi
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rtlwifi/rtl8192cufw.bin $(1)/lib/firmware/rtlwifi
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rtlwifi/rtl8192cufw_A.bin $(1)/lib/firmware/rtlwifi
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rtlwifi/rtl8192cufw_B.bin $(1)/lib/firmware/rtlwifi
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rtlwifi/rtl8192cufw_TMSC.bin $(1)/lib/firmware/rtlwifi
 endef
 
 ZD1211FW_NAME:=zd1211-firmware
@@ -509,6 +512,16 @@ define KernelPackage/ath/config
                help
                  Say Y, if you want to debug atheros wireless drivers.
                  Right now only ath9k makes use of this.
+
+       config PACKAGE_ATH_DFS
+               bool "Enable DFS support"
+               help
+                 Dynamic frequency selection (DFS) is required for most of the 5 GHz band
+                 channels in Europe, US, and Japan.
+
+                 Select this option if you want to use such channels. Only EU (ETSI) DFS
+                 is supported at the moment.
+
   endif
 endef
 
@@ -563,6 +576,14 @@ This module adds support for wireless adapters based on
 Atheros IEEE 802.11n AR5008 and AR9001 family of chipsets.
 endef
 
+define KernelPackage/ath9k/config
+
+       config ATH9K_SUPPORT_PCOEM
+               bool "Support chips used in PC OEM cards"
+               depends on PACKAGE_kmod-ath9k
+       
+endef
+
 define KernelPackage/ath9k-htc
   $(call KernelPackage/mac80211/Default)
   TITLE:=Atheros 802.11n USB device support
@@ -846,6 +867,20 @@ define KernelPackage/iwlagn/config
                  Download and install firmware for:
                    Intel Centrino Advanced-N 6230, Wireless-N 1030, Wireless-N 130 and Advanced-N 6235
 
+       config IWL7260_FW
+               bool "Intel 7260 Firmware"
+               default y
+               help
+                 Download and install firmware for:
+                   Intel Dual Band Wireless-N 7260 and Intel Dual Band Wireless-AC 7260
+
+       config IWL7265_FW
+               bool "Intel 7265 Firmware"
+               default y
+               help
+                 Download and install firmware for:
+                   Intel Wireless 7265
+
        config IWL100_FW
                bool "Intel 100 Firmware"
                default y
@@ -880,6 +915,13 @@ define KernelPackage/iwlagn/config
                help
                  Download and install firmware for:
                    Intel Centrino Wireless-N 135
+
+       config IWL3160_FW
+               bool "Intel 3160 Firmware"
+               default y
+               help
+                 Download and install firmware for:
+                   Intel Wireless 3160
   endif
 endef
 
@@ -976,6 +1018,14 @@ endef
 
 
 #Broadcom firmware
+ifneq ($(CONFIG_B43_FW_6_30),)
+  PKG_B43_FWV4_NAME:=broadcom-wl
+  PKG_B43_FWV4_VERSION:=6.30.163.46
+  PKG_B43_FWV4_OBJECT:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION).wl_apsta.o
+  PKG_B43_FWV4_SOURCE:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION).tar.bz2
+  PKG_B43_FWV4_SOURCE_URL:=http://www.lwfinger.com/b43-firmware/
+  PKG_B43_FWV4_MD5SUM:=6fe97e9368d25342a1ab943d3cf3496d
+else
 ifneq ($(CONFIG_B43_FW_5_10),)
   PKG_B43_FWV4_NAME:=broadcom-wl
   PKG_B43_FWV4_VERSION:=5.10.56.27.3
@@ -1009,6 +1059,7 @@ else
 endif
 endif
 endif
+endif
 ifneq ($(CONFIG_B43_OPENFIRMWARE),)
   PKG_B43_FWV4_NAME:=broadcom-wl
   PKG_B43_FWV4_VERSION:=5.2
@@ -1046,13 +1097,32 @@ define KernelPackage/b43
   URL:=http://linuxwireless.org/en/users/Drivers/b43
   KCONFIG:= \
        CONFIG_HW_RANDOM=y
-  DEPENDS+= +kmod-mac80211 +!TARGET_brcm47xx:kmod-bcma +!(TARGET_brcm47xx||TARGET_brcm63xx):kmod-ssb
+  # Depend on PCI_SUPPORT to make sure we can select kmod-bcma or kmod-ssb
+  DEPENDS += \
+       @PCI_SUPPORT +kmod-mac80211 \
+       $(if $(CONFIG_PACKAGE_B43_USE_SSB),+kmod-ssb) \
+       $(if $(CONFIG_PACKAGE_B43_USE_BCMA),+kmod-bcma)
   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/b43/b43.ko
   AUTOLOAD:=$(call AutoProbe,b43)
   MENU:=1
 endef
 
 define KernelPackage/b43/config
+
+config PACKAGE_B43_USE_SSB
+       select PACKAGE_kmod-ssb
+       tristate
+       depends on !TARGET_brcm47xx && !TARGET_brcm63xx
+       default PACKAGE_kmod-b43 if PACKAGE_B43_BUSES_BCMA_AND_SSB
+       default PACKAGE_kmod-b43 if PACKAGE_B43_BUSES_SSB
+
+config PACKAGE_B43_USE_BCMA
+       select PACKAGE_kmod-bcma
+       tristate
+       depends on !TARGET_brcm47xx
+       default PACKAGE_kmod-b43 if PACKAGE_B43_BUSES_BCMA_AND_SSB
+       default PACKAGE_kmod-b43 if PACKAGE_B43_BUSES_BCMA
+
   if PACKAGE_kmod-b43
 
        choice
@@ -1064,34 +1134,39 @@ define KernelPackage/b43/config
        config B43_FW_4_150
                bool "Firmware 410.2160 from driver 4.150.10.5 (old stable)"
                help
-                 Stable firmware for BCM43xx devices.
+                 Old stable firmware for BCM43xx devices.
 
                  If unsure, select this.
 
        config B43_FW_4_178
                bool "Firmware 478.104 from driver 4.178.10.4"
                help
-                 Experimental firmware for BCM43xx devices.
-
-                 This firmware is not tested as much as the "stable" firmware.
+                 Older firmware for BCM43xx devices.
 
                  If unsure, select the "stable" firmware.
 
        config B43_FW_5_10
                bool "Firmware 508.1084 from driver 5.10.56.27"
                help
-                 Newer experimental firmware for BCM43xx devices.
-
-                 This firmware is mostly untested. It is needed for some N-PHY devices.
+                 Older firmware for BCM43xx devices.
 
                  If unsure, select the "stable" firmware.
 
        config B43_FW_5_100_138
                bool "Firmware 666.2 from driver 5.100.138 (stable)"
+               help
+                 The currently default firmware for BCM43xx devices.
+
+                 This firmware currently gets most of the testing and is needed for some N-PHY devices.
+
+                 If unsure, select the this firmware.
+
+       config B43_FW_6_30
+               bool "Firmware 784.2 from driver 6.30.163.46 (experimental)"
                help
                  Newer experimental firmware for BCM43xx devices.
 
-                 This firmware is mostly untested. It is needed for some N-PHY devices.
+                 This firmware is mostly untested.
 
                  If unsure, select the "stable" firmware.
 
@@ -1124,6 +1199,7 @@ define KernelPackage/b43/config
        config B43_FW_SQUASH_COREREVS
                string "Core revisions to include"
                depends on B43_FW_SQUASH
+               default "5,6,7,8,9,10,11,13,15" if TARGET_brcm47xx_legacy
                default "5,6,7,8,9,10,11,13,15,16,29"
                help
                  This is a comma seperated list of core revision numbers.
@@ -1137,6 +1213,7 @@ define KernelPackage/b43/config
        config B43_FW_SQUASH_PHYTYPES
                string "PHY types to include"
                depends on B43_FW_SQUASH
+               default "G,LP" if TARGET_brcm47xx_legacy
                default "G,LP,N,HT"
                help
                  This is a comma seperated list of PHY types:
@@ -1154,6 +1231,25 @@ define KernelPackage/b43/config
                  Example (keep files for G-PHY and N-PHY):
                    G,N
 
+       choice
+               prompt "Supported buses"
+               default PACKAGE_B43_BUSES_BCMA_AND_SSB
+               help
+                 This allows choosing buses that b43 should support.
+
+       config PACKAGE_B43_BUSES_BCMA_AND_SSB
+               depends on !TARGET_brcm47xx_legacy
+               bool "BCMA and SSB"
+
+       config PACKAGE_B43_BUSES_BCMA
+               depends on !TARGET_brcm47xx_legacy
+               bool "BCMA only"
+
+       config PACKAGE_B43_BUSES_SSB
+               bool "SSB only"
+
+       endchoice
+
        config PACKAGE_B43_DEBUG
                bool "Enable debug output and debugfs for b43"
                default n
@@ -1174,6 +1270,7 @@ define KernelPackage/b43/config
 
        config PACKAGE_B43_PHY_N
                bool "Enable support for N-PHYs"
+               default n if TARGET_brcm47xx_legacy
                default y
                help
                  Enable support for N-PHY. This includes support for the following devices:
@@ -1184,8 +1281,19 @@ define KernelPackage/b43/config
 
                  If unsure, say Y.
 
+       config PACKAGE_B43_PHY_LP
+               bool "Enable support for LP-PHYs"
+               default y
+               help
+                 Enable support for LP-PHY. This includes support for the following devices:
+                 PCI: BCM4312
+                 SoC: BCM5354
+
+                 If unsure, say Y.
+
        config PACKAGE_B43_PHY_HT
                bool "Enable support for HT-PHYs"
+               default n if TARGET_brcm47xx_legacy
                default y
                help
                  Enable support for HT-PHY. This includes support for the following devices:
@@ -1348,6 +1456,7 @@ config-y:= \
        NL80211_TESTMODE \
        CFG80211_WEXT \
        CFG80211_INTERNAL_REGDB \
+       CFG80211_CERTIFICATION_ONUS \
        MAC80211_RC_MINSTREL \
        MAC80211_RC_MINSTREL_HT \
        MAC80211_RC_DEFAULT_MINSTREL \
@@ -1371,12 +1480,14 @@ config-$(call config_package,lib80211) += LIB80211 LIB80211_CRYPT_WEP LIB80211_C
 
 config-$(call config_package,ath) += ATH_CARDS ATH_COMMON
 config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG
+config-$(CONFIG_PACKAGE_ATH_DFS) += ATH9K_DFS_CERTIFIED ATH10K_DFS_CERTIFIED
 
 config-$(call config_package,ath9k) += ATH9K
 config-$(call config_package,ath9k-common) += ATH9K_COMMON
 config-$(CONFIG_TARGET_ar71xx) += ATH9K_AHB
 config-$(CONFIG_PCI) += ATH9K_PCI
 config-$(CONFIG_ATH_USER_REGD) += ATH_USER_REGD
+config-$(CONFIG_ATH9K_SUPPORT_PCOEM) += ATH9K_PCOEM
 
 config-$(call config_package,ath9k-htc) += ATH9K_HTC
 config-$(call config_package,ath10k) += ATH10K ATH10K_PCI
@@ -1391,8 +1502,11 @@ endif
 config-$(call config_package,carl9170) += CARL9170
 
 config-$(call config_package,b43) += B43
-config-y += B43_SSB B43_BCMA B43_PHY_LP
+config-$(CONFIG_PACKAGE_B43_BUSES_BCMA_AND_SSB) += B43_BUSES_BCMA_AND_SSB
+config-$(CONFIG_PACKAGE_B43_BUSES_BCMA) += B43_BUSES_BCMA
+config-$(CONFIG_PACKAGE_B43_BUSES_SSB) += B43_BUSES_SSB
 config-$(CONFIG_PACKAGE_B43_PHY_N) += B43_PHY_N
+config-$(CONFIG_PACKAGE_B43_PHY_LP) += B43_PHY_LP
 config-$(CONFIG_PACKAGE_B43_PHY_HT) += B43_PHY_HT
 config-$(CONFIG_PACKAGE_B43_PIO) += B43_PIO
 config-$(CONFIG_PACKAGE_B43_DEBUG) += B43_DEBUG
@@ -1725,6 +1839,12 @@ endif
 ifneq ($(CONFIG_IWL6030_FW),)
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-6000g2b-6.ucode $(1)/lib/firmware
 endif
+ifneq ($(CONFIG_IWL7260_FW),)
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-7260-9.ucode $(1)/lib/firmware
+endif
+ifneq ($(CONFIG_IWL7265_FW),)
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-7265-9.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
@@ -1740,6 +1860,9 @@ endif
 ifneq ($(CONFIG_IWL135_FW),)
        $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-135-6.ucode $(1)/lib/firmware
 endif
+ifneq ($(CONFIG_IWL3160_FW),)
+       $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-3160-9.ucode $(1)/lib/firmware
+endif
 endef
 
 define KernelPackage/iwl3945/install
@@ -1800,6 +1923,9 @@ define KernelPackage/brcmfmac/install
        $(INSTALL_DATA) \
                $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43236b.bin \
                $(1)/lib/firmware/brcm/
+       $(INSTALL_DATA) \
+               $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43143.bin \
+               $(1)/lib/firmware/brcm/
 endef
 
 $(eval $(call KernelPackage,adm8211))