source: trunk/package/mac80211/Makefile @ 27084

Last change on this file since 27084 was 27084, checked in by juhosg, 6 years ago

mac80211: add initial support for AR9330

File size: 52.0 KB
Line 
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
8include $(TOPDIR)/rules.mk
9include $(INCLUDE_DIR)/kernel.mk
10
11PKG_NAME:=mac80211
12
13PKG_VERSION:=2011-05-27
14PKG_RELEASE:=2
15PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
16PKG_MD5SUM:=3a382b03333aff304dbe8ee94fce6b5a
17
18PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
19PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
20PKG_BUILD_PARALLEL:=1
21
22PKG_DRIVERS = \
23        ath5k libertas-usb libertas-sd p54-common p54-pci p54-usb p54-spi \
24        rt2x00-lib rt2x00-pci rt2x00-usb rt2x00-soc rt2800-lib rt2400-pci \
25        rt2500-pci rt2500-usb rt61-pci rt73-usb rt2800-pci rt2800-usb \
26        rtl8180 rtl8187 zd1211rw mac80211-hwsim carl9170 b43 b43legacy \
27        ath9k-common ath9k ath9k-htc ath net-libipw net-ipw2100 net-ipw2200 \
28        mwl8k net-hermes net-hermes-pci net-hermes-plx net-hermes-pcmcia \
29        iwl-legacy iwl3945 iwl4965 iwlagn
30
31PKG_CONFIG_DEPENDS:= \
32        CONFIG_PACKAGE_kmod-mac80211 \
33        $(patsubst %,CONFIG_PACKAGE_kmod-%,$(PKG_DRIVERS)) \
34        CONFIG_PACKAGE_MAC80211_DEBUGFS \
35        CONFIG_PACKAGE_ATH_DEBUG \
36        CONFIG_PACKAGE_B43_DEBUG \
37        CONFIG_PACKAGE_B43_PIO \
38        CONFIG_PACKAGE_B43_N_PHY \
39        CONFIG_ATH_USER_REGD \
40
41CARL9170_FW_VERSION:=1.9.2
42
43include $(INCLUDE_DIR)/package.mk
44
45WMENU:=Wireless Drivers
46
47define KernelPackage/mac80211/Default
48  SUBMENU:=$(WMENU)
49  URL:=http://linuxwireless.org/
50  MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
51  DEPENDS:=@(!(TARGET_avr32||TARGET_ep93xx||TARGET_ps3||TARGET_pxcab)||BROKEN)
52endef
53
54define KernelPackage/cfg80211
55  $(call KernelPackage/mac80211/Default)
56  TITLE:=cfg80211 - wireless configuration API
57  DEPENDS+= +wireless-tools +iw +crda
58ifeq ($(strip $(call CompareKernelPatchVer,$(KERNEL_PATCHVER),ge,2.6.33)),1)
59  FILES:= \
60        $(PKG_BUILD_DIR)/compat/compat.ko \
61        $(PKG_BUILD_DIR)/net/wireless/cfg80211.ko
62  AUTOLOAD:=$(call AutoLoad,20,compat cfg80211)
63else
64  FILES:= \
65        $(PKG_BUILD_DIR)/compat/compat.ko \
66        $(PKG_BUILD_DIR)/compat/compat_firmware_class.ko \
67        $(PKG_BUILD_DIR)/net/wireless/cfg80211.ko
68  AUTOLOAD:=$(call AutoLoad,20,compat compat_firmware_class cfg80211)
69endif
70endef
71
72define KernelPackage/cfg80211/description
73cfg80211 is the Linux wireless LAN (802.11) configuration API.
74endef
75
76define KernelPackage/mac80211
77  $(call KernelPackage/mac80211/Default)
78  TITLE:=Linux 802.11 Wireless Networking Stack
79  DEPENDS+= +kmod-crypto-core +kmod-crypto-arc4 +kmod-crypto-aes +kmod-cfg80211
80  KCONFIG:=\
81        CONFIG_AVERAGE=y
82  FILES:= $(PKG_BUILD_DIR)/net/mac80211/mac80211.ko
83  AUTOLOAD:=$(call AutoLoad,21,mac80211)
84  MENU:=1
85endef
86
87define KernelPackage/mac80211/config
88        menu "Configuration"
89                depends on PACKAGE_kmod-mac80211
90
91        config PACKAGE_MAC80211_DEBUGFS
92                bool "Export mac80211 internals in DebugFS"
93                default y
94                help
95                  Select this to see extensive information about
96                  the internal state of mac80211 in debugfs.
97
98                  Say N unless you know you need this.
99
100        endmenu
101endef
102
103define KernelPackage/mac80211/description
104Generic IEEE 802.11 Networking Stack (mac80211)
105endef
106
107# Prism54 drivers
108P54PCIFW:=2.13.12.0.arm
109P54USBFW:=2.13.24.0.lm87.arm
110P54SPIFW:=2.13.0.0.a.13.14.arm
111CARL9170_FW:=carl9170-1.fw
112
113define Download/p54usb
114  FILE:=$(P54USBFW)
115  URL:=http://daemonizer.de/prism54/prism54-fw/fw-usb
116  MD5SUM:=8e8ab005a4f8f0123bcdc51bc25b47f6
117endef
118$(eval $(call Download,p54usb))
119
120define Download/p54pci
121  FILE:=$(P54PCIFW)
122  URL:=http://daemonizer.de/prism54/prism54-fw/fw-softmac
123  MD5SUM:=ff7536af2092b1c4b21315bd103ef4c4
124endef
125$(eval $(call Download,p54pci))
126
127define Download/p54spi
128  FILE:=$(P54SPIFW)
129  URL:=http://daemonizer.de/prism54/prism54-fw/stlc4560
130  MD5SUM:=42661f8ecbadd88012807493f596081d
131endef
132$(eval $(call Download,p54spi))
133
134define Download/carl9170
135  FILE:=$(CARL9170_FW)-$(CARL9170_FW_VERSION)
136  URL:=http://downloads.openwrt.org/sources/
137  MD5SUM:=9e33ac39dcd610aa1ad80bbf4f1abccf
138endef
139$(eval $(call Download,carl9170))
140
141define KernelPackage/p54/Default
142  $(call KernelPackage/mac80211/Default)
143  TITLE:=Prism54 Drivers
144endef
145
146define KernelPackage/p54/description
147  Kernel module for Prism54 chipsets (mac80211)
148endef
149
150define KernelPackage/p54-common
151  $(call KernelPackage/p54/Default)
152  DEPENDS+= @PCI_SUPPORT||@USB_SUPPORT||@TARGET_omap24xx +kmod-mac80211 +kmod-crc-ccitt
153  TITLE+= (COMMON)
154  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/p54/p54common.ko
155  AUTOLOAD:=$(call AutoLoad,30,p54common)
156endef
157
158define KernelPackage/p54-pci
159  $(call KernelPackage/p54/Default)
160  TITLE+= (PCI)
161  DEPENDS+= @PCI_SUPPORT +kmod-p54-common
162  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/p54/p54pci.ko
163  AUTOLOAD:=$(call AutoLoad,31,p54pci)
164endef
165
166define KernelPackage/p54-usb
167  $(call KernelPackage/p54/Default)
168  TITLE+= (USB)
169  DEPENDS+= @USB_SUPPORT +kmod-usb-core +kmod-p54-common
170  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/p54/p54usb.ko
171  AUTOLOAD:=$(call AutoLoad,31,p54usb)
172endef
173
174define KernelPackage/p54-spi
175  $(call KernelPackage/p54/Default)
176  TITLE+= (SPI)
177  DEPENDS+= @TARGET_omap24xx +kmod-p54-common
178  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/p54/p54spi.ko
179  AUTOLOAD:=$(call AutoLoad,31,p54spi)
180endef
181
182# Ralink rt2x00 drivers
183RT61FW:=RT61_Firmware_V1.2.zip
184RT71FW:=RT71W_Firmware_V1.8.zip
185RT2860FW:=RT2860_Firmware_V11.zip
186RT2870FW:=RT2870_Firmware_V8.zip
187
188define Download/rt61
189  FILE:=$(RT61FW)
190  URL:=http://www.ralinktech.com.tw/data/
191  MD5SUM:=d4c690c93b470bc9a681297c2adc6281
192endef
193$(eval $(call Download,rt61))
194
195define Download/rt71w
196  FILE:=$(RT71FW)
197  URL:=http://www.ralinktech.com.tw/data/
198  MD5SUM:=1e7a5dc574e0268574fcda3fd5cf52f7
199endef
200$(eval $(call Download,rt71w))
201
202define Download/rt2860
203  FILE:=$(RT2860FW)
204  URL:=http://www.ralinktech.com.tw/data/drivers
205  MD5SUM:=440a81756a52c53528f16faa41c40124
206endef
207$(eval $(call Download,rt2860))
208
209define Download/rt2870
210  FILE:=$(RT2870FW)
211  URL:=http://www.ralinktech.com.tw/data/drivers
212  MD5SUM:=a7aae1d8cfd68e4d86a73000df0b6584
213endef
214$(eval $(call Download,rt2870))
215
216AR9170FW:=ar9170.fw
217
218define Download/ar9170
219  FILE:=$(AR9170FW)
220  URL:=http://www.kernel.org/pub/linux/kernel/people/mcgrof/firmware/ar9170
221  MD5SUM:=34feec4ec0eae3bb92c7c1ea2dfb4530
222endef
223$(eval $(call Download,ar9170))
224
225NEED_RT2X00_LIB_CRYPTO:=y
226NEED_RT2X00_LIB_FIRMWARE:=y
227NEED_RT2X00_LIB_HT:=y
228NEED_RT2X00_LIB_LEDS:=y
229
230define KernelPackage/rt2x00/Default
231  $(call KernelPackage/mac80211/Default)
232  TITLE:=Ralink Drivers for RT2x00 cards
233endef
234
235define KernelPackage/rt2x00-lib
236$(call KernelPackage/rt2x00/Default)
237  DEPENDS+= @(PCI_SUPPORT||USB_SUPPORT||TARGET_ramips) +kmod-mac80211 +kmod-crc-itu-t
238  TITLE+= (LIB)
239  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00lib.ko
240  AUTOLOAD:=$(call AutoLoad,25,rt2x00lib)
241  MENU:=1
242endef
243
244define KernelPackage/rt2x00-lib/config
245        menu "Configuration"
246                depends PACKAGE_kmod-rt2x00-lib
247
248        config PACKAGE_RT2X00_LIB_DEBUGFS
249                bool "Enable rt2x00 debugfs support"
250                depends PACKAGE_MAC80211_DEBUGFS
251                help
252                  Enable creation of debugfs files for the rt2x00 drivers.
253                  These debugfs files support both reading and writing of the
254                  most important register types of the rt2x00 hardware.
255
256        config PACKAGE_RT2X00_DEBUG
257                bool "Enable rt2x00 debug output"
258                help
259                  Enable debugging output for all rt2x00 modules
260
261        endmenu
262endef
263
264define KernelPackage/rt2x00-pci
265$(call KernelPackage/rt2x00/Default)
266  DEPENDS+= @(PCI_SUPPORT||TARGET_ramips) +kmod-rt2x00-lib +kmod-eeprom-93cx6
267  TITLE+= (PCI)
268  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00pci.ko
269  AUTOLOAD:=$(call AutoLoad,26,rt2x00pci)
270endef
271
272define KernelPackage/rt2x00-usb
273$(call KernelPackage/rt2x00/Default)
274  DEPENDS+= @USB_SUPPORT +kmod-rt2x00-lib +kmod-usb-core
275  TITLE+= (USB)
276  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00usb.ko
277  AUTOLOAD:=$(call AutoLoad,26,rt2x00usb)
278endef
279
280define KernelPackage/rt2x00-soc
281$(call KernelPackage/rt2x00/Default)
282  DEPENDS+= @TARGET_ramips +kmod-rt2x00-lib
283  TITLE+= (SoC)
284  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00soc.ko
285  AUTOLOAD:=$(call AutoLoad,26,rt2x00soc)
286endef
287
288define KernelPackage/rt2800-lib
289$(call KernelPackage/rt2x00/Default)
290  DEPENDS+= @(PCI_SUPPORT||USB_SUPPORT||TARGET_ramips) +kmod-rt2x00-lib +TARGET_ramips:kmod-rt2x00-soc +@DRIVER_11N_SUPPORT
291  TITLE+= (rt2800 LIB)
292  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2800lib.ko
293  AUTOLOAD:=$(call AutoLoad,27,rt2800lib)
294endef
295
296define KernelPackage/rt2400-pci
297$(call KernelPackage/rt2x00/Default)
298  DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-pci
299  TITLE+= (RT2400 PCI)
300  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2400pci.ko
301  AUTOLOAD:=$(call AutoLoad,27,rt2400pci)
302endef
303
304define KernelPackage/rt2500-pci
305$(call KernelPackage/rt2x00/Default)
306  DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-pci
307  TITLE+= (RT2500 PCI)
308  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2500pci.ko
309  AUTOLOAD:=$(call AutoLoad,27,rt2500pci)
310endef
311
312define KernelPackage/rt2500-usb
313$(call KernelPackage/rt2x00/Default)
314  DEPENDS+= @USB_SUPPORT +kmod-rt2x00-usb
315  TITLE+= (RT2500 USB)
316  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2500usb.ko
317  AUTOLOAD:=$(call AutoLoad,27,rt2500usb)
318endef
319
320define KernelPackage/rt61-pci
321$(call KernelPackage/rt2x00/Default)
322  DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-pci
323  TITLE+= (RT2x61 PCI)
324  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt61pci.ko
325  AUTOLOAD:=$(call AutoLoad,27,rt61pci)
326endef
327
328define KernelPackage/rt73-usb
329  $(call KernelPackage/rt2x00/Default)
330  DEPENDS+= @USB_SUPPORT +kmod-rt2x00-usb
331  TITLE+= (RT73 USB)
332  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt73usb.ko
333  AUTOLOAD:=$(call AutoLoad,27,rt73usb)
334endef
335
336define KernelPackage/rt2800-pci
337$(call KernelPackage/rt2x00/Default)
338  DEPENDS+= @(PCI_SUPPORT||TARGET_ramips) +kmod-rt2x00-pci +kmod-rt2800-lib +kmod-crc-ccitt +TARGET_ramips:kmod-rt2x00-soc
339  TITLE+= (RT2860 PCI)
340  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2800pci.ko
341  AUTOLOAD:=$(call AutoLoad,28,rt2800pci)
342endef
343
344define KernelPackage/rt2800-usb
345$(call KernelPackage/rt2x00/Default)
346  DEPENDS+= @USB_SUPPORT +kmod-rt2x00-usb +kmod-rt2800-lib +kmod-crc-ccitt
347  TITLE+= (RT2870 USB)
348  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2800usb.ko
349  AUTOLOAD:=$(call AutoLoad,28,rt2800usb)
350endef
351
352define KernelPackage/rtl818x/Default
353  $(call KernelPackage/mac80211/Default)
354  TITLE:=Realtek Drivers for RTL818x devices
355  URL:=http://wireless.kernel.org/en/users/Drivers/rtl8187
356  DEPENDS+= +kmod-eeprom-93cx6 +kmod-mac80211
357endef
358
359define KernelPackage/rtl8180
360  $(call KernelPackage/rtl818x/Default)
361  DEPENDS+= @PCI_SUPPORT
362  TITLE+= (RTL8180 PCI)
363  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rtl818x/rtl8180/rtl8180.ko
364  AUTOLOAD:=$(call AutoLoad,27,rtl8180)
365endef
366
367define KernelPackage/rtl8187
368$(call KernelPackage/rtl818x/Default)
369  DEPENDS+= @USB_SUPPORT +kmod-usb-core
370  TITLE+= (RTL8187 USB)
371  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rtl818x/rtl8187/rtl8187.ko
372  AUTOLOAD:=$(call AutoLoad,27,rtl8187)
373endef
374
375ZD1211FW_NAME:=zd1211-firmware
376ZD1211FW_VERSION:=1.4
377define Download/zd1211rw
378  FILE:=$(ZD1211FW_NAME)-$(ZD1211FW_VERSION).tar.bz2
379  URL:=@SF/zd1211/
380  MD5SUM:=19f28781d76569af8551c9d11294c870
381endef
382$(eval $(call Download,zd1211rw))
383
384define KernelPackage/zd1211rw
385  $(call KernelPackage/mac80211/Default)
386  TITLE:=Zydas ZD1211 support
387  DEPENDS+= @USB_SUPPORT +kmod-usb-core +kmod-mac80211
388  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/zd1211rw/zd1211rw.ko
389  AUTOLOAD:=$(call AutoLoad,60,zd1211rw)
390endef
391
392define KernelPackage/ath/config
393        menu "Configuration"
394                depends on PACKAGE_kmod-ath
395
396        config ATH_USER_REGD
397                bool "Force Atheros drivers to respect the user's regdomain settings"
398                help
399                  Atheros' idea of regulatory handling is that the EEPROM of the card defines
400                  the regulatory limits and the user is only allowed to restrict the settings
401                  even further, even if the country allows frequencies or power levels that
402                  are forbidden by the EEPROM settings.
403
404                  Select this option if you want the driver to respect the user's decision about
405                  regulatory settings.
406
407        config PACKAGE_ATH_DEBUG
408                bool "Atheros wireless debugging"
409                help
410                  Say Y, if you want to debug atheros wireless drivers.
411                  Right now only ath9k makes use of this.
412
413        endmenu
414endef
415
416define KernelPackage/ath
417  $(call KernelPackage/mac80211/Default)
418  TITLE:=Atheros common driver part
419  DEPENDS+= @PCI_SUPPORT||USB_SUPPORT||TARGET_ar71xx +kmod-mac80211
420  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath.ko
421  AUTOLOAD:=$(call AutoLoad,26,ath)
422  MENU:=1
423endef
424
425define KernelPackage/ath/description
426 This module contains some common parts needed by Atheros Wireless drivers.
427endef
428
429define KernelPackage/ath5k
430  $(call KernelPackage/mac80211/Default)
431  TITLE:=Atheros 5xxx wireless cards support
432  URL:=http://linuxwireless.org/en/users/Drivers/ath5k
433  DEPENDS+= @PCI_SUPPORT||@TARGET_atheros +kmod-ath
434  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath5k/ath5k.ko
435  AUTOLOAD:=$(call AutoLoad,27,ath5k)
436endef
437
438define KernelPackage/ath5k/description
439 This module adds support for wireless adapters based on
440 Atheros 5xxx chipset.
441endef
442
443define KernelPackage/ath9k-common
444  $(call KernelPackage/mac80211/Default)
445  TITLE:=Atheros 802.11n wireless devices (common code for ath9k and ath9k_htc)
446  URL:=http://linuxwireless.org/en/users/Drivers/ath9k
447  DEPENDS+= @PCI_SUPPORT||TARGET_ar71xx +kmod-ath +@DRIVER_11N_SUPPORT
448  FILES:= \
449        $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k_common.ko \
450        $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k_hw.ko
451  AUTOLOAD:=$(call AutoLoad,27,ath9k_hw ath9k_common)
452endef
453
454define KernelPackage/ath9k
455  $(call KernelPackage/mac80211/Default)
456  TITLE:=Atheros 802.11n PCI wireless cards support
457  URL:=http://linuxwireless.org/en/users/Drivers/ath9k
458  DEPENDS+= @PCI_SUPPORT||TARGET_ar71xx +kmod-ath9k-common
459  FILES:= \
460        $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k.ko
461  AUTOLOAD:=$(call AutoLoad,28,ath9k)
462endef
463
464define KernelPackage/ath9k/description
465This module adds support for wireless adapters based on
466Atheros IEEE 802.11n AR5008 and AR9001 family of chipsets.
467endef
468
469AR7010FW:=ar7010.fw
470AR7010_1_1_FW:=ar7010_1_1.fw
471AR9271FW:=ar9271.fw
472
473define Download/ar9271
474  FILE:=$(AR9271FW)
475  URL:=http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=blob_plain;f=ar9271.fw;h=d0ee74a1c8dccb7cc21f5be90f1d4048fa9dbf9e;hb=HEAD;?
476  MD5SUM:=2e6f5045ec4c5a42bb93ced242bad0ba
477endef
478$(eval $(call Download,ar9271))
479
480define Download/ar7010
481  FILE:=$(AR7010FW)
482  URL:=http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=blob_plain;f=ar7010.fw;h=840005d0f0c81838c581b8cd5d76c8dd3843731c;hb=HEAD;?
483  MD5SUM:=59823b82b1f72bed9b044e8cc78ad65c
484endef
485$(eval $(call Download,ar7010))
486
487define Download/ar7010_1_1
488  FILE:=$(AR7010_1_1_FW)
489  URL:=http://git.kernel.org/?p=linux/kernel/git/dwmw2/linux-firmware.git;a=blob_plain;f=ar7010_1_1.fw;h=684d4cd1a8cac4f58305589e31f9d856d03a8ef0;hb=HEAD;?
490  MD5SUM:=544fcbe5a93cfa53c7e6d3ded2b05347
491endef
492$(eval $(call Download,ar7010_1_1))
493
494define KernelPackage/ath9k-htc
495  $(call KernelPackage/mac80211/Default)
496  TITLE:=Atheros 802.11n USB device support
497  URL:=http://linuxwireless.org/en/users/Drivers/ath9k
498  DEPENDS+= @USB_SUPPORT +kmod-ath9k-common +kmod-usb-core
499  FILES:= \
500        $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k_htc.ko
501  AUTOLOAD:=$(call AutoLoad,28,ath9k_htc)
502endef
503
504define KernelPackage/ath9k-htc/description
505This module adds support for wireless adapters based on
506Atheros USB AR9271 and AR7010 family of chipsets.
507endef
508
509define KernelPackage/carl9170
510  $(call KernelPackage/mac80211/Default)
511  TITLE:=Driver for Atheros AR9170 USB sticks
512  DEPENDS:=@USB_SUPPORT +kmod-mac80211 +kmod-ath +kmod-usb-core +@DRIVER_11N_SUPPORT
513  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/carl9170/carl9170.ko
514  AUTOLOAD:=$(call AutoLoad,60,carl9170)
515endef
516
517define KernelPackage/carl9170/install
518        $(INSTALL_DIR) $(1)/lib/firmware
519        $(INSTALL_DATA) $(DL_DIR)/$(CARL9170_FW)-$(CARL9170_FW_VERSION) $(1)/lib/firmware/$(CARL9170_FW)
520endef
521
522
523USB8388FW_NAME:=usb8388
524USB8388FW_VERSION:=5.110.22.p23
525
526define Download/usb8388
527  URL:=http://dev.laptop.org/pub/firmware/libertas/
528  FILE:=$(USB8388FW_NAME)-$(USB8388FW_VERSION).bin
529  MD5SUM=5e38f55719df3d0c58dd3bd02575a09c
530endef
531$(eval $(call Download,usb8388))
532
533SD8686FW_NAME:=sd8686
534SD8686FW_VERSION:=9.70.7.p0
535
536define Download/sd8686
537  URL:=http://dev.laptop.org/pub/firmware/libertas/
538  FILE:=$(SD8686FW_NAME)-$(SD8686FW_VERSION).bin
539  MD5SUM=b4f8be61e19780a14836f146c538c5dd
540endef
541$(eval $(call Download,sd8686))
542
543SD8686HELPER_NAME:=sd8686_helper
544
545define Download/sd8686_helper
546  URL:=http://dev.laptop.org/pub/firmware/libertas/
547  FILE:=$(SD8686HELPER_NAME).bin
548  MD5SUM=2a4d8f4df198ce949c350df5674f4ac6
549endef
550$(eval $(call Download,sd8686_helper))
551
552define KernelPackage/libertas-usb
553  $(call KernelPackage/mac80211/Default)
554  DEPENDS+= @USB_SUPPORT +kmod-mac80211 +kmod-usb-core +kmod-lib80211
555  TITLE:=Marvell 88W8015 Wireless Driver
556  FILES:= \
557        $(PKG_BUILD_DIR)/drivers/net/wireless/libertas/libertas.ko \
558        $(PKG_BUILD_DIR)/drivers/net/wireless/libertas/usb8xxx.ko
559  AUTOLOAD:=$(call AutoLoad,27,libertas usb8xxx)
560endef
561
562define KernelPackage/libertas-sd
563  $(call KernelPackage/mac80211/Default)
564  DEPENDS+= +kmod-mac80211 +kmod-lib80211 +@DRIVER_WEXT_SUPPORT
565  TITLE:=Marvell 88W8686 Wireless Driver
566  FILES:= \
567        $(PKG_BUILD_DIR)/drivers/net/wireless/libertas/libertas.ko \
568        $(PKG_BUILD_DIR)/drivers/net/wireless/libertas/libertas_sdio.ko
569  AUTOLOAD:=$(call AutoLoad,91,libertas libertas_sdio)
570endef
571
572define KernelPackage/mac80211-hwsim
573  $(call KernelPackage/mac80211/Default)
574  TITLE:=mac80211 HW simulation device
575  DEPENDS+= +kmod-mac80211
576  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/mac80211_hwsim.ko
577  AUTOLOAD:=$(call AutoLoad,60,mac80211_hwsim)
578endef
579
580define KernelPackage/net-libipw
581  $(call KernelPackage/mac80211/Default)
582  TITLE:=libipw for ipw2100 and ipw2200
583  DEPENDS:=@PCI_SUPPORT +kmod-crypto-core +kmod-crypto-arc4 +kmod-crypto-aes +kmod-crypto-michael-mic +kmod-lib80211 +kmod-cfg80211
584  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ipw2x00/libipw.ko
585  AUTOLOAD:=$(call AutoLoad,49,libipw)
586endef
587
588define KernelPackage/net-libipw/description
589 Hardware independent IEEE 802.11 networking stack for ipw2100 and ipw2200.
590endef
591
592IPW2100_NAME:=ipw2100-fw
593IPW2100_VERSION:=1.3
594
595define Download/net-ipw2100
596  URL:=http://bughost.org/firmware/
597  FILE:=$(IPW2100_NAME)-$(IPW2100_VERSION).tgz
598  MD5SUM=46aa75bcda1a00efa841f9707bbbd113
599endef
600$(eval $(call Download,net-ipw2100))
601
602define KernelPackage/net-ipw2100
603  $(call KernelPackage/mac80211/Default)
604  TITLE:=Intel IPW2100 driver
605  DEPENDS:=@PCI_SUPPORT +kmod-net-libipw
606  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ipw2x00/ipw2100.ko
607  AUTOLOAD:=$(call AutoLoad,50,ipw2100)
608endef
609
610define KernelPackage/net-ipw2100/description
611 Kernel support for Intel IPW2100
612 Includes:
613 - ipw2100
614endef
615
616IPW2200_NAME:=ipw2200-fw
617IPW2200_VERSION:=3.1
618
619define Download/net-ipw2200
620  URL:=http://bughost.org/firmware/
621  FILE:=$(IPW2200_NAME)-$(IPW2200_VERSION).tgz
622  MD5SUM=eaba788643c7cc7483dd67ace70f6e99
623endef
624$(eval $(call Download,net-ipw2200))
625
626define KernelPackage/net-ipw2200
627  $(call KernelPackage/mac80211/Default)
628  TITLE:=Intel IPW2200 driver
629  DEPENDS:=@PCI_SUPPORT +kmod-net-libipw
630  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ipw2x00/ipw2200.ko
631  AUTOLOAD:=$(call AutoLoad,50,ipw2200)
632endef
633
634define KernelPackage/net-ipw2200/description
635 Kernel support for Intel IPW2200
636 Includes:
637 - ipw2200
638endef
639
640
641define KernelPackage/net-hermes
642  $(call KernelPackage/mac80211/Default)
643  TITLE:=Hermes 802.11b chipset support
644  DEPENDS:=@PCI_SUPPORT||PCMCIA_SUPPORT +kmod-cfg80211 +@DRIVER_WEXT_SUPPORT
645  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/orinoco/orinoco.ko
646  AUTOLOAD:=$(call AutoLoad,50,orinoco)
647endef
648
649define KernelPackage/net-hermes/description
650 Kernel support for Hermes 802.11b chipsets
651endef
652
653define KernelPackage/net-hermes-pci
654  $(call KernelPackage/mac80211/Default)
655  TITLE:=Intersil Prism 2.5 PCI support
656  DEPENDS:=@PCI_SUPPORT +kmod-net-hermes +kmod-cfg80211
657  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/orinoco/orinoco_pci.ko
658  AUTOLOAD:=$(call AutoLoad,55,orinoco_pci)
659endef
660
661define KernelPackage/net-hermes-pci/description
662 Kernel modules for Intersil Prism 2.5 PCI support
663endef
664
665define KernelPackage/net-hermes-plx
666  $(call KernelPackage/mac80211/Default)
667  TITLE:=PLX9052 based PCI adaptor
668  DEPENDS:=@PCI_SUPPORT +kmod-net-hermes +kmod-cfg80211
669  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/orinoco/orinoco_plx.ko
670  AUTOLOAD:=$(call AutoLoad,55,orinoco_plx)
671endef
672
673define KernelPackage/net-hermes-plx/description
674 Kernel modules for Hermes in PLX9052 based PCI adaptors
675endef
676
677define KernelPackage/net-hermes-pcmcia
678  $(call KernelPackage/mac80211/Default)
679  TITLE:=Hermes based PCMCIA adaptors
680  DEPENDS:=@PCMCIA_SUPPORT +kmod-net-hermes +kmod-cfg80211 @BROKEN
681  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/orinoco/orinoco_cs.ko
682  AUTOLOAD:=$(call AutoLoad,55,orinoco_cs)
683endef
684
685define KernelPackage/net-hermes-pcmcia/description
686 Kernel modules for Hermes based PCMCIA adaptors
687endef
688
689IWL3945_NAME:=iwlwifi-3945-ucode
690IWL3945_VERSION:=15.32.2.9
691IWL3945_MD5SUM:=d99a75ab1305d1532a09471b2f9a547a
692IWL4965_NAME:=iwlwifi-4965-ucode
693IWL4965_VERSION:=228.61.2.24
694IWL4965_MD5SUM:=2531028773cfc22aca5539c734f2a241
695IWL5000_NAME:=iwlwifi-5000-ucode
696IWL5000_VERSION:=8.83.5.1
697IWL5000_MD5SUM:=da82465019b3c7d1ee5156474ab4931d
698IWL5150_NAME:=iwlwifi-5150-ucode
699IWL5150_VERSION:=8.24.2.2
700IWL5150_MD5SUM:=f9cee16e455e8046b1bf62c93f882d5d
701IWL1000_NAME:=iwlwifi-1000-ucode
702IWL1000_VERSION:=39.31.5.1
703IWL1000_MD5SUM:=8098503cb2abcdeffffb3ddd2d8d6f60
704IWL6000_NAME:=iwlwifi-6000-ucode
705IWL6000_VERSION:=9.221.4.1
706IWL6000_MD5SUM:=c132a4c1946a9dbc0c36b41696e5c793
707IWL6050_NAME:=iwlwifi-6050-ucode
708IWL6050_VERSION:=41.28.5.1
709IWL6050_MD5SUM:=cb484a65b9139666d4ddebf60598a87b
710IWL6005_NAME:=iwlwifi-6000g2a-ucode
711IWL6005_VERSION:=17.168.5.2
712IWL6005_MD5SUM:=0b9579f4b8faf51c955295607a8e79a8
713IWL6030_NAME:=iwlwifi-6000g2b-ucode
714IWL6030_VERSION:=17.168.5.2
715IWL6030_MD5SUM:=d87411296b4eeda0c91322228e9f8437
716IWL100_NAME:=iwlwifi-100-ucode
717IWL100_VERSION:=39.31.5.1
718IWL100_MD5SUM:=b686f0ab94888ccca3ce74d2d6ee1133
719
720
721define Download/iwl-fw/Default
722  URL:=http://intellinuxwireless.org/iwlwifi/downloads/
723endef
724
725define Download/iwl3945-fw
726  $(call Download/iwl-fw/Default)
727  FILE:=$(IWL3945_NAME)-$(IWL3945_VERSION).tgz
728  MD5SUM:=$(IWL3945_MD5SUM)
729endef
730$(eval $(call Download,iwl3945-fw))
731
732define Download/iwl4965-fw
733  $(call Download/iwl-fw/Default)
734  FILE:=$(IWL4965_NAME)-$(IWL4965_VERSION).tgz
735  MD5SUM:=$(IWL4965_MD5SUM)
736endef
737$(eval $(call Download,iwl4965-fw))
738
739define Download/iwl5000-fw
740  $(call Download/iwl-fw/Default)
741  FILE:=$(IWL5000_NAME)-$(IWL5000_VERSION).tgz
742  MD5SUM:=$(IWL5000_MD5SUM)
743endef
744$(eval $(call Download,iwl5000-fw))
745
746define Download/iwl5150-fw
747  $(call Download/iwl-fw/Default)
748  FILE:=$(IWL5150_NAME)-$(IWL5150_VERSION).tgz
749  MD5SUM:=$(IWL5150_MD5SUM)
750endef
751$(eval $(call Download,iwl5150-fw))
752
753define Download/iwl1000-fw
754  $(call Download/iwl-fw/Default)
755  FILE:=$(IWL1000_NAME)-$(IWL1000_VERSION).tgz
756  MD5SUM:=$(IWL1000_MD5SUM)
757endef
758$(eval $(call Download,iwl1000-fw))
759
760define Download/iwl6000-fw
761  $(call Download/iwl-fw/Default)
762  FILE:=$(IWL6000_NAME)-$(IWL6000_VERSION).tgz
763  MD5SUM:=$(IWL6000_MD5SUM)
764endef
765$(eval $(call Download,iwl6000-fw))
766
767define Download/iwl6050-fw
768  $(call Download/iwl-fw/Default)
769  FILE:=$(IWL6050_NAME)-$(IWL6050_VERSION).tgz
770  MD5SUM:=$(IWL6050_MD5SUM)
771endef
772$(eval $(call Download,iwl6050-fw))
773
774define Download/iwl6005-fw
775  $(call Download/iwl-fw/Default)
776  FILE:=$(IWL6005_NAME)-$(IWL6005_VERSION).tgz
777  MD5SUM:=$(IWL6005_MD5SUM)
778endef
779$(eval $(call Download,iwl6005-fw))
780
781define Download/iwl6030-fw
782  $(call Download/iwl-fw/Default)
783  FILE:=$(IWL6030_NAME)-$(IWL6030_VERSION).tgz
784  MD5SUM:=$(IWL6030_MD5SUM)
785endef
786$(eval $(call Download,iwl6030-fw))
787
788define Download/iwl100-fw
789  $(call Download/iwl-fw/Default)
790  FILE:=$(IWL100_NAME)-$(IWL100_VERSION).tgz
791  MD5SUM:=$(IWL100_MD5SUM)
792endef
793$(eval $(call Download,iwl100-fw))
794
795define KernelPackage/iwlagn
796  $(call KernelPackage/mac80211/Default)
797  DEPENDS:= +kmod-mac80211 @PCI_SUPPORT
798  TITLE:=Intel AGN Wireless support
799  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/iwlwifi/iwlagn.$(LINUX_KMOD_SUFFIX)
800  AUTOLOAD:=$(call AutoLoad,60,iwlagn)
801  MENU:=1
802endef
803
804define KernelPackage/iwlagn/description
805 iwlagn kernel module for Intel 5000/5150/1000/6000/6050/6005/6030/100 support
806endef
807
808define KernelPackage/iwlagn/config
809        menu "Configuration"
810                depends on PACKAGE_kmod-iwlagn
811
812        config IWL5000_FW
813                bool "Intel 5000 Firmware"
814                default y
815                help
816                  Download and install firmware for:
817                    Intel 5000 wireless card into /lib/firmware.
818
819        config IWL5150_FW
820                bool "Intel 5150 Firmware"
821                default y
822                help
823                  Download and install firmware for:
824                    Intel 5150 wireless card into /lib/firmware.
825
826        config IWL1000_FW
827                bool "Intel 1000 Firmware"
828                default y
829                help
830                  Download and install firmware for:
831                    Intel 1000 wireless card into /lib/firmware.
832
833        config IWL6000_FW
834                bool "Intel 6000 Firmware"
835                default y
836                help
837                  Download and install firmware for:
838                    Intel 6000 wireless card into /lib/firmware.
839
840        config IWL6050_FW
841                bool "Intel 6050 Firmware"
842                default y
843                help
844                  Download and install firmware for:
845                    Intel 6050 wireless card into /lib/firmware.
846
847        config IWL6005_FW
848                bool "Intel 6005 Firmware"
849                default y
850                help
851                  Download and install firmware for:
852                    Intel 6005 wireless card into /lib/firmware.
853
854        config IWL6030_FW
855                bool "Intel 6030 Firmware"
856                default y
857                help
858                  Download and install firmware for:
859                    Intel 6030 wireless card into /lib/firmware.
860
861        config IWL100_FW
862                bool "Intel 100 Firmware"
863                default y
864                help
865                  Download and install firmware for:
866                    Intel 100 wireless card into /lib/firmware.
867
868        endmenu
869endef
870
871define KernelPackage/iwl-legacy
872  $(call KernelPackage/mac80211/Default)
873  DEPENDS:= +kmod-mac80211 @PCI_SUPPORT
874  TITLE:=Intel legacy Wireless support
875  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/iwlegacy/iwl-legacy.$(LINUX_KMOD_SUFFIX)
876  AUTOLOAD:=$(call AutoLoad,60,iwl-legacy)
877endef
878
879define KernelPackage/iwl-legacy/description
880 iwl-legacy kernel module for legacy Intel wireless support
881endef
882
883define KernelPackage/iwl3945
884  $(call KernelPackage/mac80211/Default)
885  DEPENDS:= +kmod-mac80211 +kmod-iwl-legacy
886  TITLE:=Intel iwl3945 Wireless support
887  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/iwlegacy/iwl3945.$(LINUX_KMOD_SUFFIX)
888  AUTOLOAD:=$(call AutoLoad,61,iwl3945)
889endef
890
891define KernelPackage/iwl3945/description
892 iwl3945 kernel module for Intel 3945 support
893endef
894
895define KernelPackage/iwl4965
896  $(call KernelPackage/mac80211/Default)
897  DEPENDS:= +kmod-mac80211 +kmod-iwl-legacy
898  TITLE:=Intel iwl4965 Wireless support
899  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/iwlegacy/iwl4965.$(LINUX_KMOD_SUFFIX)
900  AUTOLOAD:=$(call AutoLoad,61,iwl4965)
901endef
902
903define KernelPackage/iwl4965/description
904 iwl4965 kernel module for Intel 4965 support
905endef
906
907
908define KernelPackage/mwl8k
909  $(call KernelPackage/mac80211/Default)
910  TITLE:=Driver for Marvell TOPDOG 802.11 Wireless cards
911  URL:=http://wireless.kernel.org/en/users/Drivers/mwl8k
912  DEPENDS+= @PCI_SUPPORT +kmod-mac80211
913  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/mwl8k.ko
914  AUTOLOAD:=$(call AutoLoad,27,mwl8k)
915endef
916
917define KernelPackage/mwl8k/description
918 Kernel modules for Marvell TOPDOG 802.11 Wireless cards
919endef
920
921#Broadcom firmware
922ifneq ($(CONFIG_B43_FW_5_10),)
923  PKG_B43_FWV4_NAME:=broadcom-wl
924  PKG_B43_FWV4_VERSION:=5.10.56.27.3
925  PKG_B43_FWV4_OBJECT:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION)/driver/wl_apsta/wl_prebuilt.o
926  PKG_B43_FWV4_SOURCE:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION)_mipsel.tar.bz2
927  PKG_B43_FWV4_SOURCE_URL:=http://mirror2.openwrt.org/sources/
928  PKG_B43_FWV4_MD5SUM:=3363e3a6b3d9d73c49dea870c7834eac
929else
930ifneq ($(CONFIG_B43_FW_4_178),)
931  PKG_B43_FWV4_NAME:=broadcom-wl
932  PKG_B43_FWV4_VERSION:=4.178.10.4
933  PKG_B43_FWV4_OBJECT:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION)/linux/wl_apsta.o
934  PKG_B43_FWV4_SOURCE:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION).tar.bz2
935  PKG_B43_FWV4_SOURCE_URL:=http://mirror2.openwrt.org/sources/
936  PKG_B43_FWV4_MD5SUM:=14477e8cbbb91b11896affac9b219fdb
937else
938  PKG_B43_FWV4_NAME:=broadcom-wl
939  PKG_B43_FWV4_VERSION:=4.150.10.5
940  PKG_B43_FWV4_OBJECT:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION)/driver/wl_apsta_mimo.o
941  PKG_B43_FWV4_SOURCE:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION).tar.bz2
942  PKG_B43_FWV4_SOURCE_URL:=http://mirror2.openwrt.org/sources/
943  PKG_B43_FWV4_MD5SUM:=0c6ba9687114c6b598e8019e262d9a60
944endif
945endif
946ifneq ($(CONFIG_B43_OPENFIRMWARE),)
947  PKG_B43_FWV4_NAME:=broadcom-wl
948  PKG_B43_FWV4_VERSION:=5.2
949  PKG_B43_FWV4_OBJECT:=openfwwf-$(PKG_B43_FWV4_VERSION)
950  PKG_B43_FWV4_SOURCE:=openfwwf-$(PKG_B43_FWV4_VERSION).tar.gz
951  PKG_B43_FWV4_SOURCE_URL:=http://www.ing.unibs.it/openfwwf/firmware/
952  PKG_B43_FWV4_MD5SUM:=e045a135453274e439ae183f8498b0fa
953endif
954
955
956PKG_B43_FWV3_NAME:=wl_apsta
957PKG_B43_FWV3_VERSION:=3.130.20.0
958PKG_B43_FWV3_SOURCE:=$(PKG_B43_FWV3_NAME)-$(PKG_B43_FWV3_VERSION).o
959PKG_B43_FWV3_SOURCE_URL:=http://downloads.openwrt.org/sources/
960PKG_B43_FWV3_MD5SUM:=e08665c5c5b66beb9c3b2dd54aa80cb3
961
962ifeq ($(CONFIG_B43_OPENFIRMWARE),y)
963  PKG_B43_FWCUTTER_NAME:=b43-fwcutter
964  PKG_B43_FWCUTTER_VERSION:=3e69531aa65b8f664a0ab00dfc3e2eefeb0cb417
965  PKG_B43_FWCUTTER_SOURCE:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION).tar.bz2
966  PKG_B43_FWCUTTER_PROTO:=git
967  PKG_B43_FWCUTTER_SOURCE_URL:=http://git.bu3sch.de/git/b43-tools.git
968  PKG_B43_FWCUTTER_SUBDIR:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION)
969  PKG_B43_FWCUTTER_OBJECT:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION)/fwcutter/
970else
971  PKG_B43_FWCUTTER_NAME:=b43-fwcutter
972  PKG_B43_FWCUTTER_VERSION:=014
973  PKG_B43_FWCUTTER_SOURCE:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION).tar.bz2
974  PKG_B43_FWCUTTER_PROTO:=default
975  PKG_B43_FWCUTTER_SOURCE_URL:=http://bu3sch.de/b43/fwcutter/
976  PKG_B43_FWCUTTER_MD5SUM:=dd63f9149510bd6e01b89314e955083b
977  PKG_B43_FWCUTTER_SUBDIR:=b43-fwcutter-$(PKG_B43_FWCUTTER_VERSION)
978  PKG_B43_FWCUTTER_OBJECT:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION)/
979endif
980
981define Download/b43-common
982  FILE:=$(PKG_B43_FWCUTTER_SOURCE)
983  URL:=$(PKG_B43_FWCUTTER_SOURCE_URL)
984  MD5SUM:=$(PKG_B43_FWCUTTER_MD5SUM)
985  PROTO:=$(PKG_B43_FWCUTTER_PROTO)
986  VERSION:=$(PKG_B43_FWCUTTER_VERSION)
987  SUBDIR:=$(PKG_B43_FWCUTTER_SUBDIR)
988endef
989$(eval $(call Download,b43-common))
990
991define Download/b43
992  FILE:=$(PKG_B43_FWV4_SOURCE)
993  URL:=$(PKG_B43_FWV4_SOURCE_URL)
994  MD5SUM:=$(PKG_B43_FWV4_MD5SUM)
995endef
996$(eval $(call Download,b43))
997
998define Download/b43legacy
999  FILE:=$(PKG_B43_FWV3_SOURCE)
1000  URL:=$(PKG_B43_FWV3_SOURCE_URL)
1001  MD5SUM:=$(PKG_B43_FWV3_MD5SUM)
1002endef
1003$(eval $(call Download,b43legacy))
1004
1005define KernelPackage/b43-common
1006  $(call KernelPackage/mac80211/Default)
1007  TITLE:=Generic stuff for Broadcom wireless devices
1008  URL:=http://linuxwireless.org/en/users/Drivers/b43
1009  KCONFIG:= \
1010        CONFIG_HW_RANDOM=y
1011  DEPENDS+= +kmod-mac80211 +!(TARGET_brcm47xx||TARGET_brcm63xx):kmod-ssb
1012endef
1013
1014define KernelPackage/b43
1015$(call KernelPackage/b43-common)
1016  TITLE:=Broadcom 43xx wireless support
1017  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/b43/b43.ko
1018  AUTOLOAD:=$(call AutoLoad,30,b43)
1019  MENU:=1
1020endef
1021
1022define KernelPackage/b43/config
1023        menu "Configuration"
1024                depends on PACKAGE_kmod-b43
1025
1026        choice
1027                prompt "b43 firmware version"
1028                default B43_FW_4_150
1029                help
1030                  This option allows you to select the version of the b43 firmware.
1031
1032        config B43_FW_4_150
1033                bool "Firmware 410.2160 from driver 4.150.10.5 (stable)"
1034                help
1035                  Stable firmware for BCM43xx devices.
1036
1037                  If unsure, select this.
1038
1039        config B43_FW_4_178
1040                bool "Firmware 478.104 from driver 4.178.10.4"
1041                help
1042                  Experimental firmware for BCM43xx devices.
1043
1044                  This firmware is not tested as much as the "stable" firmware.
1045
1046                  If unsure, select the "stable" firmware.
1047
1048        config B43_FW_5_10
1049                bool "Firmware 508.1084 from driver 5.10.56.27"
1050                help
1051                  Newer experimental firmware for BCM43xx devices.
1052
1053                  This firmware is mostly untested. It is needed for some N-PHY devices.
1054
1055                  If unsure, select the "stable" firmware.
1056
1057        config B43_OPENFIRMWARE
1058                bool "Open FirmWare for WiFi networks"
1059                help
1060                  Opensource firmware for BCM43xx devices.
1061
1062                  Do _not_ select this, unless you know what you are doing.
1063                  The Opensource firmware is not suitable for embedded devices, yet.
1064                  It does not support QoS, which is bad for AccessPoints.
1065                  It does not support hardware crypto acceleration, which is a showstopper
1066                  for embedded devices with low CPU resources.
1067
1068                  If unsure, select the "stable" firmware.
1069
1070        endchoice
1071
1072        config B43_FW_SQUASH
1073                bool "Remove unnecessary firmware files"
1074                depends on !B43_OPENFIRMWARE
1075                default y
1076                help
1077                  This options allows you to remove unnecessary b43 firmware files
1078                  from the final rootfs image. This can reduce the rootfs size by
1079                  up to 200k.
1080
1081                  If unsure, say Y.
1082
1083        config B43_FW_SQUASH_COREREVS
1084                string "Core revisions to include"
1085                depends on B43_FW_SQUASH
1086                default "5,6,7,8,9,10,11,13,14,15,16" if PACKAGE_B43_PHY_N
1087                default "5,6,7,8,9,10,13,14,15" if !PACKAGE_B43_PHY_N
1088                help
1089                  This is a comma seperated list of core revision numbers.
1090
1091                  Example (keep files for rev5 only):
1092                    5
1093
1094                  Example (keep files for rev5 and rev11):
1095                    5,11
1096
1097        config B43_FW_SQUASH_PHYTYPES
1098                string "PHY types to include"
1099                depends on B43_FW_SQUASH
1100                default "G,LP,N" if PACKAGE_B43_PHY_N
1101                default "G,LP" if !PACKAGE_B43_PHY_N
1102                help
1103                  This is a comma seperated list of PHY types:
1104                    A  => A-PHY
1105                    AG => Dual A-PHY G-PHY
1106                    G  => G-PHY
1107                    LP => LP-PHY
1108                    N  => N-PHY
1109
1110                  Example (keep files for G-PHY only):
1111                    G
1112
1113                  Example (keep files for G-PHY and N-PHY):
1114                    G,N
1115
1116        config PACKAGE_B43_DEBUG
1117                bool "Enable debug output and debugfs for b43"
1118                default n
1119                help
1120                  Enable additional debug output and runtime sanity checks for b43
1121                  and enables the debugfs interface.
1122
1123                  If unsure, say N.
1124
1125        config PACKAGE_B43_PIO
1126                bool "Enable support for PIO transfer mode"
1127                default n
1128                help
1129                  Enable support for using PIO instead of DMA. Unless you have DMA
1130                  transfer problems you don't need this.
1131
1132                  If unsure, say N.
1133
1134        config PACKAGE_B43_PHY_N
1135                bool "Enable support for N-PHYs"
1136                select B43_FW_5_10
1137                default n
1138                help
1139                  Enable support for BCM4321 and BCM4322.
1140
1141                  Currently only 11g speed is available.
1142
1143                  If unsure, say N.
1144
1145        endmenu
1146endef
1147
1148define KernelPackage/b43/description
1149Kernel module for Broadcom 43xx wireless support (mac80211 stack) new
1150endef
1151
1152define KernelPackage/b43legacy
1153$(call KernelPackage/b43-common)
1154  TITLE:=Broadcom 43xx-legacy wireless support
1155  FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/b43legacy/b43legacy.ko
1156  AUTOLOAD:=$(call AutoLoad,30,b43legacy)
1157  MENU:=1
1158endef
1159
1160define KernelPackage/b43legacy/config
1161        menu "Configuration"
1162                depends on PACKAGE_kmod-b43legacy
1163
1164        config B43LEGACY_FW_SQUASH
1165                bool "Remove unnecessary firmware files"
1166                default y
1167                help
1168                  This options allows you to remove unnecessary b43legacy firmware files
1169                  from the final rootfs image. This can reduce the rootfs size by
1170                  up to 50k.
1171
1172                  If unsure, say Y.
1173
1174        config B43LEGACY_FW_SQUASH_COREREVS
1175                string "Core revisions to include"
1176                depends on B43LEGACY_FW_SQUASH
1177                default "1,2,3,4"
1178                help
1179                  This is a comma seperated list of core revision numbers.
1180
1181                  Example (keep files for rev4 only):
1182                    4
1183
1184                  Example (keep files for rev2 and rev4):
1185                    2,4
1186
1187        endmenu
1188endef
1189
1190define KernelPackage/b43legacy/description
1191Kernel module for Broadcom 43xx-legacy wireless support (mac80211 stack) new
1192endef
1193
1194BUILDFLAGS:= \
1195        -I$(PKG_BUILD_DIR)/include \
1196        $(foreach opt,$(CONFOPTS),-DCONFIG_$(opt)) \
1197        $(if $(CONFIG_PCI),-DCONFIG_B43_PCI_AUTOSELECT -DCONFIG_B43_PCICORE_AUTOSELECT) \
1198        $(if $(CONFIG_LEDS_TRIGGERS), -DCONFIG_MAC80211_LEDS -DCONFIG_LEDS_TRIGGERS -DCONFIG_B43_LEDS -DCONFIG_B43LEGACY_LEDS -DCONFIG_AR9170_LEDS) \
1199        -DCONFIG_B43_HWRNG -DCONFIG_B43LEGACY_HWRNG \
1200        $(if $(CONFIG_PCI),-DCONFIG_ATH9K_PCI) \
1201        $(if $(CONFIG_TARGET_ar71xx),-DCONFIG_ATH9K_AHB) \
1202        $(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),-DCONFIG_MAC80211_DEBUGFS -DCONFIG_ATH9K_DEBUGFS -DCONFIG_CARL9170_DEBUGFS -DCONFIG_ATH9K_HTC_DEBUGFS -DCONFIG_ATH5K_DEBUG) \
1203        $(if $(CONFIG_PACKAGE_ATH_DEBUG),-DCONFIG_ATH_DEBUG -DCONFIG_ATH9K_PKTLOG) \
1204        -D__CONFIG_MAC80211_RC_DEFAULT=minstrel \
1205        -DCONFIG_MAC80211_RC_MINSTREL_HT \
1206        $(if $(CONFIG_ATH_USER_REGD),-DATH_USER_REGD=1) \
1207        $(if $(CONFIG_PACKAGE_B43_DEBUG),-DCONFIG_B43_DEBUG) \
1208        $(if $(CONFIG_PACKAGE_B43_PIO),-DCONFIG_B43_PIO) \
1209        $(if $(CONFIG_PACKAGE_B43_PHY_N),-DCONFIG_B43_PHY_N) \
1210        $(if $(CONFIG_PACKAGE_RT2X00_LIB_DEBUGFS),-DCONFIG_RT2X00_LIB_DEBUGFS) \
1211        $(if $(CONFIG_PACKAGE_RT2X00_DEBUG),-DCONFIG_RT2X00_DEBUG) \
1212        $(if $(NEED_RT2X00_LIB_HT),-DCONFIG_RT2X00_LIB_HT) \
1213        $(if $(NEED_RT2X00_LIB_CRYPTO),-DCONFIG_RT2X00_LIB_CRYPTO) \
1214        $(if $(NEED_RT2X00_LIB_FIRMWARE),-DCONFIG_RT2X00_LIB_FIRMWARE) \
1215        $(if $(NEED_RT2X00_LIB_LEDS),-DCONFIG_RT2X00_LIB_LEDS) \
1216        $(if $(CONFIG_PACKAGE_kmod-rt2x00-pci),-DCONFIG_RT2X00_LIB_PCI) \
1217        $(if $(CONFIG_PACKAGE_kmod-rt2x00-usb),-DCONFIG_RT2X00_LIB_USB) \
1218        $(if $(CONFIG_PACKAGE_kmod-rt2x00-soc),-DCONFIG_RT2X00_LIB_SOC) \
1219        $(if $(CONFIG_TARGET_atheros),-DCONFIG_ATH5K_AHB,-DCONFIG_ATH5K_PCI) \
1220        $(if $(CONFIG_PACKAGE_kmod-iwl3945),-DCONFIG_IWL3945) \
1221        $(if $(CONFIG_PACKAGE_kmod-iwl4965),-DCONFIG_COMPAT_IWL4965)
1222
1223MAKE_OPTS:= \
1224        CROSS_COMPILE="$(KERNEL_CROSS)" \
1225        ARCH="$(LINUX_KARCH)" \
1226        EXTRA_CFLAGS="$(BUILDFLAGS)" \
1227        $(foreach opt,$(CONFOPTS),CONFIG_$(opt)=m) \
1228        CONFIG_MAC80211=$(if $(CONFIG_PACKAGE_kmod-mac80211),m) \
1229        CONFIG_MAC80211_RC_MINSTREL=y \
1230        CONFIG_MAC80211_LEDS=$(CONFIG_LEDS_TRIGGERS) \
1231        CONFIG_MAC80211_DEBUGFS=$(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),y) \
1232        CONFIG_B43_PCMCIA=n CONFIG_B43_PIO=n \
1233        CONFIG_B43_PCI_AUTOSELECT=$(if $(CONFIG_PCI),y) \
1234        CONFIG_B43_PCICORE_AUTOSELECT=$(if $(CONFIG_PCI),y) \
1235        CONFIG_B43LEGACY_LEDS=$(CONFIG_LEDS_TRIGGERS) \
1236        CONFIG_B43_LEDS=$(CONFIG_LEDS_TRIGGERS) \
1237        CONFIG_B43_HWRNG=$(if $(CONFIG_HW_RANDOM),y) \
1238        CONFIG_B43LEGACY_HWRNG=$(if $(CONFIG_HW_RANDOM),y) \
1239        CONFIG_B43=$(if $(CONFIG_PACKAGE_kmod-b43),m) \
1240        CONFIG_B43LEGACY=$(if $(CONFIG_PACKAGE_kmod-b43legacy),m) \
1241        CONFIG_B43_DEBUG=$(if $(CONFIG_PACKAGE_B43_DEBUG),y) \
1242        CONFIG_B43_PIO=$(if $(CONFIG_PACKAGE_B43_PIO),y) \
1243        CONFIG_B43_PHY_N=$(if $(CONFIG_PACKAGE_B43_PHY_N),y) \
1244        CONFIG_ATH_COMMON=$(if $(CONFIG_PACKAGE_kmod-ath),m) \
1245        CONFIG_ATH_DEBUG=$(if $(CONFIG_PACKAGE_ATH_DEBUG),y) \
1246        CONFIG_ATH5K_DEBUG=$(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),y) \
1247        CONFIG_ATH9K_PKTLOG=$(if $(CONFIG_PACKAGE_ATH_DEBUG),y) \
1248        CONFIG_ATH5K=$(if $(CONFIG_PACKAGE_kmod-ath5k),m) \
1249        CONFIG_ATH5K_PCI=$(if $(CONFIG_TARGET_atheros),,y) \
1250        CONFIG_ATH5K_AHB=$(if $(CONFIG_TARGET_atheros),y) \
1251        CONFIG_ATH5K_DEBUG=$(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),y) \
1252        CONFIG_ATH9K=$(if $(CONFIG_PACKAGE_kmod-ath9k),m) \
1253        CONFIG_ATH9K_PCI=$(CONFIG_PCI) \
1254        CONFIG_ATH9K_AHB=$(if $(CONFIG_TARGET_ar71xx),y) \
1255        CONFIG_ATH9K_HTC=$(if $(CONFIG_PACKAGE_kmod-ath9k-htc),m) \
1256        CONFIG_ATH9K_HW=$(if $(CONFIG_PACKAGE_kmod-ath9k-common),m) \
1257        CONFIG_ATH9K_COMMON=$(if $(CONFIG_PACKAGE_kmod-ath9k-common),m) \
1258        CONFIG_ATH9K_DEBUGFS=$(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),y) \
1259        CONFIG_CARL9170=$(if $(CONFIG_PACKAGE_kmod-carl9170),m) \
1260        CONFIG_CARL9170_DEBUGFS=$(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),y) \
1261        CONFIG_COMPAT_ZD1211RW=$(if $(CONFIG_PACKAGE_kmod-zd1211rw),m) \
1262        CONFIG_P54_COMMON=$(if $(CONFIG_PACKAGE_kmod-p54-common),m) \
1263        CONFIG_P54_PCI=$(if $(CONFIG_PACKAGE_kmod-p54-pci),m) \
1264        CONFIG_P54_USB=$(if $(CONFIG_PACKAGE_kmod-p54-usb),m) \
1265        CONFIG_P54_SPI=$(if $(CONFIG_PACKAGE_kmod-p54-spi),m) \
1266        CONFIG_P54_SPI_DEFAULT_EEPROM=n \
1267        CONFIG_RT2X00=$(if $(CONFIG_PACKAGE_kmod-rt2x00-lib),m) \
1268        CONFIG_RT2X00_LIB=$(if $(CONFIG_PACKAGE_kmod-rt2x00-lib),m) \
1269        CONFIG_RT2X00_LIB_PCI=$(if $(CONFIG_PACKAGE_kmod-rt2x00-pci),m) \
1270        CONFIG_RT2X00_LIB_USB=$(if $(CONFIG_PACKAGE_kmod-rt2x00-usb),m) \
1271        CONFIG_RT2X00_LIB_SOC=$(if $(CONFIG_PACKAGE_kmod-rt2x00-soc),m) \
1272        CONFIG_RT2X00_LIB_DEBUGFS=$(CONFIG_PACKAGE_RT2X00_LIB_DEBUGFS) \
1273        CONFIG_RT2X00_LIB_CRYPTO=$(NEED_RT2X00_LIB_CRYPTO) \
1274        CONFIG_RT2X00_LIB_FIRMWARE=$(NEED_RT2X00_LIB_FIRMWARE) \
1275        CONFIG_RT2X00_LIB_HT=$(NEED_RT2X00_LIB_HT) \
1276        CONFIG_RT2X00_LIB_LEDS=$(NEED_RT2X00_LIB_LEDS) \
1277        CONFIG_RT2400PCI=$(if $(CONFIG_PACKAGE_kmod-rt2400-pci),m) \
1278        CONFIG_RT2500PCI=$(if $(CONFIG_PACKAGE_kmod-rt2500-pci),m) \
1279        CONFIG_RT2500USB=$(if $(CONFIG_PACKAGE_kmod-rt2500-usb),m) \
1280        CONFIG_RT61PCI=$(if $(CONFIG_PACKAGE_kmod-rt61-pci),m) \
1281        CONFIG_RT73USB=$(if $(CONFIG_PACKAGE_kmod-rt73-usb),m) \
1282        CONFIG_RT2800_LIB=$(if $(CONFIG_PACKAGE_kmod-rt2800-lib),m) \
1283        CONFIG_RT2800PCI=$(if $(CONFIG_PACKAGE_kmod-rt2800-pci),m) \
1284        CONFIG_RT2800USB=$(if $(CONFIG_PACKAGE_kmod-rt2800-usb),m) \
1285        CONFIG_RTL8180=$(if $(CONFIG_PACKAGE_kmod-rtl8180),m) \
1286        CONFIG_RTL8187=$(if $(CONFIG_PACKAGE_kmod-rtl8187),m) \
1287        CONFIG_RTL8192CE= \
1288        CONFIG_RTLWIFI= \
1289        CONFIG_MAC80211_HWSIM=$(if $(CONFIG_PACKAGE_kmod-mac80211-hwsim),m) \
1290        CONFIG_PCMCIA= \
1291        CONFIG_LIBIPW=$(if $(CONFIG_PACKAGE_kmod-net-libipw),m) \
1292        CONFIG_LIBERTAS=$(if $(CONFIG_PACKAGE_kmod-libertas-sd)$(CONFIG_PACKAGE_kmod-libertas-usb),m) \
1293        CONFIG_LIBERTAS_CS= \
1294        CONFIG_LIBERTAS_SPI= \
1295        CONFIG_LIBERTAS_SDIO=$(if $(CONFIG_PACKAGE_kmod-libertas-sd),m) \
1296        CONFIG_LIBERTAS_THINFIRM= \
1297        CONFIG_LIBERTAS_USB=$(if $(CONFIG_PACKAGE_kmod-libertas-usb),m) \
1298        CONFIG_IPW2100=$(if $(CONFIG_PACKAGE_kmod-net-ipw2100),m) \
1299        CONFIG_IPW2200=$(if $(CONFIG_PACKAGE_kmod-net-ipw2200),m) \
1300        CONFIG_NL80211=y \
1301        CONFIG_LIB80211= \
1302        CONFIG_LIB80211_CRYPT_WEP= \
1303        CONFIG_LIB80211_CRYPT_CCMP= \
1304        CONFIG_LIB80211_CRYPT_TKIP= \
1305        CONFIG_IWLAGN=$(if $(CONFIG_PACKAGE_kmod-iwlagn),m) \
1306        CONFIG_IWLWIFI_LEGACY=$(if $(CONFIG_PACKAGE_kmod-iwl-legacy),m) \
1307        CONFIG_COMPAT_IWL4965=$(if $(CONFIG_PACKAGE_kmod-iwl4965),m) \
1308        CONFIG_IWL3945=$(if $(CONFIG_PACKAGE_kmod-iwl3945),m) \
1309        CONFIG_MWL8K=$(if $(CONFIG_PACKAGE_kmod-mwl8k),m) \
1310        CONFIG_ATMEL= \
1311        CONFIG_PCMCIA_ATMEL= \
1312        CONFIG_ADM8211= \
1313        CONFIG_USB_NET_RNDIS_HOST= \
1314        CONFIG_USB_NET_RNDIS_WLAN= \
1315        CONFIG_USB_NET_CDCETHER= \
1316        CONFIG_USB_USBNET= \
1317        CONFIG_AT76C50X_USB= \
1318        CONFIG_WL12XX= \
1319        CONFIG_EEPROM_93CX6= \
1320        CONFIG_HERMES=$(if $(CONFIG_PACKAGE_kmod-net-hermes),m) \
1321        CONFIG_HERMES_CACHE_FW_ON_INIT= \
1322        CONFIG_PCI_HERMES=$(if $(CONFIG_PACKAGE_kmod-net-hermes-pci),m) \
1323        CONFIG_PLX_HERMES=$(if $(CONFIG_PACKAGE_kmod-net-hermes-plx),m) \
1324        CONFIG_PCMCIA_HERMES=$(if $(CONFIG_PACKAGE_kmod-net-hermes-pcmcia),m) \
1325        CONFIG_HERMES_PRISM= \
1326        CONFIG_APPLE_AIRPORT= \
1327        CONFIG_TMD_HERMES= \
1328        CONFIG_NORTEL_HERMES= \
1329        CONFIG_PCMCIA_SPECTRUM= \
1330        CONFIG_ORINOCO_USB= \
1331        CONFIG_AR9170_USB=$(if $(CONFIG_PACKAGE_kmod-ar9170),m) \
1332        CONFIG_AR9170_LEDS=$(CONFIG_LEDS_TRIGGERS) \
1333        CONFIG_IWM= \
1334        CONFIG_MWIFIEX= \
1335        CONFIG_MAC80211_RC_MINSTREL_HT=y \
1336        MADWIFI= \
1337        KLIB_BUILD="$(LINUX_DIR)" \
1338        MODPROBE=: \
1339        KLIB=$(TARGET_MODULES_DIR) \
1340        KERNEL_SUBLEVEL=$(lastword $(subst ., ,$(KERNEL_PATCHVER))) \
1341        KBUILD_LDFLAGS_MODULE_PREREQ=
1342
1343ifeq ($(CONFIG_PACKAGE_kmod-libertas-sd)$(CONFIG_PACKAGE_kmod-libertas-usb)$(CONFIG_PACKAGE_kmod-rt2x00-lib),)
1344  MAKE_OPTS += CONFIG_COMPAT_KFIFO=
1345endif
1346
1347define Build/Prepare
1348        rm -rf $(PKG_BUILD_DIR)
1349        mkdir -p $(PKG_BUILD_DIR)
1350        $(PKG_UNPACK)
1351        $(Build/Patch)
1352        unzip -jod $(PKG_BUILD_DIR) $(DL_DIR)/$(RT61FW)
1353        unzip -jod $(PKG_BUILD_DIR) $(DL_DIR)/$(RT71FW)
1354        -unzip -jod $(PKG_BUILD_DIR) $(DL_DIR)/$(RT2860FW)
1355        -unzip -jod $(PKG_BUILD_DIR) $(DL_DIR)/$(RT2870FW)
1356        $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(IPW2100_NAME)-$(IPW2100_VERSION).tgz
1357        $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(IPW2200_NAME)-$(IPW2200_VERSION).tgz
1358        $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(IWL3945_NAME)-$(IWL3945_VERSION).tgz
1359        $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(IWL4965_NAME)-$(IWL4965_VERSION).tgz
1360        $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(IWL5000_NAME)-$(IWL5000_VERSION).tgz
1361        $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(IWL5150_NAME)-$(IWL5150_VERSION).tgz
1362        $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(IWL1000_NAME)-$(IWL1000_VERSION).tgz
1363        $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(IWL6000_NAME)-$(IWL6000_VERSION).tgz
1364        $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(IWL6050_NAME)-$(IWL6050_VERSION).tgz
1365        $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(IWL6005_NAME)-$(IWL6005_VERSION).tgz
1366        $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(IWL6030_NAME)-$(IWL6030_VERSION).tgz
1367        $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(IWL100_NAME)-$(IWL100_VERSION).tgz
1368        $(TAR) -C $(PKG_BUILD_DIR) -xjf $(DL_DIR)/$(ZD1211FW_NAME)-$(ZD1211FW_VERSION).tar.bz2
1369        rm -rf $(PKG_BUILD_DIR)/include/linux/ssb
1370        rm -f $(PKG_BUILD_DIR)/include/net/ieee80211.h
1371endef
1372
1373ifneq ($(CONFIG_PACKAGE_kmod-cfg80211),)
1374 define Build/Compile/kmod
1375        rm -rf $(PKG_BUILD_DIR)/modules
1376        $(MAKE) $(PKG_JOBS) -C "$(PKG_BUILD_DIR)" $(MAKE_OPTS) all
1377 endef
1378endif
1379
1380define Build/Compile
1381        $(call Build/Compile/kmod)
1382endef
1383
1384define Build/InstallDev
1385        mkdir -p \
1386                $(1)/usr/include/mac80211 \
1387                $(1)/usr/include/mac80211/ath \
1388                $(1)/usr/include/net/mac80211
1389        $(CP) $(PKG_BUILD_DIR)/net/mac80211/*.h $(PKG_BUILD_DIR)/include/* $(1)/usr/include/mac80211/
1390        $(CP) $(PKG_BUILD_DIR)/net/mac80211/rate.h $(1)/usr/include/net/mac80211/
1391        $(CP) $(PKG_BUILD_DIR)/drivers/net/wireless/ath/*.h $(1)/usr/include/mac80211/ath/
1392endef
1393
1394define KernelPackage/libertas-usb/install
1395        $(INSTALL_DIR) $(1)/lib/firmware
1396        $(INSTALL_DATA) $(DL_DIR)/$(USB8388FW_NAME)-$(USB8388FW_VERSION).bin $(1)/lib/firmware/$(USB8388FW_NAME).bin
1397endef
1398
1399define KernelPackage/libertas-sd/install
1400        echo "Libertas install: $(CONFIG_PACKAGE_kmod-libertas-sd)"
1401        $(INSTALL_DIR) $(1)/lib/firmware
1402        $(INSTALL_DATA) $(DL_DIR)/$(SD8686FW_NAME)-$(SD8686FW_VERSION).bin $(1)/lib/firmware/$(SD8686FW_NAME).bin
1403        $(INSTALL_DATA) $(DL_DIR)/$(SD8686HELPER_NAME).bin $(1)/lib/firmware/$(SD8686HELPER_NAME).bin
1404endef
1405
1406define KernelPackage/cfg80211/install
1407        $(INSTALL_DIR) $(1)/lib/wifi
1408        $(INSTALL_DATA) ./files/lib/wifi/mac80211.sh $(1)/lib/wifi
1409endef
1410
1411define KernelPackage/p54-pci/install
1412        $(INSTALL_DIR) $(1)/lib/firmware
1413        $(INSTALL_DATA) $(DL_DIR)/$(P54PCIFW) $(1)/lib/firmware/isl3886pci
1414endef
1415
1416define KernelPackage/p54-usb/install
1417        $(INSTALL_DIR) $(1)/lib/firmware
1418        $(INSTALL_DATA) $(DL_DIR)/$(P54USBFW) $(1)/lib/firmware/isl3887usb
1419endef
1420
1421define KernelPackage/p54-spi/install
1422        $(INSTALL_DIR) $(1)/lib/firmware
1423        $(INSTALL_DATA) $(DL_DIR)/$(P54SPIFW) $(1)/lib/firmware/3826.arm
1424endef
1425
1426define KernelPackage/rt61-pci/install
1427        $(INSTALL_DIR) $(1)/lib/firmware
1428        $(INSTALL_DATA) $(PKG_BUILD_DIR)/rt2?61*.bin $(1)/lib/firmware/
1429endef
1430
1431define KernelPackage/rt73-usb/install
1432        $(INSTALL_DIR) $(1)/lib/firmware
1433        $(INSTALL_DATA) $(PKG_BUILD_DIR)/rt73.bin $(1)/lib/firmware/
1434endef
1435
1436define KernelPackage/rt2800-pci/install
1437        $(INSTALL_DIR) $(1)/lib/firmware
1438        $(INSTALL_DATA) $(PKG_BUILD_DIR)/rt2860.bin $(1)/lib/firmware/
1439endef
1440
1441define KernelPackage/rt2800-usb/install
1442        $(INSTALL_DIR) $(1)/lib/firmware
1443        $(INSTALL_DATA) $(PKG_BUILD_DIR)/rt2870.bin $(1)/lib/firmware/
1444endef
1445
1446define KernelPackage/zd1211rw/install
1447        $(INSTALL_DIR) $(1)/lib/firmware/zd1211
1448        $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(ZD1211FW_NAME)/zd1211* $(1)/lib/firmware/zd1211
1449endef
1450
1451define KernelPackage/ar9170/install
1452        $(INSTALL_DIR) $(1)/lib/firmware
1453        $(INSTALL_DATA) $(DL_DIR)/$(AR9170FW) $(1)/lib/firmware/
1454endef
1455
1456define KernelPackage/ath9k-htc/install
1457        $(INSTALL_DIR) $(1)/lib/firmware
1458        $(INSTALL_DATA) \
1459                $(DL_DIR)/$(AR9271FW) \
1460                $(DL_DIR)/$(AR7010FW) \
1461                $(DL_DIR)/$(AR7010_1_1_FW) \
1462                $(1)/lib/firmware/
1463endef
1464
1465define KernelPackage/net-ipw2100/install
1466        $(INSTALL_DIR) $(1)/lib/firmware
1467        $(INSTALL_DATA) $(PKG_BUILD_DIR)/ipw2100-$(IPW2100_VERSION)*.fw $(1)/lib/firmware
1468endef
1469
1470define KernelPackage/net-ipw2200/install
1471        $(INSTALL_DIR) $(1)/lib/firmware
1472        $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(IPW2200_NAME)-$(IPW2200_VERSION)/ipw2200*.fw $(1)/lib/firmware
1473endef
1474
1475define KernelPackage/iwlagn/install
1476        $(INSTALL_DIR) $(1)/lib/firmware
1477ifneq ($(CONFIG_IWL5000_FW),)
1478        $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(IWL5000_NAME)-$(IWL5000_VERSION)/iwlwifi-5000-*.ucode $(1)/lib/firmware
1479endif
1480ifneq ($(CONFIG_IWL5150_FW),)
1481        $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(IWL5150_NAME)-$(IWL5150_VERSION)/iwlwifi-5150-*.ucode $(1)/lib/firmware
1482endif
1483ifneq ($(CONFIG_IWL1000_FW),)
1484        $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(IWL1000_NAME)-$(IWL1000_VERSION)/iwlwifi-1000-*.ucode $(1)/lib/firmware
1485endif
1486ifneq ($(CONFIG_IWL6000_FW),)
1487        $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(IWL6000_NAME)-$(IWL6000_VERSION)/iwlwifi-6000-*.ucode $(1)/lib/firmware
1488endif
1489ifneq ($(CONFIG_IWL6050_FW),)
1490        $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(IWL6050_NAME)-$(IWL6050_VERSION)/iwlwifi-6050-*.ucode $(1)/lib/firmware
1491endif
1492ifneq ($(CONFIG_IWL6005_FW),)
1493        $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(IWL6005_NAME)-$(IWL6005_VERSION)/iwlwifi-6000g2a-*.ucode $(1)/lib/firmware
1494endif
1495ifneq ($(CONFIG_IWL6030_FW),)
1496        $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(IWL6030_NAME)-$(IWL6030_VERSION)/iwlwifi-6000g2b-*.ucode $(1)/lib/firmware
1497endif
1498ifneq ($(CONFIG_IWL100_FW),)
1499        $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(IWL100_NAME)-$(IWL100_VERSION)/iwlwifi-100-*.ucode $(1)/lib/firmware
1500endif
1501endef
1502
1503define KernelPackage/iwl3945/install
1504        $(INSTALL_DIR) $(1)/lib/firmware
1505        $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(IWL3945_NAME)-$(IWL3945_VERSION)/iwlwifi-3945-*.ucode $(1)/lib/firmware
1506endef
1507
1508define KernelPackage/iwl4965/install
1509        $(INSTALL_DIR) $(1)/lib/firmware
1510        $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(IWL4965_NAME)-$(IWL4965_VERSION)/iwlwifi-4965-*.ucode $(1)/lib/firmware
1511endef
1512
1513define Build/b43-common
1514        tar xjf "$(DL_DIR)/$(PKG_B43_FWCUTTER_SOURCE)" -C "$(PKG_BUILD_DIR)"
1515        $(MAKE) -C "$(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_OBJECT)" \
1516                CFLAGS="-I$(STAGING_DIR_HOST)/include -include endian.h" \
1517                QUIET_SPARSE=:
1518        $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_OBJECT)/b43-fwcutter $(STAGING_DIR_HOST)/bin/
1519ifeq ($(CONFIG_B43_OPENFIRMWARE),y)
1520        $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/
1521        $(MAKE) -C "$(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_SUBDIR)/assembler/"
1522        $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_SUBDIR)/assembler/b43-asm $(STAGING_DIR_HOST)/bin/
1523        $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_SUBDIR)/assembler/b43-asm.bin $(STAGING_DIR_HOST)/bin/
1524endif
1525        $(INSTALL_BIN) ./files/host_bin/b43-fwsquash.py $(STAGING_DIR_HOST)/bin/
1526endef
1527
1528define KernelPackage/b43/install
1529        rm -rf $(1)/lib/firmware/
1530        $(call Build/b43-common)
1531ifeq ($(CONFIG_B43_OPENFIRMWARE),y)
1532        tar xzf "$(DL_DIR)/$(PKG_B43_FWV4_SOURCE)" -C "$(PKG_BUILD_DIR)"
1533else
1534        tar xjf "$(DL_DIR)/$(PKG_B43_FWV4_SOURCE)" -C "$(PKG_BUILD_DIR)"
1535endif
1536        $(INSTALL_DIR) $(1)/lib/firmware/
1537ifeq ($(CONFIG_B43_OPENFIRMWARE),y)
1538        $(MAKE) -C "$(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/"
1539        $(INSTALL_DIR) $(1)/lib/firmware/b43-open/
1540        $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/ucode5.fw $(1)/lib/firmware/b43-open/ucode5.fw
1541        $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/b0g0bsinitvals5.fw $(1)/lib/firmware/b43-open/b0g0bsinitvals5.fw
1542        $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/b0g0initvals5.fw $(1)/lib/firmware/b43-open/b0g0initvals5.fw
1543else
1544        b43-fwcutter -w $(1)/lib/firmware/ $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)
1545endif
1546ifneq ($(CONFIG_B43_FW_SQUASH),)
1547        b43-fwsquash.py "$(CONFIG_B43_FW_SQUASH_PHYTYPES)" "$(CONFIG_B43_FW_SQUASH_COREREVS)" "$(1)/lib/firmware/b43"
1548endif
1549endef
1550
1551define KernelPackage/b43legacy/install
1552        $(call Build/b43-common)
1553        $(INSTALL_DIR) $(1)/lib/firmware/
1554
1555        b43-fwcutter --unsupported -w $(1)/lib/firmware/ $(DL_DIR)/$(PKG_B43_FWV3_SOURCE)
1556ifneq ($(CONFIG_B43LEGACY_FW_SQUASH),)
1557        b43-fwsquash.py "G" "$(CONFIG_B43LEGACY_FW_SQUASH_COREREVS)" "$(1)/lib/firmware/b43legacy"
1558endif
1559endef
1560
1561$(eval $(call KernelPackage,ath5k))
1562$(eval $(call KernelPackage,libertas-usb))
1563$(eval $(call KernelPackage,libertas-sd))
1564$(eval $(call KernelPackage,cfg80211))
1565$(eval $(call KernelPackage,mac80211))
1566$(eval $(call KernelPackage,p54-common))
1567$(eval $(call KernelPackage,p54-pci))
1568$(eval $(call KernelPackage,p54-usb))
1569$(eval $(call KernelPackage,p54-spi))
1570$(eval $(call KernelPackage,rt2x00-lib))
1571$(eval $(call KernelPackage,rt2x00-pci))
1572$(eval $(call KernelPackage,rt2x00-usb))
1573$(eval $(call KernelPackage,rt2x00-soc))
1574$(eval $(call KernelPackage,rt2800-lib))
1575$(eval $(call KernelPackage,rt2400-pci))
1576$(eval $(call KernelPackage,rt2500-pci))
1577$(eval $(call KernelPackage,rt2500-usb))
1578$(eval $(call KernelPackage,rt61-pci))
1579$(eval $(call KernelPackage,rt73-usb))
1580$(eval $(call KernelPackage,rt2800-pci))
1581$(eval $(call KernelPackage,rt2800-usb))
1582$(eval $(call KernelPackage,rtl8180))
1583$(eval $(call KernelPackage,rtl8187))
1584$(eval $(call KernelPackage,zd1211rw))
1585$(eval $(call KernelPackage,mac80211-hwsim))
1586$(eval $(call KernelPackage,ath9k-common))
1587$(eval $(call KernelPackage,ath9k))
1588$(eval $(call KernelPackage,ath9k-htc))
1589$(eval $(call KernelPackage,ath))
1590$(eval $(call KernelPackage,carl9170))
1591$(eval $(call KernelPackage,b43))
1592$(eval $(call KernelPackage,b43legacy))
1593$(eval $(call KernelPackage,net-libipw))
1594$(eval $(call KernelPackage,net-ipw2100))
1595$(eval $(call KernelPackage,net-ipw2200))
1596$(eval $(call KernelPackage,iwlagn))
1597$(eval $(call KernelPackage,iwl-legacy))
1598$(eval $(call KernelPackage,iwl4965))
1599$(eval $(call KernelPackage,iwl3945))
1600$(eval $(call KernelPackage,mwl8k))
1601$(eval $(call KernelPackage,net-hermes))
1602$(eval $(call KernelPackage,net-hermes-pci))
1603$(eval $(call KernelPackage,net-hermes-plx))
1604$(eval $(call KernelPackage,net-hermes-pcmcia))
Note: See TracBrowser for help on using the repository browser.