0e32a2b34cd326bdd7cf11cd03f65c7b3f5da693
[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 lib80211 \
29 mac80211-hwsim \
30 mt7601u \
31 p54-common p54-pci p54-spi p54-usb \
32 rsi91x rsi91x-usb rsi91x-sdio\
33 wlcore wl12xx wl18xx \
34 zd1211rw
35
36 PKG_CONFIG_DEPENDS:= \
37 CONFIG_PACKAGE_kmod-mac80211 \
38 CONFIG_PACKAGE_MAC80211_DEBUGFS \
39 CONFIG_PACKAGE_MAC80211_MESH \
40 CONFIG_PACKAGE_MAC80211_TRACING \
41 CONFIG_PACKAGE_IWLWIFI_DEBUG \
42 CONFIG_PACKAGE_IWLWIFI_DEBUGFS \
43 CONFIG_PACKAGE_RTLWIFI_DEBUG \
44
45 include $(INCLUDE_DIR)/package.mk
46
47 WMENU:=Wireless Drivers
48
49 define KernelPackage/mac80211/Default
50 SUBMENU:=$(WMENU)
51 URL:=https://wireless.wiki.kernel.org/
52 MAINTAINER:=Felix Fietkau <nbd@nbd.name>
53 endef
54
55 config_package=$(if $(CONFIG_PACKAGE_kmod-$(1)),m)
56
57 config-y:= \
58 WLAN \
59 NL80211_TESTMODE \
60 CFG80211_WEXT \
61 CFG80211_CERTIFICATION_ONUS \
62 MAC80211_RC_MINSTREL \
63 MAC80211_RC_MINSTREL_HT \
64 MAC80211_RC_MINSTREL_VHT \
65 MAC80211_RC_DEFAULT_MINSTREL \
66 WLAN_VENDOR_ADMTEK \
67 WLAN_VENDOR_ATH \
68 WLAN_VENDOR_ATMEL \
69 WLAN_VENDOR_BROADCOM \
70 WLAN_VENDOR_CISCO \
71 WLAN_VENDOR_INTEL \
72 WLAN_VENDOR_INTERSIL \
73 WLAN_VENDOR_MARVELL \
74 WLAN_VENDOR_MEDIATEK \
75 WLAN_VENDOR_RALINK \
76 WLAN_VENDOR_REALTEK \
77 WLAN_VENDOR_RSI \
78 WLAN_VENDOR_ST \
79 WLAN_VENDOR_TI \
80 WLAN_VENDOR_ZYDAS \
81
82 config-$(call config_package,cfg80211) += CFG80211
83
84 config-$(call config_package,mac80211) += MAC80211
85 config-$(CONFIG_PACKAGE_MAC80211_MESH) += MAC80211_MESH
86
87 include ath.mk
88 include broadcom.mk
89 include intel.mk
90 include marvell.mk
91 include ralink.mk
92 include realtek.mk
93
94 PKG_CONFIG_DEPENDS += \
95 $(patsubst %,CONFIG_PACKAGE_kmod-%,$(PKG_DRIVERS))
96
97 define KernelPackage/cfg80211
98 $(call KernelPackage/mac80211/Default)
99 TITLE:=cfg80211 - wireless configuration API
100 DEPENDS+= +iw +wireless-regdb
101 FILES:= \
102 $(PKG_BUILD_DIR)/compat/compat.ko \
103 $(PKG_BUILD_DIR)/net/wireless/cfg80211.ko
104 endef
105
106 define KernelPackage/cfg80211/description
107 cfg80211 is the Linux wireless LAN (802.11) configuration API.
108 endef
109
110 define KernelPackage/mac80211
111 $(call KernelPackage/mac80211/Default)
112 TITLE:=Linux 802.11 Wireless Networking Stack
113 # +kmod-crypto-cmac is a runtime only dependency of net/mac80211/aes_cmac.c
114 DEPENDS+= +kmod-cfg80211 +hostapd-common
115 KCONFIG:=\
116 CONFIG_AVERAGE=y
117 FILES:= $(PKG_BUILD_DIR)/net/mac80211/mac80211.ko
118 MENU:=1
119 endef
120
121 define KernelPackage/mac80211/config
122 if PACKAGE_kmod-mac80211
123
124 config PACKAGE_MAC80211_DEBUGFS
125 bool "Export mac80211 internals in DebugFS"
126 select KERNEL_DEBUG_FS
127 default y
128 help
129 Select this to see extensive information about
130 the internal state of mac80211 in debugfs.
131
132 config PACKAGE_MAC80211_TRACING
133 bool "Enable tracing (mac80211 and supported drivers)"
134 select KERNEL_FTRACE
135 select KERNEL_ENABLE_DEFAULT_TRACERS
136 default n
137 help
138 Select this to enable tracing of mac80211 and
139 related wifi drivers (using trace-cmd).
140
141 config PACKAGE_MAC80211_MESH
142 bool "Enable 802.11s mesh support"
143 default y
144
145 endif
146 endef
147
148 define KernelPackage/mac80211/description
149 Generic IEEE 802.11 Networking Stack (mac80211)
150 endef
151
152 define KernelPackage/adm8211
153 $(call KernelPackage/mac80211/Default)
154 TITLE:=ADMTek 8211 support
155 DEPENDS+=@PCI_SUPPORT +kmod-mac80211 +kmod-eeprom-93cx6
156 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/admtek/adm8211.ko
157 AUTOLOAD:=$(call AutoProbe,adm8211)
158 endef
159
160 define KernelPackage/airo
161 $(call KernelPackage/mac80211/Default)
162 TITLE:=Cisco Aironet driver
163 DEPENDS+=@PCI_SUPPORT +@DRIVER_WEXT_SUPPORT +kmod-cfg80211 @TARGET_x86
164 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/cisco/airo.ko
165 AUTOLOAD:=$(call AutoProbe,airo)
166 endef
167
168 define KernelPackage/airo/description
169 Kernel support for Cisco Aironet cards
170 endef
171
172 define KernelPackage/hermes
173 $(call KernelPackage/mac80211/Default)
174 TITLE:=Hermes 802.11b chipset support
175 DEPENDS:=@PCI_SUPPORT||PCMCIA_SUPPORT +kmod-cfg80211 +@DRIVER_WEXT_SUPPORT +kmod-crypto-michael-mic
176 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intersil/orinoco/orinoco.ko
177 AUTOLOAD:=$(call AutoProbe,orinoco)
178 endef
179
180 define KernelPackage/hermes/description
181 Kernel support for Hermes 802.11b chipsets
182 endef
183
184 define KernelPackage/hermes-pci
185 $(call KernelPackage/mac80211/Default)
186 TITLE:=Intersil Prism 2.5 PCI support
187 DEPENDS:=@PCI_SUPPORT +kmod-hermes
188 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intersil/orinoco/orinoco_pci.ko
189 AUTOLOAD:=$(call AutoProbe,orinoco_pci)
190 endef
191
192 define KernelPackage/hermes-pci/description
193 Kernel modules for Intersil Prism 2.5 PCI support
194 endef
195
196 define KernelPackage/hermes-plx
197 $(call KernelPackage/mac80211/Default)
198 TITLE:=PLX9052 based PCI adaptor
199 DEPENDS:=@PCI_SUPPORT +kmod-hermes
200 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intersil/orinoco/orinoco_plx.ko
201 AUTOLOAD:=$(call AutoProbe,orinoco_plx)
202 endef
203
204 define KernelPackage/hermes-plx/description
205 Kernel modules for Hermes in PLX9052 based PCI adaptors
206 endef
207
208 define KernelPackage/hermes-pcmcia
209 $(call KernelPackage/mac80211/Default)
210 TITLE:=Hermes based PCMCIA adaptors
211 DEPENDS:=@PCMCIA_SUPPORT +kmod-hermes
212 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intersil/orinoco/orinoco_cs.ko
213 AUTOLOAD:=$(call AutoProbe,orinoco_cs)
214 endef
215
216 define KernelPackage/hermes-pcmcia/description
217 Kernel modules for Hermes based PCMCIA adaptors
218 endef
219
220
221 define KernelPackage/lib80211
222 $(call KernelPackage/mac80211/Default)
223 TITLE:=802.11 Networking stack
224 DEPENDS:=+kmod-cfg80211 +kmod-crypto-hash
225 FILES:= \
226 $(PKG_BUILD_DIR)/net/wireless/lib80211.ko \
227 $(PKG_BUILD_DIR)/net/wireless/lib80211_crypt_wep.ko \
228 $(PKG_BUILD_DIR)/net/wireless/lib80211_crypt_ccmp.ko \
229 $(PKG_BUILD_DIR)/net/wireless/lib80211_crypt_tkip.ko
230 AUTOLOAD:=$(call AutoProbe, \
231 lib80211 \
232 lib80211_crypt_wep \
233 lib80211_crypt_ccmp \
234 lib80211_crypt_tkip \
235 )
236 endef
237
238 define KernelPackage/lib80211/description
239 Kernel modules for 802.11 Networking stack
240 Includes:
241 - lib80211
242 - lib80211_crypt_wep
243 - lib80211_crypt_tkip
244 - lib80211_crytp_ccmp
245 endef
246
247
248 define KernelPackage/mac80211-hwsim
249 $(call KernelPackage/mac80211/Default)
250 TITLE:=mac80211 HW simulation device
251 DEPENDS+= +kmod-mac80211 +@DRIVER_11AC_SUPPORT +@DRIVER_11N_SUPPORT +@DRIVER_11W_SUPPORT
252 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/mac80211_hwsim.ko
253 AUTOLOAD:=$(call AutoProbe,mac80211_hwsim)
254 endef
255
256
257 define KernelPackage/mt7601u
258 $(call KernelPackage/mac80211/Default)
259 TITLE:=MT7601U-based USB dongles Wireless Driver
260 DEPENDS+= +kmod-mac80211 +@DRIVER_11N_SUPPORT @USB_SUPPORT +kmod-usb-core +mt7601u-firmware
261 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/mediatek/mt7601u/mt7601u.ko
262 AUTOLOAD:=$(call AutoProbe,mt7601u)
263 endef
264
265 define KernelPackage/p54/Default
266 $(call KernelPackage/mac80211/Default)
267 TITLE:=Prism54 Drivers
268 endef
269
270 define KernelPackage/p54/description
271 Kernel module for Prism54 chipsets (mac80211)
272 endef
273
274 define KernelPackage/p54-common
275 $(call KernelPackage/p54/Default)
276 DEPENDS+= @PCI_SUPPORT||@USB_SUPPORT||@TARGET_omap24xx +kmod-mac80211 +kmod-lib-crc-ccitt
277 TITLE+= (COMMON)
278 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intersil/p54/p54common.ko
279 endef
280
281 define KernelPackage/p54-pci
282 $(call KernelPackage/p54/Default)
283 TITLE+= (PCI)
284 DEPENDS+= @PCI_SUPPORT +kmod-p54-common +p54-pci-firmware
285 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intersil/p54/p54pci.ko
286 AUTOLOAD:=$(call AutoProbe,p54pci)
287 endef
288
289 define KernelPackage/p54-usb
290 $(call KernelPackage/p54/Default)
291 TITLE+= (USB)
292 DEPENDS+= @USB_SUPPORT +kmod-usb-core +kmod-p54-common +p54-usb-firmware
293 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intersil/p54/p54usb.ko
294 AUTOLOAD:=$(call AutoProbe,p54usb)
295 endef
296
297 define KernelPackage/p54-spi
298 $(call KernelPackage/p54/Default)
299 TITLE+= (SPI)
300 DEPENDS+= @TARGET_omap24xx +kmod-p54-common +p54-spi-firmware
301 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/intersil/p54/p54spi.ko
302 AUTOLOAD:=$(call AutoProbe,p54spi)
303 endef
304
305 define KernelPackage/rsi91x
306 $(call KernelPackage/mac80211/Default)
307 TITLE:=Redpine Signals Inc 91x WLAN driver support
308 DEPENDS+= +kmod-mac80211 +rs9113-firmware
309 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rsi/rsi_91x.ko
310 endef
311
312 define KernelPackage/rsi91x-usb
313 $(call KernelPackage/mac80211/Default)
314 TITLE:=Redpine Signals USB bus support
315 DEPENDS+= +kmod-mac80211 +kmod-usb2 +kmod-rsi91x +rs9113-firmware
316 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rsi/rsi_usb.ko
317 AUTOLOAD:=$(call AutoProbe,rsi_usb)
318 endef
319
320 define KernelPackage/rsi91x-sdio
321 $(call KernelPackage/mac80211/Default)
322 TITLE:=Redpine Signals SDIO bus support
323 DEPENDS+= +kmod-mac80211 +kmod-mmc +kmod-rsi91x +rs9113-firmware
324 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rsi/rsi_sdio.ko
325 AUTOLOAD:=$(call AutoProbe,rsi_sdio)
326 endef
327
328
329 define KernelPackage/wlcore
330 $(call KernelPackage/mac80211/Default)
331 TITLE:=TI common driver part
332 DEPENDS+= +kmod-mmc +kmod-mac80211 +@DRIVER_11N_SUPPORT
333 FILES:= \
334 $(PKG_BUILD_DIR)/drivers/net/wireless/ti/wlcore/wlcore.ko \
335 $(PKG_BUILD_DIR)/drivers/net/wireless/ti/wlcore/wlcore_sdio.ko
336 AUTOLOAD:=$(call AutoProbe,wlcore wlcore_sdio)
337 endef
338
339 define KernelPackage/wlcore/description
340 This module contains some common parts needed by TI Wireless drivers.
341 endef
342
343 define KernelPackage/wl12xx
344 $(call KernelPackage/mac80211/Default)
345 TITLE:=Driver for TI WL12xx
346 URL:=https://wireless.wiki.kernel.org/en/users/drivers/wl12xx
347 DEPENDS+= +kmod-wlcore +wl12xx-firmware
348 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ti/wl12xx/wl12xx.ko
349 AUTOLOAD:=$(call AutoProbe,wl12xx)
350 endef
351
352 define KernelPackage/wl12xx/description
353 Kernel modules for TI WL12xx
354 endef
355
356 define KernelPackage/wl18xx
357 $(call KernelPackage/mac80211/Default)
358 TITLE:=Driver for TI WL18xx
359 URL:=https://wireless.wiki.kernel.org/en/users/drivers/wl18xx
360 DEPENDS+= +kmod-wlcore +wl18xx-firmware
361 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ti/wl18xx/wl18xx.ko
362 AUTOLOAD:=$(call AutoProbe,wl18xx)
363 endef
364
365 define KernelPackage/wl18xx/description
366 Kernel modules for TI WL18xx
367 endef
368
369
370 ZD1211FW_NAME:=zd1211-firmware
371 ZD1211FW_VERSION:=1.4
372 define Download/zd1211rw
373 FILE:=$(ZD1211FW_NAME)-$(ZD1211FW_VERSION).tar.bz2
374 URL:=@SF/zd1211/
375 HASH:=866308f6f59f7075f075d4959dff2ede47735c751251fecd1496df1ba4d338e1
376 endef
377 $(eval $(call Download,zd1211rw))
378
379 define KernelPackage/zd1211rw
380 $(call KernelPackage/mac80211/Default)
381 TITLE:=Zydas ZD1211 support
382 DEPENDS+= @USB_SUPPORT +kmod-usb-core +kmod-mac80211
383 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/zydas/zd1211rw/zd1211rw.ko
384 AUTOLOAD:=$(call AutoProbe,zd1211rw)
385 endef
386
387 ifdef CONFIG_PACKAGE_MAC80211_DEBUGFS
388 config-y += \
389 CFG80211_DEBUGFS \
390 MAC80211_DEBUGFS
391 endif
392
393 ifdef CONFIG_PACKAGE_MAC80211_TRACING
394 config-y += \
395 IWLWIFI_DEVICE_TRACING
396 endif
397
398 config-$(call config_package,lib80211) += LIB80211 LIB80211_CRYPT_WEP LIB80211_CRYPT_CCMP LIB80211_CRYPT_TKIP
399
400 config-$(call config_package,airo) += AIRO
401
402 config-$(call config_package,mac80211-hwsim) += MAC80211_HWSIM
403 config-$(call config_package,mt7601u) += MT7601U
404 config-y += WL_MEDIATEK
405
406 config-$(call config_package,p54-common) += P54_COMMON
407 config-$(call config_package,p54-pci) += P54_PCI
408 config-$(call config_package,p54-usb) += P54_USB
409 config-$(call config_package,p54-spi) += P54_SPI
410
411 config-$(call config_package,hermes) += HERMES
412 config-$(call config_package,hermes-pci) += PCI_HERMES
413 config-$(call config_package,hermes-plx) += PLX_HERMES
414 config-$(call config_package,hermes-pcmcia) += PCMCIA_HERMES
415 config-y += HERMES_PRISM
416
417 config-$(call config_package,adm8211) += ADM8211
418 config-$(call config_package,wlcore) += WLCORE WLCORE_SDIO
419 config-$(call config_package,wl12xx) += WL12XX
420 config-$(call config_package,wl18xx) += WL18XX
421 config-y += WL_TI WILINK_PLATFORM_DATA
422 config-$(call config_package,zd1211rw) += ZD1211RW
423 config-$(call config_package,rsi91x) += RSI_91X
424 config-$(call config_package,rsi91x-usb) += RSI_USB
425 config-$(call config_package,rsi91x-sdio) += RSI_SDIO
426
427 config-$(CONFIG_LEDS_TRIGGERS) += MAC80211_LEDS
428
429 MAKE_OPTS:= -C "$(PKG_BUILD_DIR)" \
430 $(KERNEL_MAKE_FLAGS) \
431 EXTRA_CFLAGS="-I$(PKG_BUILD_DIR)/include $(IREMAP_CFLAGS)" \
432 KLIB_BUILD="$(LINUX_DIR)" \
433 MODPROBE=true \
434 KLIB=$(TARGET_MODULES_DIR) \
435 KERNEL_SUBLEVEL=$(lastword $(subst ., ,$(KERNEL_PATCHVER))) \
436 KBUILD_LDFLAGS_MODULE_PREREQ=
437
438 define ConfigVars
439 $(subst $(space),,$(foreach opt,$(config-$(1)),CPTCFG_$(opt)=$(1)
440 ))
441 endef
442
443 define mac80211_config
444 $(call ConfigVars,m)$(call ConfigVars,y)
445 endef
446 $(eval $(call shexport,mac80211_config))
447
448 define Build/Prepare
449 rm -rf $(PKG_BUILD_DIR)
450 mkdir -p $(PKG_BUILD_DIR)
451 $(PKG_UNPACK)
452 $(Build/Patch)
453 $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(IPW2100_NAME)-$(IPW2100_VERSION).tgz
454 $(TAR) -C $(PKG_BUILD_DIR) -xzf $(DL_DIR)/$(IPW2200_NAME)-$(IPW2200_VERSION).tgz
455 $(TAR) -C $(PKG_BUILD_DIR) -xjf $(DL_DIR)/$(ZD1211FW_NAME)-$(ZD1211FW_VERSION).tar.bz2
456 rm -rf \
457 $(PKG_BUILD_DIR)/include/linux/ssb \
458 $(PKG_BUILD_DIR)/include/linux/bcma \
459 $(PKG_BUILD_DIR)/include/net/bluetooth
460
461 rm -f \
462 $(PKG_BUILD_DIR)/include/linux/cordic.h \
463 $(PKG_BUILD_DIR)/include/linux/crc8.h \
464 $(PKG_BUILD_DIR)/include/linux/eeprom_93cx6.h \
465 $(PKG_BUILD_DIR)/include/linux/wl12xx.h \
466 $(PKG_BUILD_DIR)/include/linux/spi/libertas_spi.h \
467 $(PKG_BUILD_DIR)/include/net/ieee80211.h \
468 $(PKG_BUILD_DIR)/backport-include/linux/bcm47xx_nvram.h
469
470 echo 'compat-wireless-$(PKG_VERSION)-$(PKG_RELEASE)-$(REVISION)' > $(PKG_BUILD_DIR)/compat_version
471 endef
472
473 ifneq ($(CONFIG_PACKAGE_kmod-cfg80211)$(CONFIG_PACKAGE_kmod-lib80211),)
474 define Build/Compile/kmod
475 rm -rf $(PKG_BUILD_DIR)/modules
476 +$(MAKE) $(PKG_JOBS) $(MAKE_OPTS) modules
477 endef
478 endif
479
480 #do not Build/Configure for EXTERNAL KERNEL
481 ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
482 ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"")
483 define Build/Configure
484 cmp $(PKG_BUILD_DIR)/include/linux/ath9k_platform.h $(LINUX_DIR)/include/linux/ath9k_platform.h
485 cmp $(PKG_BUILD_DIR)/include/linux/ath5k_platform.h $(LINUX_DIR)/include/linux/ath5k_platform.h
486 cmp $(PKG_BUILD_DIR)/include/linux/rt2x00_platform.h $(LINUX_DIR)/include/linux/rt2x00_platform.h
487 endef
488 endif
489 endif
490
491 define Build/Patch
492 $(if $(QUILT),rm -rf $(PKG_BUILD_DIR)/patches; mkdir -p $(PKG_BUILD_DIR)/patches)
493 $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/build,build/)
494 $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/subsys,subsys/)
495 $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath,ath/)
496 $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/rt2x00,rt2x00/)
497 $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/mwl,mwl/)
498 $(call PatchDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/brcm,brcm/)
499 $(if $(QUILT),touch $(PKG_BUILD_DIR)/.quilt_used)
500 endef
501
502 define Quilt/Refresh/Package
503 $(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/build,build/)
504 $(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/subsys,subsys/)
505 $(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/ath,ath/)
506 $(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/rt2x00,rt2x00/)
507 $(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/mwl,mwl/)
508 $(call Quilt/RefreshDir,$(PKG_BUILD_DIR),$(PATCH_DIR)/brcm,brcm/)
509 endef
510
511 define Build/Compile
512 $(SH_FUNC) var2file "$(call shvar,mac80211_config)" $(PKG_BUILD_DIR)/.config
513 $(MAKE) $(MAKE_OPTS) allnoconfig
514 $(call Build/Compile/kmod)
515 endef
516
517 define Build/InstallDev
518 mkdir -p \
519 $(1)/usr/include/mac80211 \
520 $(1)/usr/include/mac80211-backport \
521 $(1)/usr/include/mac80211/ath \
522 $(1)/usr/include/net/mac80211
523 $(CP) $(PKG_BUILD_DIR)/net/mac80211/*.h $(PKG_BUILD_DIR)/include/* $(1)/usr/include/mac80211/
524 $(CP) $(PKG_BUILD_DIR)/backport-include/* $(1)/usr/include/mac80211-backport/
525 $(CP) $(PKG_BUILD_DIR)/net/mac80211/rate.h $(1)/usr/include/net/mac80211/
526 $(CP) $(PKG_BUILD_DIR)/drivers/net/wireless/ath/*.h $(1)/usr/include/mac80211/ath/
527 rm -f $(1)/usr/include/mac80211-backport/linux/module.h
528 endef
529
530
531 define KernelPackage/b43/install
532 rm -rf $(1)/lib/firmware/
533 ifeq ($(CONFIG_B43_OPENFIRMWARE),y)
534 tar xzf "$(DL_DIR)/$(PKG_B43_FWV4_SOURCE)" -C "$(PKG_BUILD_DIR)"
535 else
536 tar xjf "$(DL_DIR)/$(PKG_B43_FWV4_SOURCE)" -C "$(PKG_BUILD_DIR)"
537 endif
538 $(INSTALL_DIR) $(1)/lib/firmware/
539 ifeq ($(CONFIG_B43_OPENFIRMWARE),y)
540 $(MAKE) -C "$(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/"
541 $(INSTALL_DIR) $(1)/lib/firmware/b43-open/
542 $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/ucode5.fw $(1)/lib/firmware/b43-open/ucode5.fw
543 $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/b0g0bsinitvals5.fw $(1)/lib/firmware/b43-open/b0g0bsinitvals5.fw
544 $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/b0g0initvals5.fw $(1)/lib/firmware/b43-open/b0g0initvals5.fw
545 else
546 b43-fwcutter -w $(1)/lib/firmware/ $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)
547 endif
548 ifneq ($(CONFIG_B43_FW_SQUASH),)
549 b43-fwsquash.py "$(CONFIG_B43_FW_SQUASH_PHYTYPES)" "$(CONFIG_B43_FW_SQUASH_COREREVS)" "$(1)/lib/firmware/b43"
550 endif
551 endef
552
553 define KernelPackage/cfg80211/install
554 $(INSTALL_DIR) $(1)/lib/wifi $(1)/lib/netifd/wireless
555 $(INSTALL_DATA) ./files/lib/wifi/mac80211.sh $(1)/lib/wifi
556 $(INSTALL_BIN) ./files/lib/netifd/wireless/mac80211.sh $(1)/lib/netifd/wireless
557 $(INSTALL_DIR) $(1)/etc/hotplug.d/ieee80211
558 $(INSTALL_DATA) ./files/mac80211.hotplug $(1)/etc/hotplug.d/ieee80211/10-wifi-detect
559 endef
560
561 define KernelPackage/zd1211rw/install
562 $(INSTALL_DIR) $(1)/lib/firmware/zd1211
563 $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(ZD1211FW_NAME)/zd1211* $(1)/lib/firmware/zd1211
564 endef
565
566 $(eval $(foreach drv,$(PKG_DRIVERS),$(call KernelPackage,$(drv))))
567 $(eval $(call KernelPackage,cfg80211))
568 $(eval $(call KernelPackage,mac80211))