mac80211: add initial support for AR9330
[openwrt/svn-archive/archive.git] / package / mac80211 / Makefile
index 1201b7f6a6381ca8c40a8c25e0ec08820886d710..9032d4b30bbf6b63ecaeb22aff37b389771a5ba2 100644 (file)
@@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=mac80211
 
-PKG_VERSION:=2011-04-06
-PKG_RELEASE:=3
+PKG_VERSION:=2011-05-27
+PKG_RELEASE:=2
 PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
-PKG_MD5SUM:=7ef8c2d9ee25af7ed33cf339f2484249
+PKG_MD5SUM:=3a382b03333aff304dbe8ee94fce6b5a
 
 PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
@@ -35,6 +35,7 @@ PKG_CONFIG_DEPENDS:= \
        CONFIG_PACKAGE_ATH_DEBUG \
        CONFIG_PACKAGE_B43_DEBUG \
        CONFIG_PACKAGE_B43_PIO \
+       CONFIG_PACKAGE_B43_N_PHY \
        CONFIG_ATH_USER_REGD \
 
 CARL9170_FW_VERSION:=1.9.2
@@ -415,7 +416,7 @@ endef
 define KernelPackage/ath
   $(call KernelPackage/mac80211/Default)
   TITLE:=Atheros common driver part
-  DEPENDS+= @PCI_SUPPORT||@USB_SUPPORT +kmod-mac80211
+  DEPENDS+= @PCI_SUPPORT||USB_SUPPORT||TARGET_ar71xx +kmod-mac80211
   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath.ko
   AUTOLOAD:=$(call AutoLoad,26,ath)
   MENU:=1
@@ -443,7 +444,7 @@ define KernelPackage/ath9k-common
   $(call KernelPackage/mac80211/Default)
   TITLE:=Atheros 802.11n wireless devices (common code for ath9k and ath9k_htc)
   URL:=http://linuxwireless.org/en/users/Drivers/ath9k
-  DEPENDS+= @PCI_SUPPORT +kmod-ath +@DRIVER_11N_SUPPORT
+  DEPENDS+= @PCI_SUPPORT||TARGET_ar71xx +kmod-ath +@DRIVER_11N_SUPPORT
   FILES:= \
        $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k_common.ko \
        $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k_hw.ko
@@ -454,7 +455,7 @@ define KernelPackage/ath9k
   $(call KernelPackage/mac80211/Default)
   TITLE:=Atheros 802.11n PCI wireless cards support
   URL:=http://linuxwireless.org/en/users/Drivers/ath9k
-  DEPENDS+= @PCI_SUPPORT +kmod-ath9k-common
+  DEPENDS+= @PCI_SUPPORT||TARGET_ar71xx +kmod-ath9k-common
   FILES:= \
        $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k.ko
   AUTOLOAD:=$(call AutoLoad,28,ath9k)
@@ -1082,7 +1083,8 @@ 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,13,14,15"
+               default "5,6,7,8,9,10,11,13,14,15,16" if PACKAGE_B43_PHY_N
+               default "5,6,7,8,9,10,13,14,15" if !PACKAGE_B43_PHY_N
                help
                  This is a comma seperated list of core revision numbers.
 
@@ -1095,7 +1097,8 @@ define KernelPackage/b43/config
        config B43_FW_SQUASH_PHYTYPES
                string "PHY types to include"
                depends on B43_FW_SQUASH
-               default "G,LP"
+               default "G,LP,N" if PACKAGE_B43_PHY_N
+               default "G,LP" if !PACKAGE_B43_PHY_N
                help
                  This is a comma seperated list of PHY types:
                    A  => A-PHY
@@ -1128,6 +1131,17 @@ define KernelPackage/b43/config
 
                  If unsure, say N.
 
+       config PACKAGE_B43_PHY_N
+               bool "Enable support for N-PHYs"
+               select B43_FW_5_10
+               default n
+               help
+                 Enable support for BCM4321 and BCM4322.
+
+                 Currently only 11g speed is available.
+
+                 If unsure, say N.
+
        endmenu
 endef
 
@@ -1183,6 +1197,8 @@ BUILDFLAGS:= \
        $(if $(CONFIG_PCI),-DCONFIG_B43_PCI_AUTOSELECT -DCONFIG_B43_PCICORE_AUTOSELECT) \
        $(if $(CONFIG_LEDS_TRIGGERS), -DCONFIG_MAC80211_LEDS -DCONFIG_LEDS_TRIGGERS -DCONFIG_B43_LEDS -DCONFIG_B43LEGACY_LEDS -DCONFIG_AR9170_LEDS) \
        -DCONFIG_B43_HWRNG -DCONFIG_B43LEGACY_HWRNG \
+       $(if $(CONFIG_PCI),-DCONFIG_ATH9K_PCI) \
+       $(if $(CONFIG_TARGET_ar71xx),-DCONFIG_ATH9K_AHB) \
        $(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),-DCONFIG_MAC80211_DEBUGFS -DCONFIG_ATH9K_DEBUGFS -DCONFIG_CARL9170_DEBUGFS -DCONFIG_ATH9K_HTC_DEBUGFS -DCONFIG_ATH5K_DEBUG) \
        $(if $(CONFIG_PACKAGE_ATH_DEBUG),-DCONFIG_ATH_DEBUG -DCONFIG_ATH9K_PKTLOG) \
        -D__CONFIG_MAC80211_RC_DEFAULT=minstrel \
@@ -1190,6 +1206,7 @@ BUILDFLAGS:= \
        $(if $(CONFIG_ATH_USER_REGD),-DATH_USER_REGD=1) \
        $(if $(CONFIG_PACKAGE_B43_DEBUG),-DCONFIG_B43_DEBUG) \
        $(if $(CONFIG_PACKAGE_B43_PIO),-DCONFIG_B43_PIO) \
+       $(if $(CONFIG_PACKAGE_B43_PHY_N),-DCONFIG_B43_PHY_N) \
        $(if $(CONFIG_PACKAGE_RT2X00_LIB_DEBUGFS),-DCONFIG_RT2X00_LIB_DEBUGFS) \
        $(if $(CONFIG_PACKAGE_RT2X00_DEBUG),-DCONFIG_RT2X00_DEBUG) \
        $(if $(NEED_RT2X00_LIB_HT),-DCONFIG_RT2X00_LIB_HT) \
@@ -1223,15 +1240,18 @@ MAKE_OPTS:= \
        CONFIG_B43LEGACY=$(if $(CONFIG_PACKAGE_kmod-b43legacy),m) \
        CONFIG_B43_DEBUG=$(if $(CONFIG_PACKAGE_B43_DEBUG),y) \
        CONFIG_B43_PIO=$(if $(CONFIG_PACKAGE_B43_PIO),y) \
+       CONFIG_B43_PHY_N=$(if $(CONFIG_PACKAGE_B43_PHY_N),y) \
        CONFIG_ATH_COMMON=$(if $(CONFIG_PACKAGE_kmod-ath),m) \
        CONFIG_ATH_DEBUG=$(if $(CONFIG_PACKAGE_ATH_DEBUG),y) \
-       CONFIG_ATH5K_DEBUG=$(if $(CONFIG_PACKAGE_ATH_DEBUG),y) \
+       CONFIG_ATH5K_DEBUG=$(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),y) \
        CONFIG_ATH9K_PKTLOG=$(if $(CONFIG_PACKAGE_ATH_DEBUG),y) \
        CONFIG_ATH5K=$(if $(CONFIG_PACKAGE_kmod-ath5k),m) \
        CONFIG_ATH5K_PCI=$(if $(CONFIG_TARGET_atheros),,y) \
        CONFIG_ATH5K_AHB=$(if $(CONFIG_TARGET_atheros),y) \
        CONFIG_ATH5K_DEBUG=$(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),y) \
        CONFIG_ATH9K=$(if $(CONFIG_PACKAGE_kmod-ath9k),m) \
+       CONFIG_ATH9K_PCI=$(CONFIG_PCI) \
+       CONFIG_ATH9K_AHB=$(if $(CONFIG_TARGET_ar71xx),y) \
        CONFIG_ATH9K_HTC=$(if $(CONFIG_PACKAGE_kmod-ath9k-htc),m) \
        CONFIG_ATH9K_HW=$(if $(CONFIG_PACKAGE_kmod-ath9k-common),m) \
        CONFIG_ATH9K_COMMON=$(if $(CONFIG_PACKAGE_kmod-ath9k-common),m) \
@@ -1348,7 +1368,6 @@ define Build/Prepare
        $(TAR) -C $(PKG_BUILD_DIR) -xjf $(DL_DIR)/$(ZD1211FW_NAME)-$(ZD1211FW_VERSION).tar.bz2
        rm -rf $(PKG_BUILD_DIR)/include/linux/ssb
        rm -f $(PKG_BUILD_DIR)/include/net/ieee80211.h
-       rm $(PKG_BUILD_DIR)/include/linux/eeprom_93cx6.h
 endef
 
 ifneq ($(CONFIG_PACKAGE_kmod-cfg80211),)