wl1251: add support for dedicated IRQ line
[pandora-wifi.git] / config.mk
1 export
2
3 ## NOTE
4 ## Make sure to have each variable declaration start
5 ## in the first column, no whitespace allowed.
6
7 ifeq ($(wildcard $(KLIB_BUILD)/.config),)
8 # These will be ignored by compat autoconf
9  CONFIG_PCI=y
10  CONFIG_USB=y
11  CONFIG_PCMCIA=y
12  CONFIG_SSB=m
13 else
14 include $(KLIB_BUILD)/.config
15 endif
16
17 # We will warn when you don't have MQ support or NET_SCHED enabled.
18 #
19 # We could consider just quiting if MQ and NET_SCHED is disabled
20 # as I suspect all users of this package want 802.11e (WME) and
21 # 802.11n (HT) support.
22 ifneq ($(wildcard $(KLIB_BUILD)/Makefile),)
23 COMPAT_LATEST_VERSION = 33
24 KERNEL_SUBLEVEL := $(shell $(MAKE) -C $(KLIB_BUILD) kernelversion | sed -n 's/^2\.6\.\([0-9]\+\).*/\1/p')
25 COMPAT_VERSIONS := $(shell I=$(COMPAT_LATEST_VERSION); while [ "$$I" -gt $(KERNEL_SUBLEVEL) ]; do echo $$I; I=$$(($$I - 1)); done)
26 $(foreach ver,$(COMPAT_VERSIONS),$(eval CONFIG_COMPAT_KERNEL_$(ver)=y))
27
28 ifdef CONFIG_COMPAT_KERNEL_25
29 $(error "ERROR: compat-wireless by default supports kernels >= 2.6.25, try enabling only one driver though")
30 endif
31
32 ifeq ($(CONFIG_CFG80211),y)
33 $(error "ERROR: your kernel has CONFIG_CFG80211=y, you should have it CONFIG_CFG80211=m if you want to use this thing.")
34 endif
35
36
37 # 2.6.27 has FTRACE_DYNAMIC borked, so we will complain if
38 # you have it enabled, otherwise you will very likely run into
39 # a kernel panic.
40 ifeq ($(KERNEL_SUBLEVEL),27)
41 ifeq ($(CONFIG_DYNAMIC_FTRACE),y)
42 $(error "ERROR: Your 2.6.27 kernel has CONFIG_DYNAMIC_FTRACE, please upgrade your distribution kernel as newer ones should not have this enabled (and if so report a bug) or remove this warning if you know what you are doing")
43 endif
44 endif
45
46 # This is because with CONFIG_MAC80211 include/linux/skbuff.h will
47 # enable on 2.6.27 a new attribute:
48 #
49 # skb->do_not_encrypt
50 #
51 # and on 2.6.28 another new attribute:
52 #
53 # skb->requeue
54 #
55 ifeq ($(shell test $(KERNEL_SUBLEVEL) -ge 27 && echo yes),yes)
56 ifeq ($(CONFIG_MAC80211),)
57 $(error "ERROR: Your >=2.6.27 kernel has CONFIG_MAC80211 disabled, you should have it CONFIG_MAC80211=m if you want to use this thing.")
58 endif
59 endif
60
61 ifneq ($(KERNELRELEASE),) # This prevents a warning
62
63 ifeq ($(CONFIG_NET_SCHED),)
64  QOS_REQS_MISSING+=CONFIG_NET_SCHED
65 endif
66
67 ifneq ($(QOS_REQS_MISSING),) # Complain about our missing dependencies
68 $(warning "WARNING: You are running a kernel >= 2.6.23, you should enable in it $(QOS_REQS_MISSING) for 802.11[ne] support")
69 endif
70
71 endif # build check
72 endif # kernel Makefile check
73
74 # These both are needed by compat-wireless || compat-bluetooth so enable them
75  CONFIG_COMPAT_RFKILL=y
76
77 ifeq ($(CONFIG_MAC80211),y)
78 $(error "ERROR: you have MAC80211 compiled into the kernel, CONFIG_MAC80211=y, as such you cannot replace its mac80211 driver. You need this set to CONFIG_MAC80211=m. If you are using Fedora upgrade your kernel as later version should this set as modular. For further information on Fedora see https://bugzilla.redhat.com/show_bug.cgi?id=470143. If you are using your own kernel recompile it and make mac80211 modular")
79 else
80  CONFIG_COMPAT_WIRELESS=y
81  CONFIG_COMPAT_WIRELESS_MODULES=m
82  CONFIG_COMPAT_VAR_MODULES=m
83 # We could technically separate these but not yet, we only have b44
84 # Note that we don't intend on backporting network drivers that
85 # use Multiqueue as that was a pain to backport to kernels older than
86 # 2.6.27. But -- we could just disable those drivers from kernels
87 # older than 2.6.27
88  CONFIG_COMPAT_NETWORK_MODULES=m
89  CONFIG_COMPAT_NET_USB_MODULES=m
90 endif
91
92 # The Bluetooth compatibility only builds on kernels >= 2.6.27 for now
93 ifndef CONFIG_COMPAT_KERNEL_27
94 ifeq ($(CONFIG_BT),y)
95 # we'll ignore compiling bluetooth
96 else
97  CONFIG_COMPAT_BLUETOOTH=y
98  CONFIG_COMPAT_BLUETOOTH_MODULES=m
99 endif
100 endif # Kernel >= 2.6.26
101
102 ifeq ($(CONFIG_COMPAT_KERNEL_33),y)
103 ifneq ($(CONFIG_FW_LOADER),)
104  CONFIG_COMPAT_FIRMWARE_CLASS=m
105 endif
106 endif
107
108
109 # Wireless subsystem stuff
110 CONFIG_MAC80211=m
111
112 # CONFIG_MAC80211_DEBUGFS=y
113 # CONFIG_MAC80211_DEBUG_MENU=y
114 # CONFIG_MAC80211_NOINLINE=y
115 # CONFIG_MAC80211_VERBOSE_DEBUG=y
116 # CONFIG_MAC80211_HT_DEBUG=y
117 # CONFIG_MAC80211_TKIP_DEBUG=y
118 # CONFIG_MAC80211_IBSS_DEBUG=y
119 # CONFIG_MAC80211_VERBOSE_PS_DEBUG=y
120 # CONFIG_MAC80211_VERBOSE_MPL_DEBUG=y
121 # CONFIG_MAC80211_VERBOSE_MHWMP_DEBUG=y
122 # CONFIG_MAC80211_DEBUG_COUNTERS=y
123 # CONFIG_MAC80211_DRIVER_API_TRACER=y
124
125 # choose between pid and minstrel as default rate control algorithm
126 CONFIG_MAC80211_RC_DEFAULT=minstrel
127 CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
128 # CONFIG_MAC80211_RC_DEFAULT_PID=y
129 # This is the one used by our compat-wireless net/mac80211/rate.c
130 # in case you have and old kernel which is overriding this to pid.
131 CONFIG_COMPAT_MAC80211_RC_DEFAULT=minstrel
132 CONFIG_MAC80211_RC_PID=y
133 CONFIG_MAC80211_RC_MINSTREL=y
134 CONFIG_MAC80211_LEDS=y
135
136 # enable mesh networking too
137 CONFIG_MAC80211_MESH=y
138
139 CONFIG_CFG80211=m
140 CONFIG_CFG80211_DEFAULT_PS=y
141 # CONFIG_CFG80211_DEBUGFS=y
142 # CONFIG_NL80211_TESTMODE=y
143 # CONFIG_CFG80211_DEVELOPER_WARNINGS=y
144 # CONFIG_CFG80211_REG_DEBUG=y
145 # See below for wext stuff
146
147 CONFIG_LIB80211=m
148 CONFIG_LIB80211_CRYPT_WEP=m
149 CONFIG_LIB80211_CRYPT_CCMP=m
150 CONFIG_LIB80211_CRYPT_TKIP=m
151 # CONFIG_LIB80211_DEBUG=y
152
153 CONFIG_WIRELESS_OLD_REGULATORY=n
154
155 CONFIG_BT=m
156 CONFIG_BT_L2CAP=m
157 CONFIG_BT_SCO=m
158 CONFIG_BT_RFCOMM=m
159 CONFIG_BT_BNEP=m
160 CONFIG_BT_ATH3K=m
161 # CONFIG_BT_CMTP depends on ISDN_CAPI
162 ifneq ($(CONFIG_BT_CMTP),)
163 CONFIG_BT_CMTP=m
164 endif
165 CONFIG_BT_HIDP=m
166
167 ifdef CONFIG_COMPAT_KERNEL_32
168 # Old kernels stil do depend on CONFIG_WIRELESS_EXT
169 # as we add the wireless handler back to the struct
170 # netdevice
171 ifneq ($(CONFIG_WIRELESS_EXT),)
172 CONFIG_CFG80211_WEXT=y
173 endif
174 else
175 # 2.6.33 and above do not need CONFIG_WIRELESS_EXT, but the
176 # reality is we should select CONFIG_WIRELESS_EXT only if a
177 # driver claims for it (one of the old non-cfg80211 drivers).
178 # Then users could either have this on or off but we leave it
179 # on in case users on >= 2.6.33 still have iwconfig and other
180 # old deprecated userspace applications.
181 CONFIG_CFG80211_WEXT=y
182 endif # CONFIG_COMPAT_KERNEL_32
183
184 # mac80211 test driver
185 CONFIG_MAC80211_HWSIM=m
186
187 # PCI Drivers
188 ifneq ($(CONFIG_PCI),)
189
190 CONFIG_ATH5K=m
191 # CONFIG_ATH5K_DEBUG=y
192 CONFIG_ATH9K_HW=m
193 CONFIG_ATH9K=m
194 # Note: once ath9k_htc is added we'll have to move
195 # CONFIG_ATH9K_COMMON to an area that doesn't depend on PCI
196 # as you could then have ath9k disabled but ath9k_htc enabled.
197 CONFIG_ATH9K_COMMON=m
198 # CONFIG_ATH9K_DEBUGFS=y
199
200
201 CONFIG_IWLWIFI=m
202 # CONFIG_IWLWIFI_DEBUG=y
203 # CONFIG_IWLWIFI_DEBUGFS=y
204 # CONFIG_IWLWIFI_DEVICE_TRACING=y
205 CONFIG_IWLAGN=m
206 CONFIG_COMPAT_IWL4965=y
207 CONFIG_IWL5000=y
208 CONFIG_IWL3945=m
209
210
211 CONFIG_B43=m
212 CONFIG_B43_HWRNG=y
213 CONFIG_B43_PCI_AUTOSELECT=y
214 ifneq ($(CONFIG_PCMCIA),)
215 CONFIG_B43_PCMCIA=y
216 endif
217 CONFIG_B43_LEDS=y
218 CONFIG_B43_PHY_LP=y
219 CONFIG_B43_NPHY=y
220 # CONFIG_B43_DEBUG=y
221
222 CONFIG_B43LEGACY=m
223 CONFIG_B43LEGACY_HWRNG=y
224 CONFIG_B43LEGACY_PCI_AUTOSELECT=y
225 CONFIG_B43LEGACY_LEDS=y
226 # CONFIG_B43LEGACY_DEBUG=y
227 CONFIG_B43LEGACY_DMA=y
228 CONFIG_B43LEGACY_PIO=y
229
230 # The Intel ipws
231 CONFIG_LIBIPW=m
232 # CONFIG_LIBIPW_DEBUG=y
233
234
235 CONFIG_IPW2100=m
236 CONFIG_IPW2100_MONITOR=y
237 # CONFIG_IPW2100_DEBUG=y
238 CONFIG_IPW2200=m
239 CONFIG_IPW2200_MONITOR=y
240 CONFIG_IPW2200_RADIOTAP=y
241 CONFIG_IPW2200_PROMISCUOUS=y
242 CONFIG_IPW2200_QOS=y
243 # CONFIG_IPW2200_DEBUG=y
244 # The above enables use a second interface prefixed 'rtap'.
245 #           Example usage:
246 #
247 # % modprobe ipw2200 rtap_iface=1
248 # % ifconfig rtap0 up
249 # % tethereal -i rtap0
250 #
251 # If you do not specify 'rtap_iface=1' as a module parameter then
252 # the rtap interface will not be created and you will need to turn
253 # it on via sysfs:
254 #
255 # % echo 1 > /sys/bus/pci/drivers/ipw2200/*/rtap_iface
256
257 ifneq ($(CONFIG_SSB),)
258 # Sonics Silicon Backplane
259 CONFIG_SSB_SPROM=y
260 # CONFIG_SSB_DEBUG=y
261
262 CONFIG_SSB_BLOCKIO=y
263 CONFIG_SSB_PCIHOST=y
264 CONFIG_SSB_B43_PCI_BRIDGE=y
265 ifneq ($(CONFIG_PCMCIA),)
266 CONFIG_SSB_PCMCIAHOST=y
267 endif
268 # CONFIG_SSB_DEBUG=y
269 CONFIG_SSB_DRIVER_PCICORE=y
270 endif
271
272 CONFIG_P54_PCI=m
273
274 CONFIG_B44=m
275 CONFIG_B44_PCI=y
276
277 CONFIG_RTL8180=m
278
279 CONFIG_ADM8211=m
280
281 CONFIG_RT2X00_LIB_PCI=m
282 CONFIG_RT2400PCI=m
283 CONFIG_RT2500PCI=m
284 CONFIG_RT2800PCI=m
285 CONFIG_RT2800PCI_PCI=y
286 NEED_RT2X00=y
287
288 # Two rt2x00 drivers require firmware: rt61pci and rt73usb. They depend on
289 # CRC to check the firmware. We check here first for the PCI
290 # driver as we're in the PCI section.
291 ifneq ($(CONFIG_CRC_ITU_T),)
292 CONFIG_RT61PCI=m
293 NEED_RT2X00_FIRMWARE=y
294 endif
295
296 CONFIG_MWL8K=m
297
298 # Ethernet drivers go here
299 CONFIG_ATL1=m
300 CONFIG_ATL2=m
301 CONFIG_ATL1E=m
302 CONFIG_ATL1C=m
303
304 endif
305 ## end of PCI
306
307 ifneq ($(CONFIG_PCMCIA),)
308
309 ifdef CONFIG_COMPAT_KERNEL_27
310 CONFIG_LIBERTAS=n
311 CONFIG_LIBERTAS_CS=n
312 else
313 CONFIG_LIBERTAS_CS=m
314 NEED_LIBERTAS=y
315 endif
316
317 endif
318 ## end of PCMCIA
319
320 # This is required for some cards
321 CONFIG_EEPROM_93CX6=m
322
323 # USB Drivers
324 ifneq ($(CONFIG_USB),)
325 CONFIG_ZD1211RW=m
326 # CONFIG_ZD1211RW_DEBUG=y
327
328 # Sorry, rndis_wlan uses cancel_work_sync which is new and can't be done in compat...
329
330 # Wireless RNDIS USB support (RTL8185 802.11g) A-Link WL54PC
331 # All of these devices are based on Broadcom 4320 chip which
332 # is only wireless RNDIS chip known to date.
333 # Note: this depends on CONFIG_USB_NET_RNDIS_HOST and CONFIG_USB_NET_CDCETHER
334 # it also requires new RNDIS_HOST and CDC_ETHER modules which we add
335 ifdef CONFIG_COMPAT_KERNEL_29
336 CONFIG_USB_COMPAT_USBNET=n
337 CONFIG_USB_NET_COMPAT_RNDIS_HOST=n
338 CONFIG_USB_NET_COMPAT_RNDIS_WLAN=n
339 CONFIG_USB_NET_COMPAT_CDCETHER=n
340 else
341 CONFIG_USB_COMPAT_USBNET=m
342 CONFIG_USB_NET_COMPAT_RNDIS_HOST=m
343 CONFIG_USB_NET_COMPAT_RNDIS_WLAN=m
344 CONFIG_USB_NET_COMPAT_CDCETHER=m
345 endif
346
347
348 CONFIG_P54_USB=m
349 CONFIG_RTL8187=m
350 CONFIG_RTL8187_LEDS=y
351
352 CONFIG_AT76C50X_USB=m
353
354 ifndef CONFIG_COMPAT_KERNEL_28
355 CONFIG_AR9170_USB=m
356 CONFIG_AR9170_LEDS=y
357 endif
358
359 # RT2500USB does not require firmware
360 CONFIG_RT2500USB=m
361 CONFIG_RT2800USB=m
362 CONFIG_RT2X00_LIB_USB=m
363 NEED_RT2X00=y
364 # RT73USB requires firmware
365 ifneq ($(CONFIG_CRC_ITU_T),)
366 CONFIG_RT73USB=m
367 NEED_RT2X00_FIRMWARE=y
368 endif
369
370 ifdef CONFIG_COMPAT_KERNEL_27
371 CONFIG_LIBERTAS_THINFIRM_USB=n
372 CONFIG_LIBERTAS_USB=n
373 NEED_LIBERTAS=n
374 else
375 CONFIG_LIBERTAS_THINFIRM_USB=m
376 CONFIG_LIBERTAS_USB=m
377 NEED_LIBERTAS=y
378 endif
379
380 endif # end of USB driver list
381
382 ifneq ($(CONFIG_SPI_MASTER),)
383
384 CONFIG_WL1251=m
385 CONFIG_WL1251_SPI=m
386 CONFIG_P54_SPI=m
387
388 ifdef CONFIG_COMPAT_KERNEL_27
389 CONFIG_LIBERTAS_SPI=n
390 NEED_LIBERTAS=n
391 else
392 CONFIG_LIBERTAS_SPI=m
393 NEED_LIBERTAS=y
394 endif
395
396 endif # end of SPI driver list
397
398 ifneq ($(CONFIG_MMC),)
399
400 CONFIG_SSB_SDIOHOST=y
401 CONFIG_B43_SDIO=y
402 CONFIG_WL1251_SDIO=m
403
404 ifdef CONFIG_COMPAT_KERNEL_27
405 CONFIG_LIBERTAS_SDIO=n
406 NEED_LIBERTAS=n
407 else
408 CONFIG_LIBERTAS_SDIO=m
409 NEED_LIBERTAS=y
410 endif
411
412 # Activate iwmc3200wifi support only on kernel >= 2.6.29.
413 # iwmc3200wifi uses new netdev_ops api no supported by old kernel.
414 ifndef CONFIG_COMPAT_KERNEL_29
415 CONFIG_IWM=m
416 # CONFIG_IWM_DEBUG=y
417 endif
418
419 endif # end of SDIO driver list
420
421 # Common rt2x00 requirements
422 ifeq ($(NEED_RT2X00),y)
423 CONFIG_RT2X00=y
424 CONFIG_RT2X00_LIB=m
425 CONFIG_RT2800_LIB=m
426 CONFIG_RT2X00_LIB_HT=y
427 CONFIG_RT2X00_LIB_FIRMWARE=y
428 CONFIG_RT2X00_LIB_CRYPTO=y
429 CONFIG_RT2X00_LIB_LEDS=y
430 # CONFIG_RT2X00_DEBUG=y
431 # CONFIG_RT2X00_LIB_DEBUGFS
432 endif
433
434 ifeq ($(NEED_RT2X00_FIRMWARE),y)
435 CONFIG_RT2X00_LIB_FIRMWARE=y
436 endif
437
438 # p54
439 CONFIG_P54_COMMON=m
440 CONFIG_P54_LEDS=y
441
442 # Atheros
443 CONFIG_ATH_COMMON=m
444 # CONFIG_ATH_DEBUG=y
445
446 CONFIG_WL12XX=y
447 CONFIG_WL1251=m
448 CONFIG_WL1271=m
449
450 ifdef CONFIG_COMPAT_KERNEL_27
451 CONFIG_LIBERTAS=n
452 else
453 ifeq ($(NEED_LIBERTAS),y)
454 CONFIG_LIBERTAS_THINFIRM=m
455 CONFIG_LIBERTAS=m
456 CONFIG_LIBERTAS_MESH=y
457 # CONFIG_LIBERTAS_DEBUG=y
458 endif
459 endif
460
461 # We need the backported rfkill module on kernel < 2.6.31.
462 # In more recent kernel versions use the in kernel rfkill module.
463 ifdef CONFIG_COMPAT_KERNEL_31
464 CONFIG_RFKILL_BACKPORT=m
465 CONFIG_RFKILL_BACKPORT_LEDS=y
466 CONFIG_RFKILL_BACKPORT_INPUT=y
467 endif
468