259f744ee5f25d064c83bf877c5e36d32f0184be
[openwrt/openwrt.git] / package / mac80211 / Makefile
1 #
2 # Copyright (C) 2007-2010 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:=mac80211
12
13 PKG_VERSION:=2010-09-28
14 PKG_RELEASE:=1
15 PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
16 # http://www.orbit-lab.org/kernel/compat-wireless-2.6/2010/11 \
17 # http://wireless.kernel.org/download/compat-wireless-2.6
18 PKG_MD5SUM:=c1b4ebcb61a59824493ec35f799f8393
19
20 PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
21 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
22 PKG_BUILD_PARALLEL:=1
23
24 PKG_CONFIG_DEPENDS:= \
25 CONFIG_PACKAGE_kmod-mac80211 \
26 CONFIG_PACKAGE_MAC80211_DEBUGFS \
27 CONFIG_PACKAGE_ATH9K_USE_MINSTREL \
28 CONFIG_PACKAGE_ATH_DEBUG \
29 CONFIG_ATH_USER_REGD \
30
31 CARL9170_FW_VERSION:=1.8.8.2
32
33 include $(INCLUDE_DIR)/package.mk
34
35 WMENU:=Wireless Drivers
36
37 define KernelPackage/mac80211/Default
38 SUBMENU:=$(WMENU)
39 URL:=http://linuxwireless.org/
40 MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
41 DEPENDS:=@(!(TARGET_avr32||TARGET_ep93xx||TARGET_ps3||TARGET_pxcab)||BROKEN)
42 endef
43
44 define KernelPackage/cfg80211
45 $(call KernelPackage/mac80211/Default)
46 TITLE:=cfg80211 - wireless configuration API
47 DEPENDS+= +wireless-tools +iw @!LINUX_2_6_25 +crda
48 ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,2.6.33)),1)
49 FILES:= \
50 $(PKG_BUILD_DIR)/compat/compat.ko \
51 $(PKG_BUILD_DIR)/net/wireless/cfg80211.ko
52 AUTOLOAD:=$(call AutoLoad,20,compat cfg80211)
53 else
54 FILES:= \
55 $(PKG_BUILD_DIR)/compat/compat.ko \
56 $(PKG_BUILD_DIR)/compat/compat_firmware_class.ko \
57 $(PKG_BUILD_DIR)/net/wireless/cfg80211.ko
58 AUTOLOAD:=$(call AutoLoad,20,compat compat_firmware_class cfg80211)
59 endif
60 endef
61
62 define KernelPackage/cfg80211/description
63 cfg80211 is the Linux wireless LAN (802.11) configuration API.
64 endef
65
66 define KernelPackage/mac80211
67 $(call KernelPackage/mac80211/Default)
68 TITLE:=Linux 802.11 Wireless Networking Stack
69 DEPENDS+= +kmod-crypto-core +kmod-crypto-arc4 +kmod-crypto-aes +kmod-cfg80211
70 FILES:= $(PKG_BUILD_DIR)/net/mac80211/mac80211.ko
71 AUTOLOAD:=$(call AutoLoad,21,mac80211)
72 MENU:=1
73 endef
74
75 define KernelPackage/mac80211/config
76 menu "Configuration"
77 depends on PACKAGE_kmod-mac80211
78
79 config PACKAGE_MAC80211_DEBUGFS
80 bool "Export mac80211 internals in DebugFS"
81 default y
82 help
83 Select this to see extensive information about
84 the internal state of mac80211 in debugfs.
85
86 Say N unless you know you need this.
87
88 endmenu
89 endef
90
91 define KernelPackage/mac80211/description
92 Generic IEEE 802.11 Networking Stack (mac80211)
93 endef
94
95 # Prism54 drivers
96 P54PCIFW:=2.13.12.0.arm
97 P54USBFW:=2.13.24.0.lm87.arm
98 P54SPIFW:=2.13.0.0.a.13.14.arm
99 CARL9170_FW:=carl9170-1.fw
100
101 define Download/p54usb
102 FILE:=$(P54USBFW)
103 URL:=http://daemonizer.de/prism54/prism54-fw/fw-usb
104 MD5SUM:=8e8ab005a4f8f0123bcdc51bc25b47f6
105 endef
106 $(eval $(call Download,p54usb))
107
108 define Download/p54pci
109 FILE:=$(P54PCIFW)
110 URL:=http://daemonizer.de/prism54/prism54-fw/fw-softmac
111 MD5SUM:=ff7536af2092b1c4b21315bd103ef4c4
112 endef
113 $(eval $(call Download,p54pci))
114
115 define Download/p54spi
116 FILE:=$(P54SPIFW)
117 URL:=http://daemonizer.de/prism54/prism54-fw/stlc4560
118 MD5SUM:=42661f8ecbadd88012807493f596081d
119 endef
120 $(eval $(call Download,p54spi))
121
122 define Download/carl9170
123 FILE:=$(CARL9170_FW)
124 URL:=http://www.kernel.org/pub/linux/kernel/people/chr/carl9170/fw/$(CARL9170_FW_VERSION)
125 MD5SUM:=114c43846ed1d2f89cc92bd0e2ec0589
126 endef
127 $(eval $(call Download,carl9170))
128
129 define KernelPackage/p54/Default
130 $(call KernelPackage/mac80211/Default)
131 TITLE:=Prism54 Drivers
132 endef
133
134 define KernelPackage/p54/description
135 Kernel module for Prism54 chipsets (mac80211)
136 endef
137
138 define KernelPackage/p54-common
139 $(call KernelPackage/p54/Default)
140 DEPENDS+= @PCI_SUPPORT||@USB_SUPPORT||@TARGET_omap24xx +kmod-mac80211
141 TITLE+= (COMMON)
142 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/p54/p54common.ko
143 AUTOLOAD:=$(call AutoLoad,30,p54common)
144 endef
145
146 define KernelPackage/p54-pci
147 $(call KernelPackage/p54/Default)
148 TITLE+= (PCI)
149 DEPENDS+= @PCI_SUPPORT +kmod-p54-common
150 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/p54/p54pci.ko
151 AUTOLOAD:=$(call AutoLoad,31,p54pci)
152 endef
153
154 define KernelPackage/p54-usb
155 $(call KernelPackage/p54/Default)
156 TITLE+= (USB)
157 DEPENDS+= @USB_SUPPORT +kmod-usb-core +kmod-p54-common
158 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/p54/p54usb.ko
159 AUTOLOAD:=$(call AutoLoad,31,p54usb)
160 endef
161
162 define KernelPackage/p54-spi
163 $(call KernelPackage/p54/Default)
164 TITLE+= (SPI)
165 DEPENDS+= @TARGET_omap24xx +kmod-p54-common
166 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/p54/p54spi.ko
167 AUTOLOAD:=$(call AutoLoad,31,p54spi)
168 endef
169
170 # Ralink rt2x00 drivers
171 RT61FW:=RT61_Firmware_V1.2.zip
172 RT71FW:=RT71W_Firmware_V1.8.zip
173 RT2860FW:=RT2860_Firmware_V11.zip
174 RT2870FW:=RT2870_Firmware_V8.zip
175
176 define Download/rt61
177 FILE:=$(RT61FW)
178 URL:=http://www.ralinktech.com.tw/data/
179 MD5SUM:=d4c690c93b470bc9a681297c2adc6281
180 endef
181 $(eval $(call Download,rt61))
182
183 define Download/rt71w
184 FILE:=$(RT71FW)
185 URL:=http://www.ralinktech.com.tw/data/
186 MD5SUM:=1e7a5dc574e0268574fcda3fd5cf52f7
187 endef
188 $(eval $(call Download,rt71w))
189
190 define Download/rt2860
191 FILE:=$(RT2860FW)
192 URL:=http://www.ralinktech.com.tw/data/drivers
193 MD5SUM:=440a81756a52c53528f16faa41c40124
194 endef
195 $(eval $(call Download,rt2860))
196
197 define Download/rt2870
198 FILE:=$(RT2870FW)
199 URL:=http://www.ralinktech.com.tw/data/drivers
200 MD5SUM:=a7aae1d8cfd68e4d86a73000df0b6584
201 endef
202 $(eval $(call Download,rt2870))
203
204 AR9170FW:=ar9170.fw
205
206 define Download/ar9170
207 FILE:=$(AR9170FW)
208 URL:=http://www.kernel.org/pub/linux/kernel/people/mcgrof/firmware/ar9170
209 MD5SUM:=34feec4ec0eae3bb92c7c1ea2dfb4530
210 endef
211 $(eval $(call Download,ar9170))
212
213 NEED_RT2X00_LIB_CRYPTO:=y
214 NEED_RT2X00_LIB_FIRMWARE:=y
215 NEED_RT2X00_LIB_HT:=y
216 NEED_RT2X00_LIB_LEDS:=y
217
218 define KernelPackage/rt2x00/Default
219 $(call KernelPackage/mac80211/Default)
220 TITLE:=Ralink Drivers for RT2x00 cards
221 endef
222
223 define KernelPackage/rt2x00-lib
224 $(call KernelPackage/rt2x00/Default)
225 DEPENDS+= @(PCI_SUPPORT||USB_SUPPORT||TARGET_ramips) +kmod-mac80211 +kmod-crc-itu-t
226 TITLE+= (LIB)
227 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00lib.ko
228 AUTOLOAD:=$(call AutoLoad,25,rt2x00lib)
229 MENU:=1
230 endef
231
232 define KernelPackage/rt2x00-lib/config
233 menu "Configuration"
234 depends PACKAGE_kmod-rt2x00-lib
235
236 config PACKAGE_RT2X00_LIB_DEBUGFS
237 bool "Enable rt2x00 debugfs support"
238 depends PACKAGE_MAC80211_DEBUGFS
239 help
240 Enable creation of debugfs files for the rt2x00 drivers.
241 These debugfs files support both reading and writing of the
242 most important register types of the rt2x00 hardware.
243
244 config PACKAGE_RT2X00_DEBUG
245 bool "Enable rt2x00 debug output"
246 help
247 Enable debugging output for all rt2x00 modules
248
249 endmenu
250 endef
251
252 define KernelPackage/rt2x00-pci
253 $(call KernelPackage/rt2x00/Default)
254 DEPENDS+= @(PCI_SUPPORT||TARGET_ramips) +kmod-rt2x00-lib +kmod-eeprom-93cx6
255 TITLE+= (PCI)
256 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00pci.ko
257 AUTOLOAD:=$(call AutoLoad,26,rt2x00pci)
258 endef
259
260 define KernelPackage/rt2x00-usb
261 $(call KernelPackage/rt2x00/Default)
262 DEPENDS+= @USB_SUPPORT +kmod-rt2x00-lib +kmod-usb-core
263 TITLE+= (USB)
264 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00usb.ko
265 AUTOLOAD:=$(call AutoLoad,26,rt2x00usb)
266 endef
267
268 define KernelPackage/rt2x00-soc
269 $(call KernelPackage/rt2x00/Default)
270 DEPENDS+= @TARGET_ramips +kmod-rt2x00-lib
271 TITLE+= (SoC)
272 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00soc.ko
273 AUTOLOAD:=$(call AutoLoad,26,rt2x00soc)
274 endef
275
276 define KernelPackage/rt2800-lib
277 $(call KernelPackage/rt2x00/Default)
278 DEPENDS+= @(PCI_SUPPORT||USB_SUPPORT||TARGET_ramips) +kmod-rt2x00-lib +USB_SUPPORT:kmod-rt2x00-usb +TARGET_ramips:kmod-rt2x00-soc
279 TITLE+= (rt2800 LIB)
280 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2800lib.ko
281 AUTOLOAD:=$(call AutoLoad,27,rt2800lib)
282 endef
283
284 define KernelPackage/rt2400-pci
285 $(call KernelPackage/rt2x00/Default)
286 DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-pci
287 TITLE+= (RT2400 PCI)
288 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2400pci.ko
289 AUTOLOAD:=$(call AutoLoad,27,rt2400pci)
290 endef
291
292 define KernelPackage/rt2500-pci
293 $(call KernelPackage/rt2x00/Default)
294 DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-pci
295 TITLE+= (RT2500 PCI)
296 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2500pci.ko
297 AUTOLOAD:=$(call AutoLoad,27,rt2500pci)
298 endef
299
300 define KernelPackage/rt2500-usb
301 $(call KernelPackage/rt2x00/Default)
302 DEPENDS+= @USB_SUPPORT +kmod-rt2x00-usb
303 TITLE+= (RT2500 USB)
304 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2500usb.ko
305 AUTOLOAD:=$(call AutoLoad,27,rt2500usb)
306 endef
307
308 define KernelPackage/rt61-pci
309 $(call KernelPackage/rt2x00/Default)
310 DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-pci
311 TITLE+= (RT2x61 PCI)
312 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt61pci.ko
313 AUTOLOAD:=$(call AutoLoad,27,rt61pci)
314 endef
315
316 define KernelPackage/rt73-usb
317 $(call KernelPackage/rt2x00/Default)
318 DEPENDS+= @USB_SUPPORT +kmod-rt2x00-usb
319 TITLE+= (RT73 USB)
320 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt73usb.ko
321 AUTOLOAD:=$(call AutoLoad,27,rt73usb)
322 endef
323
324 define KernelPackage/rt2800-pci
325 $(call KernelPackage/rt2x00/Default)
326 DEPENDS+= +kmod-rt2x00-pci +kmod-rt2800-lib +kmod-crc-ccitt +TARGET_ramips:kmod-rt2x00-soc
327 TITLE+= (RT2860 PCI)
328 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2800pci.ko
329 AUTOLOAD:=$(call AutoLoad,28,rt2800pci)
330 endef
331
332 define KernelPackage/rt2800-usb
333 $(call KernelPackage/rt2x00/Default)
334 DEPENDS+= +kmod-rt2x00-usb +kmod-rt2800-lib +kmod-crc-ccitt
335 TITLE+= (RT2870 USB)
336 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2800usb.ko
337 AUTOLOAD:=$(call AutoLoad,28,rt2800usb)
338 endef
339
340 define KernelPackage/rtl818x/Default
341 $(call KernelPackage/mac80211/Default)
342 TITLE:=Realtek Drivers for RTL818x devices
343 URL:=http://wireless.kernel.org/en/users/Drivers/rtl8187
344 DEPENDS+= +kmod-eeprom-93cx6 +kmod-mac80211
345 endef
346
347 define KernelPackage/rtl8180
348 $(call KernelPackage/rtl818x/Default)
349 DEPENDS+= @PCI_SUPPORT
350 TITLE+= (RTL8180 PCI)
351 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rtl818x/rtl8180.ko
352 AUTOLOAD:=$(call AutoLoad,27,rtl8180)
353 endef
354
355 define KernelPackage/rtl8187
356 $(call KernelPackage/rtl818x/Default)
357 DEPENDS+= @USB_SUPPORT
358 TITLE+= (RTL8187 USB)
359 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rtl818x/rtl8187.ko
360 AUTOLOAD:=$(call AutoLoad,27,rtl8187)
361 endef
362
363 ZD1211FW_NAME:=zd1211-firmware
364 ZD1211FW_VERSION:=1.4
365 define Download/zd1211rw
366 FILE:=$(ZD1211FW_NAME)-$(ZD1211FW_VERSION).tar.bz2
367 URL:=@SF/zd1211/
368 MD5SUM:=19f28781d76569af8551c9d11294c870
369 endef
370 $(eval $(call Download,zd1211rw))
371
372 define KernelPackage/zd1211rw
373 $(call KernelPackage/mac80211/Default)
374 TITLE:=Zydas ZD1211 support
375 DEPENDS+= @USB_SUPPORT +kmod-usb-core +kmod-mac80211
376 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/zd1211rw/zd1211rw.ko
377 AUTOLOAD:=$(call AutoLoad,60,zd1211rw)
378 endef
379
380 define KernelPackage/ath/config
381 menu "Configuration"
382 depends on PACKAGE_kmod-ath
383
384 config ATH_USER_REGD
385 bool "Force Atheros drivers to respect the user's regdomain settings"
386 help
387 Atheros' idea of regulatory handling is that the EEPROM of the card defines
388 the regulatory limits and the user is only allowed to restrict the settings
389 even further, even if the country allows frequencies or power levels that
390 are forbidden by the EEPROM settings.
391
392 Select this option if you want the driver to respect the user's decision about
393 regulatory settings.
394
395 config PACKAGE_ATH_DEBUG
396 bool "Atheros wireless debugging"
397 help
398 Say Y, if you want to debug atheros wireless drivers.
399 Right now only ath9k makes use of this.
400
401 endmenu
402 endef
403
404 define KernelPackage/ath
405 $(call KernelPackage/mac80211/Default)
406 TITLE:=Atheros common driver part
407 DEPENDS+= @PCI_SUPPORT +kmod-mac80211
408 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath.ko
409 AUTOLOAD:=$(call AutoLoad,26,ath)
410 MENU:=1
411 endef
412
413 define KernelPackage/ath/description
414 This module contains some common parts needed by Atheros Wireless drivers.
415 endef
416
417 define KernelPackage/ath5k
418 $(call KernelPackage/mac80211/Default)
419 TITLE:=Atheros 5xxx wireless cards support
420 URL:=http://linuxwireless.org/en/users/Drivers/ath5k
421 DEPENDS+= +kmod-ath
422 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath5k/ath5k.ko
423 AUTOLOAD:=$(call AutoLoad,27,ath5k)
424 endef
425
426 define KernelPackage/ath5k/description
427 This module adds support for wireless adapters based on
428 Atheros 5xxx chipset.
429 endef
430
431 define KernelPackage/ath9k
432 $(call KernelPackage/mac80211/Default)
433 TITLE:=Atheros 802.11n wireless cards support
434 URL:=http://linuxwireless.org/en/users/Drivers/ath9k
435 DEPENDS+= +kmod-ath
436 FILES:= \
437 $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k_common.ko \
438 $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k_hw.ko \
439 $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k.ko
440 AUTOLOAD:=$(call AutoLoad,27,ath9k_hw ath9k_common ath9k)
441 MENU:=1
442 endef
443
444 define KernelPackage/ath9k/description
445 This module adds support for wireless adapters based on
446 Atheros IEEE 802.11n AR5008 and AR9001 family of chipsets.
447 endef
448
449 define KernelPackage/ath9k/config
450 menu "Configuration"
451 depends PACKAGE_kmod-ath9k
452
453 config PACKAGE_ATH9K_USE_MINSTREL
454 bool "use the new minstrel_ht rate control for ath9k"
455 default y
456
457 endmenu
458 endef
459
460 define KernelPackage/carl9170
461 $(call KernelPackage/mac80211/Default)
462 TITLE:=Driver for Atheros AR9170 USB sticks
463 DEPENDS:=@USB_SUPPORT +kmod-mac80211 +kmod-ath +kmod-usb-core
464 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/carl9170/carl9170.ko
465 AUTOLOAD:=$(call AutoLoad,60,carl9170)
466 endef
467
468 define KernelPackage/carl9170/install
469 $(INSTALL_DIR) $(1)/lib/firmware
470 $(INSTALL_DATA) $(DL_DIR)/$(CARL9170_FW) $(1)/lib/firmware/
471 endef
472
473
474 USB8388FW_NAME:=usb8388
475 USB8388FW_VERSION:=5.110.22.p23
476
477 define Download/usb8388
478 URL:=http://dev.laptop.org/pub/firmware/libertas/
479 FILE:=$(USB8388FW_NAME)-$(USB8388FW_VERSION).bin
480 MD5SUM=5e38f55719df3d0c58dd3bd02575a09c
481 endef
482 $(eval $(call Download,usb8388))
483
484 SD8686FW_NAME:=sd8686
485 SD8686FW_VERSION:=9.70.7.p0
486
487 define Download/sd8686
488 URL:=http://dev.laptop.org/pub/firmware/libertas/
489 FILE:=$(SD8686FW_NAME)-$(SD8686FW_VERSION).bin
490 MD5SUM=b4f8be61e19780a14836f146c538c5dd
491 endef
492 $(eval $(call Download,sd8686))
493
494 SD8686HELPER_NAME:=sd8686_helper
495
496 define Download/sd8686_helper
497 URL:=http://dev.laptop.org/pub/firmware/libertas/
498 FILE:=$(SD8686HELPER_NAME).bin
499 MD5SUM=2a4d8f4df198ce949c350df5674f4ac6
500 endef
501 $(eval $(call Download,sd8686_helper))
502
503 define KernelPackage/libertas-usb
504 $(call KernelPackage/mac80211/Default)
505 DEPENDS+= @USB_SUPPORT +kmod-mac80211 +kmod-usb-core +kmod-lib80211
506 TITLE:=Marvell 88W8015 Wireless Driver
507 FILES:= \
508 $(PKG_BUILD_DIR)/drivers/net/wireless/libertas/libertas.ko \
509 $(PKG_BUILD_DIR)/drivers/net/wireless/libertas/usb8xxx.ko
510 AUTOLOAD:=$(call AutoLoad,27,libertas usb8xxx)
511 endef
512
513 define KernelPackage/libertas-sd
514 $(call KernelPackage/mac80211/Default)
515 DEPENDS+= +kmod-mac80211 +kmod-lib80211
516 TITLE:=Marvell 88W8686 Wireless Driver
517 FILES:= \
518 $(PKG_BUILD_DIR)/drivers/net/wireless/libertas/libertas.ko \
519 $(PKG_BUILD_DIR)/drivers/net/wireless/libertas/libertas_sdio.ko
520 AUTOLOAD:=$(call AutoLoad,27,libertas libertas_sdio)
521 endef
522
523 define KernelPackage/mac80211-hwsim
524 $(call KernelPackage/mac80211/Default)
525 TITLE:=mac80211 HW simulation device
526 DEPENDS+= +kmod-mac80211
527 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/mac80211_hwsim.ko
528 AUTOLOAD:=$(call AutoLoad,60,mac80211_hwsim)
529 endef
530
531 define KernelPackage/net-libipw
532 $(call KernelPackage/mac80211/Default)
533 TITLE:=libipw for ipw2100 and ipw2200
534 DEPENDS:=@PCI_SUPPORT +kmod-crypto-core +kmod-crypto-arc4 +kmod-crypto-aes +kmod-crypto-michael-mic +kmod-lib80211 +kmod-cfg80211
535 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ipw2x00/libipw.ko
536 AUTOLOAD:=$(call AutoLoad,49,libipw)
537 endef
538
539 define KernelPackage/net-libipw/description
540 Hardware independent IEEE 802.11 networking stack for ipw2100 and ipw2200.
541 endef
542
543 IPW2100_NAME:=ipw2100-fw
544 IPW2100_VERSION:=1.3
545
546 define Download/net-ipw2100
547 URL:=http://bughost.org/firmware/
548 FILE:=$(IPW2100_NAME)-$(IPW2100_VERSION).tgz
549 MD5SUM=46aa75bcda1a00efa841f9707bbbd113
550 endef
551 $(eval $(call Download,net-ipw2100))
552
553 define KernelPackage/net-ipw2100
554 $(call KernelPackage/mac80211/Default)
555 TITLE:=Intel IPW2100 driver
556 DEPENDS:=@PCI_SUPPORT +kmod-net-libipw
557 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ipw2x00/ipw2100.ko
558 AUTOLOAD:=$(call AutoLoad,50,ipw2100)
559 endef
560
561 define KernelPackage/net-ipw2100/description
562 Kernel support for Intel IPW2100
563 Includes:
564 - ipw2100
565 endef
566
567 IPW2200_NAME:=ipw2200-fw
568 IPW2200_VERSION:=3.1
569
570 define Download/net-ipw2200
571 URL:=http://bughost.org/firmware/
572 FILE:=$(IPW2200_NAME)-$(IPW2200_VERSION).tgz
573 MD5SUM=eaba788643c7cc7483dd67ace70f6e99
574 endef
575 $(eval $(call Download,net-ipw2200))
576
577 define KernelPackage/net-ipw2200
578 $(call KernelPackage/mac80211/Default)
579 TITLE:=Intel IPW2200 driver
580 DEPENDS:=@PCI_SUPPORT +kmod-net-libipw
581 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ipw2x00/ipw2200.ko
582 AUTOLOAD:=$(call AutoLoad,50,ipw2200)
583 endef
584
585 define KernelPackage/net-ipw2200/description
586 Kernel support for Intel IPW2200
587 Includes:
588 - ipw2200
589 endef
590
591
592 define KernelPackage/mwl8k
593 $(call KernelPackage/mac80211/Default)
594 TITLE:=Driver for Marvell TOPDOG 802.11 Wireless cards
595 URL:=http://wireless.kernel.org/en/users/Drivers/mwl8k
596 DEPENDS+= @PCI_SUPPORT +kmod-mac80211
597 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/mwl8k.ko
598 AUTOLOAD:=$(call AutoLoad,27,mwl8k)
599 endef
600
601 define KernelPackage/mwl8k/description
602 Kernel modules for Marvell TOPDOG 802.11 Wireless cards
603 endef
604
605 #Broadcom firmware
606 ifneq ($(CONFIG_B43_EXPERIMENTAL),)
607 PKG_B43_FWV4_NAME:=broadcom-wl
608 PKG_B43_FWV4_VERSION:=4.178.10.4
609 PKG_B43_FWV4_OBJECT:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION)/linux/wl_apsta.o
610 PKG_B43_FWV4_SOURCE:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION).tar.bz2
611 PKG_B43_FWV4_SOURCE_URL:=http://mirror2.openwrt.org/sources/
612 PKG_B43_FWV4_MD5SUM:=14477e8cbbb91b11896affac9b219fdb
613 else
614 PKG_B43_FWV4_NAME:=broadcom-wl
615 PKG_B43_FWV4_VERSION:=4.150.10.5
616 PKG_B43_FWV4_OBJECT:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION)/driver/wl_apsta_mimo.o
617 PKG_B43_FWV4_SOURCE:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION).tar.bz2
618 PKG_B43_FWV4_SOURCE_URL:=http://mirror2.openwrt.org/sources/
619 PKG_B43_FWV4_MD5SUM:=0c6ba9687114c6b598e8019e262d9a60
620 endif
621 ifneq ($(CONFIG_B43_OPENFIRMWARE),)
622 PKG_B43_FWV4_NAME:=broadcom-wl
623 PKG_B43_FWV4_VERSION:=5.2
624 PKG_B43_FWV4_OBJECT:=openfwwf-$(PKG_B43_FWV4_VERSION)
625 PKG_B43_FWV4_SOURCE:=openfwwf-$(PKG_B43_FWV4_VERSION).tar.gz
626 PKG_B43_FWV4_SOURCE_URL:=http://www.ing.unibs.it/openfwwf/firmware/
627 PKG_B43_FWV4_MD5SUM:=e045a135453274e439ae183f8498b0fa
628 endif
629
630
631 PKG_B43_FWV3_NAME:=wl_apsta
632 PKG_B43_FWV3_VERSION:=3.130.20.0
633 PKG_B43_FWV3_SOURCE:=$(PKG_B43_FWV3_NAME)-$(PKG_B43_FWV3_VERSION).o
634 PKG_B43_FWV3_SOURCE_URL:=http://downloads.openwrt.org/sources/
635 PKG_B43_FWV3_MD5SUM:=e08665c5c5b66beb9c3b2dd54aa80cb3
636
637 ifeq ($(CONFIG_B43_OPENFIRMWARE),y)
638 PKG_B43_FWCUTTER_NAME:=b43-fwcutter
639 PKG_B43_FWCUTTER_VERSION:=3e69531aa65b8f664a0ab00dfc3e2eefeb0cb417
640 PKG_B43_FWCUTTER_SOURCE:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION).tar.bz2
641 PKG_B43_FWCUTTER_PROTO:=git
642 PKG_B43_FWCUTTER_SOURCE_URL:=http://git.bu3sch.de/git/b43-tools.git
643 PKG_B43_FWCUTTER_SUBDIR:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION)
644 PKG_B43_FWCUTTER_OBJECT:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION)/fwcutter/
645 else
646 PKG_B43_FWCUTTER_NAME:=b43-fwcutter
647 PKG_B43_FWCUTTER_VERSION:=013
648 PKG_B43_FWCUTTER_SOURCE:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION).tar.bz2
649 PKG_B43_FWCUTTER_PROTO:=default
650 PKG_B43_FWCUTTER_SOURCE_URL:=http://bu3sch.de/b43/fwcutter/
651 PKG_B43_FWCUTTER_MD5SUM:=3547ec6c474ac1bc2c4a5bb765b791a4
652 PKG_B43_FWCUTTER_SUBDIR:=b43-fwcutter-$(PKG_B43_FWCUTTER_VERSION)
653 PKG_B43_FWCUTTER_OBJECT:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION)/
654 endif
655
656 define Download/b43-common
657 FILE:=$(PKG_B43_FWCUTTER_SOURCE)
658 URL:=$(PKG_B43_FWCUTTER_SOURCE_URL)
659 MD5SUM:=$(PKG_B43_FWCUTTER_MD5SUM)
660 PROTO:=$(PKG_B43_FWCUTTER_PROTO)
661 VERSION:=$(PKG_B43_FWCUTTER_VERSION)
662 SUBDIR:=$(PKG_B43_FWCUTTER_SUBDIR)
663 endef
664 $(eval $(call Download,b43-common))
665
666 define Download/b43
667 FILE:=$(PKG_B43_FWV4_SOURCE)
668 URL:=$(PKG_B43_FWV4_SOURCE_URL)
669 MD5SUM:=$(PKG_B43_FWV4_MD5SUM)
670 endef
671 $(eval $(call Download,b43))
672
673 define Download/b43legacy
674 FILE:=$(PKG_B43_FWV3_SOURCE)
675 URL:=$(PKG_B43_FWV3_SOURCE_URL)
676 MD5SUM:=$(PKG_B43_FWV3_MD5SUM)
677 endef
678 $(eval $(call Download,b43legacy))
679
680 define KernelPackage/b43-common
681 $(call KernelPackage/mac80211/Default)
682 TITLE:=Generic stuff for Broadcom wireless devices
683 URL:=http://linuxwireless.org/en/users/Drivers/b43
684 KCONFIG:= \
685 CONFIG_HW_RANDOM=y
686 DEPENDS+= +kmod-mac80211 +!(TARGET_brcm47xx||TARGET_brcm63xx):kmod-ssb
687 endef
688
689 define KernelPackage/b43
690 $(call KernelPackage/b43-common)
691 TITLE:=Broadcom 43xx wireless support
692 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/b43/b43.ko
693 AUTOLOAD:=$(call AutoLoad,30,b43)
694 MENU:=1
695 endef
696
697 define KernelPackage/b43/config
698 menu "Configuration"
699 depends on PACKAGE_kmod-b43
700
701 choice
702 prompt "b43 firmware version"
703 default B43_STABLE
704 help
705 This option allows you to select the version of the b43 firmware.
706
707 config B43_STABLE
708 bool "4.150.10.5 (stable)"
709 help
710 Stable firmware for BCM43xx devices.
711
712 If unsure, select this.
713
714 config B43_EXPERIMENTAL
715 bool "4.178.10.4 (experimental)"
716 help
717 Experimental firmware for BCM43xx devices.
718
719 This firmware is not tested as much as the "stable" firmware.
720
721 If unsure, select the "stable" firmware.
722
723 config B43_OPENFIRMWARE
724 bool "Open FirmWare for WiFi networks"
725 help
726 Opensource firmware for BCM43xx devices.
727
728 Do _not_ select this, unless you know what you are doing.
729 The Opensource firmware is not suitable for embedded devices, yet.
730 It does not support QoS, which is bad for AccessPoints.
731 It does not support hardware crypto acceleration, which is a showstopper
732 for embedded devices with low CPU resources.
733
734 If unsure, select the "stable" firmware.
735
736 endchoice
737
738 config B43_FW_SQUASH
739 bool "Remove unnecessary firmware files"
740 depends on !B43_OPENFIRMWARE
741 default y
742 help
743 This options allows you to remove unnecessary b43 firmware files
744 from the final rootfs image. This can reduce the rootfs size by
745 up to 200k.
746
747 If unsure, say Y.
748
749 config B43_FW_SQUASH_COREREVS
750 string "Core revisions to include"
751 depends on B43_FW_SQUASH
752 default "5,6,7,8,9,10,13,14,15"
753 help
754 This is a comma seperated list of core revision numbers.
755
756 Example (keep files for rev5 only):
757 5
758
759 Example (keep files for rev5 and rev11):
760 5,11
761
762 config B43_FW_SQUASH_PHYTYPES
763 string "PHY types to include"
764 depends on B43_FW_SQUASH
765 default "G,LP"
766 help
767 This is a comma seperated list of PHY types:
768 A => A-PHY
769 AG => Dual A-PHY G-PHY
770 G => G-PHY
771 LP => LP-PHY
772 N => N-PHY
773
774 Example (keep files for G-PHY only):
775 G
776
777 Example (keep files for G-PHY and N-PHY):
778 G,N
779
780 endmenu
781 endef
782
783 define KernelPackage/b43/description
784 Kernel module for Broadcom 43xx wireless support (mac80211 stack) new
785 endef
786
787 define KernelPackage/b43legacy
788 $(call KernelPackage/b43-common)
789 TITLE:=Broadcom 43xx-legacy wireless support
790 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/b43legacy/b43legacy.ko
791 AUTOLOAD:=$(call AutoLoad,30,b43legacy)
792 MENU:=1
793 endef
794
795 define KernelPackage/b43legacy/config
796 menu "Configuration"
797 depends on PACKAGE_kmod-b43legacy
798
799 config B43LEGACY_FW_SQUASH
800 bool "Remove unnecessary firmware files"
801 default y
802 help
803 This options allows you to remove unnecessary b43legacy firmware files
804 from the final rootfs image. This can reduce the rootfs size by
805 up to 50k.
806
807 If unsure, say Y.
808
809 config B43LEGACY_FW_SQUASH_COREREVS
810 string "Core revisions to include"
811 depends on B43LEGACY_FW_SQUASH
812 default "1,2,3,4"
813 help
814 This is a comma seperated list of core revision numbers.
815
816 Example (keep files for rev4 only):
817 4
818
819 Example (keep files for rev2 and rev4):
820 2,4
821
822 endmenu
823 endef
824
825 define KernelPackage/b43legacy/description
826 Kernel module for Broadcom 43xx-legacy wireless support (mac80211 stack) new
827 endef
828
829 BUILDFLAGS:= \
830 -I$(PKG_BUILD_DIR)/include \
831 $(foreach opt,$(CONFOPTS),-DCONFIG_$(opt)) \
832 $(if $(CONFIG_PCI),-DCONFIG_B43_PCI_AUTOSELECT -DCONFIG_B43_PCICORE_AUTOSELECT) \
833 $(if $(CONFIG_LEDS_TRIGGERS), -DCONFIG_MAC80211_LEDS -DCONFIG_LEDS_TRIGGERS -DCONFIG_B43_LEDS -DCONFIG_B43LEGACY_LEDS -DCONFIG_AR9170_LEDS) \
834 -DCONFIG_B43_HWRNG -DCONFIG_B43LEGACY_HWRNG \
835 $(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),-DCONFIG_MAC80211_DEBUGFS -DCONFIG_ATH9K_DEBUGFS -DCONFIG_CARL9170_DEBUGFS) \
836 $(if $(CONFIG_PACKAGE_ATH_DEBUG),-DCONFIG_ATH_DEBUG -DCONFIG_ATH9K_PKTLOG) \
837 -D__CONFIG_MAC80211_RC_DEFAULT=minstrel \
838 -DCONFIG_MAC80211_RC_MINSTREL_HT \
839 $(if $(CONFIG_ATH_USER_REGD),-DATH_USER_REGD=1) \
840 $(if $(CONFIG_PACKAGE_ATH9K_USE_MINSTREL),-DATH9K_USE_MINSTREL) \
841 $(if $(CONFIG_PACKAGE_RT2X00_LIB_DEBUGFS),-DCONFIG_RT2X00_LIB_DEBUGFS) \
842 $(if $(CONFIG_PACKAGE_RT2X00_DEBUG),-DCONFIG_RT2X00_DEBUG) \
843 $(if $(NEED_RT2X00_LIB_HT),-DCONFIG_RT2X00_LIB_HT) \
844 $(if $(NEED_RT2X00_LIB_CRYPTO),-DCONFIG_RT2X00_LIB_CRYPTO) \
845 $(if $(NEED_RT2X00_LIB_FIRMWARE),-DCONFIG_RT2X00_LIB_FIRMWARE) \
846 $(if $(NEED_RT2X00_LIB_LEDS),-DCONFIG_RT2X00_LIB_LEDS) \
847 $(if $(CONFIG_PACKAGE_kmod-rt2x00-pci),-DCONFIG_RT2X00_LIB_PCI) \
848 $(if $(CONFIG_PACKAGE_kmod-rt2x00-usb),-DCONFIG_RT2X00_LIB_USB) \
849 $(if $(CONFIG_PACKAGE_kmod-rt2x00-soc),-DCONFIG_RT2X00_LIB_SOC) \
850 $(if $(CONFIG_PCI_SUPPORT),-DCONFIG_RT2800PCI_PCI) \
851 $(if $(CONFIG_TARGET_ramips),-DCONFIG_RT2800PCI_SOC) \
852 -DCONFIG_P54_SPI_DEFAULT_EEPROM
853
854 MAKE_OPTS:= \
855 CROSS_COMPILE="$(KERNEL_CROSS)" \
856 ARCH="$(LINUX_KARCH)" \
857 EXTRA_CFLAGS="$(BUILDFLAGS)" \
858 $(foreach opt,$(CONFOPTS),CONFIG_$(opt)=m) \
859 CONFIG_MAC80211=$(if $(CONFIG_PACKAGE_kmod-mac80211),m) \
860 CONFIG_MAC80211_RC_MINSTREL=y \
861 CONFIG_MAC80211_LEDS=$(CONFIG_LEDS_TRIGGERS) \
862 CONFIG_MAC80211_DEBUGFS=$(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),y) \
863 CONFIG_B43_PCMCIA=n CONFIG_B43_PIO=n \
864 CONFIG_B43_PCI_AUTOSELECT=$(if $(CONFIG_PCI),y) \
865 CONFIG_B43_PCICORE_AUTOSELECT=$(if $(CONFIG_PCI),y) \
866 CONFIG_B43LEGACY_LEDS=$(CONFIG_LEDS_TRIGGERS) \
867 CONFIG_B43_LEDS=$(CONFIG_LEDS_TRIGGERS) \
868 CONFIG_B43_HWRNG=$(if $(CONFIG_HW_RANDOM),y) \
869 CONFIG_B43LEGACY_HWRNG=$(if $(CONFIG_HW_RANDOM),y) \
870 CONFIG_B43=$(if $(CONFIG_PACKAGE_kmod-b43),m) \
871 CONFIG_B43LEGACY=$(if $(CONFIG_PACKAGE_kmod-b43legacy),m) \
872 CONFIG_ATH_COMMON=$(if $(CONFIG_PACKAGE_kmod-ath),m) \
873 CONFIG_ATH_DEBUG=$(if $(CONFIG_PACKAGE_ATH_DEBUG),y) \
874 CONFIG_ATH9K_PKTLOG=$(if $(CONFIG_PACKAGE_ATH_DEBUG),y) \
875 CONFIG_ATH5K=$(if $(CONFIG_PACKAGE_kmod-ath5k),m) \
876 CONFIG_ATH9K=$(if $(CONFIG_PACKAGE_kmod-ath9k),m) \
877 CONFIG_ATH9K_HW=$(if $(CONFIG_PACKAGE_kmod-ath9k),m) \
878 CONFIG_ATH9K_COMMON=$(if $(CONFIG_PACKAGE_kmod-ath9k),m) \
879 CONFIG_ATH9K_DEBUGFS=$(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),y) \
880 CONFIG_CARL9170=$(if $(CONFIG_PACKAGE_kmod-carl9170),m) \
881 CONFIG_CARL9170_DEBUGFS=$(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),y) \
882 CONFIG_ZD1211RW=$(if $(CONFIG_PACKAGE_kmod-zd1211rw),m) \
883 CONFIG_P54_COMMON=$(if $(CONFIG_PACKAGE_kmod-p54-common),m) \
884 CONFIG_P54_PCI=$(if $(CONFIG_PACKAGE_kmod-p54-pci),m) \
885 CONFIG_P54_USB=$(if $(CONFIG_PACKAGE_kmod-p54-usb),m) \
886 CONFIG_P54_SPI=$(if $(CONFIG_PACKAGE_kmod-p54-spi),m) \
887 CONFIG_P54_SPI_DEFAULT_EEPROM=y \
888 CONFIG_RT2X00=$(if $(CONFIG_PACKAGE_kmod-rt2x00-lib),m) \
889 CONFIG_RT2X00_LIB=$(if $(CONFIG_PACKAGE_kmod-rt2x00-lib),m) \
890 CONFIG_RT2X00_LIB_PCI=$(if $(CONFIG_PACKAGE_kmod-rt2x00-pci),m) \
891 CONFIG_RT2X00_LIB_USB=$(if $(CONFIG_PACKAGE_kmod-rt2x00-usb),m) \
892 CONFIG_RT2X00_LIB_SOC=$(if $(CONFIG_PACKAGE_kmod-rt2x00-soc),m) \
893 CONFIG_RT2X00_LIB_DEBUGFS=$(CONFIG_PACKAGE_RT2X00_LIB_DEBUGFS) \
894 CONFIG_RT2X00_LIB_CRYPTO=$(NEED_RT2X00_LIB_CRYPTO) \
895 CONFIG_RT2X00_LIB_FIRMWARE=$(NEED_RT2X00_LIB_FIRMWARE) \
896 CONFIG_RT2X00_LIB_HT=$(NEED_RT2X00_LIB_HT) \
897 CONFIG_RT2X00_LIB_LEDS=$(NEED_RT2X00_LIB_LEDS) \
898 CONFIG_RT2400PCI=$(if $(CONFIG_PACKAGE_kmod-rt2400-pci),m) \
899 CONFIG_RT2500PCI=$(if $(CONFIG_PACKAGE_kmod-rt2500-pci),m) \
900 CONFIG_RT2500USB=$(if $(CONFIG_PACKAGE_kmod-rt2500-usb),m) \
901 CONFIG_RT61PCI=$(if $(CONFIG_PACKAGE_kmod-rt61-pci),m) \
902 CONFIG_RT73USB=$(if $(CONFIG_PACKAGE_kmod-rt73-usb),m) \
903 CONFIG_RT2800_LIB=$(if $(CONFIG_PACKAGE_kmod-rt2800-lib),m) \
904 CONFIG_RT2800PCI=$(if $(CONFIG_PACKAGE_kmod-rt2800-pci),m) \
905 CONFIG_RT2800PCI_PCI=$(if $(CONFIG_PCI_SUPPORT),y) \
906 CONFIG_RT2800PCI_SOC=$(if $(CONFIG_TARGET_ramips),y) \
907 CONFIG_RT2800USB=$(if $(CONFIG_PACKAGE_kmod-rt2800-usb),m) \
908 CONFIG_RTL8180=$(if $(CONFIG_PACKAGE_kmod-rtl8180),m) \
909 CONFIG_RTL8187=$(if $(CONFIG_PACKAGE_kmod-rtl8187),m) \
910 CONFIG_MAC80211_HWSIM=$(if $(CONFIG_PACKAGE_kmod-mac80211-hwsim),m) \
911 CONFIG_PCMCIA= \
912 CONFIG_LIBIPW=$(if $(CONFIG_PACKAGE_kmod-net-libipw),m) \
913 CONFIG_LIBERTAS=$(if $(CONFIG_PACKAGE_kmod-libertas-sd)$(CONFIG_PACKAGE_kmod-libertas-usb),m) \
914 CONFIG_LIBERTAS_CS= \
915 CONFIG_LIBERTAS_SPI= \
916 CONFIG_LIBERTAS_SDIO=$(if $(CONFIG_PACKAGE_kmod-libertas-sd),m) \
917 CONFIG_LIBERTAS_THINFIRM= \
918 CONFIG_LIBERTAS_USB=$(if $(CONFIG_PACKAGE_kmod-libertas-usb),m) \
919 CONFIG_IPW2100=$(if $(CONFIG_PACKAGE_kmod-net-ipw2100),m) \
920 CONFIG_IPW2200=$(if $(CONFIG_PACKAGE_kmod-net-ipw2200),m) \
921 CONFIG_NL80211=y \
922 CONFIG_LIB80211= \
923 CONFIG_LIB80211_CRYPT_WEP= \
924 CONFIG_LIB80211_CRYPT_CCMP= \
925 CONFIG_LIB80211_CRYPT_TKIP= \
926 CONFIG_IWLWIFI= \
927 CONFIG_COMPAT_IWLWIFI= \
928 CONFIG_IWLAGN= \
929 CONFIG_MWL8K=$(if $(CONFIG_PACKAGE_kmod-mwl8k),m) \
930 CONFIG_ATMEL= \
931 CONFIG_PCMCIA_ATMEL= \
932 CONFIG_ADM8211= \
933 CONFIG_USB_NET_RNDIS_HOST= \
934 CONFIG_USB_NET_RNDIS_WLAN= \
935 CONFIG_USB_NET_CDCETHER= \
936 CONFIG_USB_USBNET= \
937 CONFIG_AT76C50X_USB= \
938 CONFIG_WL12XX= \
939 CONFIG_EEPROM_93CX6= \
940 CONFIG_HERMES= \
941 CONFIG_AR9170_USB=$(if $(CONFIG_PACKAGE_kmod-ar9170),m) \
942 CONFIG_AR9170_LEDS=$(CONFIG_LEDS_TRIGGERS) \
943 CONFIG_IWM= \
944 CONFIG_ATH9K_HTC= \
945 CONFIG_MAC80211_RC_MINSTREL_HT=y \
946 MADWIFI= \
947 OLD_IWL= \
948 KLIB_BUILD="$(LINUX_DIR)" \
949 MODPROBE=: \
950 KLIB=$(TARGET_MODULES_DIR) \
951 KERNEL_SUBLEVEL=$(lastword $(subst ., ,$(KERNEL_PATCHVER)))
952
953 define Build/Prepare
954 rm -rf $(PKG_BUILD_DIR)
955 mkdir -p $(PKG_BUILD_DIR)
956 $(PKG_UNPACK)
957 $(Build/Patch)
958 unzip -jod $(PKG_BUILD_DIR) $(DL_DIR)/$(RT61FW)
959 unzip -jod $(PKG_BUILD_DIR) $(DL_DIR)/$(RT71FW)
960 -unzip -jod $(PKG_BUILD_DIR) $(DL_DIR)/$(RT2860FW)
961 -unzip -jod $(PKG_BUILD_DIR) $(DL_DIR)/$(RT2870FW)
962 $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(IPW2100_NAME)-$(IPW2100_VERSION).tgz
963 $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(IPW2200_NAME)-$(IPW2200_VERSION).tgz
964 $(TAR) -C $(PKG_BUILD_DIR) -xjf $(DL_DIR)/$(ZD1211FW_NAME)-$(ZD1211FW_VERSION).tar.bz2
965 rm -rf $(PKG_BUILD_DIR)/include/linux/ssb
966 rm -f $(PKG_BUILD_DIR)/include/net/ieee80211.h
967 rm $(PKG_BUILD_DIR)/include/linux/eeprom_93cx6.h
968 endef
969
970 ifneq ($(CONFIG_PACKAGE_kmod-cfg80211),)
971 define Build/Compile/kmod
972 rm -rf $(PKG_BUILD_DIR)/modules
973 $(MAKE) $(PKG_JOBS) -C "$(PKG_BUILD_DIR)" $(MAKE_OPTS) all
974 endef
975 endif
976
977 define Build/Compile
978 $(call Build/Compile/kmod)
979 endef
980
981 define Build/InstallDev
982 mkdir -p \
983 $(1)/usr/include/mac80211 \
984 $(1)/usr/include/mac80211/ath \
985 $(1)/usr/include/net/mac80211
986 $(CP) $(PKG_BUILD_DIR)/net/mac80211/*.h $(PKG_BUILD_DIR)/include/* $(1)/usr/include/mac80211/
987 $(CP) $(PKG_BUILD_DIR)/net/mac80211/rate.h $(1)/usr/include/net/mac80211/
988 $(CP) $(PKG_BUILD_DIR)/drivers/net/wireless/ath/*.h $(1)/usr/include/mac80211/ath/
989 endef
990
991 define KernelPackage/libertas-usb/install
992 $(INSTALL_DIR) $(1)/lib/firmware
993 $(INSTALL_DATA) $(DL_DIR)/$(USB8388FW_NAME)-$(USB8388FW_VERSION).bin $(1)/lib/firmware/$(USB8388FW_NAME).bin
994 endef
995
996 define KernelPackage/libertas-sd/install
997 echo "Libertas install: $(CONFIG_PACKAGE_kmod-libertas-sd)"
998 $(INSTALL_DIR) $(1)/lib/firmware
999 $(INSTALL_DATA) $(DL_DIR)/$(SD8686FW_NAME)-$(SD8686FW_VERSION).bin $(1)/lib/firmware/$(SD8686FW_NAME).bin
1000 $(INSTALL_DATA) $(DL_DIR)/$(SD8686HELPER_NAME).bin $(1)/lib/firmware/$(SD8686HELPER_NAME).bin
1001 endef
1002
1003 define KernelPackage/cfg80211/install
1004 $(INSTALL_DIR) $(1)/lib/wifi
1005 $(INSTALL_DATA) ./files/lib/wifi/mac80211.sh $(1)/lib/wifi
1006 endef
1007
1008 define KernelPackage/p54-pci/install
1009 $(INSTALL_DIR) $(1)/lib/firmware
1010 $(INSTALL_DATA) $(DL_DIR)/$(P54PCIFW) $(1)/lib/firmware/isl3886pci
1011 endef
1012
1013 define KernelPackage/p54-usb/install
1014 $(INSTALL_DIR) $(1)/lib/firmware
1015 $(INSTALL_DATA) $(DL_DIR)/$(P54USBFW) $(1)/lib/firmware/isl3887usb
1016 endef
1017
1018 define KernelPackage/p54-spi/install
1019 $(INSTALL_DIR) $(1)/lib/firmware
1020 $(INSTALL_DATA) $(DL_DIR)/$(P54SPIFW) $(1)/lib/firmware/3826.arm
1021 endef
1022
1023 define KernelPackage/rt61-pci/install
1024 $(INSTALL_DIR) $(1)/lib/firmware
1025 $(INSTALL_DATA) $(PKG_BUILD_DIR)/rt2?61*.bin $(1)/lib/firmware/
1026 endef
1027
1028 define KernelPackage/rt73-usb/install
1029 $(INSTALL_DIR) $(1)/lib/firmware
1030 $(INSTALL_DATA) $(PKG_BUILD_DIR)/rt73.bin $(1)/lib/firmware/
1031 endef
1032
1033 define KernelPackage/rt2800-pci/install
1034 $(INSTALL_DIR) $(1)/lib/firmware
1035 $(INSTALL_DATA) $(PKG_BUILD_DIR)/rt2860.bin $(1)/lib/firmware/
1036 endef
1037
1038 define KernelPackage/rt2800-usb/install
1039 $(INSTALL_DIR) $(1)/lib/firmware
1040 $(INSTALL_DATA) $(PKG_BUILD_DIR)/rt2870.bin $(1)/lib/firmware/
1041 endef
1042
1043 define KernelPackage/zd1211rw/install
1044 $(INSTALL_DIR) $(1)/lib/firmware/zd1211
1045 $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(ZD1211FW_NAME)/zd1211* $(1)/lib/firmware/zd1211
1046 endef
1047
1048 define KernelPackage/ar9170/install
1049 $(INSTALL_DIR) $(1)/lib/firmware
1050 $(INSTALL_DATA) $(DL_DIR)/$(AR9170FW) $(1)/lib/firmware/
1051 endef
1052
1053 define KernelPackage/net-ipw2100/install
1054 $(INSTALL_DIR) $(1)/lib/firmware
1055 $(INSTALL_DATA) $(PKG_BUILD_DIR)/ipw2100-$(IPW2100_VERSION)*.fw $(1)/lib/firmware
1056 endef
1057
1058 define KernelPackage/net-ipw2200/install
1059 $(INSTALL_DIR) $(1)/lib/firmware
1060 $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(IPW2200_NAME)-$(IPW2200_VERSION)/ipw2200*.fw $(1)/lib/firmware
1061 endef
1062
1063 define Build/b43-common
1064 tar xjf "$(DL_DIR)/$(PKG_B43_FWCUTTER_SOURCE)" -C "$(PKG_BUILD_DIR)"
1065 $(MAKE) -C "$(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_OBJECT)" \
1066 CFLAGS="-I$(STAGING_DIR_HOST)/include -include endian.h" \
1067 QUIET_SPARSE=:
1068 $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_OBJECT)/b43-fwcutter $(STAGING_DIR_HOST)/bin/
1069 ifeq ($(CONFIG_B43_OPENFIRMWARE),y)
1070 $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/
1071 $(MAKE) -C "$(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_SUBDIR)/assembler/"
1072 $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_SUBDIR)/assembler/b43-asm $(STAGING_DIR_HOST)/bin/
1073 $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_SUBDIR)/assembler/b43-asm.bin $(STAGING_DIR_HOST)/bin/
1074 endif
1075 $(INSTALL_BIN) ./files/host_bin/b43-fwsquash.py $(STAGING_DIR_HOST)/bin/
1076 endef
1077
1078 define KernelPackage/b43/install
1079 rm -rf $(1)/lib/firmware/
1080 $(call Build/b43-common)
1081 ifeq ($(CONFIG_B43_OPENFIRMWARE),y)
1082 tar xzf "$(DL_DIR)/$(PKG_B43_FWV4_SOURCE)" -C "$(PKG_BUILD_DIR)"
1083 else
1084 tar xjf "$(DL_DIR)/$(PKG_B43_FWV4_SOURCE)" -C "$(PKG_BUILD_DIR)"
1085 endif
1086 $(INSTALL_DIR) $(1)/lib/firmware/
1087 ifeq ($(CONFIG_B43_OPENFIRMWARE),y)
1088 $(MAKE) -C "$(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/"
1089 $(INSTALL_DIR) $(1)/lib/firmware/b43-open/
1090 $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/ucode5.fw $(1)/lib/firmware/b43-open/ucode5.fw
1091 $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/b0g0bsinitvals5.fw $(1)/lib/firmware/b43-open/b0g0bsinitvals5.fw
1092 $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/b0g0initvals5.fw $(1)/lib/firmware/b43-open/b0g0initvals5.fw
1093 else
1094 b43-fwcutter -w $(1)/lib/firmware/ $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)
1095 endif
1096 ifneq ($(CONFIG_B43_FW_SQUASH),)
1097 b43-fwsquash.py "$(CONFIG_B43_FW_SQUASH_PHYTYPES)" "$(CONFIG_B43_FW_SQUASH_COREREVS)" "$(1)/lib/firmware/b43"
1098 endif
1099 endef
1100
1101 define KernelPackage/b43legacy/install
1102 $(call Build/b43-common)
1103 $(INSTALL_DIR) $(1)/lib/firmware/
1104
1105 b43-fwcutter --unsupported -w $(1)/lib/firmware/ $(DL_DIR)/$(PKG_B43_FWV3_SOURCE)
1106 ifneq ($(CONFIG_B43LEGACY_FW_SQUASH),)
1107 b43-fwsquash.py "G" "$(CONFIG_B43LEGACY_FW_SQUASH_COREREVS)" "$(1)/lib/firmware/b43legacy"
1108 endif
1109 endef
1110
1111 $(eval $(call KernelPackage,ath5k))
1112 $(eval $(call KernelPackage,libertas-usb))
1113 $(eval $(call KernelPackage,libertas-sd))
1114 $(eval $(call KernelPackage,cfg80211))
1115 $(eval $(call KernelPackage,mac80211))
1116 $(eval $(call KernelPackage,p54-common))
1117 $(eval $(call KernelPackage,p54-pci))
1118 $(eval $(call KernelPackage,p54-usb))
1119 $(eval $(call KernelPackage,p54-spi))
1120 $(eval $(call KernelPackage,rt2x00-lib))
1121 $(eval $(call KernelPackage,rt2x00-pci))
1122 $(eval $(call KernelPackage,rt2x00-usb))
1123 $(eval $(call KernelPackage,rt2x00-soc))
1124 $(eval $(call KernelPackage,rt2800-lib))
1125 $(eval $(call KernelPackage,rt2400-pci))
1126 $(eval $(call KernelPackage,rt2500-pci))
1127 $(eval $(call KernelPackage,rt2500-usb))
1128 $(eval $(call KernelPackage,rt61-pci))
1129 $(eval $(call KernelPackage,rt73-usb))
1130 $(eval $(call KernelPackage,rt2800-pci))
1131 $(eval $(call KernelPackage,rt2800-usb))
1132 $(eval $(call KernelPackage,rtl8180))
1133 $(eval $(call KernelPackage,rtl8187))
1134 $(eval $(call KernelPackage,zd1211rw))
1135 $(eval $(call KernelPackage,mac80211-hwsim))
1136 $(eval $(call KernelPackage,ath9k))
1137 $(eval $(call KernelPackage,ath))
1138 $(eval $(call KernelPackage,carl9170))
1139 $(eval $(call KernelPackage,b43))
1140 $(eval $(call KernelPackage,b43legacy))
1141 $(eval $(call KernelPackage,net-libipw))
1142 $(eval $(call KernelPackage,net-ipw2100))
1143 $(eval $(call KernelPackage,net-ipw2200))
1144 $(eval $(call KernelPackage,mwl8k))