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