mac80211: fix client mode
[openwrt.git] / package / mac80211 / Makefile
1 #
2 # Copyright (C) 2007-2010 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:=2010-02-16
14 PKG_RELEASE:=3
15 PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
16 # http://www.orbit-lab.org/kernel/compat-wireless-2.6/2010/11 \
17 # http://wireless.kernel.org/download/compat-wireless-2.6
18 PKG_MD5SUM:=190060a705c2b78e9b0bc873a8803b37
19
20 PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
21 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
22
23 PKG_CONFIG_DEPENDS:= \
24 CONFIG_PACKAGE_kmod-mac80211 \
25 CONFIG_PACKAGE_MAC80211_DEBUGFS \
26 CONFIG_PACKAGE_ATH_DEBUG \
27 CONFIG_ATH_USER_REGD \
28
29 include $(INCLUDE_DIR)/package.mk
30
31 WMENU:=Wireless Drivers
32
33 define KernelPackage/mac80211/Default
34 SUBMENU:=$(WMENU)
35 URL:=http://linuxwireless.org/
36 MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
37 DEPENDS:=@LINUX_2_6 @!TARGET_avr32 @(!(TARGET_ep93xx||TARGET_ps3||TARGET_pxcab)||BROKEN)
38 endef
39
40 define KernelPackage/mac80211
41 $(call KernelPackage/mac80211/Default)
42 TITLE:=Linux 802.11 Wireless Networking Stack
43 DEPENDS+= +kmod-crypto-core +kmod-crypto-arc4 +kmod-crypto-aes +wireless-tools +iw @!LINUX_2_6_25
44 FILES:= \
45 $(PKG_BUILD_DIR)/compat/compat.$(LINUX_KMOD_SUFFIX) \
46 $(PKG_BUILD_DIR)/compat/compat_firmware_class.$(LINUX_KMOD_SUFFIX) \
47 $(PKG_BUILD_DIR)/net/mac80211/mac80211.$(LINUX_KMOD_SUFFIX) \
48 $(PKG_BUILD_DIR)/net/wireless/cfg80211.$(LINUX_KMOD_SUFFIX)
49 AUTOLOAD:=$(call AutoLoad,20,compat compat_firmware_class cfg80211 mac80211)
50 endef
51
52 define KernelPackage/mac80211/config
53 source "$(SOURCE)/Config.in"
54 endef
55
56 define KernelPackage/mac80211/description
57 Linux 802.11 Wireless Networking Stack
58 endef
59
60 # Prism54 drivers
61 P54PCIFW:=2.13.12.0.arm
62 P54USBFW:=2.13.24.0.lm87.arm
63
64 define Download/p54usb
65 FILE:=$(P54USBFW)
66 URL:=http://daemonizer.de/prism54/prism54-fw/fw-usb
67 MD5SUM:=8e8ab005a4f8f0123bcdc51bc25b47f6
68 endef
69 $(eval $(call Download,p54usb))
70
71 define Download/p54pci
72 FILE:=$(P54PCIFW)
73 URL:=http://daemonizer.de/prism54/prism54-fw/fw-softmac
74 MD5SUM:=ff7536af2092b1c4b21315bd103ef4c4
75 endef
76 $(eval $(call Download,p54pci))
77
78 define KernelPackage/p54/Default
79 $(call KernelPackage/mac80211/Default)
80 TITLE:=Prism54 Drivers
81 endef
82
83 define KernelPackage/p54/description
84 Kernel module for Prism54 chipsets (mac80211)
85 endef
86
87 define KernelPackage/p54-common
88 $(call KernelPackage/p54/Default)
89 DEPENDS+= @PCI_SUPPORT||@USB_SUPPORT +kmod-mac80211
90 TITLE+= (COMMON)
91 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/p54/p54common.$(LINUX_KMOD_SUFFIX)
92 AUTOLOAD:=$(call AutoLoad,30,p54common)
93 endef
94
95 define KernelPackage/p54-pci
96 $(call KernelPackage/p54/Default)
97 TITLE+= (PCI)
98 DEPENDS+= @PCI_SUPPORT +kmod-p54-common
99 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/p54/p54pci.$(LINUX_KMOD_SUFFIX)
100 AUTOLOAD:=$(call AutoLoad,31,p54pci)
101 endef
102
103 define KernelPackage/p54-usb
104 $(call KernelPackage/p54/Default)
105 TITLE+= (USB)
106 DEPENDS+= @USB_SUPPORT +kmod-usb-core +kmod-p54-common
107 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/p54/p54usb.$(LINUX_KMOD_SUFFIX)
108 AUTOLOAD:=$(call AutoLoad,31,p54usb)
109 endef
110
111 # Ralink rt2x00 drivers
112 RT61FW:=RT61_Firmware_V1.2.zip
113 RT71FW:=RT71W_Firmware_V1.8.zip
114 RT2860FW:=RT2860_Firmware_V11.zip
115 RT2870FW:=RT2870_Firmware_V8.zip
116
117 define Download/rt61
118 FILE:=$(RT61FW)
119 URL:=http://www.ralinktech.com.tw/data/
120 MD5SUM:=d4c690c93b470bc9a681297c2adc6281
121 endef
122 $(eval $(call Download,rt61))
123
124 define Download/rt71w
125 FILE:=$(RT71FW)
126 URL:=http://www.ralinktech.com.tw/data/
127 MD5SUM:=1e7a5dc574e0268574fcda3fd5cf52f7
128 endef
129 $(eval $(call Download,rt71w))
130
131 define Download/rt2860
132 FILE:=$(RT2860FW)
133 URL:=http://www.ralinktech.com.tw/data/drivers
134 MD5SUM:=440a81756a52c53528f16faa41c40124
135 endef
136 $(eval $(call Download,rt2860))
137
138 define Download/rt2870
139 FILE:=$(RT2870FW)
140 URL:=http://www.ralinktech.com.tw/data/drivers
141 MD5SUM:=a7aae1d8cfd68e4d86a73000df0b6584
142 endef
143 $(eval $(call Download,rt2870))
144
145 AR9170FW:=ar9170.fw
146
147 define Download/ar9170
148 FILE:=$(AR9170FW)
149 URL:=http://www.kernel.org/pub/linux/kernel/people/mcgrof/firmware/ar9170
150 MD5SUM:=34feec4ec0eae3bb92c7c1ea2dfb4530
151 endef
152 $(eval $(call Download,ar9170))
153
154 define KernelPackage/rt2x00/Default
155 $(call KernelPackage/mac80211/Default)
156 TITLE:=Ralink Drivers for RT2x00 cards
157 endef
158
159 define KernelPackage/rt2x00-lib
160 $(call KernelPackage/rt2x00/Default)
161 DEPENDS+= @(PCI_SUPPORT||USB_SUPPORT) +kmod-mac80211 +kmod-crc-itu-t
162 TITLE+= (LIB)
163 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00lib.$(LINUX_KMOD_SUFFIX)
164 AUTOLOAD:=$(call AutoLoad,25,rt2x00lib)
165 endef
166
167 define KernelPackage/rt2x00-pci
168 $(call KernelPackage/rt2x00/Default)
169 DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-lib +kmod-eeprom-93cx6
170 TITLE+= (PCI)
171 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00pci.$(LINUX_KMOD_SUFFIX)
172 AUTOLOAD:=$(call AutoLoad,26,rt2x00pci)
173 endef
174
175 define KernelPackage/rt2x00-usb
176 $(call KernelPackage/rt2x00/Default)
177 DEPENDS+= @USB_SUPPORT +kmod-rt2x00-lib +kmod-usb-core
178 TITLE+= (USB)
179 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2x00usb.$(LINUX_KMOD_SUFFIX)
180 AUTOLOAD:=$(call AutoLoad,26,rt2x00usb)
181 endef
182
183 define KernelPackage/rt2800-lib
184 $(call KernelPackage/rt2x00/Default)
185 DEPENDS+= @(PCI_SUPPORT||USB_SUPPORT) +kmod-rt2x00-lib +USB_SUPPORT:kmod-rt2x00-usb
186 TITLE+= (rt2800 LIB)
187 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2800lib.$(LINUX_KMOD_SUFFIX)
188 AUTOLOAD:=$(call AutoLoad,27,rt2800lib)
189 endef
190
191 define KernelPackage/rt2400-pci
192 $(call KernelPackage/rt2x00/Default)
193 DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-pci
194 TITLE+= (RT2400 PCI)
195 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2400pci.$(LINUX_KMOD_SUFFIX)
196 AUTOLOAD:=$(call AutoLoad,27,rt2400pci)
197 endef
198
199 define KernelPackage/rt2500-pci
200 $(call KernelPackage/rt2x00/Default)
201 DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-pci
202 TITLE+= (RT2500 PCI)
203 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2500pci.$(LINUX_KMOD_SUFFIX)
204 AUTOLOAD:=$(call AutoLoad,27,rt2500pci)
205 endef
206
207 define KernelPackage/rt2500-usb
208 $(call KernelPackage/rt2x00/Default)
209 DEPENDS+= @USB_SUPPORT +kmod-rt2x00-usb
210 TITLE+= (RT2500 USB)
211 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2500usb.$(LINUX_KMOD_SUFFIX)
212 AUTOLOAD:=$(call AutoLoad,27,rt2500usb)
213 endef
214
215 define KernelPackage/rt61-pci
216 $(call KernelPackage/rt2x00/Default)
217 DEPENDS+= @PCI_SUPPORT +kmod-rt2x00-pci
218 TITLE+= (RT2x61 PCI)
219 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt61pci.$(LINUX_KMOD_SUFFIX)
220 AUTOLOAD:=$(call AutoLoad,27,rt61pci)
221 endef
222
223 define KernelPackage/rt73-usb
224 $(call KernelPackage/rt2x00/Default)
225 DEPENDS+= @USB_SUPPORT +kmod-rt2x00-usb
226 TITLE+= (RT73 USB)
227 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt73usb.$(LINUX_KMOD_SUFFIX)
228 AUTOLOAD:=$(call AutoLoad,27,rt73usb)
229 endef
230
231 define KernelPackage/rt2800-pci
232 $(call KernelPackage/rt2x00/Default)
233 DEPENDS+= +kmod-rt2x00-pci +kmod-rt2800-lib +kmod-crc-ccitt
234 TITLE+= (RT2860 PCI)
235 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2800pci.$(LINUX_KMOD_SUFFIX)
236 AUTOLOAD:=$(call AutoLoad,28,rt2800pci)
237 endef
238
239 define KernelPackage/rt2800-usb
240 $(call KernelPackage/rt2x00/Default)
241 DEPENDS+= +kmod-rt2x00-usb +kmod-rt2800-lib +kmod-crc-ccitt
242 TITLE+= (RT2870 USB)
243 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rt2x00/rt2800usb.$(LINUX_KMOD_SUFFIX)
244 AUTOLOAD:=$(call AutoLoad,28,rt2800usb)
245 endef
246
247 define KernelPackage/rtl818x/Default
248 $(call KernelPackage/mac80211/Default)
249 TITLE:=Realtek Drivers for RTL818x devices
250 URL:=http://wireless.kernel.org/en/users/Drivers/rtl8187
251 DEPENDS+= +kmod-eeprom-93cx6 +kmod-mac80211
252 endef
253
254 define KernelPackage/rtl8180
255 $(call KernelPackage/rtl818x/Default)
256 DEPENDS+= @PCI_SUPPORT
257 TITLE+= (RTL8180 PCI)
258 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rtl818x/rtl8180.$(LINUX_KMOD_SUFFIX)
259 AUTOLOAD:=$(call AutoLoad,27,rtl8180)
260 endef
261
262 define KernelPackage/rtl8187
263 $(call KernelPackage/rtl818x/Default)
264 DEPENDS+= @USB_SUPPORT
265 TITLE+= (RTL8187 USB)
266 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/rtl818x/rtl8187.$(LINUX_KMOD_SUFFIX)
267 AUTOLOAD:=$(call AutoLoad,27,rtl8187)
268 endef
269
270 ZD1211FW_NAME:=zd1211-firmware
271 ZD1211FW_VERSION:=1.4
272 define Download/zd1211rw
273 FILE:=$(ZD1211FW_NAME)-$(ZD1211FW_VERSION).tar.bz2
274 URL:=@SF/zd1211/
275 MD5SUM:=19f28781d76569af8551c9d11294c870
276 endef
277 $(eval $(call Download,zd1211rw))
278
279 define KernelPackage/zd1211rw
280 $(call KernelPackage/mac80211/Default)
281 TITLE:=Zydas ZD1211 support
282 DEPENDS+= @USB_SUPPORT +kmod-usb-core +kmod-mac80211
283 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/zd1211rw/zd1211rw.$(LINUX_KMOD_SUFFIX)
284 AUTOLOAD:=$(call AutoLoad,60,zd1211rw)
285 endef
286
287 define KernelPackage/ath/config
288
289 config ATH_USER_REGD
290 bool "Force Atheros drivers to respect the user's regdomain settings"
291 depends on PACKAGE_kmod-ath
292 help
293 Atheros' idea of regulatory handling is that the EEPROM of the card defines
294 the regulatory limits and the user is only allowed to restrict the settings
295 even further, even if the country allows frequencies or power levels that
296 are forbidden by the EEPROM settings.
297 Select this option if you want the driver to respect the user's decision about
298 regulatory settings.
299
300 config PACKAGE_ATH_DEBUG
301 bool "Atheros wireless debugging"
302 depends on PACKAGE_kmod-ath
303 help
304 Say Y, if you want to debug atheros wireless drivers.
305 Right now only ath9k makes use of this.
306 endef
307
308 define KernelPackage/ath
309 $(call KernelPackage/mac80211/Default)
310 TITLE:=Atheros common driver part
311 DEPENDS+= @PCI_SUPPORT +kmod-mac80211
312 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath.$(LINUX_KMOD_SUFFIX)
313 AUTOLOAD:=$(call AutoLoad,26,ath)
314 endef
315
316 define KernelPackage/ath/description
317 This module contains some common parts needed by Atheros Wireless drivers.
318 endef
319
320 define KernelPackage/ath5k
321 $(call KernelPackage/mac80211/Default)
322 TITLE:=Atheros 5xxx wireless cards support
323 URL:=http://linuxwireless.org/en/users/Drivers/ath5k
324 DEPENDS+= +kmod-ath
325 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath5k/ath5k.$(LINUX_KMOD_SUFFIX)
326 AUTOLOAD:=$(call AutoLoad,27,ath5k)
327 endef
328
329 define KernelPackage/ath5k/description
330 This module adds support for wireless adapters based on
331 Atheros 5xxx chipset.
332 endef
333
334 define KernelPackage/ath9k
335 $(call KernelPackage/mac80211/Default)
336 TITLE:=Atheros 802.11n wireless cards support
337 URL:=http://linuxwireless.org/en/users/Drivers/ath9k
338 DEPENDS+= +kmod-ath
339 FILES:= \
340 $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k_common.$(LINUX_KMOD_SUFFIX) \
341 $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k_hw.$(LINUX_KMOD_SUFFIX) \
342 $(PKG_BUILD_DIR)/drivers/net/wireless/ath/ath9k/ath9k.$(LINUX_KMOD_SUFFIX)
343 AUTOLOAD:=$(call AutoLoad,27,ath9k_hw ath9k_common ath9k)
344 endef
345
346 define KernelPackage/ath9k/description
347 This module adds support for wireless adapters based on
348 Atheros IEEE 802.11n AR5008 and AR9001 family of chipsets.
349 endef
350
351 define KernelPackage/ath9k/config
352 source "$(SOURCE)/Config.in.ath9k"
353 endef
354
355 USB8388FW_NAME:=usb8388
356 USB8388FW_VERSION:=5.110.22.p23
357
358 define Download/usb8388
359 URL:=http://dev.laptop.org/pub/firmware/libertas/
360 FILE:=$(USB8388FW_NAME)-$(USB8388FW_VERSION).bin
361 MD5SUM=5e38f55719df3d0c58dd3bd02575a09c
362 endef
363 $(eval $(call Download,usb8388))
364
365 define KernelPackage/libertas
366 $(call KernelPackage/mac80211/Default)
367 DEPENDS+= @USB_SUPPORT +kmod-mac80211 +kmod-usb-core +kmod-lib80211
368 TITLE:=Marvell 88W8015 Wireless Driver
369 FILES:= \
370 $(PKG_BUILD_DIR)/drivers/net/wireless/libertas/libertas.$(LINUX_KMOD_SUFFIX) \
371 $(PKG_BUILD_DIR)/drivers/net/wireless/libertas/usb8xxx.$(LINUX_KMOD_SUFFIX)
372 AUTOLOAD:=$(call AutoLoad,27,libertas usb8xxx)
373 endef
374
375
376 define KernelPackage/ar9170
377 $(call KernelPackage/mac80211/Default)
378 TITLE:=Atheros AR9170 802.11n USB support
379 URL:=http://wireless.kernel.org/en/users/Drivers/ar9170
380 DEPENDS+= @USB_SUPPORT @!LINUX_2_6_25 +kmod-ath +kmod-usb-core
381 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/ath/ar9170/ar9170usb.$(LINUX_KMOD_SUFFIX)
382 AUTOLOAD:=$(call AutoLoad,27,ar9170usb)
383 endef
384
385 define KernelPackage/ar9170/description
386 This is a driver for the Atheros "otus" 802.11n USB devices.
387 endef
388
389 define KernelPackage/mac80211-hwsim
390 $(call KernelPackage/mac80211/Default)
391 TITLE:=mac80211 HW simulation device
392 DEPENDS+= +kmod-mac80211
393 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/mac80211_hwsim.$(LINUX_KMOD_SUFFIX)
394 AUTOLOAD:=$(call AutoLoad,60,mac80211_hwsim)
395 endef
396
397 #Broadcom firmware
398 ifneq ($(CONFIG_B43_EXPERIMENTAL),)
399 PKG_B43_FWV4_NAME:=broadcom-wl
400 PKG_B43_FWV4_VERSION:=4.178.10.4
401 PKG_B43_FWV4_OBJECT:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION)/linux/wl.o
402 PKG_B43_FWV4_SOURCE:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION).tar.bz2
403 PKG_B43_FWV4_SOURCE_URL:=http://mirror2.openwrt.org/sources/
404 PKG_B43_FWV4_MD5SUM:=14477e8cbbb91b11896affac9b219fdb
405 else
406 PKG_B43_FWV4_NAME:=broadcom-wl
407 PKG_B43_FWV4_VERSION:=4.150.10.5
408 PKG_B43_FWV4_OBJECT:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION)/driver/wl_apsta_mimo.o
409 PKG_B43_FWV4_SOURCE:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION).tar.bz2
410 PKG_B43_FWV4_SOURCE_URL:=http://mirror2.openwrt.org/sources/
411 PKG_B43_FWV4_MD5SUM:=0c6ba9687114c6b598e8019e262d9a60
412 endif
413 ifneq ($(CONFIG_B43_OPENFIRMWARE),)
414 PKG_B43_FWV4_NAME:=broadcom-wl
415 PKG_B43_FWV4_VERSION:=5.2
416 PKG_B43_FWV4_OBJECT:=openfwwf-$(PKG_B43_FWV4_VERSION)
417 PKG_B43_FWV4_SOURCE:=openfwwf-$(PKG_B43_FWV4_VERSION).tar.gz
418 PKG_B43_FWV4_SOURCE_URL:=http://www.ing.unibs.it/openfwwf/firmware/
419 PKG_B43_FWV4_MD5SUM:=e045a135453274e439ae183f8498b0fa
420 endif
421
422
423 PKG_B43_FWV3_NAME:=wl_apsta
424 PKG_B43_FWV3_VERSION:=3.130.20.0
425 PKG_B43_FWV3_SOURCE:=$(PKG_B43_FWV3_NAME)-$(PKG_B43_FWV3_VERSION).o
426 PKG_B43_FWV3_SOURCE_URL:=http://downloads.openwrt.org/sources/
427 PKG_B43_FWV3_MD5SUM:=e08665c5c5b66beb9c3b2dd54aa80cb3
428
429 ifneq ($(CONFIG_B43_OPENFIRMWARE),)
430 PKG_B43_FWCUTTER_NAME:=b43-fwcutter
431 PKG_B43_FWCUTTER_VERSION:=3e69531aa65b8f664a0ab00dfc3e2eefeb0cb417
432 PKG_B43_FWCUTTER_SOURCE:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION).tar.bz2
433 PKG_B43_FWCUTTER_PROTO:=git
434 PKG_B43_FWCUTTER_SOURCE_URL:=http://git.bu3sch.de/git/b43-tools.git
435 PKG_B43_FWCUTTER_SUBDIR:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION)
436 PKG_B43_FWCUTTER_OBJECT:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION)/fwcutter/
437 else
438 PKG_B43_FWCUTTER_NAME:=b43-fwcutter
439 PKG_B43_FWCUTTER_VERSION:=012
440 PKG_B43_FWCUTTER_SOURCE:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION).tar.bz2
441 PKG_B43_FWCUTTER_PROTO:=default
442 PKG_B43_FWCUTTER_SOURCE_URL:=http://bu3sch.de/b43/fwcutter/
443 PKG_B43_FWCUTTER_MD5SUM:=69eadf67b459f313a8d6b37aaabef96c
444 PKG_B43_FWCUTTER_SUBDIR:=b43-fwcutter-$(PKG_B43_FWCUTTER_VERSION)
445 PKG_B43_FWCUTTER_OBJECT:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION)/
446 endif
447
448 define Download/b43-common
449 FILE:=$(PKG_B43_FWCUTTER_SOURCE)
450 URL:=$(PKG_B43_FWCUTTER_SOURCE_URL)
451 MD5SUM:=$(PKG_B43_FWCUTTER_MD5SUM)
452 PROTO:=$(PKG_B43_FWCUTTER_PROTO)
453 VERSION:=$(PKG_B43_FWCUTTER_VERSION)
454 SUBDIR:=$(PKG_B43_FWCUTTER_SUBDIR)
455 endef
456 $(eval $(call Download,b43-common))
457
458 define Download/b43
459 FILE:=$(PKG_B43_FWV4_SOURCE)
460 URL:=$(PKG_B43_FWV4_SOURCE_URL)
461 MD5SUM:=$(PKG_B43_FWV4_MD5SUM)
462 endef
463 $(eval $(call Download,b43))
464
465 define Download/b43legacy
466 FILE:=$(PKG_B43_FWV3_SOURCE)
467 URL:=$(PKG_B43_FWV3_SOURCE_URL)
468 MD5SUM:=$(PKG_B43_FWV3_MD5SUM)
469 endef
470 $(eval $(call Download,b43legacy))
471
472 define KernelPackage/b43-common
473 $(call KernelPackage/mac80211/Default)
474 TITLE:=Generic stuff for Broadcom wireless devices
475 URL:=http://linuxwireless.org/en/users/Drivers/b43
476 KCONFIG:= \
477 CONFIG_HW_RANDOM=y
478 DEPENDS+= +kmod-mac80211 +!(TARGET_brcm47xx||TARGET_brcm63xx):kmod-ssb
479 endef
480
481 define KernelPackage/b43
482 $(call KernelPackage/b43-common)
483 TITLE:=Broadcom 43xx wireless support
484 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/b43/b43.$(LINUX_KMOD_SUFFIX)
485 AUTOLOAD:=$(call AutoLoad,30,b43)
486 endef
487
488 define KernelPackage/b43/config
489 source "$(SOURCE)/Config.in.b43"
490 endef
491
492 define KernelPackage/b43/description
493 Kernel module for Broadcom 43xx wireless support (mac80211 stack) new
494 endef
495
496 define KernelPackage/b43legacy
497 $(call KernelPackage/b43-common)
498 TITLE:=Broadcom 43xx-legacy wireless support
499 FILES:=$(PKG_BUILD_DIR)/drivers/net/wireless/b43legacy/b43legacy.$(LINUX_KMOD_SUFFIX)
500 AUTOLOAD:=$(call AutoLoad,30,b43legacy)
501 endef
502
503 define KernelPackage/b43legacy/config
504 source "$(SOURCE)/Config.in.b43legacy"
505 endef
506
507 define KernelPackage/b43legacy/description
508 Kernel module for Broadcom 43xx-legacy wireless support (mac80211 stack) new
509 endef
510
511 BUILDFLAGS:= \
512 -I$(PKG_BUILD_DIR)/include \
513 $(foreach opt,$(CONFOPTS),-DCONFIG_$(opt)) \
514 $(if $(CONFIG_PCI),-DCONFIG_B43_PCI_AUTOSELECT -DCONFIG_B43_PCICORE_AUTOSELECT -DCONFIG_SSB_DRIVER_PCICORE_POSSIBLE -DCONFIG_SSB_DRIVER_PCICORE) \
515 $(if $(CONFIG_PCI),-DCONFIG_SSB_PCIHOST_POSSIBLE -DCONFIG_SSB_PCIHOST) \
516 $(if $(CONFIG_PCI),-DCONFIG_SSB_SPROM) \
517 $(if $(CONFIG_LEDS_TRIGGERS), -DCONFIG_MAC80211_LEDS -DCONFIG_LEDS_TRIGGERS -DCONFIG_B43_LEDS -DCONFIG_B43LEGACY_LEDS -DCONFIG_AR9170_LEDS) \
518 -DCONFIG_B43_HWRNG -DCONFIG_B43LEGACY_HWRNG \
519 $(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),-DCONFIG_MAC80211_DEBUGFS -DCONFIG_ATH9K_DEBUGFS) \
520 $(if $(CONFIG_PACKAGE_ATH_DEBUG),-DCONFIG_ATH_DEBUG) \
521 -D__CONFIG_MAC80211_RC_DEFAULT=minstrel \
522 $(if $(CONFIG_ATH_USER_REGD),-DATH_USER_REGD=1)
523
524 MAKE_OPTS:= \
525 CROSS_COMPILE="$(KERNEL_CROSS)" \
526 ARCH="$(LINUX_KARCH)" \
527 EXTRA_CFLAGS="$(BUILDFLAGS)" \
528 $(foreach opt,$(CONFOPTS),CONFIG_$(opt)=m) \
529 CONFIG_MAC80211_RC_PID=y \
530 CONFIG_MAC80211_RC_MINSTREL=y \
531 CONFIG_MAC80211_LEDS=$(CONFIG_LEDS_TRIGGERS) \
532 CONFIG_MAC80211_DEBUGFS=$(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),y) \
533 CONFIG_B43_PCMCIA=n CONFIG_B43_PIO=n \
534 CONFIG_B43_PCI_AUTOSELECT=$(if $(CONFIG_PCI),y) \
535 CONFIG_B43_PCICORE_AUTOSELECT=$(if $(CONFIG_PCI),y) \
536 CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=$(if $(CONFIG_PCI),y) \
537 CONFIG_SSB_DRIVER_PCICORE=$(if $(CONFIG_PCI),y) \
538 CONFIG_SSB_PCIHOST_POSSIBLE=$(if $(CONFIG_PCI),y) \
539 CONFIG_SSB_PCIHOST=$(if $(CONFIG_PCI),y) \
540 CONFIG_B43LEGACY_LEDS=$(CONFIG_LEDS_TRIGGERS) \
541 CONFIG_B43_LEDS=$(CONFIG_LEDS_TRIGGERS) \
542 CONFIG_B43_HWRNG=$(if $(CONFIG_HW_RANDOM),y) \
543 CONFIG_B43LEGACY_HWRNG=$(if $(CONFIG_HW_RANDOM),y) \
544 CONFIG_B43=$(if $(CONFIG_PACKAGE_kmod-b43),m) \
545 CONFIG_B43LEGACY=$(if $(CONFIG_PACKAGE_kmod-b43legacy),m) \
546 CONFIG_ATH_COMMON=$(if $(CONFIG_PACKAGE_kmod-ath),m) \
547 CONFIG_ATH_DEBUG=$(if $(CONFIG_PACKAGE_ATH_DEBUG),y) \
548 CONFIG_ATH5K=$(if $(CONFIG_PACKAGE_kmod-ath5k),m) \
549 CONFIG_ATH9K=$(if $(CONFIG_PACKAGE_kmod-ath9k),m) \
550 CONFIG_ATH9K_DEBUGFS=$(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),y) \
551 CONFIG_ZD1211RW=$(if $(CONFIG_PACKAGE_kmod-zd1211rw),m) \
552 CONFIG_P54_COMMON=$(if $(CONFIG_PACKAGE_kmod-p54-common),m) \
553 CONFIG_P54_PCI=$(if $(CONFIG_PACKAGE_kmod-p54-pci),m) \
554 CONFIG_P54_USB=$(if $(CONFIG_PACKAGE_kmod-p54-usb),m) \
555 CONFIG_P54_SPI= \
556 CONFIG_RT2X00=$(if $(CONFIG_PACKAGE_kmod-rt2x00-lib),m) \
557 CONFIG_RT2X00_LIB_PCI=$(if $(CONFIG_PACKAGE_kmod-rt2x00-pci),m) \
558 CONFIG_RT2X00_LIB_USB=$(if $(CONFIG_PACKAGE_kmod-rt2x00-usb),m) \
559 CONFIG_RT2400PCI=$(if $(CONFIG_PACKAGE_kmod-rt2400-pci),m) \
560 CONFIG_RT2500PCI=$(if $(CONFIG_PACKAGE_kmod-rt2500-pci),m) \
561 CONFIG_RT2500USB=$(if $(CONFIG_PACKAGE_kmod-rt2500-usb),m) \
562 CONFIG_RT61PCI=$(if $(CONFIG_PACKAGE_kmod-rt61-pci),m) \
563 CONFIG_RT73USB=$(if $(CONFIG_PACKAGE_kmod-rt73-usb),m) \
564 CONFIG_RT2800PCI=$(if $(CONFIG_PACKAGE_kmod-rt2800-pci),m) \
565 CONFIG_RT2800USB=$(if $(CONFIG_PACKAGE_kmod-rt2800-usb),m) \
566 CONFIG_RTL8180=$(if $(CONFIG_PACKAGE_kmod-rtl8180),m) \
567 CONFIG_RTL8187=$(if $(CONFIG_PACKAGE_kmod-rtl8187),m) \
568 CONFIG_MAC80211_HWSIM=$(if $(CONFIG_PACKAGE_kmod-mac80211-hwsim),m) \
569 CONFIG_PCMCIA= \
570 CONFIG_LIBIPW= \
571 CONFIG_LIBERTAS=$(if $(CONFIG_PACKAGE_kmod-libertas),m) \
572 CONFIG_LIBERTAS_CS= \
573 CONFIG_LIBERTAS_SDIO= \
574 CONFIG_LIBERTAS_THINFIRM= \
575 CONFIG_LIBERTAS_USB=$(if $(CONFIG_PACKAGE_kmod-libertas),m) \
576 CONFIG_IPW2100= \
577 CONFIG_IPW2200= \
578 CONFIG_NL80211=y \
579 CONFIG_LIB80211= \
580 CONFIG_LIB80211_CRYPT_WEP= \
581 CONFIG_LIB80211_CRYPT_CCMP= \
582 CONFIG_LIB80211_CRYPT_TKIP= \
583 CONFIG_IWLWIFI= \
584 CONFIG_IWLAGN= \
585 CONFIG_MWL8K= \
586 CONFIG_ATMEL= \
587 CONFIG_PCMCIA_ATMEL= \
588 CONFIG_ADM8211= \
589 CONFIG_USB_NET_RNDIS_HOST= \
590 CONFIG_USB_NET_RNDIS_WLAN= \
591 CONFIG_USB_NET_CDCETHER= \
592 CONFIG_USB_USBNET= \
593 CONFIG_AT76C50X_USB= \
594 CONFIG_WL12XX= \
595 CONFIG_EEPROM_93CX6= \
596 CONFIG_AR9170_USB=$(if $(CONFIG_PACKAGE_kmod-ar9170),m) \
597 CONFIG_AR9170_LEDS=$(CONFIG_LEDS_TRIGGERS) \
598 CONFIG_IWM= \
599 MADWIFI= \
600 OLD_IWL= \
601 KLIB_BUILD="$(LINUX_DIR)" \
602 MODPROBE=: \
603 KLIB=$(TARGET_MODULES_DIR) \
604 KERNEL_SUBLEVEL=$(lastword $(subst ., ,$(KERNEL_PATCHVER)))
605
606 define Build/Prepare
607 rm -rf $(PKG_BUILD_DIR)
608 mkdir -p $(PKG_BUILD_DIR)
609 $(PKG_UNPACK)
610 $(Build/Patch)
611 unzip -jod $(PKG_BUILD_DIR) $(DL_DIR)/$(RT61FW)
612 unzip -jod $(PKG_BUILD_DIR) $(DL_DIR)/$(RT71FW)
613 -unzip -jod $(PKG_BUILD_DIR) $(DL_DIR)/$(RT2860FW)
614 -unzip -jod $(PKG_BUILD_DIR) $(DL_DIR)/$(RT2870FW)
615 $(TAR) -C $(PKG_BUILD_DIR) -xjf $(DL_DIR)/$(ZD1211FW_NAME)-$(ZD1211FW_VERSION).tar.bz2
616 rm -rf $(PKG_BUILD_DIR)/include/linux/ssb
617 rm -f $(PKG_BUILD_DIR)/include/net/ieee80211.h
618 rm $(PKG_BUILD_DIR)/include/linux/eeprom_93cx6.h
619 endef
620
621 ifneq ($(CONFIG_PACKAGE_kmod-mac80211),)
622 define Build/Compile/kmod
623 rm -rf $(PKG_BUILD_DIR)/modules
624 $(MAKE) -C "$(PKG_BUILD_DIR)" $(MAKE_OPTS) all
625 endef
626 endif
627
628 define Build/Compile
629 $(call Build/Compile/kmod)
630 endef
631
632 define Build/InstallDev
633 mkdir -p \
634 $(1)/usr/include/mac80211 \
635 $(1)/usr/include/mac80211/ath \
636 $(1)/usr/include/net/mac80211
637 $(CP) $(PKG_BUILD_DIR)/net/mac80211/*.h $(PKG_BUILD_DIR)/include/* $(1)/usr/include/mac80211/
638 $(CP) $(PKG_BUILD_DIR)/net/mac80211/rate.h $(1)/usr/include/net/mac80211/
639 $(CP) $(PKG_BUILD_DIR)/drivers/net/wireless/ath/*.h $(1)/usr/include/mac80211/ath/
640 endef
641
642 define KernelPackage/libertas/install
643 $(INSTALL_DIR) $(1)/lib/firmware
644 $(INSTALL_DATA) $(DL_DIR)/$(USB8388FW_NAME)-$(USB8388FW_VERSION).bin $(1)/lib/firmware/$(USB8388FW_NAME).bin
645 endef
646
647 define KernelPackage/mac80211/install
648 $(INSTALL_DIR) $(1)/lib/wifi
649 $(INSTALL_DATA) ./files/lib/wifi/mac80211.sh $(1)/lib/wifi
650 endef
651
652 define KernelPackage/p54-pci/install
653 $(INSTALL_DIR) $(1)/lib/firmware
654 $(INSTALL_DATA) $(DL_DIR)/$(P54PCIFW) $(1)/lib/firmware/isl3886pci
655 endef
656
657 define KernelPackage/p54-usb/install
658 $(INSTALL_DIR) $(1)/lib/firmware
659 $(INSTALL_DATA) $(DL_DIR)/$(P54USBFW) $(1)/lib/firmware/isl3887usb
660 endef
661
662 define KernelPackage/rt61-pci/install
663 $(INSTALL_DIR) $(1)/lib/firmware
664 $(INSTALL_DATA) $(PKG_BUILD_DIR)/rt2?61*.bin $(1)/lib/firmware/
665 endef
666
667 define KernelPackage/rt73-usb/install
668 $(INSTALL_DIR) $(1)/lib/firmware
669 $(INSTALL_DATA) $(PKG_BUILD_DIR)/rt73.bin $(1)/lib/firmware/
670 endef
671
672 define KernelPackage/rt2800-pci/install
673 $(INSTALL_DIR) $(1)/lib/firmware
674 $(INSTALL_DATA) $(PKG_BUILD_DIR)/rt2860.bin $(1)/lib/firmware/
675 endef
676
677 define KernelPackage/rt2800-usb/install
678 $(INSTALL_DIR) $(1)/lib/firmware
679 $(INSTALL_DATA) $(PKG_BUILD_DIR)/rt2870.bin $(1)/lib/firmware/
680 endef
681
682 define KernelPackage/zd1211rw/install
683 $(INSTALL_DIR) $(1)/lib/firmware/zd1211
684 $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(ZD1211FW_NAME)/zd1211* $(1)/lib/firmware/zd1211
685 endef
686
687 define KernelPackage/ar9170/install
688 $(INSTALL_DIR) $(1)/lib/firmware
689 $(INSTALL_DATA) $(DL_DIR)/$(AR9170FW) $(1)/lib/firmware/
690 endef
691
692 define Build/b43-common
693 tar xjf "$(DL_DIR)/$(PKG_B43_FWCUTTER_SOURCE)" -C "$(PKG_BUILD_DIR)"
694 $(MAKE) -C "$(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_OBJECT)" \
695 CFLAGS="-I$(STAGING_DIR_HOST)/include -include endian.h"
696 $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_OBJECT)/b43-fwcutter $(STAGING_DIR_HOST)/bin/
697 ifneq ($(CONFIG_B43_OPENFIRMWARE),)
698 $(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/
699 $(MAKE) -C "$(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_SUBDIR)/assembler/"
700 $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_SUBDIR)/assembler/b43-asm $(STAGING_DIR_HOST)/bin/
701 $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_SUBDIR)/assembler/b43-asm.bin $(STAGING_DIR_HOST)/bin/
702 endif
703 $(INSTALL_BIN) ./files/host_bin/b43-fwsquash.py $(STAGING_DIR_HOST)/bin/
704 endef
705
706 define KernelPackage/b43/install
707 rm -rf $(1)/lib/firmware/
708 $(call Build/b43-common)
709 ifneq ($(CONFIG_B43_OPENFIRMWARE),)
710 tar xzf "$(DL_DIR)/$(PKG_B43_FWV4_SOURCE)" -C "$(PKG_BUILD_DIR)"
711 else
712 tar xjf "$(DL_DIR)/$(PKG_B43_FWV4_SOURCE)" -C "$(PKG_BUILD_DIR)"
713 endif
714 $(INSTALL_DIR) $(1)/lib/firmware/
715 ifneq ($(CONFIG_B43_OPENFIRMWARE),)
716 $(MAKE) -C "$(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/"
717 $(INSTALL_DIR) $(1)/lib/firmware/b43-open/
718 $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/ucode5.fw $(1)/lib/firmware/b43-open/ucode5.fw
719 $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/b0g0bsinitvals5.fw $(1)/lib/firmware/b43-open/b0g0bsinitvals5.fw
720 $(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/b0g0initvals5.fw $(1)/lib/firmware/b43-open/b0g0initvals5.fw
721 else
722 b43-fwcutter --unsupported -w $(1)/lib/firmware/ $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)
723 endif
724 ifneq ($(CONFIG_B43_FW_SQUASH),)
725 b43-fwsquash.py "$(CONFIG_B43_FW_SQUASH_PHYTYPES)" "$(CONFIG_B43_FW_SQUASH_COREREVS)" "$(1)/lib/firmware/b43"
726 endif
727 endef
728
729 define KernelPackage/b43legacy/install
730 $(call Build/b43-common)
731 $(INSTALL_DIR) $(1)/lib/firmware/
732
733 b43-fwcutter --unsupported -w $(1)/lib/firmware/ $(DL_DIR)/$(PKG_B43_FWV3_SOURCE)
734 ifneq ($(CONFIG_B43LEGACY_FW_SQUASH),)
735 b43-fwsquash.py "G" "$(CONFIG_B43LEGACY_FW_SQUASH_COREREVS)" "$(1)/lib/firmware/b43legacy"
736 endif
737 endef
738
739 $(eval $(call KernelPackage,ath5k))
740 $(eval $(call KernelPackage,libertas))
741 $(eval $(call KernelPackage,mac80211))
742 $(eval $(call KernelPackage,p54-common))
743 $(eval $(call KernelPackage,p54-pci))
744 $(eval $(call KernelPackage,p54-usb))
745 $(eval $(call KernelPackage,rt2x00-lib))
746 $(eval $(call KernelPackage,rt2x00-pci))
747 $(eval $(call KernelPackage,rt2x00-usb))
748 $(eval $(call KernelPackage,rt2800-lib))
749 $(eval $(call KernelPackage,rt2400-pci))
750 $(eval $(call KernelPackage,rt2500-pci))
751 $(eval $(call KernelPackage,rt2500-usb))
752 $(eval $(call KernelPackage,rt61-pci))
753 $(eval $(call KernelPackage,rt73-usb))
754 $(eval $(call KernelPackage,rt2800-pci))
755 $(eval $(call KernelPackage,rt2800-usb))
756 $(eval $(call KernelPackage,rtl8180))
757 $(eval $(call KernelPackage,rtl8187))
758 $(eval $(call KernelPackage,zd1211rw))
759 $(eval $(call KernelPackage,mac80211-hwsim))
760 $(eval $(call KernelPackage,ath9k))
761 $(eval $(call KernelPackage,ath))
762 $(eval $(call KernelPackage,ar9170))
763 $(eval $(call KernelPackage,b43))
764 $(eval $(call KernelPackage,b43legacy))
This page took 0.074322 seconds and 5 git commands to generate.