ltq-ptm: Support 1508-byte MTU for RFC4638
[openwrt/openwrt.git] / package / kernel / acx-mac80211 / Makefile
1 #
2 # Copyright (C) 2007-2012 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9 include $(INCLUDE_DIR)/kernel.mk
10
11 PKG_NAME:=acx-mac80211
12 PKG_REV:=b6fc31491020cb01d2cd1acc170cfa03ced7e726
13 PKG_VERSION:=20140216
14 PKG_RELEASE:=1
15
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
17 PKG_SOURCE_URL:=http://git.code.sf.net/p/acx100/acx-mac80211
18 PKG_SOURCE_PROTO:=git
19 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
20 PKG_SOURCE_VERSION:=$(PKG_REV)
21 PKG_BUILD_DEPENDS:=mac80211
22
23 PKG_CONFIG_DEPENDS:= \
24 CONFIG_PACKAGE_MAC80211_DEBUGFS \
25 CONFIG_PACKAGE_MAC80211_MESH \
26
27 include $(INCLUDE_DIR)/package.mk
28
29 define KernelPackage/acx-mac80211
30 SUBMENU:=Wireless Drivers
31 TITLE:=ACX1xx mac80211 driver
32 DEPENDS:=@(PCI_SUPPORT||TARGET_ar7) @!TARGET_cobalt @mipsel +kmod-mac80211
33 FILES:=$(PKG_BUILD_DIR)/acx-mac80211.ko
34 AUTOLOAD:=$(call AutoLoad,50,mac80211 acx-mac80211)
35 MAINTAINER:=Florian Fainelli <florian@openwrt.org>
36 MENU:=1
37 endef
38
39 define KernelPackage/acx-mac80211/config
40 menu "Configuration"
41 depends on PACKAGE_kmod-acx-mac80211
42
43 config ACX_ID_0D
44 bool "ACX1xx Radio ID 0D firmware"
45 help
46 Download and install firmware for:
47 ACX1xx cards with Radio ID 0D into /lib/firmware.
48
49 config ACX_ID_11
50 bool "ACX1xx Radio ID 11 firmware"
51 help
52 Download and install firmware for:
53 ACX1xx cards with Radio ID 11 into /lib/firmware.
54
55 config ACX_ID_15
56 bool "ACX1xx Radio ID 15 firmware"
57 help
58 Download and install firmware for:
59 ACX1xx cards with Radio ID 15 into /lib/firmware.
60
61 config ACX_ID_16
62 bool "ACX1xx Radio ID 16 firmware"
63 default y
64 help
65 Download and install firmware for:
66 ACX1xx cards with Radio ID 16 into /lib/firmware.
67
68 choice
69 prompt "ACX111 firmware version"
70 depends on ACX_ID_16
71 default ACX_DEFAULT if !TARGET_adm5120
72 default ACX_1_2_1_34 if TARGET_adm5120
73 help
74 This option allows you to select the version of the acx firmware.
75
76 config ACX_DEFAULT
77 bool "Default"
78 help
79 Default firmware for ACX111 devices.
80
81 If unsure, select this.
82
83 config ACX_1_2_1_34
84 bool "1.2.1_34"
85 help
86 1.2.1_34 firmware for ACX111 devices. Works with Zyxel P-334WT.
87
88 If unsure, select the "default" firmware.
89
90 endchoice
91
92 config ACX_ID_17
93 bool "ACX1xx Radio ID 17 firmware"
94 help
95 Download and install firmware for:
96 ACX1xx cards with Radio ID 17 into /lib/firmware.
97
98 config ACX_ID_19
99 bool "ACX1xx Radio ID 19 firmware"
100 default y
101 help
102 Download and install firmware for:
103 ACX1xx cards with Radio ID 19 into /lib/firmware.
104
105 config ACX_ID_1B
106 bool "ACX1xx Radio ID 1B firmware"
107 help
108 Download and install firmware for:
109 ACX1xx cards with Radio ID 1b into /lib/firmware.
110
111 endmenu
112 endef
113
114 define KernelPackage/acx-mac80211/description
115 Driver for acx111 cards (mac80211 version)
116 endef
117
118 define Download/tiacx100
119 FILE:=tiacx100
120 URL:=http://acx100.erley.org/fw/acx100_1.9.8.b/
121 MD5SUM:=24a54fd30f7658fcbffc825b0dd7aa5b
122 endef
123
124 define Download/tiacx100r0d
125 FILE:=tiacx100r0D
126 URL:=http://acx100.erley.org/fw/acx100_1.9.8.b/
127 MD5SUM:=1c7413e7b0be4ef7d1e424a132e17fab
128 endef
129
130 define Download/tiacx100r11
131 FILE:=tiacx100r11
132 URL:=http://acx100.erley.org/fw/acx100_1.9.8.b/
133 MD5SUM:=a150750ad33c512edc4afee5270b37cb
134 endef
135
136 define Download/tiacx100r15
137 FILE:=tiacx100r15
138 URL:=http://acx100.erley.org/fw/acx100_1.9.8.b/
139 MD5SUM:=c99d01d4fcf0d6cc00441aff60690be4
140 endef
141
142 define Download/tiacx111c16
143 FILE:=tiacx111c16
144 URL:=http://acx100.erley.org/fw/acx111_2.3.1.31/
145 MD5SUM:=7026826460376f6b174f9225bd7781b9
146 endef
147
148 define Download/tiacx111c16_1
149 FILE:=tiacx111c16_1.2.1_34
150 URL:=http://sites.google.com/site/atorkhov/files/
151 MD5SUM:=fcd07de4b25e1d2aaf3b78b27c5b7ee9
152 endef
153
154 define Download/tiacx111c17
155 FILE:=tiacx111c17
156 URL:=http://acx100.erley.org/fw/acx111_2.3.1.31/
157 MD5SUM:=95552544ca6d2b4e8c6aeb80b8ae7fdf
158 endef
159
160 define Download/tiacx111c19
161 FILE:=tiacx111c19
162 URL:=http://acx100.erley.org/fw/acx111_2.3.1.31/
163 MD5SUM:=a1fa9681e297b4e36e257090fc12265a
164 endef
165
166 define Download/tiacx111usbc1b
167 FILE:=tiacx111usbc1B
168 URL:=http://acx100.erley.org/fw/acx111_2.4.0.70-USB/
169 MD5SUM:=c4edecd912b2417779d0b65e3a7dc86d
170 endef
171
172 PKG_EXTRA_KCONFIG:= \
173 CONFIG_ACX_MAC80211=m \
174 CONFIG_ACX_MAC80211_PCI=m \
175
176 PKG_EXTRA_CFLAGS:= \
177 $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=m,%,$(filter %=m,$(PKG_EXTRA_KCONFIG)))) \
178 $(patsubst CONFIG_%, -DCONFIG_%=1, $(patsubst %=y,%,$(filter %=y,$(PKG_EXTRA_KCONFIG)))) \
179 $(if $(CONFIG_LEDS_TRIGGERS), -DCONFIG_MAC80211_LEDS -DCONFIG_LEDS_TRIGGERS) \
180 $(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS), -DCONFIG_CFG80211_DEBUGFS -DCONFIG_MAC80211_DEBUGFS) \
181 $(if $(CONFIG_PACKAGE_MAC80211_MESH), -DCONFIG_MAC80211_MESH) \
182 -DBACKPORTED_KERNEL_NAME=\\\"$(PKG_SOURCE)\\\" \
183 -DBACKPORTED_KERNEL_VERSION=\\\"$(PKG_SOURCE_VERSION)\\\" \
184 -DBACKPORTS_VERSION=\\\"unknown\\\" \
185
186 define Build/Compile
187 $(MAKE) -C "$(LINUX_DIR)" \
188 ARCH="$(LINUX_KARCH)" \
189 CROSS_COMPILE="$(TARGET_CROSS)" \
190 SUBDIRS="$(PKG_BUILD_DIR)" \
191 $(PKG_EXTRA_KCONFIG) \
192 EXTRA_CFLAGS="$(PKG_EXTRA_CFLAGS) -DCONFIG_ACX_MAC80211_VERSION=\"KERNEL_VERSION(4,2,0)\"" \
193 LINUXINCLUDE="-I$(STAGING_DIR)/usr/include/mac80211-backport/uapi -I$(STAGING_DIR)/usr/include/mac80211-backport \
194 -I$(STAGING_DIR)/usr/include/mac80211/uapi -I$(STAGING_DIR)/usr/include/mac80211 \
195 -I$(LINUX_DIR)/include -I$(LINUX_DIR)/include/$(LINUX_UAPI_DIR) \
196 -I$(LINUX_DIR)/include/generated/uapi/ -Iarch/$(LINUX_KARCH)/include \
197 -Iarch/$(LINUX_KARCH)/include/$(LINUX_UAPI_DIR) \
198 -Iarch/$(LINUX_KARCH)/include/generated \
199 -Iarch/$(LINUX_KARCH)/include/generated/$(LINUX_UAPI_DIR) \
200 -include generated/autoconf.h \
201 -include backport/backport.h " \
202 V="$(V)" \
203 modules
204 endef
205
206 define Build/Configure
207 endef
208
209 define KernelPackage/acx-mac80211/install
210 $(INSTALL_DIR) $(1)/lib/firmware
211
212 ifneq ($(CONFIG_ACX_ID_0D)$(CONFIG_ACX_ID_11)$(CONFIG_ACX_ID_15),)
213 $(INSTALL_DATA) $(DL_DIR)/tiacx100 $(1)/lib/firmware/
214 endif
215
216 ifneq ($(CONFIG_ACX_ID_0D),)
217 $(INSTALL_DATA) $(DL_DIR)/tiacx100r0D $(1)/lib/firmware/
218 endif
219
220 ifneq ($(CONFIG_ACX_ID_11),)
221 $(INSTALL_DATA) $(DL_DIR)/tiacx100r11 $(1)/lib/firmware/
222 endif
223
224 ifneq ($(CONFIG_ACX_ID_15),)
225 $(INSTALL_DATA) $(DL_DIR)/tiacx100r15 $(1)/lib/firmware/
226 endif
227
228 ifneq ($(CONFIG_ACX_DEFAULT),)
229 $(INSTALL_DATA) $(DL_DIR)/tiacx111c16 $(1)/lib/firmware/
230 endif
231
232 ifneq ($(CONFIG_ACX_1_2_1_34),)
233 $(INSTALL_DATA) $(DL_DIR)/tiacx111c16_1.2.1_34 $(1)/lib/firmware/tiacx111c16
234 endif
235
236 ifneq ($(CONFIG_ACX_ID_17),)
237 $(INSTALL_DATA) $(DL_DIR)/tiacx111c17 $(1)/lib/firmware/
238 endif
239
240 ifneq ($(CONFIG_ACX_ID_19),)
241 $(INSTALL_DATA) $(DL_DIR)/tiacx111c19 $(1)/lib/firmware/
242 endif
243
244 ifneq ($(CONFIG_ACX_ID_1B),)
245 $(INSTALL_DATA) $(DL_DIR)/tiacx111usbc1B $(1)/lib/firmware/
246 endif
247
248 endef
249
250 $(eval $(call KernelPackage,acx-mac80211))
251 $(eval $(call Download,tiacx100))
252 $(eval $(call Download,tiacx100r0d))
253 $(eval $(call Download,tiacx100r11))
254 $(eval $(call Download,tiacx100r15))
255 $(eval $(call Download,tiacx111c16))
256 $(eval $(call Download,tiacx111c16_1))
257 $(eval $(call Download,tiacx111c17))
258 $(eval $(call Download,tiacx111c19))
259 $(eval $(call Download,tiacx111usbc1b))