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