mac80211: move realtek packaging code to realtek.mk
[openwrt/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:=4.19-rc5-1
14 PKG_RELEASE:=1
15 PKG_SOURCE_URL:=https://mirrors.edge.kernel.org/pub/linux/kernel/projects/backports/stable/v4.19-rc5/
16 PKG_HASH:=5b61e64ea79d22bbac9e8612d5d5485974f223de00d4ec250b0faf4b7baf9957
17
18 PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
19 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION)
20 PKG_BUILD_PARALLEL:=1
21
22 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
23
24 PKG_DRIVERS = \
25 adm8211 \
26 airo \
27 hermes hermes-pci hermes-pcmcia hermes-plx\
28 iwl-legacy iwl3945 iwl4965 iwlwifi \
29 lib80211 \
30 libipw ipw2100 ipw2200 \
31 libertas-sdio libertas-usb libertas-spi \
32 mac80211-hwsim \
33 mt7601u \
34 mwl8k mwifiex-pcie mwifiex-sdio \
35 p54-common p54-pci p54-spi p54-usb \
36 rsi91x rsi91x-usb rsi91x-sdio\
37 wlcore wl12xx wl18xx \
38 zd1211rw
39
40 PKG_CONFIG_DEPENDS:= \
41 CONFIG_PACKAGE_kmod-mac80211 \
42 CONFIG_PACKAGE_MAC80211_DEBUGFS \
43 CONFIG_PACKAGE_MAC80211_MESH \
44 CONFIG_PACKAGE_MAC80211_TRACING \
45 CONFIG_PACKAGE_IWLWIFI_DEBUG \
46 CONFIG_PACKAGE_IWLWIFI_DEBUGFS \
47 CONFIG_PACKAGE_RTLWIFI_DEBUG \
48
49 include $(INCLUDE_DIR)/package.mk
50
51 WMENU:=Wireless Drivers
52
53 define KernelPackage/mac80211/Default
54 SUBMENU:=$(WMENU)
55 URL:=https://wireless.wiki.kernel.org/
56 MAINTAINER:=Felix Fietkau <nbd@nbd.name>
57 endef
58
59 config_package=$(if $(CONFIG_PACKAGE_kmod-$(1)),m)
60
61 config-y:= \
62 WLAN \
63 NL80211_TESTMODE \
64 CFG80211_WEXT \
65 CFG80211_CERTIFICATION_ONUS \
66 MAC80211_RC_MINSTREL \
67 MAC80211_RC_MINSTREL_HT \
68 MAC80211_RC_MINSTREL_VHT \
69 MAC80211_RC_DEFAULT_MINSTREL \
70 WLAN_VENDOR_ADMTEK \
71 WLAN_VENDOR_ATH \
72 WLAN_VENDOR_ATMEL \
73 WLAN_VENDOR_BROADCOM \
74 WLAN_VENDOR_CISCO \
75 WLAN_VENDOR_INTEL \
76 WLAN_VENDOR_INTERSIL \
77 WLAN_VENDOR_MARVELL \
78 WLAN_VENDOR_MEDIATEK \
79 WLAN_VENDOR_RALINK \
80 WLAN_VENDOR_REALTEK \
81 WLAN_VENDOR_RSI \
82 WLAN_VENDOR_ST \
83 WLAN_VENDOR_TI \
84 WLAN_VENDOR_ZYDAS \
85
86 config-$(call config_package,cfg80211) += CFG80211
87
88 config-$(call config_package,mac80211) += MAC80211
89 config-$(CONFIG_PACKAGE_MAC80211_MESH) += MAC80211_MESH
90
91 include ath.mk
92 include broadcom.mk
93 include ralink.mk
94 include realtek.mk
95
96 PKG_CONFIG_DEPENDS += \
97 $(patsubst %,CONFIG_PACKAGE_kmod-%,$(PKG_DRIVERS))
98
99 define KernelPackage/cfg80211
100 $(call KernelPackage/mac80211/Default)
101 TITLE:=cfg80211 - wireless configuration API
102 DEPENDS+= +iw +wireless-regdb
103 FILES:= \
104 $(PKG_BUILD_DIR)/compat/compat.ko \
105 $(PKG_BUILD_DIR)/net/wireless/cfg80211.ko
106 endef
107
108 define KernelPackage/cfg80211/description
109 cfg80211 is the Linux wireless LAN (802.11) configuration API.
110 endef
111
112 define KernelPackage/mac80211
113 $(call KernelPackage/mac80211/Default)
114 TITLE:=Linux 802.11 Wireless Networking Stack
115 # +kmod-crypto-cmac is a runtime only dependency of net/mac80211/aes_cmac.c
116 DEPENDS+= +kmod-cfg80211 +hostapd-common
117 KCONFIG:=\
118 CONFIG_AVERAGE=y
119 FILES:= $(PKG_BUILD_DIR)/net/mac80211/mac80211.ko
120 MENU:=1
121 endef
122
123 define KernelPackage/mac80211/config
124 if PACKAGE_kmod-mac80211
125
126 config PACKAGE_MAC80211_DEBUGFS
127 bool "Export mac80211 internals in DebugFS"
128 select KERNEL_DEBUG_FS
129 default y
130 help
131 Select this to see extensive information about
132 the internal state of mac80211 in debugfs.
133
134 config PACKAGE_MAC80211_TRACING
135 bool "Enable tracing (mac80211 and supported drivers)"
136 select KERNEL_FTRACE
137 select KERNEL_ENABLE_DEFAULT_TRACERS
138 default n
139 help
140 Select this to enable tracing of mac80211 and
141 related wifi drivers (using trace-cmd).
142
143 config PACKAGE_MAC80211_MESH
144 bool "Enable 802.11s mesh support"
145 default y
146
147 endif
148 endef
149
150 define KernelPackage/mac80211/description
151 Generic IEEE 802.11 Networking Stack (mac80211)
152 endef
153
154 define KernelPackage/adm8211
155 $(call KernelPackage/mac80211/Default)
156 TITLE:=ADMTek 8211 support
157 DEPENDS+=@PCI_SUPPORT +kmod-mac80211 +kmod-eeprom-93cx6
158 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/admtek/adm8211.ko
159 AUTOLOAD:=$(call AutoProbe,adm8211)
160 endef
161
162 define KernelPackage/airo
163 $(call KernelPackage/mac80211/Default)
164 TITLE:=Cisco Aironet driver
165 DEPENDS+=@PCI_SUPPORT +@DRIVER_WEXT_SUPPORT +kmod-cfg80211 @TARGET_x86
166 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/cisco/airo.ko
167 AUTOLOAD:=$(call AutoProbe,airo)
168 endef
169
170 define KernelPackage/airo/description
171 Kernel support for Cisco Aironet cards
172 endef
173
174 define KernelPackage/hermes
175 $(call KernelPackage/mac80211/Default)
176 TITLE:=Hermes 802.11b chipset support
177 DEPENDS:=@PCI_SUPPORT||PCMCIA_SUPPORT +kmod-cfg80211 +@DRIVER_WEXT_SUPPORT +kmod-crypto-michael-mic
178 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intersil/orinoco/orinoco.ko
179 AUTOLOAD:=$(call AutoProbe,orinoco)
180 endef
181
182 define KernelPackage/hermes/description
183 Kernel support for Hermes 802.11b chipsets
184 endef
185
186 define KernelPackage/hermes-pci
187 $(call KernelPackage/mac80211/Default)
188 TITLE:=Intersil Prism 2.5 PCI support
189 DEPENDS:=@PCI_SUPPORT +kmod-hermes
190 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intersil/orinoco/orinoco_pci.ko
191 AUTOLOAD:=$(call AutoProbe,orinoco_pci)
192 endef
193
194 define KernelPackage/hermes-pci/description
195 Kernel modules for Intersil Prism 2.5 PCI support
196 endef
197
198 define KernelPackage/hermes-plx
199 $(call KernelPackage/mac80211/Default)
200 TITLE:=PLX9052 based PCI adaptor
201 DEPENDS:=@PCI_SUPPORT +kmod-hermes
202 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intersil/orinoco/orinoco_plx.ko
203 AUTOLOAD:=$(call AutoProbe,orinoco_plx)
204 endef
205
206 define KernelPackage/hermes-plx/description
207 Kernel modules for Hermes in PLX9052 based PCI adaptors
208 endef
209
210 define KernelPackage/hermes-pcmcia
211 $(call KernelPackage/mac80211/Default)
212 TITLE:=Hermes based PCMCIA adaptors
213 DEPENDS:=@PCMCIA_SUPPORT +kmod-hermes
214 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intersil/orinoco/orinoco_cs.ko
215 AUTOLOAD:=$(call AutoProbe,orinoco_cs)
216 endef
217
218 define KernelPackage/hermes-pcmcia/description
219 Kernel modules for Hermes based PCMCIA adaptors
220 endef
221
222
223 define KernelPackage/iwlwifi
224 $(call KernelPackage/mac80211/Default)
225 DEPENDS:= +kmod-mac80211 @PCI_SUPPORT +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT @!LINUX_3_18
226 TITLE:=Intel AGN Wireless support
227 FILES:= \
228 $(PKG_BUILD_DIR)/drivers/net/wireless/intel/iwlwifi/iwlwifi.ko \
229 $(PKG_BUILD_DIR)/drivers/net/wireless/intel/iwlwifi/dvm/iwldvm.ko \
230 $(PKG_BUILD_DIR)/drivers/net/wireless/intel/iwlwifi/mvm/iwlmvm.ko
231 AUTOLOAD:=$(call AutoProbe,iwlwifi iwldvm iwlmvm)
232 MENU:=1
233 endef
234
235 define KernelPackage/iwlwifi/description
236 iwlwifi kernel module for
237 Intel Wireless WiFi Link 6250AGN Adapter
238 Intel 6000 Series Wi-Fi Adapters (6200AGN and 6300AGN)
239 Intel WiFi Link 1000BGN
240 Intel Wireless WiFi 5150AGN
241 Intel Wireless WiFi 5100AGN, 5300AGN, and 5350AGN
242 Intel 6005 Series Wi-Fi Adapters
243 Intel 6030 Series Wi-Fi Adapters
244 Intel Wireless WiFi Link 6150BGN 2 Adapter
245 Intel 100 Series Wi-Fi Adapters (100BGN and 130BGN)
246 Intel 2000 Series Wi-Fi Adapters
247 Intel 7260 Wi-Fi Adapter
248 Intel 3160 Wi-Fi Adapter
249 Intel 7265 Wi-Fi Adapter
250 Intel 8260 Wi-Fi Adapter
251 Intel 3165 Wi-Fi Adapter
252 endef
253
254 define KernelPackage/iwlwifi/config
255 if PACKAGE_kmod-iwlwifi
256
257 config PACKAGE_IWLWIFI_DEBUG
258 bool "Enable full debugging output in the iwlwifi driver"
259 default n
260 help
261 This option will enable debug tracing output for the iwlwifi drivers
262
263 This will result in the kernel module being ~100k larger. You can
264 control which debug output is sent to the kernel log by setting the
265 value in
266
267 /sys/module/iwlwifi/parameters/debug
268
269 This entry will only exist if this option is enabled.
270
271 To set a value, simply echo an 8-byte hex value to the same file:
272
273 % echo 0x43fff > /sys/module/iwlwifi/parameters/debug
274
275 You can find the list of debug mask values in:
276 drivers/net/wireless/intel/iwlwifi/iwl-debug.h
277
278 If this is your first time using this driver, you should say Y here
279 as the debug information can assist others in helping you resolve
280 any problems you may encounter.
281
282 config PACKAGE_IWLWIFI_DEBUGFS
283 bool "iwlwifi debugfs support"
284 depends on PACKAGE_MAC80211_DEBUGFS
285 default n
286 help
287 Enable creation of debugfs files for the iwlwifi drivers. This
288 is a low-impact option that allows getting insight into the
289 driver's state at runtime.
290
291 endif
292 endef
293
294 define KernelPackage/iwl-legacy
295 $(call KernelPackage/mac80211/Default)
296 DEPENDS:= +kmod-mac80211 @PCI_SUPPORT
297 TITLE:=Intel legacy Wireless support
298 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intel/iwlegacy/iwlegacy.ko
299 AUTOLOAD:=$(call AutoProbe,iwlegacy)
300 endef
301
302 define KernelPackage/iwl-legacy/description
303 iwl-legacy kernel module for legacy Intel wireless support
304 endef
305
306 define KernelPackage/iwl3945
307 $(call KernelPackage/mac80211/Default)
308 DEPENDS:= +kmod-mac80211 +kmod-iwl-legacy +iwl3945-firmware
309 TITLE:=Intel iwl3945 Wireless support
310 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intel/iwlegacy/iwl3945.ko
311 AUTOLOAD:=$(call AutoProbe,iwl3945)
312 endef
313
314 define KernelPackage/iwl3945/description
315 iwl3945 kernel module for Intel 3945 support
316 endef
317
318 define KernelPackage/iwl4965
319 $(call KernelPackage/mac80211/Default)
320 DEPENDS:= +kmod-mac80211 +kmod-iwl-legacy +@DRIVER_11N_SUPPORT +iwl4965-firmware
321 TITLE:=Intel iwl4965 Wireless support
322 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intel/iwlegacy/iwl4965.ko
323 AUTOLOAD:=$(call AutoProbe,iwl4965)
324 endef
325
326 define KernelPackage/iwl4965/description
327 iwl4965 kernel module for Intel 4965 support
328 endef
329
330
331 define KernelPackage/lib80211
332 $(call KernelPackage/mac80211/Default)
333 TITLE:=802.11 Networking stack
334 DEPENDS:=+kmod-cfg80211 +kmod-crypto-hash
335 FILES:= \
336 $(PKG_BUILD_DIR)/net/wireless/lib80211.ko \
337 $(PKG_BUILD_DIR)/net/wireless/lib80211_crypt_wep.ko \
338 $(PKG_BUILD_DIR)/net/wireless/lib80211_crypt_ccmp.ko \
339 $(PKG_BUILD_DIR)/net/wireless/lib80211_crypt_tkip.ko
340 AUTOLOAD:=$(call AutoProbe, \
341 lib80211 \
342 lib80211_crypt_wep \
343 lib80211_crypt_ccmp \
344 lib80211_crypt_tkip \
345 )
346 endef
347
348 define KernelPackage/lib80211/description
349 Kernel modules for 802.11 Networking stack
350 Includes:
351 - lib80211
352 - lib80211_crypt_wep
353 - lib80211_crypt_tkip
354 - lib80211_crytp_ccmp
355 endef
356
357
358 define KernelPackage/libipw
359 $(call KernelPackage/mac80211/Default)
360 TITLE:=libipw for ipw2100 and ipw2200
361 DEPENDS:=@PCI_SUPPORT +kmod-crypto-michael-mic +kmod-crypto-ecb +kmod-lib80211 +kmod-cfg80211 +@DRIVER_WEXT_SUPPORT @!BIG_ENDIAN @!LINUX_3_18
362 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intel/ipw2x00/libipw.ko
363 AUTOLOAD:=$(call AutoProbe,libipw)
364 endef
365
366 define KernelPackage/libipw/description
367 Hardware independent IEEE 802.11 networking stack for ipw2100 and ipw2200.
368 endef
369
370 IPW2100_NAME:=ipw2100-fw
371 IPW2100_VERSION:=1.3
372
373 define Download/ipw2100
374 URL:= \
375 https://src.fedoraproject.org/repo/pkgs/ipw2100-firmware/ipw2100-fw-1.3.tgz/46aa75bcda1a00efa841f9707bbbd113/ \
376 https://archlinux.mirror.pkern.at/other/packages/ipw2100-fw/ \
377 http://mirror.ox.ac.uk/sites/ftp.openbsd.org/pub/OpenBSD/distfiles/firmware/ \
378 http://firmware.openbsd.org/firmware-dist/
379 FILE:=$(IPW2100_NAME)-$(IPW2100_VERSION).tgz
380 HASH:=e1107c455e48d324a616b47a622593bc8413dcce72026f72731c0b03dae3a7a2
381 endef
382 $(eval $(call Download,ipw2100))
383
384 define KernelPackage/ipw2100
385 $(call KernelPackage/mac80211/Default)
386 TITLE:=Intel IPW2100 driver
387 DEPENDS:=@PCI_SUPPORT +kmod-libipw
388 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intel/ipw2x00/ipw2100.ko
389 AUTOLOAD:=$(call AutoProbe,ipw2100)
390 endef
391
392 define KernelPackage/ipw2100/description
393 Kernel support for Intel IPW2100
394 Includes:
395 - ipw2100
396 endef
397
398 IPW2200_NAME:=ipw2200-fw
399 IPW2200_VERSION:=3.1
400
401 define Download/ipw2200
402 URL:= \
403 https://src.fedoraproject.org/repo/pkgs/ipw2200-firmware/ipw2200-fw-3.1.tgz/eaba788643c7cc7483dd67ace70f6e99/ \
404 https://archlinux.mirror.pkern.at/other/packages/ipw2200-fw/ \
405 http://mirror.ox.ac.uk/sites/ftp.openbsd.org/pub/OpenBSD/distfiles/firmware/ \
406 http://firmware.openbsd.org/firmware-dist/
407 FILE:=$(IPW2200_NAME)-$(IPW2200_VERSION).tgz
408 HASH:=c6818c11c18cc030d55ff83f64b2bad8feef485e7742f84f94a61d811a6258bd
409 endef
410 $(eval $(call Download,ipw2200))
411
412 define KernelPackage/ipw2200
413 $(call KernelPackage/mac80211/Default)
414 TITLE:=Intel IPW2200 driver
415 DEPENDS:=@PCI_SUPPORT +kmod-libipw
416 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intel/ipw2x00/ipw2200.ko
417 AUTOLOAD:=$(call AutoProbe,ipw2200)
418 endef
419
420 define KernelPackage/ipw2200/description
421 Kernel support for Intel IPW2200
422 Includes:
423 - ipw2200
424 endef
425
426
427 define KernelPackage/libertas-usb
428 $(call KernelPackage/mac80211/Default)
429 DEPENDS+= @USB_SUPPORT +kmod-cfg80211 +kmod-usb-core +kmod-lib80211 +@DRIVER_WEXT_SUPPORT +libertas-usb-firmware @!LINUX_3_18
430 TITLE:=Marvell 88W8015 Wireless Driver
431 FILES:= \
432 $(PKG_BUILD_DIR)/drivers/net/wireless/marvell/libertas/libertas.ko \
433 $(PKG_BUILD_DIR)/drivers/net/wireless/marvell/libertas/usb8xxx.ko
434 AUTOLOAD:=$(call AutoProbe,libertas usb8xxx)
435 endef
436
437 define KernelPackage/libertas-sdio
438 $(call KernelPackage/mac80211/Default)
439 DEPENDS+= +kmod-cfg80211 +kmod-lib80211 +kmod-mmc +@DRIVER_WEXT_SUPPORT @!TARGET_uml +libertas-sdio-firmware @!LINUX_3_18
440 TITLE:=Marvell 88W8686 Wireless Driver
441 FILES:= \
442 $(PKG_BUILD_DIR)/drivers/net/wireless/marvell/libertas/libertas.ko \
443 $(PKG_BUILD_DIR)/drivers/net/wireless/marvell/libertas/libertas_sdio.ko
444 AUTOLOAD:=$(call AutoProbe,libertas libertas_sdio)
445 endef
446
447 define KernelPackage/libertas-spi
448 $(call KernelPackage/mac80211/Default)
449 SUBMENU:=Wireless Drivers
450 DEPENDS+= +kmod-cfg80211 +kmod-lib80211 +@DRIVER_WEXT_SUPPORT @!TARGET_uml +libertas-spi-firmware @!LINUX_3_18
451 KCONFIG := \
452 CONFIG_SPI=y \
453 CONFIG_SPI_MASTER=y
454 TITLE:=Marvell 88W8686 SPI Wireless Driver
455 FILES:= \
456 $(PKG_BUILD_DIR)/drivers/net/wireless/marvell/libertas/libertas.ko \
457 $(PKG_BUILD_DIR)/drivers/net/wireless/marvell/libertas/libertas_spi.ko
458 AUTOLOAD:=$(call AutoProbe,libertas libertas_spi)
459 endef
460
461 define KernelPackage/mac80211-hwsim
462 $(call KernelPackage/mac80211/Default)
463 TITLE:=mac80211 HW simulation device
464 DEPENDS+= +kmod-mac80211 +@DRIVER_11AC_SUPPORT +@DRIVER_11N_SUPPORT +@DRIVER_11W_SUPPORT
465 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/mac80211_hwsim.ko
466 AUTOLOAD:=$(call AutoProbe,mac80211_hwsim)
467 endef
468
469
470 define KernelPackage/mt7601u
471 $(call KernelPackage/mac80211/Default)
472 TITLE:=MT7601U-based USB dongles Wireless Driver
473 DEPENDS+= +kmod-mac80211 +@DRIVER_11N_SUPPORT @USB_SUPPORT +kmod-usb-core +mt7601u-firmware
474 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/mediatek/mt7601u/mt7601u.ko
475 AUTOLOAD:=$(call AutoProbe,mt7601u)
476 endef
477
478
479 define KernelPackage/mwl8k
480 $(call KernelPackage/mac80211/Default)
481 TITLE:=Driver for Marvell TOPDOG 802.11 Wireless cards
482 URL:=https://wireless.wiki.kernel.org/en/users/drivers/mwl8k
483 DEPENDS+= @PCI_SUPPORT +kmod-mac80211 +@DRIVER_11N_SUPPORT +mwl8k-firmware
484 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/marvell/mwl8k.ko
485 AUTOLOAD:=$(call AutoProbe,mwl8k)
486 endef
487
488 define KernelPackage/mwl8k/description
489 Kernel modules for Marvell TOPDOG 802.11 Wireless cards
490 endef
491
492
493 define KernelPackage/mwifiex-pcie
494 $(call KernelPackage/mac80211/Default)
495 TITLE:=Driver for Marvell 802.11n/802.11ac PCIe Wireless cards
496 URL:=https://wireless.wiki.kernel.org/en/users/drivers/mwifiex
497 DEPENDS+= @PCI_SUPPORT +kmod-mac80211 +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT +mwifiex-pcie-firmware
498 FILES:= \
499 $(PKG_BUILD_DIR)/drivers/net/wireless/marvell/mwifiex/mwifiex.ko \
500 $(PKG_BUILD_DIR)/drivers/net/wireless/marvell/mwifiex/mwifiex_pcie.ko
501 AUTOLOAD:=$(call AutoProbe,mwifiex_pcie)
502 endef
503
504 define KernelPackage/mwifiex-pcie/description
505 Kernel modules for Marvell 802.11n/802.11ac PCIe Wireless cards
506 endef
507
508 define KernelPackage/mwifiex-sdio
509 $(call KernelPackage/mac80211/Default)
510 TITLE:=Driver for Marvell 802.11n/802.11ac SDIO Wireless cards
511 URL:=https://wireless.wiki.kernel.org/en/users/drivers/mwifiex
512 DEPENDS+= +kmod-mmc +kmod-mac80211 +@DRIVER_11N_SUPPORT +@DRIVER_11AC_SUPPORT +mwifiex-sdio-firmware
513 FILES:= \
514 $(PKG_BUILD_DIR)/drivers/net/wireless/marvell/mwifiex/mwifiex.ko \
515 $(PKG_BUILD_DIR)/drivers/net/wireless/marvell/mwifiex/mwifiex_sdio.ko
516 AUTOLOAD:=$(call AutoProbe,mwifiex_sdio)
517 endef
518
519 define KernelPackage/mwifiex-sdio/description
520 Kernel modules for Marvell 802.11n/802.11ac SDIO Wireless cards
521 endef
522
523 define KernelPackage/p54/Default
524 $(call KernelPackage/mac80211/Default)
525 TITLE:=Prism54 Drivers
526 endef
527
528 define KernelPackage/p54/description
529 Kernel module for Prism54 chipsets (mac80211)
530 endef
531
532 define KernelPackage/p54-common
533 $(call KernelPackage/p54/Default)
534 DEPENDS+= @PCI_SUPPORT||@USB_SUPPORT||@TARGET_omap24xx +kmod-mac80211 +kmod-lib-crc-ccitt
535 TITLE+= (COMMON)
536 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intersil/p54/p54common.ko
537 endef
538
539 define KernelPackage/p54-pci
540 $(call KernelPackage/p54/Default)
541 TITLE+= (PCI)
542 DEPENDS+= @PCI_SUPPORT +kmod-p54-common +p54-pci-firmware
543 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intersil/p54/p54pci.ko
544 AUTOLOAD:=$(call AutoProbe,p54pci)
545 endef
546
547 define KernelPackage/p54-usb
548 $(call KernelPackage/p54/Default)
549 TITLE+= (USB)
550 DEPENDS+= @USB_SUPPORT +kmod-usb-core +kmod-p54-common +p54-usb-firmware
551 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intersil/p54/p54usb.ko
552 AUTOLOAD:=$(call AutoProbe,p54usb)
553 endef
554
555 define KernelPackage/p54-spi
556 $(call KernelPackage/p54/Default)
557 TITLE+= (SPI)
558 DEPENDS+= @TARGET_omap24xx +kmod-p54-common +p54-spi-firmware
559 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intersil/p54/p54spi.ko
560 AUTOLOAD:=$(call AutoProbe,p54spi)
561 endef
562
563 define KernelPackage/rsi91x
564 $(call KernelPackage/mac80211/Default)
565 TITLE:=Redpine Signals Inc 91x WLAN driver support
566 DEPENDS+= +kmod-mac80211 +rs9113-firmware
567 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rsi/rsi_91x.ko
568 endef
569
570 define KernelPackage/rsi91x-usb
571 $(call KernelPackage/mac80211/Default)
572 TITLE:=Redpine Signals USB bus support
573 DEPENDS+= +kmod-mac80211 +kmod-usb2 +kmod-rsi91x +rs9113-firmware
574 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rsi/rsi_usb.ko
575 AUTOLOAD:=$(call AutoProbe,rsi_usb)
576 endef
577
578 define KernelPackage/rsi91x-sdio
579 $(call KernelPackage/mac80211/Default)
580 TITLE:=Redpine Signals SDIO bus support
581 DEPENDS+= +kmod-mac80211 +kmod-mmc +kmod-rsi91x +rs9113-firmware
582 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rsi/rsi_sdio.ko
583 AUTOLOAD:=$(call AutoProbe,rsi_sdio)
584 endef
585
586
587 define KernelPackage/wlcore
588 $(call KernelPackage/mac80211/Default)
589 TITLE:=TI common driver part
590 DEPENDS+= +kmod-mmc +kmod-mac80211 +@DRIVER_11N_SUPPORT
591 FILES:= \
592 $(PKG_BUILD_DIR)/drivers/net/wireless/ti/wlcore/wlcore.ko \
593 $(PKG_BUILD_DIR)/drivers/net/wireless/ti/wlcore/wlcore_sdio.ko
594 AUTOLOAD:=$(call AutoProbe,wlcore wlcore_sdio)
595 endef
596
597 define KernelPackage/wlcore/description
598 This module contains some common parts needed by TI Wireless drivers.
599 endef
600
601 define KernelPackage/wl12xx
602 $(call KernelPackage/mac80211/Default)
603 TITLE:=Driver for TI WL12xx
604 URL:=https://wireless.wiki.kernel.org/en/users/drivers/wl12xx
605 DEPENDS+= +kmod-wlcore +wl12xx-firmware
606 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ti/wl12xx/wl12xx.ko
607 AUTOLOAD:=$(call AutoProbe,wl12xx)
608 endef
609
610 define KernelPackage/wl12xx/description
611 Kernel modules for TI WL12xx
612 endef
613
614 define KernelPackage/wl18xx
615 $(call KernelPackage/mac80211/Default)
616 TITLE:=Driver for TI WL18xx
617 URL:=https://wireless.wiki.kernel.org/en/users/drivers/wl18xx
618 DEPENDS+= +kmod-wlcore +wl18xx-firmware
619 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ti/wl18xx/wl18xx.ko
620 AUTOLOAD:=$(call AutoProbe,wl18xx)
621 endef
622
623 define KernelPackage/wl18xx/description
624 Kernel modules for TI WL18xx
625 endef
626
627
628 ZD1211FW_NAME:=zd1211-firmware
629 ZD1211FW_VERSION:=1.4
630 define Download/zd1211rw
631 FILE:=$(ZD1211FW_NAME)-$(ZD1211FW_VERSION).tar.bz2
632 URL:=@SF/zd1211/
633 HASH:=866308f6f59f7075f075d4959dff2ede47735c751251fecd1496df1ba4d338e1
634 endef
635 $(eval $(call Download,zd1211rw))
636
637 define KernelPackage/zd1211rw
638 $(call KernelPackage/mac80211/Default)
639 TITLE:=Zydas ZD1211 support
640 DEPENDS+= @USB_SUPPORT +kmod-usb-core +kmod-mac80211
641 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/zydas/zd1211rw/zd1211rw.ko
642 AUTOLOAD:=$(call AutoProbe,zd1211rw)
643 endef
644
645 ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
646 config-y += \
647 CFG80211_DEBUGFS \
648 MAC80211_DEBUGFS
649 endif
650
651 ifdef CONFIG_PACKAGE_MAC80211_TRACING
652 config-y += \
653 IWLWIFI_DEVICE_TRACING
654 endif
655
656 config-$(call config_package,lib80211) += LIB80211 LIB80211_CRYPT_WEP LIB80211_CRYPT_CCMP LIB80211_CRYPT_TKIP
657
658 config-$(call config_package,airo) += AIRO
659
660 config-$(call config_package,mac80211-hwsim) += MAC80211_HWSIM
661 config-$(call config_package,mt7601u) += MT7601U
662 config-y += WL_MEDIATEK
663
664 config-$(call config_package,iwl-legacy) += IWLEGACY
665 config-$(call config_package,iwl3945) += IWL3945
666 config-$(call config_package,iwl4965) += IWL4965
667 config-$(call config_package,iwlwifi) += IWLWIFI IWLDVM IWLMVM
668 config-$(CONFIG_PACKAGE_IWLWIFI_DEBUG)+= IWLWIFI_DEBUG
669 config-$(CONFIG_PACKAGE_IWLWIFI_DEBUGFS)+= IWLWIFI_DEBUGFS
670
671 config-$(call config_package,libipw) += LIBIPW
672 config-$(call config_package,ipw2100) += IPW2100
673 config-$(call config_package,ipw2200) += IPW2200
674
675 config-$(call config_package,p54-common) += P54_COMMON
676 config-$(call config_package,p54-pci) += P54_PCI
677 config-$(call config_package,p54-usb) += P54_USB
678 config-$(call config_package,p54-spi) += P54_SPI
679
680 config-$(call config_package,hermes) += HERMES
681 config-$(call config_package,hermes-pci) += PCI_HERMES
682 config-$(call config_package,hermes-plx) += PLX_HERMES
683 config-$(call config_package,hermes-pcmcia) += PCMCIA_HERMES
684 config-y += HERMES_PRISM
685
686 config-$(call config_package,adm8211) += ADM8211
687 config-$(call config_package,libertas-sdio) += LIBERTAS LIBERTAS_SDIO
688 config-$(call config_package,libertas-usb) += LIBERTAS LIBERTAS_USB
689 config-$(call config_package,libertas-spi) += LIBERTAS LIBERTAS_SPI
690 config-$(call config_package,mwl8k) += MWL8K
691 config-$(call config_package,mwifiex-pcie) += MWIFIEX MWIFIEX_PCIE
692 config-$(call config_package,mwifiex-sdio) += MWIFIEX MWIFIEX_SDIO
693 config-$(call config_package,wlcore) += WLCORE WLCORE_SDIO
694 config-$(call config_package,wl12xx) += WL12XX
695 config-$(call config_package,wl18xx) += WL18XX
696 config-y += WL_TI WILINK_PLATFORM_DATA
697 config-$(call config_package,zd1211rw) += ZD1211RW
698 config-$(call config_package,rsi91x) += RSI_91X
699 config-$(call config_package,rsi91x-usb) += RSI_USB
700 config-$(call config_package,rsi91x-sdio) += RSI_SDIO
701
702 config-$(CONFIG_LEDS_TRIGGERS) += MAC80211_LEDS
703
704 MAKE_OPTS:= -C "$(PKG_BUILD_DIR)" \
705 $(KERNEL_MAKE_FLAGS) \
706 EXTRA_CFLAGS="-I$(PKG_BUILD_DIR)/include $(IREMAP_CFLAGS)" \
707 KLIB_BUILD="$(LINUX_DIR)" \
708 MODPROBE=true \
709 KLIB=$(TARGET_MODULES_DIR) \
710 KERNEL_SUBLEVEL=$(lastword $(subst ., ,$(KERNEL_PATCHVER))) \
711 KBUILD_LDFLAGS_MODULE_PREREQ=
712
713 define ConfigVars
714 $(subst $(space),,$(foreach opt,$(config-$(1)),CPTCFG_$(opt)=$(1)
715 ))
716 endef
717
718 define mac80211_config
719 $(call ConfigVars,m)$(call ConfigVars,y)
720 endef
721 $(eval $(call shexport,mac80211_config))
722
723 define Build/Prepare
724 rm -rf $(PKG_BUILD_DIR)
725 mkdir -p $(PKG_BUILD_DIR)
726 $(PKG_UNPACK)
727 $(Build/Patch)
728 $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(IPW2100_NAME)-$(IPW2100_VERSION).tgz
729 $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(IPW2200_NAME)-$(IPW2200_VERSION).tgz
730 $(TAR) -C $(PKG_BUILD_DIR) -xjf $(DL_DIR)/$(ZD1211FW_NAME)-$(ZD1211FW_VERSION).tar.bz2
731 rm -rf \
732 $(PKG_BUILD_DIR)/include/linux/ssb \
733 $(PKG_BUILD_DIR)/include/linux/bcma \
734 $(PKG_BUILD_DIR)/include/net/bluetooth
735
736 rm -f \
737 $(PKG_BUILD_DIR)/include/linux/cordic.h \
738 $(PKG_BUILD_DIR)/include/linux/crc8.h \
739 $(PKG_BUILD_DIR)/include/linux/eeprom_93cx6.h \
740 $(PKG_BUILD_DIR)/include/linux/wl12xx.h \
741 $(PKG_BUILD_DIR)/include/linux/spi/libertas_spi.h \
742 $(PKG_BUILD_DIR)/include/net/ieee80211.h \
743 $(PKG_BUILD_DIR)/backport-include/linux/bcm47xx_nvram.h
744
745 echo 'compat-wireless-$(PKG_VERSION)-$(PKG_RELEASE)-$(REVISION)' > $(PKG_BUILD_DIR)/compat_version
746 endef
747
748 ifneq ($(CONFIG_PACKAGE_kmod-cfg80211)$(CONFIG_PACKAGE_kmod-lib80211),)
749 define Build/Compile/kmod
750 rm -rf $(PKG_BUILD_DIR)/modules
751 +$(MAKE) $(PKG_JOBS) $(MAKE_OPTS) modules
752 endef
753 endif
754
755 #do not Build/Configure for EXTERNAL KERNEL
756 ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
757 ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"")
758 define Build/Configure
759 cmp $(PKG_BUILD_DIR)/include/linux/ath9k_platform.h $(LINUX_DIR)/include/linux/ath9k_platform.h
760 cmp $(PKG_BUILD_DIR)/include/linux/ath5k_platform.h $(LINUX_DIR)/include/linux/ath5k_platform.h
761 cmp $(PKG_BUILD_DIR)/include/linux/rt2x00_platform.h $(LINUX_DIR)/include/linux/rt2x00_platform.h
762 endef
763 endif
764 endif
765
766 define Build/Patch
767 $(if $(QUILT),rm -rf $(PKG_BUILD_DIR)/patches; mkdir -p $(PKG_BUILD_DIR)/patches)
768 $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/build,build/)
769 $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/subsys,subsys/)
770 $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath,ath/)
771 $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/rt2x00,rt2x00/)
772 $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/mwl,mwl/)
773 $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/brcm,brcm/)
774 $(if $(QUILT),touch $(PKG_BUILD_DIR)/.quilt_used)
775 endef
776
777 define Quilt/Refresh/Package
778 $(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/build,build/)
779 $(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/subsys,subsys/)
780 $(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath,ath/)
781 $(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/rt2x00,rt2x00/)
782 $(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/mwl,mwl/)
783 $(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/brcm,brcm/)
784 endef
785
786 define Build/Compile
787 $(SH_FUNC) var2file "$(call shvar,mac80211_config)" $(PKG_BUILD_DIR)/.config
788 $(MAKE) $(MAKE_OPTS) allnoconfig
789 $(call Build/Compile/kmod)
790 endef
791
792 define Build/InstallDev
793 mkdir -p \
794 $(1)/usr/include/mac80211 \
795 $(1)/usr/include/mac80211-backport \
796 $(1)/usr/include/mac80211/ath \
797 $(1)/usr/include/net/mac80211
798 $(CP) $(PKG_BUILD_DIR)/net/mac80211/*.h $(PKG_BUILD_DIR)/include/* $(1)/usr/include/mac80211/
799 $(CP) $(PKG_BUILD_DIR)/backport-include/* $(1)/usr/include/mac80211-backport/
800 $(CP) $(PKG_BUILD_DIR)/net/mac80211/rate.h $(1)/usr/include/net/mac80211/
801 $(CP) $(PKG_BUILD_DIR)/drivers/net/wireless/ath/*.h $(1)/usr/include/mac80211/ath/
802 rm -f $(1)/usr/include/mac80211-backport/linux/module.h
803 endef
804
805
806 define KernelPackage/b43/install
807 rm -rf $(1)/lib/firmware/
808 ifeq ($(CONFIG_B43_OPENFIRMWARE),y)
809 tar xzf "$(DL_DIR)/$(PKG_B43_FWV4_SOURCE)" -C "$(PKG_BUILD_DIR)"
810 else
811 tar xjf "$(DL_DIR)/$(PKG_B43_FWV4_SOURCE)" -C "$(PKG_BUILD_DIR)"
812 endif
813 $(INSTALL_DIR) $(1)/lib/firmware/
814 ifeq ($(CONFIG_B43_OPENFIRMWARE),y)
815 $(MAKE) -C "$(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/"
816 $(INSTALL_DIR) $(1)/lib/firmware/b43-open/
817 $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/ucode5.fw $(1)/lib/firmware/b43-open/ucode5.fw
818 $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/b0g0bsinitvals5.fw $(1)/lib/firmware/b43-open/b0g0bsinitvals5.fw
819 $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/b0g0initvals5.fw $(1)/lib/firmware/b43-open/b0g0initvals5.fw
820 else
821 b43-fwcutter -w $(1)/lib/firmware/ $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)
822 endif
823 ifneq ($(CONFIG_B43_FW_SQUASH),)
824 b43-fwsquash.py "$(CONFIG_B43_FW_SQUASH_PHYTYPES)" "$(CONFIG_B43_FW_SQUASH_COREREVS)" "$(1)/lib/firmware/b43"
825 endif
826 endef
827
828 define KernelPackage/cfg80211/install
829 $(INSTALL_DIR) $(1)/lib/wifi $(1)/lib/netifd/wireless
830 $(INSTALL_DATA) ./files/lib/wifi/mac80211.sh $(1)/lib/wifi
831 $(INSTALL_BIN) ./files/lib/netifd/wireless/mac80211.sh $(1)/lib/netifd/wireless
832 $(INSTALL_DIR) $(1)/etc/hotplug.d/ieee80211
833 $(INSTALL_DATA) ./files/mac80211.hotplug $(1)/etc/hotplug.d/ieee80211/10-wifi-detect
834 endef
835
836 define KernelPackage/ipw2100/install
837 $(INSTALL_DIR) $(1)/lib/firmware
838 $(INSTALL_DATA) $(PKG_BUILD_DIR)/ipw2100-$(IPW2100_VERSION)*.fw $(1)/lib/firmware
839 endef
840
841 define KernelPackage/ipw2200/install
842 $(INSTALL_DIR) $(1)/lib/firmware
843 $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(IPW2200_NAME)-$(IPW2200_VERSION)/ipw2200*.fw $(1)/lib/firmware
844 endef
845
846 define KernelPackage/zd1211rw/install
847 $(INSTALL_DIR) $(1)/lib/firmware/zd1211
848 $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(ZD1211FW_NAME)/zd1211* $(1)/lib/firmware/zd1211
849 endef
850
851 $(eval $(foreach drv,$(PKG_DRIVERS),$(call KernelPackage,$(drv))))
852 $(eval $(call KernelPackage,cfg80211))
853 $(eval $(call KernelPackage,mac80211))