+define KernelPackage/ath9k
+ $(call KernelPackage/mac80211/Default)
+ TITLE:=Atheros 802.11n wireless cards support
+ URL:=http://linuxwireless.org/en/users/Drivers/ath9k
+ DEPENDS+= @PCI_SUPPORT +kmod-mac80211 @!LINUX_2_6_21||!LINUX_2_6_23||!LINUX_2_6_24||!LINUX_2_6_25||!LINUX_2_6_26
+ FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath9k/ath9k.$(LINUX_KMOD_SUFFIX)
+ AUTOLOAD:=$(call AutoLoad,27,ath9k)
+endef
+
+define KernelPackage/ath9k/description
+This module adds support for wireless adapters based on
+Atheros IEEE 802.11n AR5008 and AR9001 family of chipsets.
+endef
+
+define KernelPackage/mac80211-hwsim
+ $(call KernelPackage/mac80211/Default)
+ TITLE:=mac80211 HW simulation device
+ DEPENDS+= +kmod-mac80211
+ FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/mac80211_hwsim.$(LINUX_KMOD_SUFFIX)
+ AUTOLOAD:=$(call AutoLoad,60,mac80211_hwsim)
+endef
+
+#Broadcom firmware
+ifneq ($(CONFIG_B43_EXPERIMENTAL),)
+ PKG_B43_FWV4_NAME:=broadcom-wl
+ PKG_B43_FWV4_VERSION:=4.178.10.4
+ PKG_B43_FWV4_OBJECT:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION)/linux/wl.o
+ PKG_B43_FWV4_SOURCE:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION).tar.bz2
+ PKG_B43_FWV4_SOURCE_URL:=http://mirror2.openwrt.org/sources/
+ PKG_B43_FWV4_MD5SUM:=14477e8cbbb91b11896affac9b219fdb
+else
+ PKG_B43_FWV4_NAME:=broadcom-wl
+ PKG_B43_FWV4_VERSION:=4.150.10.5
+ PKG_B43_FWV4_OBJECT:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION)/driver/wl_apsta_mimo.o
+ PKG_B43_FWV4_SOURCE:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION).tar.bz2
+ PKG_B43_FWV4_SOURCE_URL:=http://mirror2.openwrt.org/sources/
+ PKG_B43_FWV4_MD5SUM:=0c6ba9687114c6b598e8019e262d9a60
+endif
+ifneq ($(CONFIG_B43_OPENFIRMWARE),)
+ PKG_B43_FWV4_NAME:=broadcom-wl
+ PKG_B43_FWV4_VERSION:=5.1
+ PKG_B43_FWV4_OBJECT:=openfwwf-$(PKG_B43_FWV4_VERSION)
+ PKG_B43_FWV4_SOURCE:=openfwwf-$(PKG_B43_FWV4_VERSION).tar.gz
+ PKG_B43_FWV4_SOURCE_URL:=http://www.ing.unibs.it/openfwwf/firmware/
+ PKG_B43_FWV4_MD5SUM:=3510c133393bb4911c4aa35742cefcfd
+endif
+
+
+PKG_B43_FWV3_NAME:=wl_apsta
+PKG_B43_FWV3_VERSION:=3.130.20.0
+PKG_B43_FWV3_SOURCE:=$(PKG_B43_FWV3_NAME)-$(PKG_B43_FWV3_VERSION).o
+PKG_B43_FWV3_SOURCE_URL:=http://downloads.openwrt.org/sources/
+PKG_B43_FWV3_MD5SUM:=e08665c5c5b66beb9c3b2dd54aa80cb3
+
+ifneq ($(CONFIG_B43_EXPERIMENTAL)$(CONFIG_B43_OPENFIRMWARE),)
+ PKG_B43_FWCUTTER_NAME:=b43-fwcutter
+ PKG_B43_FWCUTTER_VERSION:=3e69531aa65b8f664a0ab00dfc3e2eefeb0cb417
+ PKG_B43_FWCUTTER_SOURCE:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION).tar.bz2
+ PKG_B43_FWCUTTER_PROTO:=git
+ PKG_B43_FWCUTTER_SOURCE_URL:=http://git.bu3sch.de/git/b43-tools.git
+ PKG_B43_FWCUTTER_SUBDIR:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION)
+ PKG_B43_FWCUTTER_OBJECT:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION)/fwcutter/
+else
+ PKG_B43_FWCUTTER_NAME:=b43-fwcutter
+ PKG_B43_FWCUTTER_VERSION:=011
+ PKG_B43_FWCUTTER_SOURCE:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION).tar.bz2
+ PKG_B43_FWCUTTER_PROTO:=default
+ PKG_B43_FWCUTTER_SOURCE_URL:=http://bu3sch.de/b43/fwcutter/
+ PKG_B43_FWCUTTER_MD5SUM:=3db2f4de85a459451f5b391cf67a8d44
+ PKG_B43_FWCUTTER_SUBDIR:=b43-fwcutter-$(PKG_B43_FWCUTTER_VERSION)
+ PKG_B43_FWCUTTER_OBJECT:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION)/
+endif
+
+define Download/b43-common
+ FILE:=$(PKG_B43_FWCUTTER_SOURCE)
+ URL:=$(PKG_B43_FWCUTTER_SOURCE_URL)
+ MD5SUM:=$(PKG_B43_FWCUTTER_MD5SUM)
+ PROTO:=$(PKG_B43_FWCUTTER_PROTO)
+ VERSION:=$(PKG_B43_FWCUTTER_VERSION)
+ SUBDIR:=$(PKG_B43_FWCUTTER_SUBDIR)
+endef
+$(eval $(call Download,b43-common))
+
+define Download/b43
+ FILE:=$(PKG_B43_FWV4_SOURCE)
+ URL:=$(PKG_B43_FWV4_SOURCE_URL)
+ MD5SUM:=$(PKG_B43_FWV4_MD5SUM)
+endef
+$(eval $(call Download,b43))
+
+define Download/b43legacy
+ FILE:=$(PKG_B43_FWV3_SOURCE)
+ URL:=$(PKG_B43_FWV3_SOURCE_URL)
+ MD5SUM:=$(PKG_B43_FWV3_MD5SUM)
+endef
+$(eval $(call Download,b43legacy))
+
+define KernelPackage/b43-common
+ $(call KernelPackage/mac80211/Default)
+ TITLE:=Generic stuff for Broadcom wireless devices
+ URL:=http://linuxwireless.org/en/users/Drivers/b43
+ DEPENDS+= +kmod-mac80211 @TARGET_brcm47xx||@TARGET_brcm63xx @!LINUX_2_6_21||!LINUX_2_6_23||!LINUX_2_6_24
+endef
+
+define KernelPackage/b43
+$(call KernelPackage/b43-common)
+ TITLE:=Broadcom 43xx wireless support
+ FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/b43/b43.$(LINUX_KMOD_SUFFIX)
+ AUTOLOAD:=$(call AutoLoad,30,b43)
+endef
+
+define KernelPackage/b43/config
+ source "$(SOURCE)/Config.in"
+endef
+
+define KernelPackage/b43/description
+Kernel module for Broadcom 43xx wireless support (mac80211 stack) new
+endef
+
+define KernelPackage/b43legacy
+$(call KernelPackage/b43-common)
+ TITLE:=Broadcom 43xx-legacy wireless support
+ FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/b43legacy/b43legacy.$(LINUX_KMOD_SUFFIX)
+ AUTOLOAD:=$(call AutoLoad,30,b43legacy)
+endef
+
+define KernelPackage/b43legacy/description
+Kernel module for Broadcom 43xx-legacy wireless support (mac80211 stack) new
+endef
+
+BUILDFLAGS:= \
+ -I$(PKG_BUILD_DIR)/include \
+ $(foreach opt,$(CONFOPTS),-DCONFIG_$(opt)) \
+ $(if $(CONFIG_PCI),-DCONFIG_B43_PCI_AUTOSELECT -DCONFIG_B43_PCICORE_AUTOSELECT -DCONFIG_SSB_DRIVER_PCICORE_POSSIBLE -DCONFIG_SSB_DRIVER_PCICORE) \
+ $(if $(CONFIG_PCI),-DCONFIG_SSB_PCIHOST_POSSIBLE -DCONFIG_SSB_PCIHOST) \
+ $(if $(CONFIG_PCI),-DCONFIG_SSB_SPROM) \
+ $(if $(CONFIG_LEDS_TRIGGERS), -DCONFIG_MAC80211_LEDS -DCONFIG_LEDS_TRIGGERS -DCONFIG_B43_LEDS -DCONFIG_B43LEGACY_LEDS) \
+ $(if $(CONFIG_RFKILL),-DCONFIG_B43_RFKILL -DCONFIG_B43LEGACY_RFKILL) \
+ $(if $(CONFIG_PCMCIA),-DCONFIG_SSB_PCMCIAHOST_POSSIBLE -DCONFIG_SSB_PCMCIAHOST -DCONFIG_B43_PCMCIA -DCONFIG_B43_PIO) \
+ $(if $(CONFIG_DEBUG_FS), -DCONFIG_MAC80211_DEBUGFS) \
+ -D__CONFIG_MAC80211_RC_DEFAULT=minstrel \
+
+MAKE_OPTS:= \