build: remove obsolete references to cris and avr32
[openwrt.git] / package / kernel / mac80211 / Makefile
1 #
2 # Copyright (C) 2007-2015 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:=2015-03-09
14 PKG_RELEASE:=3
15 PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
16 PKG_BACKPORT_VERSION:=
17 PKG_MD5SUM:=6d4b04e4ce8a1f54dabfb04f4709453c
18
19 PKG_SOURCE:=compat-wireless-$(PKG_VERSION)$(PKG_BACKPORT_VERSION).tar.bz2
20 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
21 PKG_BUILD_PARALLEL:=1
22
23 PKG_MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
24
25 PKG_DRIVERS = \
26         adm8211 ath5k libertas-usb libertas-sdio p54-common p54-pci p54-usb p54-spi \
27         rt2x00-lib rt2x00-pci rt2x00-usb rt2800-lib rt2400-pci rt2500-pci \
28         rt2500-usb rt61-pci rt73-usb rt2800-mmio rt2800-pci rt2800-usb rt2800-soc \
29         rtl8180 rtl8187 zd1211rw mac80211-hwsim carl9170 b43 b43legacy \
30         ath9k-common ath9k ath9k-htc ath10k ath net-libipw net-ipw2100 net-ipw2200 \
31         mwl8k mwifiex-pcie net-hermes net-hermes-pci net-hermes-plx net-hermes-pcmcia \
32         iwl-legacy iwl3945 iwl4965 iwlagn wlcore wl12xx wl18xx lib80211 \
33         rtlwifi rtlwifi-pci rtlwifi-usb rtl8192c-common rtl8192ce rtl8192se \
34         rtl8192de rtl8192cu
35
36 PKG_CONFIG_DEPENDS:= \
37         CONFIG_PACKAGE_kmod-mac80211 \
38         $(patsubst %,CONFIG_PACKAGE_kmod-%,$(PKG_DRIVERS)) \
39         CONFIG_PACKAGE_MAC80211_DEBUGFS \
40         CONFIG_PACKAGE_MAC80211_MESH \
41         CONFIG_PACKAGE_ATH_DEBUG \
42         CONFIG_PACKAGE_ATH_DFS \
43         CONFIG_PACKAGE_B43_DEBUG \
44         CONFIG_PACKAGE_B43_PIO \
45         CONFIG_PACKAGE_B43_PHY_G \
46         CONFIG_PACKAGE_B43_PHY_N \
47         CONFIG_PACKAGE_B43_PHY_LP \
48         CONFIG_PACKAGE_B43_PHY_HT \
49         CONFIG_PACKAGE_B43_BUSES_BCMA_AND_SSB \
50         CONFIG_PACKAGE_B43_BUSES_BCMA \
51         CONFIG_PACKAGE_B43_BUSES_SSB \
52         CONFIG_PACKAGE_RTLWIFI_DEBUG \
53         CONFIG_ATH_USER_REGD \
54
55 include $(INCLUDE_DIR)/package.mk
56
57 WMENU:=Wireless Drivers
58
59 define KernelPackage/mac80211/Default
60   SUBMENU:=$(WMENU)
61   URL:=https://wireless.wiki.kernel.org/
62   MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
63   DEPENDS:=@!TARGET_uml
64 endef
65
66 define KernelPackage/cfg80211
67   $(call KernelPackage/mac80211/Default)
68   TITLE:=cfg80211 - wireless configuration API
69   DEPENDS+= +iw
70   FILES:= \
71         $(PKG_BUILD_DIR)/compat/compat.ko \
72         $(PKG_BUILD_DIR)/net/wireless/cfg80211.ko
73 endef
74
75 define KernelPackage/cfg80211/description
76 cfg80211 is the Linux wireless LAN (802.11) configuration API.
77 endef
78
79 define KernelPackage/mac80211
80   $(call KernelPackage/mac80211/Default)
81   TITLE:=Linux 802.11 Wireless Networking Stack
82   DEPENDS+= +kmod-crypto-core +kmod-crypto-arc4 +kmod-crypto-aes +kmod-cfg80211 +hostapd-common
83   KCONFIG:=\
84         CONFIG_AVERAGE=y
85   FILES:= $(PKG_BUILD_DIR)/net/mac80211/mac80211.ko
86   MENU:=1
87 endef
88
89 define KernelPackage/mac80211/config
90   if PACKAGE_kmod-mac80211
91
92         config PACKAGE_MAC80211_DEBUGFS
93                 bool "Export mac80211 internals in DebugFS"
94                 select KERNEL_DEBUG_FS
95                 default y
96                 help
97                   Select this to see extensive information about
98                   the internal state of mac80211 in debugfs.
99
100         config PACKAGE_MAC80211_MESH
101                 bool "Enable 802.11s mesh support"
102                 default y
103
104   endif
105 endef
106
107 define KernelPackage/mac80211/description
108 Generic IEEE 802.11 Networking Stack (mac80211)
109 endef
110
111 PKG_LINUX_FIRMWARE_NAME:=linux-firmware
112 PKG_LINUX_FIRMWARE_VERSION:=f404336ba808cbd57547196e13367079a23b822c
113 PKG_LINUX_FIRMWARE_SOURCE:=$(PKG_LINUX_FIRMWARE_NAME)-2015-03-20-$(PKG_LINUX_FIRMWARE_VERSION).tar.bz2
114 PKG_LINUX_FIRMWARE_PROTO:=git
115 PKG_LINUX_FIRMWARE_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
116 PKG_LINUX_FIRMWARE_SUBDIR:=$(PKG_LINUX_FIRMWARE_NAME)-$(PKG_LINUX_FIRMWARE_VERSION)
117 #PKG_LINUX_FIRMWARE_MIRROR_MD5SUM:=e219333f01835c6e556875a9e0deb3f9
118
119 define Download/linux-firmware
120   FILE:=$(PKG_LINUX_FIRMWARE_SOURCE)
121   URL:=$(PKG_LINUX_FIRMWARE_SOURCE_URL)
122   MD5SUM:=$(PKG_LINUX_FIRMWARE_MD5SUM)
123   PROTO:=$(PKG_LINUX_FIRMWARE_PROTO)
124   VERSION:=$(PKG_LINUX_FIRMWARE_VERSION)
125   SUBDIR:=$(PKG_LINUX_FIRMWARE_SUBDIR)
126   MIRROR_MD5SUM:=$(PKG_LINUX_FIRMWARE_MIRROR_MD5SUM)
127 endef
128 $(eval $(call Download,linux-firmware))
129
130 PKG_ATH10K_LINUX_FIRMWARE_NAME:=ath10k-firmware
131 PKG_ATH10K_LINUX_FIRMWARE_VERSION:=da0f85d924226ee30c46e037120621c9e192b39e
132 PKG_ATH10K_LINUX_FIRMWARE_SOURCE:=$(PKG_ATH10K_LINUX_FIRMWARE_NAME)-$(PKG_ATH10K_LINUX_FIRMWARE_VERSION).tar.bz2
133 PKG_ATH10K_LINUX_FIRMWARE_PROTO:=git
134 PKG_ATH10K_LINUX_FIRMWARE_SOURCE_URL:=https://github.com/kvalo/ath10k-firmware.git
135 PKG_ATH10K_LINUX_FIRMWARE_SUBDIR:=$(PKG_ATH10K_LINUX_FIRMWARE_NAME)-$(PKG_ATH10K_LINUX_FIRMWARE_VERSION)
136 #PKG_ATH10K_LINUX_FIRMWARE_MIRROR_MD5SUM:=?
137
138 define Download/ath10k-firmware
139   FILE:=$(PKG_ATH10K_LINUX_FIRMWARE_SOURCE)
140   URL:=$(PKG_ATH10K_LINUX_FIRMWARE_SOURCE_URL)
141   PROTO:=$(PKG_ATH10K_LINUX_FIRMWARE_PROTO)
142   VERSION:=$(PKG_ATH10K_LINUX_FIRMWARE_VERSION)
143   SUBDIR:=$(PKG_ATH10K_LINUX_FIRMWARE_SUBDIR)
144   #MIRROR_MD5SUM:=$(PKG_ATH10K_LINUX_FIRMWARE_MIRROR_MD5SUM)
145 endef
146 $(eval $(call Download,ath10k-firmware))
147
148 # Prism54 drivers
149 P54PCIFW:=2.13.12.0.arm
150 P54USBFW:=2.13.24.0.lm87.arm
151 P54SPIFW:=2.13.0.0.a.13.14.arm
152
153 define Download/p54usb
154   FILE:=$(P54USBFW)
155   URL:=http://daemonizer.de/prism54/prism54-fw/fw-usb
156   MD5SUM:=8e8ab005a4f8f0123bcdc51bc25b47f6
157 endef
158 $(eval $(call Download,p54usb))
159
160 define Download/p54pci
161   FILE:=$(P54PCIFW)
162   URL:=http://daemonizer.de/prism54/prism54-fw/fw-softmac
163   MD5SUM:=ff7536af2092b1c4b21315bd103ef4c4
164 endef
165 $(eval $(call Download,p54pci))
166
167 define Download/p54spi
168   FILE:=$(P54SPIFW)
169   URL:=http://daemonizer.de/prism54/prism54-fw/stlc4560
170   MD5SUM:=42661f8ecbadd88012807493f596081d
171 endef
172 $(eval $(call Download,p54spi))
173
174 define KernelPackage/p54/Default
175   $(call KernelPackage/mac80211/Default)
176   TITLE:=Prism54 Drivers
177 endef
178
179 define KernelPackage/p54/description
180   Kernel module for Prism54 chipsets (mac80211)
181 endef
182
183 define KernelPackage/p54-common
184   $(call KernelPackage/p54/Default)
185   DEPENDS+= @PCI_SUPPORT||@USB_SUPPORT||@TARGET_omap24xx +kmod-mac80211 +kmod-lib-crc-ccitt
186   TITLE+= (COMMON)
187   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/p54/p54common.ko
188 endef
189
190 define KernelPackage/p54-pci
191   $(call KernelPackage/p54/Default)
192   TITLE+= (PCI)
193   DEPENDS+= @PCI_SUPPORT +kmod-p54-common
194   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/p54/p54pci.ko
195   AUTOLOAD:=$(call AutoProbe,p54pci)
196 endef
197
198 define KernelPackage/p54-usb
199   $(call KernelPackage/p54/Default)
200   TITLE+= (USB)
201   DEPENDS+= @USB_SUPPORT +kmod-usb-core +kmod-p54-common
202   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/p54/p54usb.ko
203   AUTOLOAD:=$(call AutoProbe,p54usb)
204 endef
205
206 define KernelPackage/p54-spi
207   $(call KernelPackage/p54/Default)
208   TITLE+= (SPI)
209   DEPENDS+= @TARGET_omap24xx +kmod-p54-common
210   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/p54/p54spi.ko
211   AUTOLOAD:=$(call AutoProbe,p54spi)
212 endef
213
214 define KernelPackage/rt2x00/Default
215   $(call KernelPackage/mac80211/Default)
216   TITLE:=Ralink Drivers for RT2x00 cards
217 endef
218
219 define KernelPackage/rt2x00-lib
220 $(call KernelPackage/rt2x00/Default)
221   DEPENDS+= @(PCI_SUPPORT||USB_SUPPORT||TARGET_ramips) +kmod-mac80211 +kmod-lib-crc-itu-t
222   TITLE+= (LIB)
223   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00lib.ko
224   MENU:=1
225 endef
226
227 define KernelPackage/rt2x00-lib/config
228   if PACKAGE_kmod-rt2x00-lib
229
230         config PACKAGE_RT2X00_LIB_DEBUGFS
231                 bool "Enable rt2x00 debugfs support"
232                 depends on PACKAGE_MAC80211_DEBUGFS
233                 help
234                   Enable creation of debugfs files for the rt2x00 drivers.
235                   These debugfs files support both reading and writing of the
236                   most important register types of the rt2x00 hardware.
237
238         config PACKAGE_RT2X00_DEBUG
239                 bool "Enable rt2x00 debug output"
240                 help
241                   Enable debugging output for all rt2x00 modules
242
243   endif
244 endef
245
246 define KernelPackage/rt2x00-mmio
247 $(call KernelPackage/rt2x00/Default)
248   DEPENDS+= @(PCI_SUPPORT||TARGET_ramips) +kmod-rt2x00-lib +kmod-eeprom-93cx6
249   HIDDEN:=1
250   TITLE+= (MMIO)
251   FILES:= $(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00mmio.ko
252 endef
253
254 define KernelPackage/rt2x00-pci
255 $(call KernelPackage/rt2x00/Default)
256   DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-mmio +kmod-rt2x00-lib
257   HIDDEN:=1
258   TITLE+= (PCI)
259   FILES:= $(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00pci.ko
260   AUTOLOAD:=$(call AutoProbe,rt2x00pci)
261 endef
262
263 define KernelPackage/rt2x00-usb
264 $(call KernelPackage/rt2x00/Default)
265   DEPENDS+= @USB_SUPPORT +kmod-rt2x00-lib +kmod-usb-core
266   HIDDEN:=1
267   TITLE+= (USB)
268   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00usb.ko
269   AUTOLOAD:=$(call AutoProbe,rt2x00usb)
270 endef
271
272 define KernelPackage/rt2800-lib
273 $(call KernelPackage/rt2x00/Default)
274   DEPENDS+= @(PCI_SUPPORT||USB_SUPPORT||TARGET_ramips) +kmod-rt2x00-lib +kmod-lib-crc-ccitt +@DRIVER_11N_SUPPORT
275   HIDDEN:=1
276   TITLE+= (rt2800 LIB)
277   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2800lib.ko
278 endef
279
280 define KernelPackage/rt2400-pci
281 $(call KernelPackage/rt2x00/Default)
282   DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-pci
283   TITLE+= (RT2400 PCI)
284   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2400pci.ko
285   AUTOLOAD:=$(call AutoProbe,rt2400pci)
286 endef
287
288 define KernelPackage/rt2500-pci
289 $(call KernelPackage/rt2x00/Default)
290   DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-pci
291   TITLE+= (RT2500 PCI)
292   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2500pci.ko
293   AUTOLOAD:=$(call AutoProbe,rt2500pci)
294 endef
295
296 define KernelPackage/rt2500-usb
297 $(call KernelPackage/rt2x00/Default)
298   DEPENDS+= @USB_SUPPORT +kmod-rt2x00-usb
299   TITLE+= (RT2500 USB)
300   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2500usb.ko
301   AUTOLOAD:=$(call AutoProbe,rt2500usb)
302 endef
303
304 define KernelPackage/rt61-pci
305 $(call KernelPackage/rt2x00/Default)
306   DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-pci
307   TITLE+= (RT2x61 PCI)
308   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt61pci.ko
309   AUTOLOAD:=$(call AutoProbe,rt61pci)
310 endef
311
312 define KernelPackage/rt73-usb
313   $(call KernelPackage/rt2x00/Default)
314   DEPENDS+= @USB_SUPPORT +kmod-rt2x00-usb
315   TITLE+= (RT73 USB)
316   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt73usb.ko
317   AUTOLOAD:=$(call AutoProbe,rt73usb)
318 endef
319
320 define KernelPackage/rt2800-mmio
321 $(call KernelPackage/rt2x00/Default)
322   TITLE += (RT28xx/RT3xxx MMIO)
323   DEPENDS += +kmod-rt2800-lib +kmod-rt2x00-mmio
324   HIDDEN:=1
325   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2800mmio.ko
326 endef
327
328 define KernelPackage/rt2800-soc
329 $(call KernelPackage/rt2x00/Default)
330   DEPENDS += @(TARGET_ramips_rt288x||TARGET_ramips_rt305x||TARGET_ramips_rt3883||TARGET_ramips_mt7620) +kmod-rt2800-mmio +kmod-rt2800-lib
331   TITLE += (RT28xx/RT3xxx SoC)
332   FILES := \
333         $(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00soc.ko \
334         $(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2800soc.ko
335   AUTOLOAD:=$(call AutoProbe,rt2800soc)
336 endef
337
338 define KernelPackage/rt2800-pci
339 $(call KernelPackage/rt2x00/Default)
340   DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-pci +kmod-rt2800-lib +kmod-rt2800-mmio
341   TITLE+= (RT2860 PCI)
342   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2800pci.ko
343   AUTOLOAD:=$(call AutoProbe,rt2800pci)
344 endef
345
346 define KernelPackage/rt2800-usb
347 $(call KernelPackage/rt2x00/Default)
348   DEPENDS+= @USB_SUPPORT +kmod-rt2x00-usb +kmod-rt2800-lib +kmod-lib-crc-ccitt
349   TITLE+= (RT2870 USB)
350   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2800usb.ko
351   AUTOLOAD:=$(call AutoProbe,rt2800usb)
352 endef
353
354 define KernelPackage/rtl818x/Default
355   $(call KernelPackage/mac80211/Default)
356   TITLE:=Realtek Drivers for RTL818x devices
357   URL:=http://wireless.kernel.org/en/users/Drivers/rtl8187
358   DEPENDS+= +kmod-eeprom-93cx6 +kmod-mac80211
359 endef
360
361 define KernelPackage/rtl8180
362   $(call KernelPackage/rtl818x/Default)
363   DEPENDS+= @PCI_SUPPORT
364   TITLE+= (RTL8180 PCI)
365   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rtl818x/rtl8180/rtl818x_pci.ko
366   AUTOLOAD:=$(call AutoProbe,rtl818x_pci)
367 endef
368
369 define KernelPackage/rtl8187
370 $(call KernelPackage/rtl818x/Default)
371   DEPENDS+= @USB_SUPPORT +kmod-usb-core
372   TITLE+= (RTL8187 USB)
373   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rtl818x/rtl8187/rtl8187.ko
374   AUTOLOAD:=$(call AutoProbe,rtl8187)
375 endef
376
377 define KernelPackage/rtlwifi/config
378         config PACKAGE_RTLWIFI_DEBUG
379                 bool "Realtek wireless debugging"
380                 depends on PACKAGE_kmod-rtlwifi
381                 help
382                   Say Y, if you want to debug realtek wireless drivers.
383
384 endef
385
386 define KernelPackage/rtlwifi
387   $(call KernelPackage/mac80211/Default)
388   TITLE:=Realtek common driver part
389   DEPENDS+= @(PCI_SUPPORT||USB_SUPPORT) +kmod-mac80211 +@DRIVER_11N_SUPPORT
390   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rtlwifi/rtlwifi.ko
391   HIDDEN:=1
392 endef
393
394 define KernelPackage/rtlwifi-pci
395   $(call KernelPackage/mac80211/Default)
396   TITLE:=Realtek common driver part (PCI support)
397   DEPENDS+= @PCI_SUPPORT +kmod-rtlwifi
398   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rtlwifi/rtl_pci.ko
399   AUTOLOAD:=$(call AutoProbe,rtl_pci)
400   HIDDEN:=1
401 endef
402
403 define KernelPackage/rtlwifi-usb
404   $(call KernelPackage/mac80211/Default)
405   TITLE:=Realtek common driver part (USB support)
406   DEPENDS+= @USB_SUPPORT +kmod-usb-core +kmod-rtlwifi
407   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rtlwifi/rtl_usb.ko
408   AUTOLOAD:=$(call AutoProbe,rtl_usb)
409   HIDDEN:=1
410 endef
411
412 define KernelPackage/rtl8192c-common
413   $(call KernelPackage/mac80211/Default)
414   TITLE:=Realtek RTL8192CE/RTL8192CU common support module
415   DEPENDS+= +kmod-rtlwifi
416   FILES:= $(PKG_BUILD_DIR)/drivers/net/wireless/rtlwifi/rtl8192c/rtl8192c-common.ko
417   HIDDEN:=1
418 endef
419
420 define KernelPackage/rtl8192ce
421   $(call KernelPackage/mac80211/Default)
422   TITLE:=Realtek RTL8192CE/RTL8188CE support
423   DEPENDS+= +kmod-rtlwifi-pci +kmod-rtl8192c-common
424   FILES:= $(PKG_BUILD_DIR)/drivers/net/wireless/rtlwifi/rtl8192ce/rtl8192ce.ko
425   AUTOLOAD:=$(call AutoProbe,rtl8192ce)
426 endef
427
428 define KernelPackage/rtl8192ce/install
429         $(INSTALL_DIR) $(1)/lib/firmware/rtlwifi
430         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rtlwifi/rtl8192cfw.bin $(1)/lib/firmware/rtlwifi
431         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rtlwifi/rtl8192cfwU.bin $(1)/lib/firmware/rtlwifi
432         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rtlwifi/rtl8192cfwU_B.bin $(1)/lib/firmware/rtlwifi
433 endef
434
435 define KernelPackage/rtl8192se
436   $(call KernelPackage/mac80211/Default)
437   TITLE:=Realtek RTL8192SE/RTL8191SE support
438   DEPENDS+= +kmod-rtlwifi-pci
439   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rtlwifi/rtl8192se/rtl8192se.ko
440   AUTOLOAD:=$(call AutoProbe,rtl8192se)
441 endef
442
443 define KernelPackage/rtl8192se/install
444         $(INSTALL_DIR) $(1)/lib/firmware/rtlwifi
445         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rtlwifi/rtl8192sefw.bin $(1)/lib/firmware/rtlwifi
446 endef
447
448 define KernelPackage/rtl8192de
449   $(call KernelPackage/mac80211/Default)
450   TITLE:=Realtek RTL8192DE/RTL8188DE support
451   DEPENDS+= +kmod-rtlwifi-pci
452   FILES:= $(PKG_BUILD_DIR)/drivers/net/wireless/rtlwifi/rtl8192de/rtl8192de.ko
453   AUTOLOAD:=$(call AutoProbe,rtl8192de)
454 endef
455
456 define KernelPackage/rtl8192de/install
457         $(INSTALL_DIR) $(1)/lib/firmware/rtlwifi
458         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rtlwifi/rtl8192defw.bin $(1)/lib/firmware/rtlwifi
459 endef
460
461 define KernelPackage/rtl8192cu
462   $(call KernelPackage/mac80211/Default)
463   TITLE:=Realtek RTL8192CU/RTL8188CU support
464   DEPENDS+= +kmod-rtlwifi-usb +kmod-rtl8192c-common
465   FILES:= $(PKG_BUILD_DIR)/drivers/net/wireless/rtlwifi/rtl8192cu/rtl8192cu.ko
466   AUTOLOAD:=$(call AutoProbe,rtl8192cu)
467 endef
468
469 define KernelPackage/rtl8192cu/install
470         $(INSTALL_DIR) $(1)/lib/firmware/rtlwifi
471         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rtlwifi/rtl8192cufw.bin $(1)/lib/firmware/rtlwifi
472         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rtlwifi/rtl8192cufw_A.bin $(1)/lib/firmware/rtlwifi
473         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rtlwifi/rtl8192cufw_B.bin $(1)/lib/firmware/rtlwifi
474         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rtlwifi/rtl8192cufw_TMSC.bin $(1)/lib/firmware/rtlwifi
475 endef
476
477 ZD1211FW_NAME:=zd1211-firmware
478 ZD1211FW_VERSION:=1.4
479 define Download/zd1211rw
480   FILE:=$(ZD1211FW_NAME)-$(ZD1211FW_VERSION).tar.bz2
481   URL:=@SF/zd1211/
482   MD5SUM:=19f28781d76569af8551c9d11294c870
483 endef
484 $(eval $(call Download,zd1211rw))
485
486 define KernelPackage/zd1211rw
487   $(call KernelPackage/mac80211/Default)
488   TITLE:=Zydas ZD1211 support
489   DEPENDS+= @USB_SUPPORT +kmod-usb-core +kmod-mac80211
490   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/zd1211rw/zd1211rw.ko
491   AUTOLOAD:=$(call AutoProbe,zd1211rw)
492 endef
493
494 define KernelPackage/adm8211
495   $(call KernelPackage/mac80211/Default)
496   TITLE:=ADMTek 8211 support
497   DEPENDS+=@PCI_SUPPORT +kmod-mac80211 +kmod-eeprom-93cx6
498   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/adm8211.ko
499   AUTOLOAD:=$(call AutoProbe,adm8211)
500 endef
501
502 define KernelPackage/ath/config
503   if PACKAGE_kmod-ath
504         config ATH_USER_REGD
505                 bool "Force Atheros drivers to respect the user's regdomain settings"
506                 help
507                   Atheros' idea of regulatory handling is that the EEPROM of the card defines
508                   the regulatory limits and the user is only allowed to restrict the settings
509                   even further, even if the country allows frequencies or power levels that
510                   are forbidden by the EEPROM settings.
511
512                   Select this option if you want the driver to respect the user's decision about
513                   regulatory settings.
514
515         config PACKAGE_ATH_DEBUG
516                 bool "Atheros wireless debugging"
517                 help
518                   Say Y, if you want to debug atheros wireless drivers.
519                   Right now only ath9k makes use of this.
520
521         config PACKAGE_ATH_DFS
522                 bool "Enable DFS support"
523                 default y
524                 help
525                   Dynamic frequency selection (DFS) is required for most of the 5 GHz band
526                   channels in Europe, US, and Japan.
527
528                   Select this option if you want to use such channels.
529
530   endif
531 endef
532
533 define KernelPackage/ath
534   $(call KernelPackage/mac80211/Default)
535   TITLE:=Atheros common driver part
536   DEPENDS+= @PCI_SUPPORT||USB_SUPPORT||TARGET_ar71xx||TARGET_ath25 +kmod-mac80211
537   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath.ko
538   MENU:=1
539 endef
540
541 define KernelPackage/ath/description
542  This module contains some common parts needed by Atheros Wireless drivers.
543 endef
544
545 define KernelPackage/ath5k
546   $(call KernelPackage/mac80211/Default)
547   TITLE:=Atheros 5xxx wireless cards support
548   URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath5k
549   DEPENDS+= @PCI_SUPPORT||@TARGET_ath25 +kmod-ath
550   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath5k/ath5k.ko
551   AUTOLOAD:=$(call AutoProbe,ath5k)
552 endef
553
554 define KernelPackage/ath5k/description
555  This module adds support for wireless adapters based on
556  Atheros 5xxx chipset.
557 endef
558
559 define KernelPackage/ath9k-common
560   $(call KernelPackage/mac80211/Default)
561   TITLE:=Atheros 802.11n wireless devices (common code for ath9k and ath9k_htc)
562   URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath9k
563   DEPENDS+= @PCI_SUPPORT||USB_SUPPORT||TARGET_ar71xx +kmod-ath +@DRIVER_11N_SUPPORT +@KERNEL_RELAY
564   FILES:= \
565         $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k_common.ko \
566         $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k_hw.ko
567 endef
568
569 define KernelPackage/ath9k
570   $(call KernelPackage/mac80211/Default)
571   TITLE:=Atheros 802.11n PCI wireless cards support
572   URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath9k
573   DEPENDS+= @PCI_SUPPORT||TARGET_ar71xx +kmod-ath9k-common
574   FILES:= \
575         $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k.ko
576   AUTOLOAD:=$(call AutoProbe,ath9k)
577 endef
578
579 define KernelPackage/ath9k/description
580 This module adds support for wireless adapters based on
581 Atheros IEEE 802.11n AR5008 and AR9001 family of chipsets.
582 endef
583
584 define KernelPackage/ath9k/config
585
586         config ATH9K_SUPPORT_PCOEM
587                 bool "Support chips used in PC OEM cards"
588                 depends on PACKAGE_kmod-ath9k
589         
590 endef
591
592 define KernelPackage/ath9k-htc
593   $(call KernelPackage/mac80211/Default)
594   TITLE:=Atheros 802.11n USB device support
595   URL:=https://wireless.wiki.kernel.org/en/users/drivers/ath9k
596   DEPENDS+= @USB_SUPPORT +kmod-ath9k-common +kmod-usb-core
597   FILES:= \
598         $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k_htc.ko
599   AUTOLOAD:=$(call AutoProbe,ath9k_htc)
600 endef
601
602 define KernelPackage/ath9k-htc/description
603 This module adds support for wireless adapters based on
604 Atheros USB AR9271 and AR7010 family of chipsets.
605 endef
606
607 define KernelPackage/ath10k
608   $(call KernelPackage/mac80211/Default)
609   TITLE:=Atheros 802.11ac wireless cards support
610   URL:=https://wireless.wiki.kernel.org/en/users/Drivers/ath10k
611   DEPENDS+= @PCI_SUPPORT +kmod-ath +@DRIVER_11N_SUPPORT
612   FILES:= \
613         $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath10k/ath10k_core.ko \
614         $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath10k/ath10k_pci.ko
615   AUTOLOAD:=$(call AutoLoad,55,ath10k_core ath10k_pci)
616 endef
617
618 define KernelPackage/ath10k/description
619 This module adds support for wireless adapters based on
620 Atheros IEEE 802.11ac family of chipsets. For now only
621 PCI is supported.
622 endef
623
624 define KernelPackage/ath10k/config
625   if PACKAGE_kmod-ath10k
626
627         config ATH10K_STA_FW
628                 bool "Firmware optimized for STA operation"
629                 default n
630                 help
631                   Use the ath10k firmware optimized for wireless client instead
632                   of access point operation.
633
634   endif
635 endef
636
637 define KernelPackage/carl9170
638   $(call KernelPackage/mac80211/Default)
639   TITLE:=Driver for Atheros AR9170 USB sticks
640   DEPENDS:=@USB_SUPPORT +kmod-mac80211 +kmod-ath +kmod-usb-core +kmod-input-core +@DRIVER_11N_SUPPORT
641   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/carl9170/carl9170.ko
642   AUTOLOAD:=$(call AutoProbe,carl9170)
643 endef
644
645 define KernelPackage/lib80211
646   $(call KernelPackage/mac80211/Default)
647   TITLE:=802.11 Networking stack
648   DEPENDS:=+kmod-cfg80211
649   FILES:= \
650         $(PKG_BUILD_DIR)/net/wireless/lib80211.ko \
651         $(PKG_BUILD_DIR)/net/wireless/lib80211_crypt_wep.ko \
652         $(PKG_BUILD_DIR)/net/wireless/lib80211_crypt_ccmp.ko \
653         $(PKG_BUILD_DIR)/net/wireless/lib80211_crypt_tkip.ko
654   AUTOLOAD:=$(call AutoProbe, \
655         lib80211 \
656         lib80211_crypt_wep \
657         lib80211_crypt_ccmp \
658         lib80211_crypt_tkip \
659   )
660 endef
661
662 define KernelPackage/lib80211/description
663  Kernel modules for 802.11 Networking stack
664  Includes:
665  - lib80211
666  - lib80211_crypt_wep
667  - lib80211_crypt_tkip
668  - lib80211_crytp_ccmp
669 endef
670
671 define KernelPackage/libertas-usb
672   $(call KernelPackage/mac80211/Default)
673   DEPENDS+= @USB_SUPPORT +kmod-cfg80211 +kmod-usb-core +kmod-lib80211 +@DRIVER_WEXT_SUPPORT
674   TITLE:=Marvell 88W8015 Wireless Driver
675   FILES:= \
676         $(PKG_BUILD_DIR)/drivers/net/wireless/libertas/libertas.ko \
677         $(PKG_BUILD_DIR)/drivers/net/wireless/libertas/usb8xxx.ko
678   AUTOLOAD:=$(call AutoProbe,libertas usb8xxx)
679 endef
680
681 define KernelPackage/libertas-sdio
682   $(call KernelPackage/mac80211/Default)
683   DEPENDS+= +kmod-cfg80211 +kmod-lib80211 +kmod-mmc +@DRIVER_WEXT_SUPPORT @!TARGET_uml
684   TITLE:=Marvell 88W8686 Wireless Driver
685   FILES:= \
686         $(PKG_BUILD_DIR)/drivers/net/wireless/libertas/libertas.ko \
687         $(PKG_BUILD_DIR)/drivers/net/wireless/libertas/libertas_sdio.ko
688   AUTOLOAD:=$(call AutoProbe,libertas libertas_sdio)
689 endef
690
691 define KernelPackage/mac80211-hwsim
692   $(call KernelPackage/mac80211/Default)
693   TITLE:=mac80211 HW simulation device
694   DEPENDS+= +kmod-mac80211 +@DRIVER_11N_SUPPORT
695   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/mac80211_hwsim.ko
696   AUTOLOAD:=$(call AutoProbe,mac80211_hwsim)
697 endef
698
699 define KernelPackage/net-libipw
700   $(call KernelPackage/mac80211/Default)
701   TITLE:=libipw for ipw2100 and ipw2200
702   DEPENDS:=@PCI_SUPPORT +kmod-crypto-core +kmod-crypto-arc4 +kmod-crypto-aes +kmod-crypto-michael-mic +kmod-lib80211 +kmod-cfg80211 +@DRIVER_WEXT_SUPPORT
703   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ipw2x00/libipw.ko
704   AUTOLOAD:=$(call AutoProbe,libipw)
705 endef
706
707 define KernelPackage/net-libipw/description
708  Hardware independent IEEE 802.11 networking stack for ipw2100 and ipw2200.
709 endef
710
711 IPW2100_NAME:=ipw2100-fw
712 IPW2100_VERSION:=1.3
713
714 define Download/net-ipw2100
715   URL:=http://bughost.org/firmware/
716   FILE:=$(IPW2100_NAME)-$(IPW2100_VERSION).tgz
717   MD5SUM=46aa75bcda1a00efa841f9707bbbd113
718 endef
719 $(eval $(call Download,net-ipw2100))
720
721 define KernelPackage/net-ipw2100
722   $(call KernelPackage/mac80211/Default)
723   TITLE:=Intel IPW2100 driver
724   DEPENDS:=@PCI_SUPPORT +kmod-net-libipw
725   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ipw2x00/ipw2100.ko
726   AUTOLOAD:=$(call AutoProbe,ipw2100)
727 endef
728
729 define KernelPackage/net-ipw2100/description
730  Kernel support for Intel IPW2100
731  Includes:
732  - ipw2100
733 endef
734
735 IPW2200_NAME:=ipw2200-fw
736 IPW2200_VERSION:=3.1
737
738 define Download/net-ipw2200
739   URL:=http://bughost.org/firmware/
740   FILE:=$(IPW2200_NAME)-$(IPW2200_VERSION).tgz
741   MD5SUM=eaba788643c7cc7483dd67ace70f6e99
742 endef
743 $(eval $(call Download,net-ipw2200))
744
745 define KernelPackage/net-ipw2200
746   $(call KernelPackage/mac80211/Default)
747   TITLE:=Intel IPW2200 driver
748   DEPENDS:=@PCI_SUPPORT +kmod-net-libipw
749   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ipw2x00/ipw2200.ko
750   AUTOLOAD:=$(call AutoProbe,ipw2200)
751 endef
752
753 define KernelPackage/net-ipw2200/description
754  Kernel support for Intel IPW2200
755  Includes:
756  - ipw2200
757 endef
758
759
760 define KernelPackage/net-hermes
761   $(call KernelPackage/mac80211/Default)
762   TITLE:=Hermes 802.11b chipset support
763   DEPENDS:=@PCI_SUPPORT||PCMCIA_SUPPORT +kmod-cfg80211 +@DRIVER_WEXT_SUPPORT
764   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/orinoco/orinoco.ko
765   AUTOLOAD:=$(call AutoProbe,orinoco)
766 endef
767
768 define KernelPackage/net-hermes/description
769  Kernel support for Hermes 802.11b chipsets
770 endef
771
772 define KernelPackage/net-hermes-pci
773   $(call KernelPackage/mac80211/Default)
774   TITLE:=Intersil Prism 2.5 PCI support
775   DEPENDS:=@PCI_SUPPORT +kmod-net-hermes
776   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/orinoco/orinoco_pci.ko
777   AUTOLOAD:=$(call AutoProbe,orinoco_pci)
778 endef
779
780 define KernelPackage/net-hermes-pci/description
781  Kernel modules for Intersil Prism 2.5 PCI support
782 endef
783
784 define KernelPackage/net-hermes-plx
785   $(call KernelPackage/mac80211/Default)
786   TITLE:=PLX9052 based PCI adaptor
787   DEPENDS:=@PCI_SUPPORT +kmod-net-hermes
788   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/orinoco/orinoco_plx.ko
789   AUTOLOAD:=$(call AutoProbe,orinoco_plx)
790 endef
791
792 define KernelPackage/net-hermes-plx/description
793  Kernel modules for Hermes in PLX9052 based PCI adaptors
794 endef
795
796 define KernelPackage/net-hermes-pcmcia
797   $(call KernelPackage/mac80211/Default)
798   TITLE:=Hermes based PCMCIA adaptors
799   DEPENDS:=@PCMCIA_SUPPORT +kmod-net-hermes @BROKEN
800   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/orinoco/orinoco_cs.ko
801   AUTOLOAD:=$(call AutoProbe,orinoco_cs)
802 endef
803
804 define KernelPackage/net-hermes-pcmcia/description
805  Kernel modules for Hermes based PCMCIA adaptors
806 endef
807
808 define KernelPackage/iwlagn
809   $(call KernelPackage/mac80211/Default)
810   DEPENDS:= +kmod-mac80211 @PCI_SUPPORT +@DRIVER_11N_SUPPORT
811   TITLE:=Intel AGN Wireless support
812   FILES:= \
813         $(PKG_BUILD_DIR)/drivers/net/wireless/iwlwifi/iwlwifi.ko \
814         $(PKG_BUILD_DIR)/drivers/net/wireless/iwlwifi/dvm/iwldvm.ko
815   AUTOLOAD:=$(call AutoProbe,iwlwifi iwldvm)
816   MENU:=1
817 endef
818
819 define KernelPackage/iwlagn/description
820  iwlagn kernel module for Intel 5000/5150/1000/6000/6050/6005/6030/100 support
821 endef
822
823 define KernelPackage/iwlagn/config
824   if PACKAGE_kmod-iwlagn
825
826         config IWL5000_FW
827                 bool "Intel 5000 Firmware"
828                 default y
829                 help
830                   Download and install firmware for:
831                     Intel Wireless WiFi 5100AGN, 5300AGN, and 5350AGN
832
833         config IWL5150_FW
834                 bool "Intel 5150 Firmware"
835                 default y
836                 help
837                   Download and install firmware for:
838                     Intel Wireless WiFi 5150AGN
839
840         config IWL1000_FW
841                 bool "Intel 1000 Firmware"
842                 default y
843                 help
844                   Download and install firmware for:
845                     Intel Centrino Wireless-N 1000
846
847         config IWL6000_FW
848                 bool "Intel 6000 Firmware"
849                 default y
850                 help
851                   Download and install firmware for:
852                     Intel Centrino Ultimate-N 6300 and Advanced-N 6200
853
854         config IWL6050_FW
855                 bool "Intel 6050 Firmware"
856                 default y
857                 help
858                   Download and install firmware for:
859                     Intel Centrino Advanced-N + WiMAX 6250 and Wireless-N + WiMAX 6150
860
861         config IWL6005_FW
862                 bool "Intel 6005 Firmware"
863                 default y
864                 help
865                   Download and install firmware for:
866                     Intel Centrino Advanced-N 6205
867
868         config IWL6030_FW
869                 bool "Intel 6030 Firmware"
870                 default y
871                 help
872                   Download and install firmware for:
873                     Intel Centrino Advanced-N 6230, Wireless-N 1030, Wireless-N 130 and Advanced-N 6235
874
875         config IWL7260_FW
876                 bool "Intel 7260 Firmware"
877                 default y
878                 help
879                   Download and install firmware for:
880                     Intel Dual Band Wireless-N 7260 and Intel Dual Band Wireless-AC 7260
881
882         config IWL7265_FW
883                 bool "Intel 7265 Firmware"
884                 default y
885                 help
886                   Download and install firmware for:
887                     Intel Wireless 7265
888
889         config IWL100_FW
890                 bool "Intel 100 Firmware"
891                 default y
892                 help
893                   Download and install firmware for:
894                     Intel Centrino Wireless-N 100
895
896         config IWL2000_FW
897                 bool "Intel 2000 Firmware"
898                 default y
899                 help
900                   Download and install firmware for:
901                     Intel Centrino Wireless-N 2200
902
903         config IWL2030_FW
904                 bool "Intel 2030 Firmware"
905                 default y
906                 help
907                   Download and install firmware for:
908                     Intel Centrino Wireless-N 2230
909
910         config IWL105_FW
911                 bool "Intel 105 Firmware"
912                 default y
913                 help
914                   Download and install firmware for:
915                     Intel Centrino Wireless-N 105
916
917         config IWL135_FW
918                 bool "Intel 135 Firmware"
919                 default y
920                 help
921                   Download and install firmware for:
922                     Intel Centrino Wireless-N 135
923
924         config IWL3160_FW
925                 bool "Intel 3160 Firmware"
926                 default y
927                 help
928                   Download and install firmware for:
929                     Intel Wireless 3160
930   endif
931 endef
932
933 define KernelPackage/iwl-legacy
934   $(call KernelPackage/mac80211/Default)
935   DEPENDS:= +kmod-mac80211 @PCI_SUPPORT
936   TITLE:=Intel legacy Wireless support
937   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/iwlegacy/iwlegacy.ko
938   AUTOLOAD:=$(call AutoProbe,iwlegacy)
939 endef
940
941 define KernelPackage/iwl-legacy/description
942  iwl-legacy kernel module for legacy Intel wireless support
943 endef
944
945 define KernelPackage/iwl3945
946   $(call KernelPackage/mac80211/Default)
947   DEPENDS:= +kmod-mac80211 +kmod-iwl-legacy
948   TITLE:=Intel iwl3945 Wireless support
949   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/iwlegacy/iwl3945.ko
950   AUTOLOAD:=$(call AutoProbe,iwl3945)
951 endef
952
953 define KernelPackage/iwl3945/description
954  iwl3945 kernel module for Intel 3945 support
955 endef
956
957 define KernelPackage/iwl4965
958   $(call KernelPackage/mac80211/Default)
959   DEPENDS:= +kmod-mac80211 +kmod-iwl-legacy +@DRIVER_11N_SUPPORT
960   TITLE:=Intel iwl4965 Wireless support
961   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/iwlegacy/iwl4965.ko
962   AUTOLOAD:=$(call AutoProbe,iwl4965)
963 endef
964
965 define KernelPackage/iwl4965/description
966  iwl4965 kernel module for Intel 4965 support
967 endef
968
969
970 define KernelPackage/mwl8k
971   $(call KernelPackage/mac80211/Default)
972   TITLE:=Driver for Marvell TOPDOG 802.11 Wireless cards
973   URL:=http://wireless.kernel.org/en/users/Drivers/mwl8k
974   DEPENDS+= @PCI_SUPPORT +kmod-mac80211 +@DRIVER_11N_SUPPORT
975   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/mwl8k.ko
976   AUTOLOAD:=$(call AutoProbe,mwl8k)
977 endef
978
979 define KernelPackage/mwl8k/description
980  Kernel modules for Marvell TOPDOG 802.11 Wireless cards
981 endef
982
983
984 define KernelPackage/mwifiex-pcie
985   $(call KernelPackage/mac80211/Default)
986   TITLE:=Driver for Marvell 802.11n/802.11ac PCIe Wireless cards
987   URL:=http://wireless.kernel.org/en/users/Drivers/mwifiex
988   DEPENDS+= @PCI_SUPPORT +kmod-mac80211 +@DRIVER_11N_SUPPORT
989   FILES:= \
990         $(PKG_BUILD_DIR)/drivers/net/wireless/mwifiex/mwifiex.ko \
991         $(PKG_BUILD_DIR)/drivers/net/wireless/mwifiex/mwifiex_pcie.ko
992   AUTOLOAD:=$(call AutoProbe,mwifiex_pcie)
993 endef
994
995 define KernelPackage/mwifiex-pcie/description
996  Kernel modules for Marvell 802.11n/802.11ac PCIe Wireless cards
997 endef
998
999
1000 define KernelPackage/wlcore
1001   $(call KernelPackage/mac80211/Default)
1002   TITLE:=TI common driver part
1003   DEPENDS+= @TARGET_omap +kmod-mac80211 +@DRIVER_11N_SUPPORT
1004   FILES:= \
1005         $(PKG_BUILD_DIR)/drivers/net/wireless/ti/wlcore/wlcore.ko \
1006         $(PKG_BUILD_DIR)/drivers/net/wireless/ti/wlcore/wlcore_sdio.ko
1007   AUTOLOAD:=$(call AutoProbe,wlcore wlcore_sdio)
1008 endef
1009
1010 define KernelPackage/wlcore/description
1011  This module contains some common parts needed by TI Wireless drivers.
1012 endef
1013
1014 define KernelPackage/wl12xx
1015   $(call KernelPackage/mac80211/Default)
1016   TITLE:=Driver for TI WL12xx
1017   URL:=http://wireless.kernel.org/en/users/Drivers/wl12xx
1018   DEPENDS+= +kmod-wlcore
1019   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ti/wl12xx/wl12xx.ko
1020   AUTOLOAD:=$(call AutoProbe,wl12xx)
1021 endef
1022
1023 define KernelPackage/wl12xx/description
1024  Kernel modules for TI WL12xx
1025 endef
1026
1027 define KernelPackage/wl18xx
1028   $(call KernelPackage/mac80211/Default)
1029   TITLE:=Driver for TI WL18xx
1030   URL:=http://wireless.kernel.org/en/users/Drivers/wl18xx
1031   DEPENDS+= +kmod-wlcore
1032   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ti/wl18xx/wl18xx.ko
1033   AUTOLOAD:=$(call AutoProbe,wl18xx)
1034 endef
1035
1036 define KernelPackage/wl18xx/description
1037  Kernel modules for TI WL18xx
1038 endef
1039
1040
1041 #Broadcom firmware
1042 ifneq ($(CONFIG_B43_FW_6_30),)
1043   PKG_B43_FWV4_NAME:=broadcom-wl
1044   PKG_B43_FWV4_VERSION:=6.30.163.46
1045   PKG_B43_FWV4_OBJECT:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION).wl_apsta.o
1046   PKG_B43_FWV4_SOURCE:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION).tar.bz2
1047   PKG_B43_FWV4_SOURCE_URL:=http://www.lwfinger.com/b43-firmware/
1048   PKG_B43_FWV4_MD5SUM:=6fe97e9368d25342a1ab943d3cf3496d
1049 else
1050 ifneq ($(CONFIG_B43_FW_5_10),)
1051   PKG_B43_FWV4_NAME:=broadcom-wl
1052   PKG_B43_FWV4_VERSION:=5.10.56.27.3
1053   PKG_B43_FWV4_OBJECT:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION)/driver/wl_apsta/wl_prebuilt.o
1054   PKG_B43_FWV4_SOURCE:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION)_mipsel.tar.bz2
1055   PKG_B43_FWV4_SOURCE_URL:=http://mirror2.openwrt.org/sources/
1056   PKG_B43_FWV4_MD5SUM:=3363e3a6b3d9d73c49dea870c7834eac
1057 else
1058 ifneq ($(CONFIG_B43_FW_4_178),)
1059   PKG_B43_FWV4_NAME:=broadcom-wl
1060   PKG_B43_FWV4_VERSION:=4.178.10.4
1061   PKG_B43_FWV4_OBJECT:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION)/linux/wl_apsta.o
1062   PKG_B43_FWV4_SOURCE:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION).tar.bz2
1063   PKG_B43_FWV4_SOURCE_URL:=http://mirror2.openwrt.org/sources/
1064   PKG_B43_FWV4_MD5SUM:=14477e8cbbb91b11896affac9b219fdb
1065 else
1066 ifneq ($(CONFIG_B43_FW_5_100_138),)
1067   PKG_B43_FWV4_NAME:=broadcom-wl
1068   PKG_B43_FWV4_VERSION:=5.100.138
1069   PKG_B43_FWV4_OBJECT:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION)/linux/wl_apsta.o
1070   PKG_B43_FWV4_SOURCE:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION).tar.bz2
1071   PKG_B43_FWV4_SOURCE_URL:=http://www.lwfinger.com/b43-firmware/
1072   PKG_B43_FWV4_MD5SUM:=f4e357b09eaf5d8b1f1920cf3493a555
1073 else
1074   PKG_B43_FWV4_NAME:=broadcom-wl
1075   PKG_B43_FWV4_VERSION:=4.150.10.5
1076   PKG_B43_FWV4_OBJECT:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION)/driver/wl_apsta_mimo.o
1077   PKG_B43_FWV4_SOURCE:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION).tar.bz2
1078   PKG_B43_FWV4_SOURCE_URL:=http://mirror2.openwrt.org/sources/
1079   PKG_B43_FWV4_MD5SUM:=0c6ba9687114c6b598e8019e262d9a60
1080 endif
1081 endif
1082 endif
1083 endif
1084 ifneq ($(CONFIG_B43_OPENFIRMWARE),)
1085   PKG_B43_FWV4_NAME:=broadcom-wl
1086   PKG_B43_FWV4_VERSION:=5.2
1087   PKG_B43_FWV4_OBJECT:=openfwwf-$(PKG_B43_FWV4_VERSION)
1088   PKG_B43_FWV4_SOURCE:=openfwwf-$(PKG_B43_FWV4_VERSION).tar.gz
1089   PKG_B43_FWV4_SOURCE_URL:=http://www.ing.unibs.it/openfwwf/firmware/
1090   PKG_B43_FWV4_MD5SUM:=e045a135453274e439ae183f8498b0fa
1091 endif
1092
1093
1094 PKG_B43_FWV3_NAME:=wl_apsta
1095 PKG_B43_FWV3_VERSION:=3.130.20.0
1096 PKG_B43_FWV3_SOURCE:=$(PKG_B43_FWV3_NAME)-$(PKG_B43_FWV3_VERSION).o
1097 PKG_B43_FWV3_SOURCE_URL:=http://downloads.openwrt.org/sources/
1098 PKG_B43_FWV3_MD5SUM:=e08665c5c5b66beb9c3b2dd54aa80cb3
1099
1100 define Download/b43
1101   FILE:=$(PKG_B43_FWV4_SOURCE)
1102   URL:=$(PKG_B43_FWV4_SOURCE_URL)
1103   MD5SUM:=$(PKG_B43_FWV4_MD5SUM)
1104 endef
1105 $(eval $(call Download,b43))
1106
1107 define Download/b43legacy
1108   FILE:=$(PKG_B43_FWV3_SOURCE)
1109   URL:=$(PKG_B43_FWV3_SOURCE_URL)
1110   MD5SUM:=$(PKG_B43_FWV3_MD5SUM)
1111 endef
1112 $(eval $(call Download,b43legacy))
1113
1114
1115 define KernelPackage/b43
1116   $(call KernelPackage/mac80211/Default)
1117   TITLE:=Broadcom 43xx wireless support
1118   URL:=https://wireless.wiki.kernel.org/en/users/drivers/b43
1119   KCONFIG:= \
1120         CONFIG_HW_RANDOM=y
1121   # Depend on PCI_SUPPORT to make sure we can select kmod-bcma or kmod-ssb
1122   DEPENDS += \
1123         @PCI_SUPPORT +kmod-mac80211 \
1124         $(if $(CONFIG_PACKAGE_B43_USE_SSB),+kmod-ssb) \
1125         $(if $(CONFIG_PACKAGE_B43_USE_BCMA),+kmod-bcma)
1126   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/b43/b43.ko
1127   AUTOLOAD:=$(call AutoProbe,b43)
1128   MENU:=1
1129 endef
1130
1131 define KernelPackage/b43/config
1132
1133 config PACKAGE_B43_USE_SSB
1134         select PACKAGE_kmod-ssb
1135         tristate
1136         depends on !TARGET_brcm47xx && !TARGET_brcm63xx
1137         default PACKAGE_kmod-b43 if PACKAGE_B43_BUSES_BCMA_AND_SSB
1138         default PACKAGE_kmod-b43 if PACKAGE_B43_BUSES_SSB
1139
1140 config PACKAGE_B43_USE_BCMA
1141         select PACKAGE_kmod-bcma
1142         tristate
1143         depends on !TARGET_brcm47xx
1144         default PACKAGE_kmod-b43 if PACKAGE_B43_BUSES_BCMA_AND_SSB
1145         default PACKAGE_kmod-b43 if PACKAGE_B43_BUSES_BCMA
1146
1147   if PACKAGE_kmod-b43
1148
1149         choice
1150                 prompt "b43 firmware version"
1151                 default B43_FW_5_100_138
1152                 help
1153                   This option allows you to select the version of the b43 firmware.
1154
1155         config B43_FW_4_150
1156                 bool "Firmware 410.2160 from driver 4.150.10.5 (old stable)"
1157                 help
1158                   Old stable firmware for BCM43xx devices.
1159
1160                   If unsure, select this.
1161
1162         config B43_FW_4_178
1163                 bool "Firmware 478.104 from driver 4.178.10.4"
1164                 help
1165                   Older firmware for BCM43xx devices.
1166
1167                   If unsure, select the "stable" firmware.
1168
1169         config B43_FW_5_10
1170                 bool "Firmware 508.1084 from driver 5.10.56.27"
1171                 help
1172                   Older firmware for BCM43xx devices.
1173
1174                   If unsure, select the "stable" firmware.
1175
1176         config B43_FW_5_100_138
1177                 bool "Firmware 666.2 from driver 5.100.138 (stable)"
1178                 help
1179                   The currently default firmware for BCM43xx devices.
1180
1181                   This firmware currently gets most of the testing and is needed for some N-PHY devices.
1182
1183                   If unsure, select the this firmware.
1184
1185         config B43_FW_6_30
1186                 bool "Firmware 784.2 from driver 6.30.163.46 (experimental)"
1187                 help
1188                   Newer experimental firmware for BCM43xx devices.
1189
1190                   This firmware is mostly untested.
1191
1192                   If unsure, select the "stable" firmware.
1193
1194         config B43_OPENFIRMWARE
1195                 bool "Open FirmWare for WiFi networks"
1196                 help
1197                   Opensource firmware for BCM43xx devices.
1198
1199                   Do _not_ select this, unless you know what you are doing.
1200                   The Opensource firmware is not suitable for embedded devices, yet.
1201                   It does not support QoS, which is bad for AccessPoints.
1202                   It does not support hardware crypto acceleration, which is a showstopper
1203                   for embedded devices with low CPU resources.
1204
1205                   If unsure, select the "stable" firmware.
1206
1207         endchoice
1208
1209         config B43_FW_SQUASH
1210                 bool "Remove unnecessary firmware files"
1211                 depends on !B43_OPENFIRMWARE
1212                 default y
1213                 help
1214                   This options allows you to remove unnecessary b43 firmware files
1215                   from the final rootfs image. This can reduce the rootfs size by
1216                   up to 200k.
1217
1218                   If unsure, say Y.
1219
1220         config B43_FW_SQUASH_COREREVS
1221                 string "Core revisions to include"
1222                 depends on B43_FW_SQUASH
1223                 default "5,6,7,8,9,10,11,13,15" if TARGET_brcm47xx_legacy
1224                 default "16,28,29,30" if TARGET_brcm47xx_mips74k
1225                 default "5,6,7,8,9,10,11,13,15,16,28,29,30"
1226                 help
1227                   This is a comma seperated list of core revision numbers.
1228
1229                   Example (keep files for rev5 only):
1230                     5
1231
1232                   Example (keep files for rev5 and rev11):
1233                     5,11
1234
1235         config B43_FW_SQUASH_PHYTYPES
1236                 string "PHY types to include"
1237                 depends on B43_FW_SQUASH
1238                 default "G,LP" if TARGET_brcm47xx_legacy
1239                 default "N,HT" if TARGET_brcm47xx_mips74k
1240                 default "G,LP,N,HT"
1241                 help
1242                   This is a comma seperated list of PHY types:
1243                     A  => A-PHY
1244                     AG => Dual A-PHY G-PHY
1245                     G  => G-PHY
1246                     LP => LP-PHY
1247                     N  => N-PHY
1248                     HT  => HT-PHY
1249                     LCN  => LCN-PHY
1250                     LCN40  => LCN40-PHY
1251                     AC  => AC-PHY
1252
1253                   Example (keep files for G-PHY only):
1254                     G
1255
1256                   Example (keep files for G-PHY and N-PHY):
1257                     G,N
1258
1259         choice
1260                 prompt "Supported buses"
1261                 default PACKAGE_B43_BUSES_BCMA_AND_SSB
1262                 help
1263                   This allows choosing buses that b43 should support.
1264
1265         config PACKAGE_B43_BUSES_BCMA_AND_SSB
1266                 depends on !TARGET_brcm47xx_legacy && !TARGET_brcm47xx_mips74k
1267                 bool "BCMA and SSB"
1268
1269         config PACKAGE_B43_BUSES_BCMA
1270                 depends on !TARGET_brcm47xx_legacy
1271                 bool "BCMA only"
1272
1273         config PACKAGE_B43_BUSES_SSB
1274                 depends on !TARGET_brcm47xx_mips74k
1275                 bool "SSB only"
1276
1277         endchoice
1278
1279         config PACKAGE_B43_DEBUG
1280                 bool "Enable debug output and debugfs for b43"
1281                 default n
1282                 help
1283                   Enable additional debug output and runtime sanity checks for b43
1284                   and enables the debugfs interface.
1285
1286                   If unsure, say N.
1287
1288         config PACKAGE_B43_PIO
1289                 bool "Enable support for PIO transfer mode"
1290                 default n
1291                 help
1292                   Enable support for using PIO instead of DMA. Unless you have DMA
1293                   transfer problems you don't need this.
1294
1295                   If unsure, say N.
1296
1297         config PACKAGE_B43_PHY_G
1298                 bool "Enable support for G-PHYs"
1299                 default n if TARGET_brcm47xx_mips74k
1300                 default y
1301                 help
1302                   Enable support for G-PHY. This includes support for the following devices:
1303                   PCI: BCM4306, BCM4311, BCM4318
1304                   SoC: BCM5352E, BCM4712
1305
1306                   If unsure, say Y.
1307
1308         config PACKAGE_B43_PHY_N
1309                 bool "Enable support for N-PHYs"
1310                 default n if TARGET_brcm47xx_legacy
1311                 default y
1312                 help
1313                   Enable support for N-PHY. This includes support for the following devices:
1314                   PCI: BCM4321, BCM4322, BCM43222, BCM43224, BCM43225
1315                   SoC: BCM4716, BCM4717, BCM4718
1316
1317                   Currently only 11g speed is available.
1318
1319                   If unsure, say Y.
1320
1321         config PACKAGE_B43_PHY_LP
1322                 bool "Enable support for LP-PHYs"
1323                 default n if TARGET_brcm47xx_mips74k
1324                 default y
1325                 help
1326                   Enable support for LP-PHY. This includes support for the following devices:
1327                   PCI: BCM4312
1328                   SoC: BCM5354
1329
1330                   If unsure, say Y.
1331
1332         config PACKAGE_B43_PHY_HT
1333                 bool "Enable support for HT-PHYs"
1334                 default n if TARGET_brcm47xx_legacy
1335                 default y
1336                 help
1337                   Enable support for HT-PHY. This includes support for the following devices:
1338                   PCI: BCM4331
1339
1340                   Currently only 11g speed is available.
1341
1342                   If unsure, say Y.
1343
1344         config PACKAGE_B43_PHY_LCN
1345                 bool "Enable support for LCN-PHYs"
1346                 depends on BROKEN
1347                 default n
1348                 help
1349                   Currently broken.
1350
1351                   If unsure, say N.
1352
1353   endif
1354 endef
1355
1356 define KernelPackage/b43/description
1357 Kernel module for Broadcom 43xx wireless support (mac80211 stack) new
1358 endef
1359
1360 define KernelPackage/b43legacy
1361   $(call KernelPackage/mac80211/Default)
1362   TITLE:=Broadcom 43xx-legacy wireless support
1363   URL:=https://wireless.wiki.kernel.org/en/users/drivers/b43
1364   KCONFIG:= \
1365         CONFIG_HW_RANDOM=y
1366   DEPENDS+= +kmod-mac80211 +!(TARGET_brcm47xx||TARGET_brcm63xx):kmod-ssb
1367   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/b43legacy/b43legacy.ko
1368   AUTOLOAD:=$(call AutoProbe,b43legacy)
1369   MENU:=1
1370 endef
1371
1372 define KernelPackage/b43legacy/config
1373   if PACKAGE_kmod-b43legacy
1374
1375         config B43LEGACY_FW_SQUASH
1376                 bool "Remove unnecessary firmware files"
1377                 default y
1378                 help
1379                   This options allows you to remove unnecessary b43legacy firmware files
1380                   from the final rootfs image. This can reduce the rootfs size by
1381                   up to 50k.
1382
1383                   If unsure, say Y.
1384
1385         config B43LEGACY_FW_SQUASH_COREREVS
1386                 string "Core revisions to include"
1387                 depends on B43LEGACY_FW_SQUASH
1388                 default "1,2,3,4"
1389                 help
1390                   This is a comma seperated list of core revision numbers.
1391
1392                   Example (keep files for rev4 only):
1393                     4
1394
1395                   Example (keep files for rev2 and rev4):
1396                     2,4
1397
1398   endif
1399 endef
1400
1401 define KernelPackage/b43legacy/description
1402 Kernel module for Broadcom 43xx-legacy wireless support (mac80211 stack) new
1403 endef
1404
1405
1406 define KernelPackage/brcmutil
1407   $(call KernelPackage/mac80211/Default)
1408   TITLE:=Broadcom IEEE802.11n common driver parts
1409   URL:=https://wireless.wiki.kernel.org/en/users/drivers/brcm80211
1410   DEPENDS+=@PCI_SUPPORT||USB_SUPPORT
1411   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/brcm80211/brcmutil/brcmutil.ko
1412   AUTOLOAD:=$(call AutoProbe,brcmutil)
1413   MENU:=1
1414 endef
1415
1416 define KernelPackage/brcmutil/description
1417  This module contains some common parts needed by Broadcom Wireless drivers brcmsmac and brcmfmac.
1418 endef
1419
1420 define KernelPackage/brcmutil/config
1421   if PACKAGE_kmod-brcmutil
1422
1423         config PACKAGE_BRCM80211_DEBUG
1424                 bool "Broadcom wireless driver debugging"
1425                 help
1426                   Say Y, if you want to debug brcmsmac and brcmfmac wireless driver.
1427
1428   endif
1429 endef
1430
1431 PKG_BRCMSMAC_FW_NAME:=broadcom-wl
1432 PKG_BRCMSMAC_FW_VERSION:=5.100.138
1433 PKG_BRCMSMAC_FW_OBJECT:=$(PKG_BRCMSMAC_FW_NAME)-$(PKG_BRCMSMAC_FW_VERSION)/linux/wl_apsta.o
1434 PKG_BRCMSMAC_FW_SOURCE:=$(PKG_BRCMSMAC_FW_NAME)-$(PKG_BRCMSMAC_FW_VERSION).tar.bz2
1435 PKG_BRCMSMAC_FW_SOURCE_URL:=http://www.lwfinger.com/b43-firmware/
1436 PKG_BRCMSMAC_FW_MD5SUM:=f4e357b09eaf5d8b1f1920cf3493a555
1437
1438 define Download/brcmsmac
1439   FILE:=$(PKG_BRCMSMAC_FW_SOURCE)
1440   URL:=$(PKG_BRCMSMAC_FW_SOURCE_URL)
1441   MD5SUM:=$(PKG_BRCMSMAC_FW_MD5SUM)
1442 endef
1443 $(eval $(call Download,brcmsmac))
1444
1445 define KernelPackage/brcmsmac
1446   $(call KernelPackage/mac80211/Default)
1447   TITLE:=Broadcom IEEE802.11n PCIe SoftMAC WLAN driver
1448   URL:=https://wireless.wiki.kernel.org/en/users/drivers/brcm80211
1449   DEPENDS+= +kmod-mac80211 +@DRIVER_11N_SUPPORT +!TARGET_brcm47xx:kmod-bcma +kmod-lib-cordic +kmod-lib-crc8 +kmod-brcmutil
1450   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/brcm80211/brcmsmac/brcmsmac.ko
1451   AUTOLOAD:=$(call AutoProbe,brcmsmac)
1452   MENU:=1
1453 endef
1454
1455 define KernelPackage/brcmsmac/description
1456  Kernel module for Broadcom IEEE802.11n PCIe Wireless cards
1457 endef
1458
1459 define KernelPackage/brcmsmac/config
1460   if PACKAGE_kmod-brcmsmac
1461
1462         config BRCMSMAC_USE_FW_FROM_WL
1463                 bool "Use firmware extracted from broadcom proprietary driver"
1464                 default y
1465                 help
1466                   Instead of using the official brcmsmac firmware a firmware
1467                   version 666.2 extracted from the proprietary Broadcom driver
1468                   is used. This is needed to get core rev 17 used in bcm4716
1469                   to work.
1470
1471                   If unsure, say Y.
1472
1473   endif
1474 endef
1475
1476
1477 define KernelPackage/brcmfmac
1478   $(call KernelPackage/mac80211/Default)
1479   TITLE:=Broadcom IEEE802.11n USB FullMAC WLAN driver
1480   URL:=https://wireless.wiki.kernel.org/en/users/drivers/brcm80211
1481   DEPENDS+= @USB_SUPPORT +kmod-cfg80211 +@DRIVER_11N_SUPPORT +kmod-brcmutil +BRCMFMAC_SDIO:kmod-mmc +BRCMFMAC_USB:kmod-usb-core
1482   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/brcm80211/brcmfmac/brcmfmac.ko
1483   AUTOLOAD:=$(call AutoProbe,brcmfmac)
1484 endef
1485
1486 define KernelPackage/brcmfmac/description
1487  Kernel module for Broadcom IEEE802.11n USB Wireless cards
1488 endef
1489
1490 define KernelPackage/brcmfmac/config
1491   if PACKAGE_kmod-brcmfmac
1492
1493         config BRCMFMAC_SDIO
1494                 bool "Enable SDIO bus interface support"
1495                 default n
1496                 help
1497                   Enable support for cards attached to an SDIO bus.
1498                   Select this option only if you are sure that your
1499                   board has a Broadcom wireless chip atacched to
1500                   that bus.
1501
1502         config BRCMFMAC_USB
1503                 bool "Enable USB bus interface support"
1504                 depends on USB_SUPPORT
1505                 default y
1506                 help
1507                   Supported USB connected chipsets:
1508                   BCM43235, BCM43236, BCM43238 (all in revision 3 only)
1509                   BCM43143, BCM43242, BCM43566, BCM43569
1510
1511         config BRCMFMAC_PCIE
1512                 bool "Enable PCIE bus interface support"
1513                 depends on PCI_SUPPORT
1514                 default y
1515                 help
1516                   Supported PCIe connected chipsets:
1517                   BCM4354, BCM4356, BCM43567, BCM43570, BCM43602
1518
1519   endif
1520 endef
1521
1522 config_package=$(if $(CONFIG_PACKAGE_kmod-$(1)),m)
1523
1524 config-y:= \
1525         WLAN \
1526         NL80211_TESTMODE \
1527         CFG80211_WEXT \
1528         CFG80211_INTERNAL_REGDB \
1529         CFG80211_CERTIFICATION_ONUS \
1530         MAC80211_RC_MINSTREL \
1531         MAC80211_RC_MINSTREL_HT \
1532         MAC80211_RC_MINSTREL_VHT \
1533         MAC80211_RC_DEFAULT_MINSTREL \
1534
1535 config-$(call config_package,cfg80211) += CFG80211
1536
1537 config-$(call config_package,mac80211) += MAC80211
1538 config-$(CONFIG_PACKAGE_MAC80211_MESH) += MAC80211_MESH
1539 ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
1540   config-y += \
1541         CFG80211_DEBUGFS \
1542         MAC80211_DEBUGFS \
1543         ATH9K_DEBUGFS \
1544         ATH9K_HTC_DEBUGFS \
1545         ATH10K_DEBUGFS \
1546         CARL9170_DEBUGFS \
1547         ATH5K_DEBUG
1548 endif
1549
1550 config-$(call config_package,lib80211) += LIB80211 LIB80211_CRYPT_WEP LIB80211_CRYPT_CCMP LIB80211_CRYPT_TKIP
1551
1552 config-$(call config_package,ath) += ATH_CARDS ATH_COMMON
1553 config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG
1554 config-$(CONFIG_PACKAGE_ATH_DFS) += ATH9K_DFS_CERTIFIED ATH10K_DFS_CERTIFIED
1555
1556 config-$(call config_package,ath9k) += ATH9K
1557 config-$(call config_package,ath9k-common) += ATH9K_COMMON
1558 config-$(CONFIG_TARGET_ar71xx) += ATH9K_AHB
1559 config-$(CONFIG_PCI) += ATH9K_PCI
1560 config-$(CONFIG_ATH_USER_REGD) += ATH_USER_REGD
1561 config-$(CONFIG_ATH9K_SUPPORT_PCOEM) += ATH9K_PCOEM
1562
1563 config-$(call config_package,ath9k-htc) += ATH9K_HTC
1564 config-$(call config_package,ath10k) += ATH10K ATH10K_PCI
1565
1566 config-$(call config_package,ath5k) += ATH5K
1567 ifdef CONFIG_TARGET_ath25
1568   config-y += ATH5K_AHB
1569 else
1570   config-y += ATH5K_PCI
1571 endif
1572
1573 config-$(call config_package,carl9170) += CARL9170
1574
1575 config-$(call config_package,b43) += B43
1576 config-$(CONFIG_PACKAGE_B43_BUSES_BCMA_AND_SSB) += B43_BUSES_BCMA_AND_SSB
1577 config-$(CONFIG_PACKAGE_B43_BUSES_BCMA) += B43_BUSES_BCMA
1578 config-$(CONFIG_PACKAGE_B43_BUSES_SSB) += B43_BUSES_SSB
1579 config-$(CONFIG_PACKAGE_B43_PHY_G) += B43_PHY_G
1580 config-$(CONFIG_PACKAGE_B43_PHY_N) += B43_PHY_N
1581 config-$(CONFIG_PACKAGE_B43_PHY_LP) += B43_PHY_LP
1582 config-$(CONFIG_PACKAGE_B43_PHY_HT) += B43_PHY_HT
1583 config-$(CONFIG_PACKAGE_B43_PIO) += B43_PIO
1584 config-$(CONFIG_PACKAGE_B43_DEBUG) += B43_DEBUG
1585
1586 config-$(call config_package,b43legacy) += B43LEGACY
1587 config-y += B43LEGACY_DMA_MODE
1588
1589 config-$(call config_package,brcmutil) += BRCMUTIL
1590 config-$(call config_package,brcmsmac) += BRCMSMAC
1591 config-$(call config_package,brcmfmac) += BRCMFMAC
1592 config-$(CONFIG_BRCMFMAC_SDIO) += BRCMFMAC_SDIO
1593 config-$(CONFIG_BRCMFMAC_USB) += BRCMFMAC_USB
1594 config-$(CONFIG_BRCMFMAC_PCIE) += BRCMFMAC_PCIE
1595 config-$(CONFIG_PACKAGE_BRCM80211_DEBUG) += BRCMDBG
1596
1597 config-$(call config_package,mac80211-hwsim) += MAC80211_HWSIM
1598
1599 config-$(call config_package,rt2x00-lib) += RT2X00 RT2X00_LIB
1600 config-$(call config_package,rt2x00-pci) += RT2X00_LIB_PCI
1601 config-$(call config_package,rt2x00-mmio) += RT2X00_LIB_MMIO
1602 config-$(call config_package,rt2x00-usb) += RT2X00_LIB_USB
1603 config-$(CONFIG_PACKAGE_RT2X00_LIB_DEBUGFS) += RT2X00_LIB_DEBUGFS
1604 config-$(CONFIG_PACKAGE_RT2X00_DEBUG) += RT2X00_DEBUG
1605
1606 config-$(call config_package,rt2400-pci) += RT2400PCI
1607 config-$(call config_package,rt2500-pci) += RT2500PCI
1608 config-$(call config_package,rt2500-usb) += RT2500USB
1609 config-$(call config_package,rt61-pci) += RT61PCI
1610 config-$(call config_package,rt73-usb) += RT73USB
1611
1612 config-$(call config_package,rt2800-lib) += RT2800_LIB
1613
1614 config-$(call config_package,rt2800-soc) += RT2800SOC
1615 config-$(call config_package,rt2800-pci) += RT2800PCI
1616 config-y += RT2800PCI_RT33XX RT2800PCI_RT35XX RT2800PCI_RT53XX RT2800PCI_RT3290
1617
1618 config-$(call config_package,rt2800-usb) += RT2800USB
1619 config-y += RT2800USB_RT33XX RT2800USB_RT35XX RT2800USB_RT3573 RT2800USB_RT53XX RT2800USB_RT55XX
1620
1621 config-$(call config_package,iwl-legacy) += IWLEGACY
1622 config-$(call config_package,iwl3945) += IWL3945
1623 config-$(call config_package,iwl4965) += IWL4965
1624 config-$(call config_package,iwlagn) += IWLWIFI IWLDVM
1625
1626 config-$(call config_package,net-libipw) += LIBIPW
1627 config-$(call config_package,net-ipw2100) += IPW2100
1628 config-$(call config_package,net-ipw2200) += IPW2200
1629
1630 config-$(call config_package,p54-common) += P54_COMMON
1631 config-$(call config_package,p54-pci) += P54_PCI
1632 config-$(call config_package,p54-usb) += P54_USB
1633 config-$(call config_package,p54-spi) += P54_SPI
1634
1635 config-$(call config_package,net-hermes) += HERMES
1636 config-$(call config_package,net-hermes-pci) += PCI_HERMES
1637 config-$(call config_package,net-hermes-plx) += PLX_HERMES
1638 config-$(call config_package,net-hermes-pcmcia) += PCMCIA_HERMES
1639 config-y += HERMES_PRISM
1640
1641 config-$(call config_package,adm8211) += ADM8211
1642 config-$(call config_package,libertas-sdio) += LIBERTAS LIBERTAS_SDIO
1643 config-$(call config_package,libertas-usb) += LIBERTAS LIBERTAS_USB
1644 config-$(call config_package,mwl8k) += MWL8K
1645 config-$(call config_package,mwifiex-pcie) += MWIFIEX MWIFIEX_PCIE
1646 config-$(call config_package,rtl8180) += RTL8180
1647 config-$(call config_package,rtl8187) += RTL8187
1648 config-$(call config_package,wlcore) += WLCORE WLCORE_SDIO
1649 config-$(call config_package,wl12xx) += WL12XX
1650 config-$(call config_package,wl18xx) += WL18XX
1651 config-y += WL_TI WILINK_PLATFORM_DATA
1652 config-$(call config_package,zd1211rw) += ZD1211RW
1653
1654 config-$(call config_package,rtlwifi) += RTL_CARDS RTLWIFI
1655 config-$(call config_package,rtlwifi-pci) += RTLWIFI_PCI
1656 config-$(call config_package,rtlwifi-usb) += RTLWIFI_USB
1657 config-$(call config_package,rtl8192c-common) += RTL8192C_COMMON
1658 config-$(call config_package,rtl8192ce) += RTL8192CE
1659 config-$(call config_package,rtl8192se) += RTL8192SE
1660 config-$(call config_package,rtl8192de) += RTL8192DE
1661 config-$(call config_package,rtl8192cu) += RTL8192CU
1662 config-$(CONFIG_PACKAGE_RTLWIFI_DEBUG) += RTLWIFI_DEBUG
1663
1664 config-$(CONFIG_LEDS_TRIGGERS) += MAC80211_LEDS B43_LEDS B43LEGACY_LEDS
1665
1666 MAKE_OPTS:= -C "$(PKG_BUILD_DIR)" \
1667         CROSS_COMPILE="$(KERNEL_CROSS)" \
1668         ARCH="$(LINUX_KARCH)" \
1669         EXTRA_CFLAGS="-I$(PKG_BUILD_DIR)/include" \
1670         KLIB_BUILD="$(LINUX_DIR)" \
1671         MODPROBE=true \
1672         KLIB=$(TARGET_MODULES_DIR) \
1673         KERNEL_SUBLEVEL=$(lastword $(subst ., ,$(KERNEL_PATCHVER))) \
1674         KBUILD_LDFLAGS_MODULE_PREREQ=
1675
1676 ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
1677   MAKE_OPTS += V=1
1678 endif
1679
1680 define ConfigVars
1681 $(subst $(space),,$(foreach opt,$(config-$(1)),CPTCFG_$(opt)=$(1)
1682 ))
1683 endef
1684
1685 define mac80211_config
1686 $(call ConfigVars,m)$(call ConfigVars,y)
1687 endef
1688 $(eval $(call shexport,mac80211_config))
1689
1690 define Build/Prepare
1691         rm -rf $(PKG_BUILD_DIR)
1692         mkdir -p $(PKG_BUILD_DIR)
1693         $(PKG_UNPACK)
1694         $(Build/Patch)
1695         $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(IPW2100_NAME)-$(IPW2100_VERSION).tgz
1696         $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(IPW2200_NAME)-$(IPW2200_VERSION).tgz
1697         $(TAR) -C $(PKG_BUILD_DIR) -xjf $(DL_DIR)/$(ZD1211FW_NAME)-$(ZD1211FW_VERSION).tar.bz2
1698         $(TAR) -C $(PKG_BUILD_DIR) -xjf $(DL_DIR)/$(PKG_LINUX_FIRMWARE_SOURCE)
1699         $(TAR) -C $(PKG_BUILD_DIR) -xjf $(DL_DIR)/$(PKG_ATH10K_LINUX_FIRMWARE_SOURCE)
1700         rm -rf \
1701                 $(PKG_BUILD_DIR)/include/linux/ssb \
1702                 $(PKG_BUILD_DIR)/include/linux/bcma \
1703                 $(PKG_BUILD_DIR)/include/net/bluetooth
1704
1705         rm -f \
1706                 $(PKG_BUILD_DIR)/include/linux/cordic.h \
1707                 $(PKG_BUILD_DIR)/include/linux/crc8.h \
1708                 $(PKG_BUILD_DIR)/include/linux/eeprom_93cx6.h \
1709                 $(PKG_BUILD_DIR)/include/linux/wl12xx.h \
1710                 $(PKG_BUILD_DIR)/include/linux/spi/libertas_spi.h \
1711                 $(PKG_BUILD_DIR)/include/net/ieee80211.h
1712
1713         echo 'compat-wireless-$(PKG_VERSION)-$(PKG_RELEASE)-$(REVISION)' > $(PKG_BUILD_DIR)/compat_version
1714         $(CP) ./files/regdb.txt $(PKG_BUILD_DIR)/net/wireless/db.txt
1715 endef
1716
1717 ifneq ($(CONFIG_PACKAGE_kmod-cfg80211)$(CONFIG_PACKAGE_kmod-lib80211),)
1718  define Build/Compile/kmod
1719         rm -rf $(PKG_BUILD_DIR)/modules
1720         +$(MAKE) $(PKG_JOBS) $(MAKE_OPTS) modules
1721  endef
1722 endif
1723
1724 define Build/Configure
1725         cmp $(PKG_BUILD_DIR)/include/linux/ath9k_platform.h $(LINUX_DIR)/include/linux/ath9k_platform.h
1726         cmp $(PKG_BUILD_DIR)/include/linux/ath5k_platform.h $(LINUX_DIR)/include/linux/ath5k_platform.h
1727         cmp $(PKG_BUILD_DIR)/include/linux/rt2x00_platform.h $(LINUX_DIR)/include/linux/rt2x00_platform.h
1728 endef
1729
1730 define Build/Compile
1731         $(SH_FUNC) var2file "$(call shvar,mac80211_config)" $(PKG_BUILD_DIR)/.config
1732         $(MAKE) $(MAKE_OPTS) allnoconfig
1733         $(call Build/Compile/kmod)
1734 endef
1735
1736 define Build/InstallDev
1737         mkdir -p \
1738                 $(1)/usr/include/mac80211 \
1739                 $(1)/usr/include/mac80211-backport \
1740                 $(1)/usr/include/mac80211/ath \
1741                 $(1)/usr/include/net/mac80211
1742         $(CP) $(PKG_BUILD_DIR)/net/mac80211/*.h $(PKG_BUILD_DIR)/include/* $(1)/usr/include/mac80211/
1743         $(CP) $(PKG_BUILD_DIR)/backport-include/* $(1)/usr/include/mac80211-backport/
1744         $(CP) $(PKG_BUILD_DIR)/net/mac80211/rate.h $(1)/usr/include/net/mac80211/
1745         $(CP) $(PKG_BUILD_DIR)/drivers/net/wireless/ath/*.h $(1)/usr/include/mac80211/ath/
1746         rm -f $(1)/usr/include/mac80211-backport/linux/module.h
1747 endef
1748
1749 define KernelPackage/libertas-usb/install
1750         $(INSTALL_DIR) $(1)/lib/firmware/libertas
1751         $(INSTALL_DATA) \
1752                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/usb8388_v9.bin \
1753                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/usb8682.bin \
1754                 $(1)/lib/firmware/libertas/
1755 endef
1756
1757 define KernelPackage/libertas-sdio/install
1758         $(INSTALL_DIR) $(1)/lib/firmware/libertas
1759         $(INSTALL_DATA) \
1760                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/sd8385_helper.bin \
1761                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/sd8385.bin \
1762                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/sd8686_v9_helper.bin \
1763                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/sd8686_v9.bin \
1764                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/sd8688_helper.bin \
1765                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/sd8688.bin \
1766                 $(1)/lib/firmware/libertas
1767 endef
1768
1769 define KernelPackage/cfg80211/install
1770         $(INSTALL_DIR) $(1)/lib/wifi $(1)/lib/netifd/wireless
1771         $(INSTALL_DATA) ./files/lib/wifi/mac80211.sh $(1)/lib/wifi
1772         $(INSTALL_BIN) ./files/lib/netifd/wireless/mac80211.sh $(1)/lib/netifd/wireless
1773 endef
1774
1775 define KernelPackage/p54-pci/install
1776         $(INSTALL_DIR) $(1)/lib/firmware
1777         $(INSTALL_DATA) $(DL_DIR)/$(P54PCIFW) $(1)/lib/firmware/isl3886pci
1778 endef
1779
1780 define KernelPackage/p54-usb/install
1781         $(INSTALL_DIR) $(1)/lib/firmware
1782         $(INSTALL_DATA) $(DL_DIR)/$(P54USBFW) $(1)/lib/firmware/isl3887usb
1783 endef
1784
1785 define KernelPackage/p54-spi/install
1786         $(INSTALL_DIR) $(1)/lib/firmware
1787         $(INSTALL_DATA) $(DL_DIR)/$(P54SPIFW) $(1)/lib/firmware/3826.arm
1788 endef
1789
1790 define KernelPackage/rt61-pci/install
1791         $(INSTALL_DIR) $(1)/lib/firmware
1792         $(INSTALL_DATA) \
1793                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rt2561.bin \
1794                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rt2561s.bin \
1795                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rt2661.bin \
1796                 $(1)/lib/firmware/
1797 endef
1798
1799 define KernelPackage/rt73-usb/install
1800         $(INSTALL_DIR) $(1)/lib/firmware
1801         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rt73.bin $(1)/lib/firmware/
1802 endef
1803
1804 define KernelPackage/rt2800-pci/install
1805         $(INSTALL_DIR) $(1)/lib/firmware
1806         $(INSTALL_DATA) \
1807                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rt2860.bin \
1808                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rt3290.bin \
1809                 $(1)/lib/firmware
1810 endef
1811
1812 define KernelPackage/rt2800-usb/install
1813         $(INSTALL_DIR) $(1)/lib/firmware
1814         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rt2870.bin $(1)/lib/firmware/
1815 endef
1816
1817 define KernelPackage/wl12xx/install
1818         $(INSTALL_DIR) $(1)/lib/firmware/ti-connectivity
1819         $(INSTALL_DATA) \
1820                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ti-connectivity/wl127x-fw-5-mr.bin \
1821                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ti-connectivity/wl127x-fw-5-plt.bin \
1822                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ti-connectivity/wl127x-fw-5-sr.bin \
1823                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ti-connectivity/wl1271-nvs.bin \
1824                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ti-connectivity/wl128x-fw-5-mr.bin \
1825                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ti-connectivity/wl128x-fw-5-plt.bin \
1826                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ti-connectivity/wl128x-fw-5-sr.bin \
1827                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ti-connectivity/wl128x-nvs.bin \
1828                 $(1)/lib/firmware/ti-connectivity
1829 endef
1830
1831 define KernelPackage/wl18xx/install
1832         $(INSTALL_DIR) $(1)/lib/firmware/ti-connectivity
1833         $(INSTALL_DATA) \
1834                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ti-connectivity/wl18xx-conf.bin \
1835                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ti-connectivity/wl18xx-fw-3.bin \
1836                 $(1)/lib/firmware/ti-connectivity
1837 endef
1838
1839 define KernelPackage/zd1211rw/install
1840         $(INSTALL_DIR) $(1)/lib/firmware/zd1211
1841         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(ZD1211FW_NAME)/zd1211* $(1)/lib/firmware/zd1211
1842 endef
1843
1844 define KernelPackage/carl9170/install
1845         $(INSTALL_DIR) $(1)/lib/firmware
1846         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/carl9170-1.fw $(1)/lib/firmware
1847 endef
1848
1849 define KernelPackage/ath9k-htc/install
1850         $(INSTALL_DIR) $(1)/lib/firmware
1851         $(INSTALL_DATA) \
1852                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/htc_9271.fw \
1853                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/htc_7010.fw \
1854                 $(1)/lib/firmware/
1855 endef
1856
1857 define KernelPackage/ath10k/install
1858         $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0
1859         $(INSTALL_DATA) \
1860                 $(PKG_BUILD_DIR)/$(PKG_ATH10K_LINUX_FIRMWARE_SUBDIR)/ath10k/QCA988X/hw2.0/board.bin \
1861                 $(1)/lib/firmware/ath10k/QCA988X/hw2.0/
1862 ifeq ($(CONFIG_ATH10K_STA_FW),y)
1863         $(INSTALL_DATA) \
1864                 $(PKG_BUILD_DIR)/$(PKG_ATH10K_LINUX_FIRMWARE_SUBDIR)/main/firmware-2.bin_999.999.0.636 \
1865                 $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-2.bin
1866 else
1867         $(INSTALL_DATA) \
1868                 $(PKG_BUILD_DIR)/$(PKG_ATH10K_LINUX_FIRMWARE_SUBDIR)/10.2.4/firmware-4.bin_10.2.4.45 \
1869                 $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-4.bin
1870 endif
1871 endef
1872
1873 define KernelPackage/mwl8k/install
1874         $(INSTALL_DIR) $(1)/lib/firmware/mwl8k
1875         $(INSTALL_DATA) \
1876                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/mwl8k/fmimage_8366_ap-3.fw \
1877                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/mwl8k/fmimage_8366.fw \
1878                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/mwl8k/helper_8366.fw \
1879                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/mwl8k/fmimage_8687.fw \
1880                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/mwl8k/helper_8687.fw \
1881                 $(1)/lib/firmware/mwl8k/
1882 endef
1883
1884 define KernelPackage/mwifiex-pcie/install
1885         $(INSTALL_DIR) $(1)/lib/firmware/mrvl
1886         $(INSTALL_DATA) \
1887                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/mrvl/pcie8897_uapsta.bin \
1888                 $(1)/lib/firmware/mrvl/
1889 endef
1890
1891 define KernelPackage/net-ipw2100/install
1892         $(INSTALL_DIR) $(1)/lib/firmware
1893         $(INSTALL_DATA) $(PKG_BUILD_DIR)/ipw2100-$(IPW2100_VERSION)*.fw $(1)/lib/firmware
1894 endef
1895
1896 define KernelPackage/net-ipw2200/install
1897         $(INSTALL_DIR) $(1)/lib/firmware
1898         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(IPW2200_NAME)-$(IPW2200_VERSION)/ipw2200*.fw $(1)/lib/firmware
1899 endef
1900
1901 define KernelPackage/iwlagn/install
1902         $(INSTALL_DIR) $(1)/lib/firmware
1903 ifneq ($(CONFIG_IWL5000_FW),)
1904         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-5000-5.ucode $(1)/lib/firmware
1905 endif
1906 ifneq ($(CONFIG_IWL5150_FW),)
1907         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-5150-2.ucode $(1)/lib/firmware
1908 endif
1909 ifneq ($(CONFIG_IWL1000_FW),)
1910         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-1000-5.ucode $(1)/lib/firmware
1911 endif
1912 ifneq ($(CONFIG_IWL6000_FW),)
1913         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-6000-4.ucode $(1)/lib/firmware
1914 endif
1915 ifneq ($(CONFIG_IWL6050_FW),)
1916         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-6050-5.ucode $(1)/lib/firmware
1917 endif
1918 ifneq ($(CONFIG_IWL6005_FW),)
1919         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-6000g2a-6.ucode $(1)/lib/firmware
1920 endif
1921 ifneq ($(CONFIG_IWL6030_FW),)
1922         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-6000g2b-6.ucode $(1)/lib/firmware
1923 endif
1924 ifneq ($(CONFIG_IWL7260_FW),)
1925         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-7260-9.ucode $(1)/lib/firmware
1926 endif
1927 ifneq ($(CONFIG_IWL7265_FW),)
1928         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-7265-9.ucode $(1)/lib/firmware
1929 endif
1930 ifneq ($(CONFIG_IWL100_FW),)
1931         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-100-5.ucode $(1)/lib/firmware
1932 endif
1933 ifneq ($(CONFIG_IWL2000_FW),)
1934         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-2000-6.ucode $(1)/lib/firmware
1935 endif
1936 ifneq ($(CONFIG_IWL2030_FW),)
1937         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-2030-6.ucode $(1)/lib/firmware
1938 endif
1939 ifneq ($(CONFIG_IWL105_FW),)
1940         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-105-6.ucode $(1)/lib/firmware
1941 endif
1942 ifneq ($(CONFIG_IWL135_FW),)
1943         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-135-6.ucode $(1)/lib/firmware
1944 endif
1945 ifneq ($(CONFIG_IWL3160_FW),)
1946         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-3160-9.ucode $(1)/lib/firmware
1947 endif
1948 endef
1949
1950 define KernelPackage/iwl3945/install
1951         $(INSTALL_DIR) $(1)/lib/firmware
1952         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-3945-2.ucode $(1)/lib/firmware
1953 endef
1954
1955 define KernelPackage/iwl4965/install
1956         $(INSTALL_DIR) $(1)/lib/firmware
1957         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-4965-2.ucode $(1)/lib/firmware
1958 endef
1959
1960 define KernelPackage/b43/install
1961         rm -rf $(1)/lib/firmware/
1962 ifeq ($(CONFIG_B43_OPENFIRMWARE),y)
1963         tar xzf "$(DL_DIR)/$(PKG_B43_FWV4_SOURCE)" -C "$(PKG_BUILD_DIR)"
1964 else
1965         tar xjf "$(DL_DIR)/$(PKG_B43_FWV4_SOURCE)" -C "$(PKG_BUILD_DIR)"
1966 endif
1967         $(INSTALL_DIR) $(1)/lib/firmware/
1968 ifeq ($(CONFIG_B43_OPENFIRMWARE),y)
1969         $(MAKE) -C "$(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/"
1970         $(INSTALL_DIR) $(1)/lib/firmware/b43-open/
1971         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/ucode5.fw $(1)/lib/firmware/b43-open/ucode5.fw
1972         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/b0g0bsinitvals5.fw $(1)/lib/firmware/b43-open/b0g0bsinitvals5.fw
1973         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/b0g0initvals5.fw $(1)/lib/firmware/b43-open/b0g0initvals5.fw
1974 else
1975         b43-fwcutter -w $(1)/lib/firmware/ $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)
1976 endif
1977 ifneq ($(CONFIG_B43_FW_SQUASH),)
1978         b43-fwsquash.py "$(CONFIG_B43_FW_SQUASH_PHYTYPES)" "$(CONFIG_B43_FW_SQUASH_COREREVS)" "$(1)/lib/firmware/b43"
1979 endif
1980 endef
1981
1982 define KernelPackage/b43legacy/install
1983         $(INSTALL_DIR) $(1)/lib/firmware/
1984         b43-fwcutter --unsupported -w $(1)/lib/firmware/ $(DL_DIR)/$(PKG_B43_FWV3_SOURCE)
1985 ifneq ($(CONFIG_B43LEGACY_FW_SQUASH),)
1986         b43-fwsquash.py "G" "$(CONFIG_B43LEGACY_FW_SQUASH_COREREVS)" "$(1)/lib/firmware/b43legacy"
1987 endif
1988 endef
1989
1990 define KernelPackage/brcmsmac/install
1991         $(INSTALL_DIR) $(1)/lib/firmware/brcm
1992 ifeq ($(CONFIG_BRCMSMAC_USE_FW_FROM_WL),y)
1993         tar xjf "$(DL_DIR)/$(PKG_BRCMSMAC_FW_SOURCE)" -C "$(PKG_BUILD_DIR)"
1994         b43-fwcutter --brcmsmac -w $(1)/lib/firmware/ $(PKG_BUILD_DIR)/$(PKG_BRCMSMAC_FW_OBJECT)
1995 else
1996         $(INSTALL_DATA) \
1997                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/bcm43xx-0.fw \
1998                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/bcm43xx_hdr-0.fw \
1999                 $(1)/lib/firmware/brcm/
2000 endif
2001 endef
2002
2003 define KernelPackage/brcmfmac/install
2004         $(INSTALL_DIR) $(1)/lib/firmware/brcm
2005 ifneq ($(CONFIG_BRCMFMAC_USB),)
2006         $(INSTALL_DATA) \
2007                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43236b.bin \
2008                 $(1)/lib/firmware/brcm/
2009         $(INSTALL_DATA) \
2010                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43143.bin \
2011                 $(1)/lib/firmware/brcm/
2012 endif
2013 ifneq ($(CONFIG_BRCMFMAC_PCIE),)
2014         $(INSTALL_DATA) \
2015                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43602-pcie.ap.bin \
2016                 $(1)/lib/firmware/brcm/brcmfmac43602-pcie.bin
2017 endif
2018 endef
2019
2020 $(eval $(call KernelPackage,adm8211))
2021 $(eval $(call KernelPackage,ath5k))
2022 $(eval $(call KernelPackage,lib80211))
2023 $(eval $(call KernelPackage,libertas-usb))
2024 $(eval $(call KernelPackage,libertas-sdio))
2025 $(eval $(call KernelPackage,cfg80211))
2026 $(eval $(call KernelPackage,mac80211))
2027 $(eval $(call KernelPackage,p54-common))
2028 $(eval $(call KernelPackage,p54-pci))
2029 $(eval $(call KernelPackage,p54-usb))
2030 $(eval $(call KernelPackage,p54-spi))
2031 $(eval $(call KernelPackage,rt2x00-lib))
2032 $(eval $(call KernelPackage,rt2x00-mmio))
2033 $(eval $(call KernelPackage,rt2x00-pci))
2034 $(eval $(call KernelPackage,rt2x00-usb))
2035 $(eval $(call KernelPackage,rt2800-lib))
2036 $(eval $(call KernelPackage,rt2400-pci))
2037 $(eval $(call KernelPackage,rt2500-pci))
2038 $(eval $(call KernelPackage,rt2500-usb))
2039 $(eval $(call KernelPackage,rt61-pci))
2040 $(eval $(call KernelPackage,rt73-usb))
2041 $(eval $(call KernelPackage,rt2800-mmio))
2042 $(eval $(call KernelPackage,rt2800-soc))
2043 $(eval $(call KernelPackage,rt2800-pci))
2044 $(eval $(call KernelPackage,rt2800-usb))
2045 $(eval $(call KernelPackage,rtl8180))
2046 $(eval $(call KernelPackage,rtl8187))
2047 $(eval $(call KernelPackage,rtlwifi))
2048 $(eval $(call KernelPackage,rtlwifi-pci))
2049 $(eval $(call KernelPackage,rtlwifi-usb))
2050 $(eval $(call KernelPackage,rtl8192c-common))
2051 $(eval $(call KernelPackage,rtl8192ce))
2052 $(eval $(call KernelPackage,rtl8192se))
2053 $(eval $(call KernelPackage,rtl8192de))
2054 $(eval $(call KernelPackage,rtl8192cu))
2055 $(eval $(call KernelPackage,zd1211rw))
2056 $(eval $(call KernelPackage,mac80211-hwsim))
2057 $(eval $(call KernelPackage,ath9k-common))
2058 $(eval $(call KernelPackage,ath9k))
2059 $(eval $(call KernelPackage,ath9k-htc))
2060 $(eval $(call KernelPackage,ath10k))
2061 $(eval $(call KernelPackage,ath))
2062 $(eval $(call KernelPackage,carl9170))
2063 $(eval $(call KernelPackage,b43))
2064 $(eval $(call KernelPackage,b43legacy))
2065 $(eval $(call KernelPackage,brcmutil))
2066 $(eval $(call KernelPackage,brcmsmac))
2067 $(eval $(call KernelPackage,brcmfmac))
2068 $(eval $(call KernelPackage,net-libipw))
2069 $(eval $(call KernelPackage,net-ipw2100))
2070 $(eval $(call KernelPackage,net-ipw2200))
2071 $(eval $(call KernelPackage,iwlagn))
2072 $(eval $(call KernelPackage,iwl-legacy))
2073 $(eval $(call KernelPackage,iwl4965))
2074 $(eval $(call KernelPackage,iwl3945))
2075 $(eval $(call KernelPackage,mwl8k))
2076 $(eval $(call KernelPackage,mwifiex-pcie))
2077 $(eval $(call KernelPackage,net-hermes))
2078 $(eval $(call KernelPackage,net-hermes-pci))
2079 $(eval $(call KernelPackage,net-hermes-plx))
2080 $(eval $(call KernelPackage,net-hermes-pcmcia))
2081 $(eval $(call KernelPackage,wlcore))
2082 $(eval $(call KernelPackage,wl12xx))
2083 $(eval $(call KernelPackage,wl18xx))