1f15b40e879953500506c91bb593b1850a7f28c5
[15.05/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         config ATH10K_API2_FW
635                 bool "Firmware optimized for AP operation (v10.1 / API v2)"
636                 default n
637                 depends on !ATH10K_STA_FW
638                 help
639                   Use the ath10k firmware from the 10.1 SDK using API v2 optimized
640                   for access point operation if the default firmware keeps crashing.
641
642   endif
643 endef
644
645 define KernelPackage/carl9170
646   $(call KernelPackage/mac80211/Default)
647   TITLE:=Driver for Atheros AR9170 USB sticks
648   DEPENDS:=@USB_SUPPORT +kmod-mac80211 +kmod-ath +kmod-usb-core +kmod-input-core +@DRIVER_11N_SUPPORT
649   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/carl9170/carl9170.ko
650   AUTOLOAD:=$(call AutoProbe,carl9170)
651 endef
652
653 define KernelPackage/lib80211
654   $(call KernelPackage/mac80211/Default)
655   TITLE:=802.11 Networking stack
656   DEPENDS:=+kmod-cfg80211
657   FILES:= \
658         $(PKG_BUILD_DIR)/net/wireless/lib80211.ko \
659         $(PKG_BUILD_DIR)/net/wireless/lib80211_crypt_wep.ko \
660         $(PKG_BUILD_DIR)/net/wireless/lib80211_crypt_ccmp.ko \
661         $(PKG_BUILD_DIR)/net/wireless/lib80211_crypt_tkip.ko
662   AUTOLOAD:=$(call AutoProbe, \
663         lib80211 \
664         lib80211_crypt_wep \
665         lib80211_crypt_ccmp \
666         lib80211_crypt_tkip \
667   )
668 endef
669
670 define KernelPackage/lib80211/description
671  Kernel modules for 802.11 Networking stack
672  Includes:
673  - lib80211
674  - lib80211_crypt_wep
675  - lib80211_crypt_tkip
676  - lib80211_crytp_ccmp
677 endef
678
679 define KernelPackage/libertas-usb
680   $(call KernelPackage/mac80211/Default)
681   DEPENDS+= @USB_SUPPORT +kmod-cfg80211 +kmod-usb-core +kmod-lib80211 +@DRIVER_WEXT_SUPPORT
682   TITLE:=Marvell 88W8015 Wireless Driver
683   FILES:= \
684         $(PKG_BUILD_DIR)/drivers/net/wireless/libertas/libertas.ko \
685         $(PKG_BUILD_DIR)/drivers/net/wireless/libertas/usb8xxx.ko
686   AUTOLOAD:=$(call AutoProbe,libertas usb8xxx)
687 endef
688
689 define KernelPackage/libertas-sdio
690   $(call KernelPackage/mac80211/Default)
691   DEPENDS+= +kmod-cfg80211 +kmod-lib80211 +kmod-mmc +@DRIVER_WEXT_SUPPORT @!TARGET_uml
692   TITLE:=Marvell 88W8686 Wireless Driver
693   FILES:= \
694         $(PKG_BUILD_DIR)/drivers/net/wireless/libertas/libertas.ko \
695         $(PKG_BUILD_DIR)/drivers/net/wireless/libertas/libertas_sdio.ko
696   AUTOLOAD:=$(call AutoProbe,libertas libertas_sdio)
697 endef
698
699 define KernelPackage/mac80211-hwsim
700   $(call KernelPackage/mac80211/Default)
701   TITLE:=mac80211 HW simulation device
702   DEPENDS+= +kmod-mac80211 +@DRIVER_11N_SUPPORT
703   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/mac80211_hwsim.ko
704   AUTOLOAD:=$(call AutoProbe,mac80211_hwsim)
705 endef
706
707 define KernelPackage/net-libipw
708   $(call KernelPackage/mac80211/Default)
709   TITLE:=libipw for ipw2100 and ipw2200
710   DEPENDS:=@PCI_SUPPORT +kmod-crypto-core +kmod-crypto-arc4 +kmod-crypto-aes +kmod-crypto-michael-mic +kmod-lib80211 +kmod-cfg80211 +@DRIVER_WEXT_SUPPORT
711   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ipw2x00/libipw.ko
712   AUTOLOAD:=$(call AutoProbe,libipw)
713 endef
714
715 define KernelPackage/net-libipw/description
716  Hardware independent IEEE 802.11 networking stack for ipw2100 and ipw2200.
717 endef
718
719 IPW2100_NAME:=ipw2100-fw
720 IPW2100_VERSION:=1.3
721
722 define Download/net-ipw2100
723   URL:=http://bughost.org/firmware/
724   FILE:=$(IPW2100_NAME)-$(IPW2100_VERSION).tgz
725   MD5SUM=46aa75bcda1a00efa841f9707bbbd113
726 endef
727 $(eval $(call Download,net-ipw2100))
728
729 define KernelPackage/net-ipw2100
730   $(call KernelPackage/mac80211/Default)
731   TITLE:=Intel IPW2100 driver
732   DEPENDS:=@PCI_SUPPORT +kmod-net-libipw
733   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ipw2x00/ipw2100.ko
734   AUTOLOAD:=$(call AutoProbe,ipw2100)
735 endef
736
737 define KernelPackage/net-ipw2100/description
738  Kernel support for Intel IPW2100
739  Includes:
740  - ipw2100
741 endef
742
743 IPW2200_NAME:=ipw2200-fw
744 IPW2200_VERSION:=3.1
745
746 define Download/net-ipw2200
747   URL:=http://bughost.org/firmware/
748   FILE:=$(IPW2200_NAME)-$(IPW2200_VERSION).tgz
749   MD5SUM=eaba788643c7cc7483dd67ace70f6e99
750 endef
751 $(eval $(call Download,net-ipw2200))
752
753 define KernelPackage/net-ipw2200
754   $(call KernelPackage/mac80211/Default)
755   TITLE:=Intel IPW2200 driver
756   DEPENDS:=@PCI_SUPPORT +kmod-net-libipw
757   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ipw2x00/ipw2200.ko
758   AUTOLOAD:=$(call AutoProbe,ipw2200)
759 endef
760
761 define KernelPackage/net-ipw2200/description
762  Kernel support for Intel IPW2200
763  Includes:
764  - ipw2200
765 endef
766
767
768 define KernelPackage/net-hermes
769   $(call KernelPackage/mac80211/Default)
770   TITLE:=Hermes 802.11b chipset support
771   DEPENDS:=@PCI_SUPPORT||PCMCIA_SUPPORT +kmod-cfg80211 +@DRIVER_WEXT_SUPPORT
772   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/orinoco/orinoco.ko
773   AUTOLOAD:=$(call AutoProbe,orinoco)
774 endef
775
776 define KernelPackage/net-hermes/description
777  Kernel support for Hermes 802.11b chipsets
778 endef
779
780 define KernelPackage/net-hermes-pci
781   $(call KernelPackage/mac80211/Default)
782   TITLE:=Intersil Prism 2.5 PCI support
783   DEPENDS:=@PCI_SUPPORT +kmod-net-hermes
784   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/orinoco/orinoco_pci.ko
785   AUTOLOAD:=$(call AutoProbe,orinoco_pci)
786 endef
787
788 define KernelPackage/net-hermes-pci/description
789  Kernel modules for Intersil Prism 2.5 PCI support
790 endef
791
792 define KernelPackage/net-hermes-plx
793   $(call KernelPackage/mac80211/Default)
794   TITLE:=PLX9052 based PCI adaptor
795   DEPENDS:=@PCI_SUPPORT +kmod-net-hermes
796   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/orinoco/orinoco_plx.ko
797   AUTOLOAD:=$(call AutoProbe,orinoco_plx)
798 endef
799
800 define KernelPackage/net-hermes-plx/description
801  Kernel modules for Hermes in PLX9052 based PCI adaptors
802 endef
803
804 define KernelPackage/net-hermes-pcmcia
805   $(call KernelPackage/mac80211/Default)
806   TITLE:=Hermes based PCMCIA adaptors
807   DEPENDS:=@PCMCIA_SUPPORT +kmod-net-hermes @BROKEN
808   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/orinoco/orinoco_cs.ko
809   AUTOLOAD:=$(call AutoProbe,orinoco_cs)
810 endef
811
812 define KernelPackage/net-hermes-pcmcia/description
813  Kernel modules for Hermes based PCMCIA adaptors
814 endef
815
816 define KernelPackage/iwlagn
817   $(call KernelPackage/mac80211/Default)
818   DEPENDS:= +kmod-mac80211 @PCI_SUPPORT +@DRIVER_11N_SUPPORT
819   TITLE:=Intel AGN Wireless support
820   FILES:= \
821         $(PKG_BUILD_DIR)/drivers/net/wireless/iwlwifi/iwlwifi.ko \
822         $(PKG_BUILD_DIR)/drivers/net/wireless/iwlwifi/dvm/iwldvm.ko
823   AUTOLOAD:=$(call AutoProbe,iwlwifi iwldvm)
824   MENU:=1
825 endef
826
827 define KernelPackage/iwlagn/description
828  iwlagn kernel module for Intel 5000/5150/1000/6000/6050/6005/6030/100 support
829 endef
830
831 define KernelPackage/iwlagn/config
832   if PACKAGE_kmod-iwlagn
833
834         config IWL5000_FW
835                 bool "Intel 5000 Firmware"
836                 default y
837                 help
838                   Download and install firmware for:
839                     Intel Wireless WiFi 5100AGN, 5300AGN, and 5350AGN
840
841         config IWL5150_FW
842                 bool "Intel 5150 Firmware"
843                 default y
844                 help
845                   Download and install firmware for:
846                     Intel Wireless WiFi 5150AGN
847
848         config IWL1000_FW
849                 bool "Intel 1000 Firmware"
850                 default y
851                 help
852                   Download and install firmware for:
853                     Intel Centrino Wireless-N 1000
854
855         config IWL6000_FW
856                 bool "Intel 6000 Firmware"
857                 default y
858                 help
859                   Download and install firmware for:
860                     Intel Centrino Ultimate-N 6300 and Advanced-N 6200
861
862         config IWL6050_FW
863                 bool "Intel 6050 Firmware"
864                 default y
865                 help
866                   Download and install firmware for:
867                     Intel Centrino Advanced-N + WiMAX 6250 and Wireless-N + WiMAX 6150
868
869         config IWL6005_FW
870                 bool "Intel 6005 Firmware"
871                 default y
872                 help
873                   Download and install firmware for:
874                     Intel Centrino Advanced-N 6205
875
876         config IWL6030_FW
877                 bool "Intel 6030 Firmware"
878                 default y
879                 help
880                   Download and install firmware for:
881                     Intel Centrino Advanced-N 6230, Wireless-N 1030, Wireless-N 130 and Advanced-N 6235
882
883         config IWL7260_FW
884                 bool "Intel 7260 Firmware"
885                 default y
886                 help
887                   Download and install firmware for:
888                     Intel Dual Band Wireless-N 7260 and Intel Dual Band Wireless-AC 7260
889
890         config IWL7265_FW
891                 bool "Intel 7265 Firmware"
892                 default y
893                 help
894                   Download and install firmware for:
895                     Intel Wireless 7265
896
897         config IWL100_FW
898                 bool "Intel 100 Firmware"
899                 default y
900                 help
901                   Download and install firmware for:
902                     Intel Centrino Wireless-N 100
903
904         config IWL2000_FW
905                 bool "Intel 2000 Firmware"
906                 default y
907                 help
908                   Download and install firmware for:
909                     Intel Centrino Wireless-N 2200
910
911         config IWL2030_FW
912                 bool "Intel 2030 Firmware"
913                 default y
914                 help
915                   Download and install firmware for:
916                     Intel Centrino Wireless-N 2230
917
918         config IWL105_FW
919                 bool "Intel 105 Firmware"
920                 default y
921                 help
922                   Download and install firmware for:
923                     Intel Centrino Wireless-N 105
924
925         config IWL135_FW
926                 bool "Intel 135 Firmware"
927                 default y
928                 help
929                   Download and install firmware for:
930                     Intel Centrino Wireless-N 135
931
932         config IWL3160_FW
933                 bool "Intel 3160 Firmware"
934                 default y
935                 help
936                   Download and install firmware for:
937                     Intel Wireless 3160
938   endif
939 endef
940
941 define KernelPackage/iwl-legacy
942   $(call KernelPackage/mac80211/Default)
943   DEPENDS:= +kmod-mac80211 @PCI_SUPPORT
944   TITLE:=Intel legacy Wireless support
945   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/iwlegacy/iwlegacy.ko
946   AUTOLOAD:=$(call AutoProbe,iwlegacy)
947 endef
948
949 define KernelPackage/iwl-legacy/description
950  iwl-legacy kernel module for legacy Intel wireless support
951 endef
952
953 define KernelPackage/iwl3945
954   $(call KernelPackage/mac80211/Default)
955   DEPENDS:= +kmod-mac80211 +kmod-iwl-legacy
956   TITLE:=Intel iwl3945 Wireless support
957   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/iwlegacy/iwl3945.ko
958   AUTOLOAD:=$(call AutoProbe,iwl3945)
959 endef
960
961 define KernelPackage/iwl3945/description
962  iwl3945 kernel module for Intel 3945 support
963 endef
964
965 define KernelPackage/iwl4965
966   $(call KernelPackage/mac80211/Default)
967   DEPENDS:= +kmod-mac80211 +kmod-iwl-legacy +@DRIVER_11N_SUPPORT
968   TITLE:=Intel iwl4965 Wireless support
969   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/iwlegacy/iwl4965.ko
970   AUTOLOAD:=$(call AutoProbe,iwl4965)
971 endef
972
973 define KernelPackage/iwl4965/description
974  iwl4965 kernel module for Intel 4965 support
975 endef
976
977
978 define KernelPackage/mwl8k
979   $(call KernelPackage/mac80211/Default)
980   TITLE:=Driver for Marvell TOPDOG 802.11 Wireless cards
981   URL:=http://wireless.kernel.org/en/users/Drivers/mwl8k
982   DEPENDS+= @PCI_SUPPORT +kmod-mac80211 +@DRIVER_11N_SUPPORT
983   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/mwl8k.ko
984   AUTOLOAD:=$(call AutoProbe,mwl8k)
985 endef
986
987 define KernelPackage/mwl8k/description
988  Kernel modules for Marvell TOPDOG 802.11 Wireless cards
989 endef
990
991
992 define KernelPackage/mwifiex-pcie
993   $(call KernelPackage/mac80211/Default)
994   TITLE:=Driver for Marvell 802.11n/802.11ac PCIe Wireless cards
995   URL:=http://wireless.kernel.org/en/users/Drivers/mwifiex
996   DEPENDS+= @PCI_SUPPORT +kmod-mac80211 +@DRIVER_11N_SUPPORT
997   FILES:= \
998         $(PKG_BUILD_DIR)/drivers/net/wireless/mwifiex/mwifiex.ko \
999         $(PKG_BUILD_DIR)/drivers/net/wireless/mwifiex/mwifiex_pcie.ko
1000   AUTOLOAD:=$(call AutoProbe,mwifiex_pcie)
1001 endef
1002
1003 define KernelPackage/mwifiex-pcie/description
1004  Kernel modules for Marvell 802.11n/802.11ac PCIe Wireless cards
1005 endef
1006
1007
1008 define KernelPackage/wlcore
1009   $(call KernelPackage/mac80211/Default)
1010   TITLE:=TI common driver part
1011   DEPENDS+= @TARGET_omap +kmod-mac80211 +@DRIVER_11N_SUPPORT
1012   FILES:= \
1013         $(PKG_BUILD_DIR)/drivers/net/wireless/ti/wlcore/wlcore.ko \
1014         $(PKG_BUILD_DIR)/drivers/net/wireless/ti/wlcore/wlcore_sdio.ko
1015   AUTOLOAD:=$(call AutoProbe,wlcore wlcore_sdio)
1016 endef
1017
1018 define KernelPackage/wlcore/description
1019  This module contains some common parts needed by TI Wireless drivers.
1020 endef
1021
1022 define KernelPackage/wl12xx
1023   $(call KernelPackage/mac80211/Default)
1024   TITLE:=Driver for TI WL12xx
1025   URL:=http://wireless.kernel.org/en/users/Drivers/wl12xx
1026   DEPENDS+= +kmod-wlcore
1027   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ti/wl12xx/wl12xx.ko
1028   AUTOLOAD:=$(call AutoProbe,wl12xx)
1029 endef
1030
1031 define KernelPackage/wl12xx/description
1032  Kernel modules for TI WL12xx
1033 endef
1034
1035 define KernelPackage/wl18xx
1036   $(call KernelPackage/mac80211/Default)
1037   TITLE:=Driver for TI WL18xx
1038   URL:=http://wireless.kernel.org/en/users/Drivers/wl18xx
1039   DEPENDS+= +kmod-wlcore
1040   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ti/wl18xx/wl18xx.ko
1041   AUTOLOAD:=$(call AutoProbe,wl18xx)
1042 endef
1043
1044 define KernelPackage/wl18xx/description
1045  Kernel modules for TI WL18xx
1046 endef
1047
1048
1049 #Broadcom firmware
1050 ifneq ($(CONFIG_B43_FW_6_30),)
1051   PKG_B43_FWV4_NAME:=broadcom-wl
1052   PKG_B43_FWV4_VERSION:=6.30.163.46
1053   PKG_B43_FWV4_OBJECT:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION).wl_apsta.o
1054   PKG_B43_FWV4_SOURCE:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION).tar.bz2
1055   PKG_B43_FWV4_SOURCE_URL:=http://www.lwfinger.com/b43-firmware/
1056   PKG_B43_FWV4_MD5SUM:=6fe97e9368d25342a1ab943d3cf3496d
1057 else
1058 ifneq ($(CONFIG_B43_FW_5_10),)
1059   PKG_B43_FWV4_NAME:=broadcom-wl
1060   PKG_B43_FWV4_VERSION:=5.10.56.27.3
1061   PKG_B43_FWV4_OBJECT:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION)/driver/wl_apsta/wl_prebuilt.o
1062   PKG_B43_FWV4_SOURCE:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION)_mipsel.tar.bz2
1063   PKG_B43_FWV4_SOURCE_URL:=http://mirror2.openwrt.org/sources/
1064   PKG_B43_FWV4_MD5SUM:=3363e3a6b3d9d73c49dea870c7834eac
1065 else
1066 ifneq ($(CONFIG_B43_FW_4_178),)
1067   PKG_B43_FWV4_NAME:=broadcom-wl
1068   PKG_B43_FWV4_VERSION:=4.178.10.4
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://mirror2.openwrt.org/sources/
1072   PKG_B43_FWV4_MD5SUM:=14477e8cbbb91b11896affac9b219fdb
1073 else
1074 ifneq ($(CONFIG_B43_FW_5_100_138),)
1075   PKG_B43_FWV4_NAME:=broadcom-wl
1076   PKG_B43_FWV4_VERSION:=5.100.138
1077   PKG_B43_FWV4_OBJECT:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION)/linux/wl_apsta.o
1078   PKG_B43_FWV4_SOURCE:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION).tar.bz2
1079   PKG_B43_FWV4_SOURCE_URL:=http://www.lwfinger.com/b43-firmware/
1080   PKG_B43_FWV4_MD5SUM:=f4e357b09eaf5d8b1f1920cf3493a555
1081 else
1082   PKG_B43_FWV4_NAME:=broadcom-wl
1083   PKG_B43_FWV4_VERSION:=4.150.10.5
1084   PKG_B43_FWV4_OBJECT:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION)/driver/wl_apsta_mimo.o
1085   PKG_B43_FWV4_SOURCE:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION).tar.bz2
1086   PKG_B43_FWV4_SOURCE_URL:=http://mirror2.openwrt.org/sources/
1087   PKG_B43_FWV4_MD5SUM:=0c6ba9687114c6b598e8019e262d9a60
1088 endif
1089 endif
1090 endif
1091 endif
1092 ifneq ($(CONFIG_B43_OPENFIRMWARE),)
1093   PKG_B43_FWV4_NAME:=broadcom-wl
1094   PKG_B43_FWV4_VERSION:=5.2
1095   PKG_B43_FWV4_OBJECT:=openfwwf-$(PKG_B43_FWV4_VERSION)
1096   PKG_B43_FWV4_SOURCE:=openfwwf-$(PKG_B43_FWV4_VERSION).tar.gz
1097   PKG_B43_FWV4_SOURCE_URL:=http://www.ing.unibs.it/openfwwf/firmware/
1098   PKG_B43_FWV4_MD5SUM:=e045a135453274e439ae183f8498b0fa
1099 endif
1100
1101
1102 PKG_B43_FWV3_NAME:=wl_apsta
1103 PKG_B43_FWV3_VERSION:=3.130.20.0
1104 PKG_B43_FWV3_SOURCE:=$(PKG_B43_FWV3_NAME)-$(PKG_B43_FWV3_VERSION).o
1105 PKG_B43_FWV3_SOURCE_URL:=http://downloads.openwrt.org/sources/
1106 PKG_B43_FWV3_MD5SUM:=e08665c5c5b66beb9c3b2dd54aa80cb3
1107
1108 define Download/b43
1109   FILE:=$(PKG_B43_FWV4_SOURCE)
1110   URL:=$(PKG_B43_FWV4_SOURCE_URL)
1111   MD5SUM:=$(PKG_B43_FWV4_MD5SUM)
1112 endef
1113 $(eval $(call Download,b43))
1114
1115 define Download/b43legacy
1116   FILE:=$(PKG_B43_FWV3_SOURCE)
1117   URL:=$(PKG_B43_FWV3_SOURCE_URL)
1118   MD5SUM:=$(PKG_B43_FWV3_MD5SUM)
1119 endef
1120 $(eval $(call Download,b43legacy))
1121
1122
1123 define KernelPackage/b43
1124   $(call KernelPackage/mac80211/Default)
1125   TITLE:=Broadcom 43xx wireless support
1126   URL:=https://wireless.wiki.kernel.org/en/users/drivers/b43
1127   KCONFIG:= \
1128         CONFIG_HW_RANDOM=y
1129   # Depend on PCI_SUPPORT to make sure we can select kmod-bcma or kmod-ssb
1130   DEPENDS += \
1131         @PCI_SUPPORT +kmod-mac80211 \
1132         $(if $(CONFIG_PACKAGE_B43_USE_SSB),+kmod-ssb) \
1133         $(if $(CONFIG_PACKAGE_B43_USE_BCMA),+kmod-bcma)
1134   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/b43/b43.ko
1135   AUTOLOAD:=$(call AutoProbe,b43)
1136   MENU:=1
1137 endef
1138
1139 define KernelPackage/b43/config
1140
1141 config PACKAGE_B43_USE_SSB
1142         select PACKAGE_kmod-ssb
1143         tristate
1144         depends on !TARGET_brcm47xx && !TARGET_brcm63xx
1145         default PACKAGE_kmod-b43 if PACKAGE_B43_BUSES_BCMA_AND_SSB
1146         default PACKAGE_kmod-b43 if PACKAGE_B43_BUSES_SSB
1147
1148 config PACKAGE_B43_USE_BCMA
1149         select PACKAGE_kmod-bcma
1150         tristate
1151         depends on !TARGET_brcm47xx && !TARGET_bcm53xx
1152         default PACKAGE_kmod-b43 if PACKAGE_B43_BUSES_BCMA_AND_SSB
1153         default PACKAGE_kmod-b43 if PACKAGE_B43_BUSES_BCMA
1154
1155   if PACKAGE_kmod-b43
1156
1157         choice
1158                 prompt "b43 firmware version"
1159                 default B43_FW_5_100_138
1160                 help
1161                   This option allows you to select the version of the b43 firmware.
1162
1163         config B43_FW_4_150
1164                 bool "Firmware 410.2160 from driver 4.150.10.5 (old stable)"
1165                 help
1166                   Old stable firmware for BCM43xx devices.
1167
1168                   If unsure, select this.
1169
1170         config B43_FW_4_178
1171                 bool "Firmware 478.104 from driver 4.178.10.4"
1172                 help
1173                   Older firmware for BCM43xx devices.
1174
1175                   If unsure, select the "stable" firmware.
1176
1177         config B43_FW_5_10
1178                 bool "Firmware 508.1084 from driver 5.10.56.27"
1179                 help
1180                   Older firmware for BCM43xx devices.
1181
1182                   If unsure, select the "stable" firmware.
1183
1184         config B43_FW_5_100_138
1185                 bool "Firmware 666.2 from driver 5.100.138 (stable)"
1186                 help
1187                   The currently default firmware for BCM43xx devices.
1188
1189                   This firmware currently gets most of the testing and is needed for some N-PHY devices.
1190
1191                   If unsure, select the this firmware.
1192
1193         config B43_FW_6_30
1194                 bool "Firmware 784.2 from driver 6.30.163.46 (experimental)"
1195                 help
1196                   Newer experimental firmware for BCM43xx devices.
1197
1198                   This firmware is mostly untested.
1199
1200                   If unsure, select the "stable" firmware.
1201
1202         config B43_OPENFIRMWARE
1203                 bool "Open FirmWare for WiFi networks"
1204                 help
1205                   Opensource firmware for BCM43xx devices.
1206
1207                   Do _not_ select this, unless you know what you are doing.
1208                   The Opensource firmware is not suitable for embedded devices, yet.
1209                   It does not support QoS, which is bad for AccessPoints.
1210                   It does not support hardware crypto acceleration, which is a showstopper
1211                   for embedded devices with low CPU resources.
1212
1213                   If unsure, select the "stable" firmware.
1214
1215         endchoice
1216
1217         config B43_FW_SQUASH
1218                 bool "Remove unnecessary firmware files"
1219                 depends on !B43_OPENFIRMWARE
1220                 default y
1221                 help
1222                   This options allows you to remove unnecessary b43 firmware files
1223                   from the final rootfs image. This can reduce the rootfs size by
1224                   up to 200k.
1225
1226                   If unsure, say Y.
1227
1228         config B43_FW_SQUASH_COREREVS
1229                 string "Core revisions to include"
1230                 depends on B43_FW_SQUASH
1231                 default "5,6,7,8,9,10,11,13,15" if TARGET_brcm47xx_legacy
1232                 default "16,28,29,30" if TARGET_brcm47xx_mips74k
1233                 default "5,6,7,8,9,10,11,13,15,16,28,29,30"
1234                 help
1235                   This is a comma seperated list of core revision numbers.
1236
1237                   Example (keep files for rev5 only):
1238                     5
1239
1240                   Example (keep files for rev5 and rev11):
1241                     5,11
1242
1243         config B43_FW_SQUASH_PHYTYPES
1244                 string "PHY types to include"
1245                 depends on B43_FW_SQUASH
1246                 default "G,N,LP" if TARGET_brcm47xx_legacy
1247                 default "N,HT" if TARGET_brcm47xx_mips74k
1248                 default "G,N,LP,HT"
1249                 help
1250                   This is a comma seperated list of PHY types:
1251                     A  => A-PHY
1252                     AG => Dual A-PHY G-PHY
1253                     G  => G-PHY
1254                     LP => LP-PHY
1255                     N  => N-PHY
1256                     HT  => HT-PHY
1257                     LCN  => LCN-PHY
1258                     LCN40  => LCN40-PHY
1259                     AC  => AC-PHY
1260
1261                   Example (keep files for G-PHY only):
1262                     G
1263
1264                   Example (keep files for G-PHY and N-PHY):
1265                     G,N
1266
1267         choice
1268                 prompt "Supported buses"
1269                 default PACKAGE_B43_BUSES_BCMA_AND_SSB
1270                 help
1271                   This allows choosing buses that b43 should support.
1272
1273         config PACKAGE_B43_BUSES_BCMA_AND_SSB
1274                 depends on !TARGET_brcm47xx_legacy && !TARGET_brcm47xx_mips74k && !TARGET_bcm53xx
1275                 bool "BCMA and SSB"
1276
1277         config PACKAGE_B43_BUSES_BCMA
1278                 depends on !TARGET_brcm47xx_legacy
1279                 bool "BCMA only"
1280
1281         config PACKAGE_B43_BUSES_SSB
1282                 depends on !TARGET_brcm47xx_mips74k && !TARGET_bcm53xx
1283                 bool "SSB only"
1284
1285         endchoice
1286
1287         config PACKAGE_B43_DEBUG
1288                 bool "Enable debug output and debugfs for b43"
1289                 default n
1290                 help
1291                   Enable additional debug output and runtime sanity checks for b43
1292                   and enables the debugfs interface.
1293
1294                   If unsure, say N.
1295
1296         config PACKAGE_B43_PIO
1297                 bool "Enable support for PIO transfer mode"
1298                 default n
1299                 help
1300                   Enable support for using PIO instead of DMA. Unless you have DMA
1301                   transfer problems you don't need this.
1302
1303                   If unsure, say N.
1304
1305         config PACKAGE_B43_PHY_G
1306                 bool "Enable support for G-PHYs"
1307                 default n if TARGET_brcm47xx_mips74k
1308                 default y
1309                 help
1310                   Enable support for G-PHY. This includes support for the following devices:
1311                   PCI: BCM4306, BCM4311, BCM4318
1312                   SoC: BCM5352E, BCM4712
1313
1314                   If unsure, say Y.
1315
1316         config PACKAGE_B43_PHY_N
1317                 bool "Enable support for N-PHYs"
1318                 default y
1319                 help
1320                   Enable support for N-PHY. This includes support for the following devices:
1321                   PCI: BCM4321, BCM4322, BCM43222, BCM43224, BCM43225
1322                   SoC: BCM4716, BCM4717, BCM4718
1323
1324                   Currently only 11g speed is available.
1325
1326                   If unsure, say Y.
1327
1328         config PACKAGE_B43_PHY_LP
1329                 bool "Enable support for LP-PHYs"
1330                 default n if TARGET_brcm47xx_mips74k
1331                 default y
1332                 help
1333                   Enable support for LP-PHY. This includes support for the following devices:
1334                   PCI: BCM4312
1335                   SoC: BCM5354
1336
1337                   If unsure, say Y.
1338
1339         config PACKAGE_B43_PHY_HT
1340                 bool "Enable support for HT-PHYs"
1341                 default n if TARGET_brcm47xx_legacy
1342                 default y
1343                 help
1344                   Enable support for HT-PHY. This includes support for the following devices:
1345                   PCI: BCM4331
1346
1347                   Currently only 11g speed is available.
1348
1349                   If unsure, say Y.
1350
1351         config PACKAGE_B43_PHY_LCN
1352                 bool "Enable support for LCN-PHYs"
1353                 depends on BROKEN
1354                 default n
1355                 help
1356                   Currently broken.
1357
1358                   If unsure, say N.
1359
1360   endif
1361 endef
1362
1363 define KernelPackage/b43/description
1364 Kernel module for Broadcom 43xx wireless support (mac80211 stack) new
1365 endef
1366
1367 define KernelPackage/b43legacy
1368   $(call KernelPackage/mac80211/Default)
1369   TITLE:=Broadcom 43xx-legacy wireless support
1370   URL:=https://wireless.wiki.kernel.org/en/users/drivers/b43
1371   KCONFIG:= \
1372         CONFIG_HW_RANDOM=y
1373   DEPENDS+= +kmod-mac80211 +!(TARGET_brcm47xx||TARGET_brcm63xx):kmod-ssb
1374   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/b43legacy/b43legacy.ko
1375   AUTOLOAD:=$(call AutoProbe,b43legacy)
1376   MENU:=1
1377 endef
1378
1379 define KernelPackage/b43legacy/config
1380   if PACKAGE_kmod-b43legacy
1381
1382         config B43LEGACY_FW_SQUASH
1383                 bool "Remove unnecessary firmware files"
1384                 default y
1385                 help
1386                   This options allows you to remove unnecessary b43legacy firmware files
1387                   from the final rootfs image. This can reduce the rootfs size by
1388                   up to 50k.
1389
1390                   If unsure, say Y.
1391
1392         config B43LEGACY_FW_SQUASH_COREREVS
1393                 string "Core revisions to include"
1394                 depends on B43LEGACY_FW_SQUASH
1395                 default "1,2,3,4"
1396                 help
1397                   This is a comma seperated list of core revision numbers.
1398
1399                   Example (keep files for rev4 only):
1400                     4
1401
1402                   Example (keep files for rev2 and rev4):
1403                     2,4
1404
1405   endif
1406 endef
1407
1408 define KernelPackage/b43legacy/description
1409 Kernel module for Broadcom 43xx-legacy wireless support (mac80211 stack) new
1410 endef
1411
1412
1413 define KernelPackage/brcmutil
1414   $(call KernelPackage/mac80211/Default)
1415   TITLE:=Broadcom IEEE802.11n common driver parts
1416   URL:=https://wireless.wiki.kernel.org/en/users/drivers/brcm80211
1417   DEPENDS+=@PCI_SUPPORT||USB_SUPPORT
1418   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/brcm80211/brcmutil/brcmutil.ko
1419   AUTOLOAD:=$(call AutoProbe,brcmutil)
1420   MENU:=1
1421 endef
1422
1423 define KernelPackage/brcmutil/description
1424  This module contains some common parts needed by Broadcom Wireless drivers brcmsmac and brcmfmac.
1425 endef
1426
1427 define KernelPackage/brcmutil/config
1428   if PACKAGE_kmod-brcmutil
1429
1430         config PACKAGE_BRCM80211_DEBUG
1431                 bool "Broadcom wireless driver debugging"
1432                 help
1433                   Say Y, if you want to debug brcmsmac and brcmfmac wireless driver.
1434
1435   endif
1436 endef
1437
1438 PKG_BRCMSMAC_FW_NAME:=broadcom-wl
1439 PKG_BRCMSMAC_FW_VERSION:=5.100.138
1440 PKG_BRCMSMAC_FW_OBJECT:=$(PKG_BRCMSMAC_FW_NAME)-$(PKG_BRCMSMAC_FW_VERSION)/linux/wl_apsta.o
1441 PKG_BRCMSMAC_FW_SOURCE:=$(PKG_BRCMSMAC_FW_NAME)-$(PKG_BRCMSMAC_FW_VERSION).tar.bz2
1442 PKG_BRCMSMAC_FW_SOURCE_URL:=http://www.lwfinger.com/b43-firmware/
1443 PKG_BRCMSMAC_FW_MD5SUM:=f4e357b09eaf5d8b1f1920cf3493a555
1444
1445 define Download/brcmsmac
1446   FILE:=$(PKG_BRCMSMAC_FW_SOURCE)
1447   URL:=$(PKG_BRCMSMAC_FW_SOURCE_URL)
1448   MD5SUM:=$(PKG_BRCMSMAC_FW_MD5SUM)
1449 endef
1450 $(eval $(call Download,brcmsmac))
1451
1452 define KernelPackage/brcmsmac
1453   $(call KernelPackage/mac80211/Default)
1454   TITLE:=Broadcom IEEE802.11n PCIe SoftMAC WLAN driver
1455   URL:=https://wireless.wiki.kernel.org/en/users/drivers/brcm80211
1456   DEPENDS+= +kmod-mac80211 +@DRIVER_11N_SUPPORT +!TARGET_brcm47xx:kmod-bcma +kmod-lib-cordic +kmod-lib-crc8 +kmod-brcmutil
1457   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/brcm80211/brcmsmac/brcmsmac.ko
1458   AUTOLOAD:=$(call AutoProbe,brcmsmac)
1459   MENU:=1
1460 endef
1461
1462 define KernelPackage/brcmsmac/description
1463  Kernel module for Broadcom IEEE802.11n PCIe Wireless cards
1464 endef
1465
1466 define KernelPackage/brcmsmac/config
1467   if PACKAGE_kmod-brcmsmac
1468
1469         config BRCMSMAC_USE_FW_FROM_WL
1470                 bool "Use firmware extracted from broadcom proprietary driver"
1471                 default y
1472                 help
1473                   Instead of using the official brcmsmac firmware a firmware
1474                   version 666.2 extracted from the proprietary Broadcom driver
1475                   is used. This is needed to get core rev 17 used in bcm4716
1476                   to work.
1477
1478                   If unsure, say Y.
1479
1480   endif
1481 endef
1482
1483
1484 define KernelPackage/brcmfmac
1485   $(call KernelPackage/mac80211/Default)
1486   TITLE:=Broadcom IEEE802.11n USB FullMAC WLAN driver
1487   URL:=https://wireless.wiki.kernel.org/en/users/drivers/brcm80211
1488   DEPENDS+= @USB_SUPPORT +kmod-cfg80211 +@DRIVER_11N_SUPPORT +kmod-brcmutil +BRCMFMAC_SDIO:kmod-mmc +BRCMFMAC_USB:kmod-usb-core
1489   FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/brcm80211/brcmfmac/brcmfmac.ko
1490   AUTOLOAD:=$(call AutoProbe,brcmfmac)
1491 endef
1492
1493 define KernelPackage/brcmfmac/description
1494  Kernel module for Broadcom IEEE802.11n USB Wireless cards
1495 endef
1496
1497 define KernelPackage/brcmfmac/config
1498   if PACKAGE_kmod-brcmfmac
1499
1500         config BRCMFMAC_SDIO
1501                 bool "Enable SDIO bus interface support"
1502                 default n
1503                 help
1504                   Enable support for cards attached to an SDIO bus.
1505                   Select this option only if you are sure that your
1506                   board has a Broadcom wireless chip atacched to
1507                   that bus.
1508
1509         config BRCMFMAC_USB
1510                 bool "Enable USB bus interface support"
1511                 depends on USB_SUPPORT
1512                 default y
1513                 help
1514                   Supported USB connected chipsets:
1515                   BCM43235, BCM43236, BCM43238 (all in revision 3 only)
1516                   BCM43143, BCM43242, BCM43566, BCM43569
1517
1518         config BRCMFMAC_PCIE
1519                 bool "Enable PCIE bus interface support"
1520                 depends on PCI_SUPPORT
1521                 default y
1522                 help
1523                   Supported PCIe connected chipsets:
1524                   BCM4354, BCM4356, BCM43567, BCM43570, BCM43602
1525
1526   endif
1527 endef
1528
1529 config_package=$(if $(CONFIG_PACKAGE_kmod-$(1)),m)
1530
1531 config-y:= \
1532         WLAN \
1533         NL80211_TESTMODE \
1534         CFG80211_WEXT \
1535         CFG80211_INTERNAL_REGDB \
1536         CFG80211_CERTIFICATION_ONUS \
1537         MAC80211_RC_MINSTREL \
1538         MAC80211_RC_MINSTREL_HT \
1539         MAC80211_RC_MINSTREL_VHT \
1540         MAC80211_RC_DEFAULT_MINSTREL \
1541
1542 config-$(call config_package,cfg80211) += CFG80211
1543
1544 config-$(call config_package,mac80211) += MAC80211
1545 config-$(CONFIG_PACKAGE_MAC80211_MESH) += MAC80211_MESH
1546 ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
1547   config-y += \
1548         CFG80211_DEBUGFS \
1549         MAC80211_DEBUGFS \
1550         ATH9K_DEBUGFS \
1551         ATH9K_HTC_DEBUGFS \
1552         ATH10K_DEBUGFS \
1553         CARL9170_DEBUGFS \
1554         ATH5K_DEBUG
1555 endif
1556
1557 config-$(call config_package,lib80211) += LIB80211 LIB80211_CRYPT_WEP LIB80211_CRYPT_CCMP LIB80211_CRYPT_TKIP
1558
1559 config-$(call config_package,ath) += ATH_CARDS ATH_COMMON
1560 config-$(CONFIG_PACKAGE_ATH_DEBUG) += ATH_DEBUG ATH10K_DEBUG
1561 config-$(CONFIG_PACKAGE_ATH_DFS) += ATH9K_DFS_CERTIFIED ATH10K_DFS_CERTIFIED
1562
1563 config-$(call config_package,ath9k) += ATH9K
1564 config-$(call config_package,ath9k-common) += ATH9K_COMMON
1565 config-$(CONFIG_TARGET_ar71xx) += ATH9K_AHB
1566 config-$(CONFIG_PCI) += ATH9K_PCI
1567 config-$(CONFIG_ATH_USER_REGD) += ATH_USER_REGD
1568 config-$(CONFIG_ATH9K_SUPPORT_PCOEM) += ATH9K_PCOEM
1569
1570 config-$(call config_package,ath9k-htc) += ATH9K_HTC
1571 config-$(call config_package,ath10k) += ATH10K ATH10K_PCI
1572
1573 config-$(call config_package,ath5k) += ATH5K
1574 ifdef CONFIG_TARGET_ath25
1575   config-y += ATH5K_AHB
1576 else
1577   config-y += ATH5K_PCI
1578 endif
1579
1580 config-$(call config_package,carl9170) += CARL9170
1581
1582 config-$(call config_package,b43) += B43
1583 config-$(CONFIG_PACKAGE_B43_BUSES_BCMA_AND_SSB) += B43_BUSES_BCMA_AND_SSB
1584 config-$(CONFIG_PACKAGE_B43_BUSES_BCMA) += B43_BUSES_BCMA
1585 config-$(CONFIG_PACKAGE_B43_BUSES_SSB) += B43_BUSES_SSB
1586 config-$(CONFIG_PACKAGE_B43_PHY_G) += B43_PHY_G
1587 config-$(CONFIG_PACKAGE_B43_PHY_N) += B43_PHY_N
1588 config-$(CONFIG_PACKAGE_B43_PHY_LP) += B43_PHY_LP
1589 config-$(CONFIG_PACKAGE_B43_PHY_HT) += B43_PHY_HT
1590 config-$(CONFIG_PACKAGE_B43_PIO) += B43_PIO
1591 config-$(CONFIG_PACKAGE_B43_DEBUG) += B43_DEBUG
1592
1593 config-$(call config_package,b43legacy) += B43LEGACY
1594 config-y += B43LEGACY_DMA_MODE
1595
1596 config-$(call config_package,brcmutil) += BRCMUTIL
1597 config-$(call config_package,brcmsmac) += BRCMSMAC
1598 config-$(call config_package,brcmfmac) += BRCMFMAC
1599 config-$(CONFIG_BRCMFMAC_SDIO) += BRCMFMAC_SDIO
1600 config-$(CONFIG_BRCMFMAC_USB) += BRCMFMAC_USB
1601 config-$(CONFIG_BRCMFMAC_PCIE) += BRCMFMAC_PCIE
1602 config-$(CONFIG_PACKAGE_BRCM80211_DEBUG) += BRCMDBG
1603
1604 config-$(call config_package,mac80211-hwsim) += MAC80211_HWSIM
1605
1606 config-$(call config_package,rt2x00-lib) += RT2X00 RT2X00_LIB
1607 config-$(call config_package,rt2x00-pci) += RT2X00_LIB_PCI
1608 config-$(call config_package,rt2x00-mmio) += RT2X00_LIB_MMIO
1609 config-$(call config_package,rt2x00-usb) += RT2X00_LIB_USB
1610 config-$(CONFIG_PACKAGE_RT2X00_LIB_DEBUGFS) += RT2X00_LIB_DEBUGFS
1611 config-$(CONFIG_PACKAGE_RT2X00_DEBUG) += RT2X00_DEBUG
1612
1613 config-$(call config_package,rt2400-pci) += RT2400PCI
1614 config-$(call config_package,rt2500-pci) += RT2500PCI
1615 config-$(call config_package,rt2500-usb) += RT2500USB
1616 config-$(call config_package,rt61-pci) += RT61PCI
1617 config-$(call config_package,rt73-usb) += RT73USB
1618
1619 config-$(call config_package,rt2800-lib) += RT2800_LIB
1620
1621 config-$(call config_package,rt2800-soc) += RT2800SOC
1622 config-$(call config_package,rt2800-pci) += RT2800PCI
1623 config-y += RT2800PCI_RT33XX RT2800PCI_RT35XX RT2800PCI_RT53XX RT2800PCI_RT3290
1624
1625 config-$(call config_package,rt2800-usb) += RT2800USB
1626 config-y += RT2800USB_RT33XX RT2800USB_RT35XX RT2800USB_RT3573 RT2800USB_RT53XX RT2800USB_RT55XX
1627
1628 config-$(call config_package,iwl-legacy) += IWLEGACY
1629 config-$(call config_package,iwl3945) += IWL3945
1630 config-$(call config_package,iwl4965) += IWL4965
1631 config-$(call config_package,iwlagn) += IWLWIFI IWLDVM
1632
1633 config-$(call config_package,net-libipw) += LIBIPW
1634 config-$(call config_package,net-ipw2100) += IPW2100
1635 config-$(call config_package,net-ipw2200) += IPW2200
1636
1637 config-$(call config_package,p54-common) += P54_COMMON
1638 config-$(call config_package,p54-pci) += P54_PCI
1639 config-$(call config_package,p54-usb) += P54_USB
1640 config-$(call config_package,p54-spi) += P54_SPI
1641
1642 config-$(call config_package,net-hermes) += HERMES
1643 config-$(call config_package,net-hermes-pci) += PCI_HERMES
1644 config-$(call config_package,net-hermes-plx) += PLX_HERMES
1645 config-$(call config_package,net-hermes-pcmcia) += PCMCIA_HERMES
1646 config-y += HERMES_PRISM
1647
1648 config-$(call config_package,adm8211) += ADM8211
1649 config-$(call config_package,libertas-sdio) += LIBERTAS LIBERTAS_SDIO
1650 config-$(call config_package,libertas-usb) += LIBERTAS LIBERTAS_USB
1651 config-$(call config_package,mwl8k) += MWL8K
1652 config-$(call config_package,mwifiex-pcie) += MWIFIEX MWIFIEX_PCIE
1653 config-$(call config_package,rtl8180) += RTL8180
1654 config-$(call config_package,rtl8187) += RTL8187
1655 config-$(call config_package,wlcore) += WLCORE WLCORE_SDIO
1656 config-$(call config_package,wl12xx) += WL12XX
1657 config-$(call config_package,wl18xx) += WL18XX
1658 config-y += WL_TI WILINK_PLATFORM_DATA
1659 config-$(call config_package,zd1211rw) += ZD1211RW
1660
1661 config-$(call config_package,rtlwifi) += RTL_CARDS RTLWIFI
1662 config-$(call config_package,rtlwifi-pci) += RTLWIFI_PCI
1663 config-$(call config_package,rtlwifi-usb) += RTLWIFI_USB
1664 config-$(call config_package,rtl8192c-common) += RTL8192C_COMMON
1665 config-$(call config_package,rtl8192ce) += RTL8192CE
1666 config-$(call config_package,rtl8192se) += RTL8192SE
1667 config-$(call config_package,rtl8192de) += RTL8192DE
1668 config-$(call config_package,rtl8192cu) += RTL8192CU
1669 config-$(CONFIG_PACKAGE_RTLWIFI_DEBUG) += RTLWIFI_DEBUG
1670
1671 config-$(CONFIG_LEDS_TRIGGERS) += MAC80211_LEDS B43_LEDS B43LEGACY_LEDS
1672
1673 MAKE_OPTS:= -C "$(PKG_BUILD_DIR)" \
1674         CROSS_COMPILE="$(KERNEL_CROSS)" \
1675         ARCH="$(LINUX_KARCH)" \
1676         EXTRA_CFLAGS="-I$(PKG_BUILD_DIR)/include" \
1677         KLIB_BUILD="$(LINUX_DIR)" \
1678         MODPROBE=true \
1679         KLIB=$(TARGET_MODULES_DIR) \
1680         KERNEL_SUBLEVEL=$(lastword $(subst ., ,$(KERNEL_PATCHVER))) \
1681         KBUILD_LDFLAGS_MODULE_PREREQ=
1682
1683 ifneq ($(findstring c,$(OPENWRT_VERBOSE)),)
1684   MAKE_OPTS += V=1
1685 endif
1686
1687 define ConfigVars
1688 $(subst $(space),,$(foreach opt,$(config-$(1)),CPTCFG_$(opt)=$(1)
1689 ))
1690 endef
1691
1692 define mac80211_config
1693 $(call ConfigVars,m)$(call ConfigVars,y)
1694 endef
1695 $(eval $(call shexport,mac80211_config))
1696
1697 define Build/Prepare
1698         rm -rf $(PKG_BUILD_DIR)
1699         mkdir -p $(PKG_BUILD_DIR)
1700         $(PKG_UNPACK)
1701         $(Build/Patch)
1702         $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(IPW2100_NAME)-$(IPW2100_VERSION).tgz
1703         $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(IPW2200_NAME)-$(IPW2200_VERSION).tgz
1704         $(TAR) -C $(PKG_BUILD_DIR) -xjf $(DL_DIR)/$(ZD1211FW_NAME)-$(ZD1211FW_VERSION).tar.bz2
1705         $(TAR) -C $(PKG_BUILD_DIR) -xjf $(DL_DIR)/$(PKG_LINUX_FIRMWARE_SOURCE)
1706         $(TAR) -C $(PKG_BUILD_DIR) -xjf $(DL_DIR)/$(PKG_ATH10K_LINUX_FIRMWARE_SOURCE)
1707         rm -rf \
1708                 $(PKG_BUILD_DIR)/include/linux/ssb \
1709                 $(PKG_BUILD_DIR)/include/linux/bcma \
1710                 $(PKG_BUILD_DIR)/include/net/bluetooth
1711
1712         rm -f \
1713                 $(PKG_BUILD_DIR)/include/linux/cordic.h \
1714                 $(PKG_BUILD_DIR)/include/linux/crc8.h \
1715                 $(PKG_BUILD_DIR)/include/linux/eeprom_93cx6.h \
1716                 $(PKG_BUILD_DIR)/include/linux/wl12xx.h \
1717                 $(PKG_BUILD_DIR)/include/linux/spi/libertas_spi.h \
1718                 $(PKG_BUILD_DIR)/include/net/ieee80211.h
1719
1720         echo 'compat-wireless-$(PKG_VERSION)-$(PKG_RELEASE)-$(REVISION)' > $(PKG_BUILD_DIR)/compat_version
1721         $(CP) ./files/regdb.txt $(PKG_BUILD_DIR)/net/wireless/db.txt
1722 endef
1723
1724 ifneq ($(CONFIG_PACKAGE_kmod-cfg80211)$(CONFIG_PACKAGE_kmod-lib80211),)
1725  define Build/Compile/kmod
1726         rm -rf $(PKG_BUILD_DIR)/modules
1727         +$(MAKE) $(PKG_JOBS) $(MAKE_OPTS) modules
1728  endef
1729 endif
1730
1731 define Build/Configure
1732         cmp $(PKG_BUILD_DIR)/include/linux/ath9k_platform.h $(LINUX_DIR)/include/linux/ath9k_platform.h
1733         cmp $(PKG_BUILD_DIR)/include/linux/ath5k_platform.h $(LINUX_DIR)/include/linux/ath5k_platform.h
1734         cmp $(PKG_BUILD_DIR)/include/linux/rt2x00_platform.h $(LINUX_DIR)/include/linux/rt2x00_platform.h
1735 endef
1736
1737 define Build/Compile
1738         $(SH_FUNC) var2file "$(call shvar,mac80211_config)" $(PKG_BUILD_DIR)/.config
1739         $(MAKE) $(MAKE_OPTS) allnoconfig
1740         $(call Build/Compile/kmod)
1741 endef
1742
1743 define Build/InstallDev
1744         mkdir -p \
1745                 $(1)/usr/include/mac80211 \
1746                 $(1)/usr/include/mac80211-backport \
1747                 $(1)/usr/include/mac80211/ath \
1748                 $(1)/usr/include/net/mac80211
1749         $(CP) $(PKG_BUILD_DIR)/net/mac80211/*.h $(PKG_BUILD_DIR)/include/* $(1)/usr/include/mac80211/
1750         $(CP) $(PKG_BUILD_DIR)/backport-include/* $(1)/usr/include/mac80211-backport/
1751         $(CP) $(PKG_BUILD_DIR)/net/mac80211/rate.h $(1)/usr/include/net/mac80211/
1752         $(CP) $(PKG_BUILD_DIR)/drivers/net/wireless/ath/*.h $(1)/usr/include/mac80211/ath/
1753         rm -f $(1)/usr/include/mac80211-backport/linux/module.h
1754 endef
1755
1756 define KernelPackage/libertas-usb/install
1757         $(INSTALL_DIR) $(1)/lib/firmware/libertas
1758         $(INSTALL_DATA) \
1759                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/usb8388_v9.bin \
1760                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/usb8682.bin \
1761                 $(1)/lib/firmware/libertas/
1762 endef
1763
1764 define KernelPackage/libertas-sdio/install
1765         $(INSTALL_DIR) $(1)/lib/firmware/libertas
1766         $(INSTALL_DATA) \
1767                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/sd8385_helper.bin \
1768                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/sd8385.bin \
1769                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/sd8686_v9_helper.bin \
1770                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/sd8686_v9.bin \
1771                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/sd8688_helper.bin \
1772                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/libertas/sd8688.bin \
1773                 $(1)/lib/firmware/libertas
1774 endef
1775
1776 define KernelPackage/cfg80211/install
1777         $(INSTALL_DIR) $(1)/lib/wifi $(1)/lib/netifd/wireless
1778         $(INSTALL_DATA) ./files/lib/wifi/mac80211.sh $(1)/lib/wifi
1779         $(INSTALL_BIN) ./files/lib/netifd/wireless/mac80211.sh $(1)/lib/netifd/wireless
1780 endef
1781
1782 define KernelPackage/p54-pci/install
1783         $(INSTALL_DIR) $(1)/lib/firmware
1784         $(INSTALL_DATA) $(DL_DIR)/$(P54PCIFW) $(1)/lib/firmware/isl3886pci
1785 endef
1786
1787 define KernelPackage/p54-usb/install
1788         $(INSTALL_DIR) $(1)/lib/firmware
1789         $(INSTALL_DATA) $(DL_DIR)/$(P54USBFW) $(1)/lib/firmware/isl3887usb
1790 endef
1791
1792 define KernelPackage/p54-spi/install
1793         $(INSTALL_DIR) $(1)/lib/firmware
1794         $(INSTALL_DATA) $(DL_DIR)/$(P54SPIFW) $(1)/lib/firmware/3826.arm
1795 endef
1796
1797 define KernelPackage/rt61-pci/install
1798         $(INSTALL_DIR) $(1)/lib/firmware
1799         $(INSTALL_DATA) \
1800                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rt2561.bin \
1801                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rt2561s.bin \
1802                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rt2661.bin \
1803                 $(1)/lib/firmware/
1804 endef
1805
1806 define KernelPackage/rt73-usb/install
1807         $(INSTALL_DIR) $(1)/lib/firmware
1808         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rt73.bin $(1)/lib/firmware/
1809 endef
1810
1811 define KernelPackage/rt2800-pci/install
1812         $(INSTALL_DIR) $(1)/lib/firmware
1813         $(INSTALL_DATA) \
1814                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rt2860.bin \
1815                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rt3290.bin \
1816                 $(1)/lib/firmware
1817 endef
1818
1819 define KernelPackage/rt2800-usb/install
1820         $(INSTALL_DIR) $(1)/lib/firmware
1821         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/rt2870.bin $(1)/lib/firmware/
1822 endef
1823
1824 define KernelPackage/wl12xx/install
1825         $(INSTALL_DIR) $(1)/lib/firmware/ti-connectivity
1826         $(INSTALL_DATA) \
1827                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ti-connectivity/wl127x-fw-5-mr.bin \
1828                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ti-connectivity/wl127x-fw-5-plt.bin \
1829                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ti-connectivity/wl127x-fw-5-sr.bin \
1830                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ti-connectivity/wl1271-nvs.bin \
1831                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ti-connectivity/wl128x-fw-5-mr.bin \
1832                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ti-connectivity/wl128x-fw-5-plt.bin \
1833                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ti-connectivity/wl128x-fw-5-sr.bin \
1834                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ti-connectivity/wl128x-nvs.bin \
1835                 $(1)/lib/firmware/ti-connectivity
1836 endef
1837
1838 define KernelPackage/wl18xx/install
1839         $(INSTALL_DIR) $(1)/lib/firmware/ti-connectivity
1840         $(INSTALL_DATA) \
1841                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ti-connectivity/wl18xx-conf.bin \
1842                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/ti-connectivity/wl18xx-fw-3.bin \
1843                 $(1)/lib/firmware/ti-connectivity
1844 endef
1845
1846 define KernelPackage/zd1211rw/install
1847         $(INSTALL_DIR) $(1)/lib/firmware/zd1211
1848         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(ZD1211FW_NAME)/zd1211* $(1)/lib/firmware/zd1211
1849 endef
1850
1851 define KernelPackage/carl9170/install
1852         $(INSTALL_DIR) $(1)/lib/firmware
1853         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/carl9170-1.fw $(1)/lib/firmware
1854 endef
1855
1856 define KernelPackage/ath9k-htc/install
1857         $(INSTALL_DIR) $(1)/lib/firmware
1858         $(INSTALL_DATA) \
1859                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/htc_9271.fw \
1860                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/htc_7010.fw \
1861                 $(1)/lib/firmware/
1862 endef
1863
1864 define KernelPackage/ath10k/install
1865         $(INSTALL_DIR) $(1)/lib/firmware/ath10k/QCA988X/hw2.0
1866         $(INSTALL_DATA) \
1867                 $(PKG_BUILD_DIR)/$(PKG_ATH10K_LINUX_FIRMWARE_SUBDIR)/ath10k/QCA988X/hw2.0/board.bin \
1868                 $(1)/lib/firmware/ath10k/QCA988X/hw2.0/
1869 ifeq ($(CONFIG_ATH10K_STA_FW),y)
1870         $(INSTALL_DATA) \
1871                 $(PKG_BUILD_DIR)/$(PKG_ATH10K_LINUX_FIRMWARE_SUBDIR)/main/firmware-2.bin_999.999.0.636 \
1872                 $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-2.bin
1873 else ifeq ($(CONFIG_ATH10K_API2_FW),y)
1874         $(INSTALL_DATA) \
1875                 $(PKG_BUILD_DIR)/$(PKG_ATH10K_LINUX_FIRMWARE_SUBDIR)/10.1/firmware-2.bin_10.1.467.2-1 \
1876                 $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-2.bin
1877 else
1878         $(INSTALL_DATA) \
1879                 $(PKG_BUILD_DIR)/$(PKG_ATH10K_LINUX_FIRMWARE_SUBDIR)/10.2.4/firmware-4.bin_10.2.4.45 \
1880                 $(1)/lib/firmware/ath10k/QCA988X/hw2.0/firmware-4.bin
1881 endif
1882 endef
1883
1884 define KernelPackage/mwl8k/install
1885         $(INSTALL_DIR) $(1)/lib/firmware/mwl8k
1886         $(INSTALL_DATA) \
1887                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/mwl8k/fmimage_8366_ap-3.fw \
1888                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/mwl8k/fmimage_8366.fw \
1889                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/mwl8k/helper_8366.fw \
1890                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/mwl8k/fmimage_8687.fw \
1891                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/mwl8k/helper_8687.fw \
1892                 $(1)/lib/firmware/mwl8k/
1893 endef
1894
1895 define KernelPackage/mwifiex-pcie/install
1896         $(INSTALL_DIR) $(1)/lib/firmware/mrvl
1897         $(INSTALL_DATA) \
1898                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/mrvl/pcie8897_uapsta.bin \
1899                 $(1)/lib/firmware/mrvl/
1900 endef
1901
1902 define KernelPackage/net-ipw2100/install
1903         $(INSTALL_DIR) $(1)/lib/firmware
1904         $(INSTALL_DATA) $(PKG_BUILD_DIR)/ipw2100-$(IPW2100_VERSION)*.fw $(1)/lib/firmware
1905 endef
1906
1907 define KernelPackage/net-ipw2200/install
1908         $(INSTALL_DIR) $(1)/lib/firmware
1909         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(IPW2200_NAME)-$(IPW2200_VERSION)/ipw2200*.fw $(1)/lib/firmware
1910 endef
1911
1912 define KernelPackage/iwlagn/install
1913         $(INSTALL_DIR) $(1)/lib/firmware
1914 ifneq ($(CONFIG_IWL5000_FW),)
1915         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-5000-5.ucode $(1)/lib/firmware
1916 endif
1917 ifneq ($(CONFIG_IWL5150_FW),)
1918         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-5150-2.ucode $(1)/lib/firmware
1919 endif
1920 ifneq ($(CONFIG_IWL1000_FW),)
1921         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-1000-5.ucode $(1)/lib/firmware
1922 endif
1923 ifneq ($(CONFIG_IWL6000_FW),)
1924         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-6000-4.ucode $(1)/lib/firmware
1925 endif
1926 ifneq ($(CONFIG_IWL6050_FW),)
1927         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-6050-5.ucode $(1)/lib/firmware
1928 endif
1929 ifneq ($(CONFIG_IWL6005_FW),)
1930         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-6000g2a-6.ucode $(1)/lib/firmware
1931 endif
1932 ifneq ($(CONFIG_IWL6030_FW),)
1933         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-6000g2b-6.ucode $(1)/lib/firmware
1934 endif
1935 ifneq ($(CONFIG_IWL7260_FW),)
1936         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-7260-9.ucode $(1)/lib/firmware
1937 endif
1938 ifneq ($(CONFIG_IWL7265_FW),)
1939         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-7265-9.ucode $(1)/lib/firmware
1940 endif
1941 ifneq ($(CONFIG_IWL100_FW),)
1942         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-100-5.ucode $(1)/lib/firmware
1943 endif
1944 ifneq ($(CONFIG_IWL2000_FW),)
1945         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-2000-6.ucode $(1)/lib/firmware
1946 endif
1947 ifneq ($(CONFIG_IWL2030_FW),)
1948         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-2030-6.ucode $(1)/lib/firmware
1949 endif
1950 ifneq ($(CONFIG_IWL105_FW),)
1951         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-105-6.ucode $(1)/lib/firmware
1952 endif
1953 ifneq ($(CONFIG_IWL135_FW),)
1954         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-135-6.ucode $(1)/lib/firmware
1955 endif
1956 ifneq ($(CONFIG_IWL3160_FW),)
1957         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-3160-9.ucode $(1)/lib/firmware
1958 endif
1959 endef
1960
1961 define KernelPackage/iwl3945/install
1962         $(INSTALL_DIR) $(1)/lib/firmware
1963         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-3945-2.ucode $(1)/lib/firmware
1964 endef
1965
1966 define KernelPackage/iwl4965/install
1967         $(INSTALL_DIR) $(1)/lib/firmware
1968         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/iwlwifi-4965-2.ucode $(1)/lib/firmware
1969 endef
1970
1971 define KernelPackage/b43/install
1972         rm -rf $(1)/lib/firmware/
1973 ifeq ($(CONFIG_B43_OPENFIRMWARE),y)
1974         tar xzf "$(DL_DIR)/$(PKG_B43_FWV4_SOURCE)" -C "$(PKG_BUILD_DIR)"
1975 else
1976         tar xjf "$(DL_DIR)/$(PKG_B43_FWV4_SOURCE)" -C "$(PKG_BUILD_DIR)"
1977 endif
1978         $(INSTALL_DIR) $(1)/lib/firmware/
1979 ifeq ($(CONFIG_B43_OPENFIRMWARE),y)
1980         $(MAKE) -C "$(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/"
1981         $(INSTALL_DIR) $(1)/lib/firmware/b43-open/
1982         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/ucode5.fw $(1)/lib/firmware/b43-open/ucode5.fw
1983         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/b0g0bsinitvals5.fw $(1)/lib/firmware/b43-open/b0g0bsinitvals5.fw
1984         $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/b0g0initvals5.fw $(1)/lib/firmware/b43-open/b0g0initvals5.fw
1985 else
1986         b43-fwcutter -w $(1)/lib/firmware/ $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)
1987 endif
1988 ifneq ($(CONFIG_B43_FW_SQUASH),)
1989         b43-fwsquash.py "$(CONFIG_B43_FW_SQUASH_PHYTYPES)" "$(CONFIG_B43_FW_SQUASH_COREREVS)" "$(1)/lib/firmware/b43"
1990 endif
1991 endef
1992
1993 define KernelPackage/b43legacy/install
1994         $(INSTALL_DIR) $(1)/lib/firmware/
1995         b43-fwcutter --unsupported -w $(1)/lib/firmware/ $(DL_DIR)/$(PKG_B43_FWV3_SOURCE)
1996 ifneq ($(CONFIG_B43LEGACY_FW_SQUASH),)
1997         b43-fwsquash.py "G" "$(CONFIG_B43LEGACY_FW_SQUASH_COREREVS)" "$(1)/lib/firmware/b43legacy"
1998 endif
1999 endef
2000
2001 define KernelPackage/brcmsmac/install
2002         $(INSTALL_DIR) $(1)/lib/firmware/brcm
2003 ifeq ($(CONFIG_BRCMSMAC_USE_FW_FROM_WL),y)
2004         tar xjf "$(DL_DIR)/$(PKG_BRCMSMAC_FW_SOURCE)" -C "$(PKG_BUILD_DIR)"
2005         b43-fwcutter --brcmsmac -w $(1)/lib/firmware/ $(PKG_BUILD_DIR)/$(PKG_BRCMSMAC_FW_OBJECT)
2006 else
2007         $(INSTALL_DATA) \
2008                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/bcm43xx-0.fw \
2009                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/bcm43xx_hdr-0.fw \
2010                 $(1)/lib/firmware/brcm/
2011 endif
2012 endef
2013
2014 define KernelPackage/brcmfmac/install
2015         $(INSTALL_DIR) $(1)/lib/firmware/brcm
2016 ifneq ($(CONFIG_BRCMFMAC_USB),)
2017         $(INSTALL_DATA) \
2018                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43236b.bin \
2019                 $(1)/lib/firmware/brcm/
2020         $(INSTALL_DATA) \
2021                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43143.bin \
2022                 $(1)/lib/firmware/brcm/
2023 endif
2024 ifneq ($(CONFIG_BRCMFMAC_PCIE),)
2025         $(INSTALL_DATA) \
2026                 $(PKG_BUILD_DIR)/$(PKG_LINUX_FIRMWARE_SUBDIR)/brcm/brcmfmac43602-pcie.ap.bin \
2027                 $(1)/lib/firmware/brcm/brcmfmac43602-pcie.bin
2028 endif
2029 endef
2030
2031 $(eval $(call KernelPackage,adm8211))
2032 $(eval $(call KernelPackage,ath5k))
2033 $(eval $(call KernelPackage,lib80211))
2034 $(eval $(call KernelPackage,libertas-usb))
2035 $(eval $(call KernelPackage,libertas-sdio))
2036 $(eval $(call KernelPackage,cfg80211))
2037 $(eval $(call KernelPackage,mac80211))
2038 $(eval $(call KernelPackage,p54-common))
2039 $(eval $(call KernelPackage,p54-pci))
2040 $(eval $(call KernelPackage,p54-usb))
2041 $(eval $(call KernelPackage,p54-spi))
2042 $(eval $(call KernelPackage,rt2x00-lib))
2043 $(eval $(call KernelPackage,rt2x00-mmio))
2044 $(eval $(call KernelPackage,rt2x00-pci))
2045 $(eval $(call KernelPackage,rt2x00-usb))
2046 $(eval $(call KernelPackage,rt2800-lib))
2047 $(eval $(call KernelPackage,rt2400-pci))
2048 $(eval $(call KernelPackage,rt2500-pci))
2049 $(eval $(call KernelPackage,rt2500-usb))
2050 $(eval $(call KernelPackage,rt61-pci))
2051 $(eval $(call KernelPackage,rt73-usb))
2052 $(eval $(call KernelPackage,rt2800-mmio))
2053 $(eval $(call KernelPackage,rt2800-soc))
2054 $(eval $(call KernelPackage,rt2800-pci))
2055 $(eval $(call KernelPackage,rt2800-usb))
2056 $(eval $(call KernelPackage,rtl8180))
2057 $(eval $(call KernelPackage,rtl8187))
2058 $(eval $(call KernelPackage,rtlwifi))
2059 $(eval $(call KernelPackage,rtlwifi-pci))
2060 $(eval $(call KernelPackage,rtlwifi-usb))
2061 $(eval $(call KernelPackage,rtl8192c-common))
2062 $(eval $(call KernelPackage,rtl8192ce))
2063 $(eval $(call KernelPackage,rtl8192se))
2064 $(eval $(call KernelPackage,rtl8192de))
2065 $(eval $(call KernelPackage,rtl8192cu))
2066 $(eval $(call KernelPackage,zd1211rw))
2067 $(eval $(call KernelPackage,mac80211-hwsim))
2068 $(eval $(call KernelPackage,ath9k-common))
2069 $(eval $(call KernelPackage,ath9k))
2070 $(eval $(call KernelPackage,ath9k-htc))
2071 $(eval $(call KernelPackage,ath10k))
2072 $(eval $(call KernelPackage,ath))
2073 $(eval $(call KernelPackage,carl9170))
2074 $(eval $(call KernelPackage,b43))
2075 $(eval $(call KernelPackage,b43legacy))
2076 $(eval $(call KernelPackage,brcmutil))
2077 $(eval $(call KernelPackage,brcmsmac))
2078 $(eval $(call KernelPackage,brcmfmac))
2079 $(eval $(call KernelPackage,net-libipw))
2080 $(eval $(call KernelPackage,net-ipw2100))
2081 $(eval $(call KernelPackage,net-ipw2200))
2082 $(eval $(call KernelPackage,iwlagn))
2083 $(eval $(call KernelPackage,iwl-legacy))
2084 $(eval $(call KernelPackage,iwl4965))
2085 $(eval $(call KernelPackage,iwl3945))
2086 $(eval $(call KernelPackage,mwl8k))
2087 $(eval $(call KernelPackage,mwifiex-pcie))
2088 $(eval $(call KernelPackage,net-hermes))
2089 $(eval $(call KernelPackage,net-hermes-pci))
2090 $(eval $(call KernelPackage,net-hermes-plx))
2091 $(eval $(call KernelPackage,net-hermes-pcmcia))
2092 $(eval $(call KernelPackage,wlcore))
2093 $(eval $(call KernelPackage,wl12xx))
2094 $(eval $(call KernelPackage,wl18xx))