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