2 # Copyright (C) 2007-2012 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
11 PKG_NAME:=acx-mac80211
12 PKG_REV:=b6fc31491020cb01d2cd1acc170cfa03ced7e726
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
17 PKG_SOURCE_URL:=git://git.code.sf.net/p/acx100/acx-mac80211
19 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
20 PKG_SOURCE_VERSION:=$(PKG_REV)
22 PKG_BUILD_DEPENDS:=mac80211
24 PKG_CONFIG_DEPENDS:= \
25 CONFIG_PACKAGE_MAC80211_DEBUGFS \
26 CONFIG_PACKAGE_MAC80211_MESH \
28 include $(INCLUDE_DIR)/package.mk
30 define KernelPackage/acx-mac80211
31 SUBMENU:=Wireless Drivers
32 TITLE:=ACX1xx mac80211 driver
33 DEPENDS:=@(PCI_SUPPORT||TARGET_ar7) @!TARGET_cobalt @mipsel +kmod-mac80211
34 FILES:=$(PKG_BUILD_DIR)/acx-mac80211.ko
35 AUTOLOAD:=$(call AutoLoad,50,mac80211 acx-mac80211)
36 MAINTAINER:=Florian Fainelli <florian@openwrt.org>
40 define KernelPackage/acx-mac80211/config
42 depends on PACKAGE_kmod-acx-mac80211
45 bool "ACX1xx Radio ID 0D firmware"
47 Download and install firmware for:
48 ACX1xx cards with Radio ID 0D into /lib/firmware.
51 bool "ACX1xx Radio ID 11 firmware"
53 Download and install firmware for:
54 ACX1xx cards with Radio ID 11 into /lib/firmware.
57 bool "ACX1xx Radio ID 15 firmware"
59 Download and install firmware for:
60 ACX1xx cards with Radio ID 15 into /lib/firmware.
63 bool "ACX1xx Radio ID 16 firmware"
66 Download and install firmware for:
67 ACX1xx cards with Radio ID 16 into /lib/firmware.
70 prompt "ACX111 firmware version"
72 default ACX_DEFAULT if !TARGET_adm5120
73 default ACX_1_2_1_34 if TARGET_adm5120
75 This option allows you to select the version of the acx firmware.
80 Default firmware for ACX111 devices.
82 If unsure, select this.
87 1.2.1_34 firmware for ACX111 devices. Works with Zyxel P-334WT.
89 If unsure, select the "default" firmware.
94 bool "ACX1xx Radio ID 17 firmware"
96 Download and install firmware for:
97 ACX1xx cards with Radio ID 17 into /lib/firmware.
100 bool "ACX1xx Radio ID 19 firmware"
103 Download and install firmware for:
104 ACX1xx cards with Radio ID 19 into /lib/firmware.
107 bool "ACX1xx Radio ID 1B firmware"
109 Download and install firmware for:
110 ACX1xx cards with Radio ID 1b into /lib/firmware.
115 define KernelPackage/acx-mac80211/description
116 Driver for acx111 cards (mac80211 version)
119 define Download/tiacx100
121 URL:=http://acx100.erley.org/fw/acx100_1.9.8.b/
122 MD5SUM:=24a54fd30f7658fcbffc825b0dd7aa5b
125 define Download/tiacx100r0d
127 URL:=http://acx100.erley.org/fw/acx100_1.9.8.b/
128 MD5SUM:=1c7413e7b0be4ef7d1e424a132e17fab
131 define Download/tiacx100r11
133 URL:=http://acx100.erley.org/fw/acx100_1.9.8.b/
134 MD5SUM:=a150750ad33c512edc4afee5270b37cb
137 define Download/tiacx100r15
139 URL:=http://acx100.erley.org/fw/acx100_1.9.8.b/
140 MD5SUM:=c99d01d4fcf0d6cc00441aff60690be4
143 define Download/tiacx111c16
145 URL:=http://acx100.erley.org/fw/acx111_2.3.1.31/
146 MD5SUM:=7026826460376f6b174f9225bd7781b9
149 define Download/tiacx111c16_1
150 FILE:=tiacx111c16_1.2.1_34
151 URL:=http://sites.google.com/site/atorkhov/files/
152 MD5SUM:=fcd07de4b25e1d2aaf3b78b27c5b7ee9
155 define Download/tiacx111c17
157 URL:=http://acx100.erley.org/fw/acx111_2.3.1.31/
158 MD5SUM:=95552544ca6d2b4e8c6aeb80b8ae7fdf
161 define Download/tiacx111c19
163 URL:=http://acx100.erley.org/fw/acx111_2.3.1.31/
164 MD5SUM:=a1fa9681e297b4e36e257090fc12265a
167 define Download/tiacx111usbc1b
169 URL:=http://acx100.erley.org/fw/acx111_2.4.0.70-USB/
170 MD5SUM:=c4edecd912b2417779d0b65e3a7dc86d
173 PKG_EXTRA_KCONFIG:= \
174 CONFIG_ACX_MAC80211=m \
175 CONFIG_ACX_MAC80211_PCI=m \
178 $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(PKG_EXTRA_KCONFIG)))) \
179 $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(PKG_EXTRA_KCONFIG)))) \
180 $(if $(CONFIG_LEDS_TRIGGERS), -DCONFIG_MAC80211_LEDS -DCONFIG_LEDS_TRIGGERS) \
181 $(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS), -DCONFIG_CFG80211_DEBUGFS -DCONFIG_MAC80211_DEBUGFS) \
182 $(if $(CONFIG_PACKAGE_MAC80211_MESH), -DCONFIG_MAC80211_MESH) \
183 -DBACKPORTED_KERNEL_NAME=\\\"$(PKG_SOURCE)\\\" \
184 -DBACKPORTED_KERNEL_VERSION=\\\"$(PKG_SOURCE_VERSION)\\\" \
185 -DBACKPORTS_VERSION=\\\"unknown\\\" \
188 $(MAKE) -C "$(LINUX_DIR)" \
189 ARCH="$(LINUX_KARCH)" \
190 CROSS_COMPILE="$(TARGET_CROSS)" \
191 SUBDIRS="$(PKG_BUILD_DIR)" \
192 $(PKG_EXTRA_KCONFIG) \
193 EXTRA_CFLAGS="$(PKG_EXTRA_CFLAGS) -DCONFIG_ACX_MAC80211_VERSION=\"KERNEL_VERSION(4,2,0)\"" \
194 LINUXINCLUDE="-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi -I$(STAGING_DIR)/usr/include/mac80211-backport \
195 -I$(STAGING_DIR)/usr/include/mac80211/uapi -I$(STAGING_DIR)/usr/include/mac80211 \
196 -I$(LINUX_DIR)/include -I$(LINUX_DIR)/include/$(LINUX_UAPI_DIR) \
197 -I$(LINUX_DIR)/include/generated/uapi/ -Iarch/$(LINUX_KARCH)/include \
198 -Iarch/$(LINUX_KARCH)/include/$(LINUX_UAPI_DIR) \
199 -Iarch/$(LINUX_KARCH)/include/generated \
200 -Iarch/$(LINUX_KARCH)/include/generated/$(LINUX_UAPI_DIR) \
201 -include generated/autoconf.h \
202 -include backport/backport.h " \
207 define Build/Configure
210 define KernelPackage/acx-mac80211/install
211 $(INSTALL_DIR) $(1)/lib/firmware
213 ifneq ($(CONFIG_ACX_ID_0D)$(CONFIG_ACX_ID_11)$(CONFIG_ACX_ID_15),)
214 $(INSTALL_DATA) $(DL_DIR)/tiacx100 $(1)/lib/firmware/
217 ifneq ($(CONFIG_ACX_ID_0D),)
218 $(INSTALL_DATA) $(DL_DIR)/tiacx100r0D $(1)/lib/firmware/
221 ifneq ($(CONFIG_ACX_ID_11),)
222 $(INSTALL_DATA) $(DL_DIR)/tiacx100r11 $(1)/lib/firmware/
225 ifneq ($(CONFIG_ACX_ID_15),)
226 $(INSTALL_DATA) $(DL_DIR)/tiacx100r15 $(1)/lib/firmware/
229 ifneq ($(CONFIG_ACX_DEFAULT),)
230 $(INSTALL_DATA) $(DL_DIR)/tiacx111c16 $(1)/lib/firmware/
233 ifneq ($(CONFIG_ACX_1_2_1_34),)
234 $(INSTALL_DATA) $(DL_DIR)/tiacx111c16_1.2.1_34 $(1)/lib/firmware/tiacx111c16
237 ifneq ($(CONFIG_ACX_ID_17),)
238 $(INSTALL_DATA) $(DL_DIR)/tiacx111c17 $(1)/lib/firmware/
241 ifneq ($(CONFIG_ACX_ID_19),)
242 $(INSTALL_DATA) $(DL_DIR)/tiacx111c19 $(1)/lib/firmware/
245 ifneq ($(CONFIG_ACX_ID_1B),)
246 $(INSTALL_DATA) $(DL_DIR)/tiacx111usbc1B $(1)/lib/firmware/
251 $(eval $(call KernelPackage,acx-mac80211))
252 $(eval $(call Download,tiacx100))
253 $(eval $(call Download,tiacx100r0d))
254 $(eval $(call Download,tiacx100r11))
255 $(eval $(call Download,tiacx100r15))
256 $(eval $(call Download,tiacx111c16))
257 $(eval $(call Download,tiacx111c16_1))
258 $(eval $(call Download,tiacx111c17))
259 $(eval $(call Download,tiacx111c19))
260 $(eval $(call Download,tiacx111usbc1b))