Revert "BCM SDK: driver "downgrade" ver. 5.10.142.0: shared sources"
[tomato.git] / release / src-rt / wl / config / wl.mk
blobeb0385ed9dc681ee5e216329623eec33d5e0d06a
1 # Helper makefile for building Broadcom wl device driver
2 # This file maps wl driver feature flags (import) to WLFLAGS and WLFILES_SRC (export).
4 # Copyright (C) 2009, Broadcom Corporation
5 # All Rights Reserved.
6 #
7 # THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY
8 # KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM
9 # SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS
10 # FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE.
11 # $Id: wl.mk,v 1.210.2.85 2010/02/25 19:48:59 Exp $
14 # debug/internal
15 ifeq ($(DEBUG),1)
16 WLFLAGS += -DBCMDBG -DWLTEST
17 else
18 # This is true for mfgtest builds.
19 #ifdef WLTEST
20 ifeq ($(WLTEST),1)
21 WLFLAGS += -DWLTEST
22 endif
23 #endif
24 endif
27 #ifdef BCMDBG_MEM
28 ifeq ($(BCMDBG_MEM),1)
29 WLFLAGS += -DBCMDBG_MEM
30 endif
31 #endif
33 #ifdef BCMDBG_PKT
34 ifeq ($(BCMDBG_PKT),1)
35 WLFLAGS += -DBCMDBG_PKT
36 endif
37 #endif
39 #ifdef WLLMAC
40 ifeq ($(WLLMAC),1)
41 WLFLAGS += -DWLLMAC -DEXTENDED_SCAN
42 endif
43 #endif
46 ## wl driver common
48 ifndef WL_LOW
49 WL_LOW = 1
50 endif
52 ifndef WL_HIGH
53 WL_HIGH = 1
54 endif
56 ## iff one of WLC_LOW and WLC_HIGH is defined, SPLIT is true
57 WL_SPLIT = 0
58 ifeq ($(WL_LOW),1)
59 ifneq ($(WL_HIGH),1)
60 WL_SPLIT = 1
61 endif
62 endif
63 ifeq ($(WL_HIGH),1)
64 ifneq ($(WL_LOW),1)
65 WL_SPLIT = 1
66 ifeq ($(RPC_NOCOPY),1)
67 WLFLAGS += -DBCM_RPC_NOCOPY
68 endif
69 ifeq ($(RPC_TXNOCOPY),1)
70 WLFLAGS += -DBCM_RPC_TXNOCOPY
71 endif
72 ifeq ($(RPC_RXNOCOPY),1)
73 WLFLAGS += -DBCM_RPC_RXNOCOPY
74 endif
75 endif
76 endif
79 ifeq ($(WL_LOW),1)
80 WLFLAGS += -DWLC_LOW
81 endif
83 ifeq ($(WL_HIGH),1)
84 WLFLAGS += -DWLC_HIGH
85 endif
87 # split driver infrastructure files
88 ifeq ($(WL_SPLIT),1)
89 WLFILES_SRC += src/shared/bcm_xdr.c
90 WLFILES_SRC += src/shared/bcm_rpc.c
91 WLFILES_SRC_HI += src/shared/nvramstubs.c
92 ifeq ($(OSLLX),1)
93 WLFILES_SRC_HI += src/shared/linux_rpc_osl.c
94 endif
95 ifeq ($(OSLNDIS),1)
96 WLFILES_SRC_HI += src/shared/ndis_rpc_osl.c
97 endif
98 ifeq ($(BCMDBUS),1)
99 WLFILES_SRC_HI += src/shared/bcm_rpc_tp_dbus.c
100 endif
102 WLFILES_SRC_HI += src/wl/sys/wlc_bmac_stubs.c
103 WLFILES_SRC_HI += src/wl/sys/wlc_rpctx.c
104 WLFILES_SRC_LO += src/wl/sys/wlc_high_stubs.c
106 ifeq ($(WL_HIGH),1)
107 WLFLAGS += -DBCMBUSTYPE=RPC_BUS
108 WLFLAGS += -DOSLREGOPS
109 endif
110 endif
112 #ifdef WL
113 ifeq ($(WL),1)
114 WLFILES_SRC += src/shared/bcmwifi.c
116 WLFILES_SRC_LO += src/wl/sys/wlc_bmac.c
117 WLFILES_SRC_LO += src/wl/sys/d11ucode.c
118 WLFILES_SRC_LO += src/wl/sys/wlc_phy.c
119 WLFILES_SRC_LO += src/shared/qmath.c
120 WLFILES_SRC_LO += src/wl/sys/mimophytbls.c
121 WLFILES_SRC_LO += src/wl/sys/lpphytbls.c
122 WLFILES_SRC_LO += src/wl/sys/sslpnphytbls.c
124 WLFILES_SRC_HI += src/wl/sys/wlc.c
125 WLFILES_SRC_HI += src/wl/sys/wlc_rate.c
126 WLFILES_SRC_HI += src/wl/sys/wlc_security.c
127 WLFILES_SRC_HI += src/wl/sys/wlc_key.c
128 WLFILES_SRC_HI += src/wl/sys/wlc_scb.c
129 WLFILES_SRC_HI += src/wl/sys/wlc_rate_sel.c
130 WLFILES_SRC_HI += src/wl/sys/wlc_antsel.c
131 WLFILES_SRC_HI += src/wl/sys/wlc_bsscfg.c
132 WLFILES_SRC_HI += src/wl/sys/wlc_scan.c
133 WLFILES_SRC_HI += src/wl/sys/wlc_phy_iovar.c
134 ifeq ($(WLLMAC),1)
135 WLFILES_SRC += src/wl/sys/wlc_lmac.c
136 ifeq ($(STA), 1)
137 WLFILES_SRC += src/wl/sys/wlc_lmac_sta.c
138 endif
139 ifeq ($(WLLMACPROTO), 1)
140 WLFLAGS += -DWLLMACPROTO
141 WLFILES_SRC += src/wl/sys/wlc_lmac_proto.c
142 endif
143 else
144 WLFILES_SRC_HI += src/wl/sys/wlc_event.c
145 WLFILES_SRC_HI += src/wl/sys/wlc_channel.c
146 endif
147 ifneq ($(BCMROMOFFLOAD),1)
148 WLFILES_SRC_HI += src/shared/bcmwpa.c
149 #ifndef LINUX_CRYPTO
150 ifneq ($(LINUX_CRYPTO),1)
151 WLFILES_SRC_HI += src/bcmcrypto/rc4.c
152 WLFILES_SRC_HI += src/bcmcrypto/tkhash.c
153 WLFILES_SRC_HI += src/bcmcrypto/tkmic.c
154 WLFILES_SRC_HI += src/bcmcrypto/wep.c
155 endif
156 #endif
157 endif
158 #ifdef WLEXTLOG
159 ifeq ($(WLEXTLOG),1)
160 WLFLAGS += -DWLEXTLOG
161 WLFILES_SRC += src/wl/sys/wlc_extlog.c
162 endif
163 #endif
164 endif
165 #endif
167 #ifdef BCMDBUS
168 ifeq ($(BCMDBUS),1)
169 WLFLAGS += -DBCMDBUS
170 WLFILES_SRC += src/shared/dbus.c
172 ifeq ($(BCMSDIO),1)
173 WLFILES_SRC += src/shared/dbus_sdio.c
174 else
175 WLFILES_SRC += src/shared/dbus_usb.c
176 endif
178 ifeq ($(WLLX),1)
179 ifeq ($(BCMSDIO),1)
180 WLFILES_SRC += src/shared/dbus_sdio_linux.c
181 else
182 WLFILES_SRC += src/shared/dbus_usb_linux.c
183 endif
184 else
185 ifeq ($(WLNDIS),1)
186 ifeq ($(BCMSDIO),1)
187 WLFILES_SRC += src/shared/dbus_sdio_ndis.c
188 else
189 WLFILES_SRC += src/shared/dbus_usb_ndis.c
190 endif
191 endif
192 endif
193 endif
194 #endif
196 #ifndef LINUX_HYBRID
197 ifeq ($(BCM_DNGL_EMBEDIMAGE),1)
198 WLFLAGS += -DBCM_DNGL_EMBEDIMAGE
199 endif
200 #endif
202 ## wl OSL
203 #ifdef WLVX
204 ifeq ($(WLVX),1)
205 WLFILES_SRC += src/wl/sys/wl_vx.c
206 WLFILES_SRC += src/shared/bcmstdlib.c
207 WLFLAGS += -DSEC_TXC_ENABLED
208 endif
209 #endif
211 #ifdef WLBSD
212 ifeq ($(WLBSD),1)
213 WLFILES_SRC += src/wl/sys/wl_bsd.c
214 endif
215 #endif
217 #ifdef WLUM
218 ifeq ($(WLUM),1)
219 WLFILES_SRC += src/wl/sys/wl_usermode.c
220 WLFLAGS += -DUSER_MODE
221 endif
222 #endif
224 #ifdef WLLX
225 ifeq ($(WLLX),1)
226 ifneq ($(WL_HIGH),1)
227 WLFILES_SRC_LO += src/wl/sys/wl_linux_bmac.c
228 WLFILES_SRC_LO += src/shared/bcm_rpc_char.c
229 endif
231 WLFILES_SRC_HI += src/wl/sys/wl_linux.c
232 #ifdef WLUMK
233 ifeq ($(WLUMK),1)
234 WLFILES_SRC_HI += src/wl/sys/wl_cdev.c
235 WLFLAGS += -DWL_UMK
236 endif
237 #endif
238 endif
239 #endif
241 #ifdef WLLXIW
242 ifeq ($(WLLXIW),1)
243 WLFILES_SRC_HI += src/wl/sys/wl_iw.c
244 endif
245 #endif
247 #ifdef WLCFE
248 ifeq ($(WLCFE),1)
249 WLFILES_SRC += src/wl/sys/wl_cfe.c
250 endif
251 #endif
253 #ifdef WLRTE
254 ifeq ($(WLRTE),1)
255 WLFILES_SRC += src/wl/sys/wl_rte.c
256 ifneq ($(WL_HIGH),1)
257 WLFILES_SRC_LO += src/shared/bcm_rpc_tp_rte.c
258 endif
259 endif
260 #endif
262 ifeq ($(BCMECICOEX),1)
263 WLFLAGS += -DBCMECICOEX
264 endif
267 #ifdef NDIS
268 # anything Windows/NDIS specific for 2k/xp/vista/windows7
269 ifeq ($(WLNDIS),1)
271 WLFILES_SRC += src/wl/sys/wl_ndis.c
273 ifeq ($(WLNDIS_DHD),)
274 WLFILES_SRC += src/wl/sys/nhd_ndis.c
275 ifeq ($(WL_SPLIT),1)
276 ifdef USEDDK
277 # XXX: Need " " defined for DDK 2600 build
278 WLFLAGS += -DMEMORY_TAG="'7034'"
279 else
280 WLFLAGS += -DMEMORY_TAG='DWMB'
281 endif
282 else
283 ifdef USEDDK
284 WLFLAGS += -DMEMORY_TAG="'7034'"
285 else
286 WLFLAGS += -DMEMORY_TAG='NWMB'
287 endif
288 endif
289 else
290 WLFILES_SRC += src/dhd/sys/dhd_ndis.c
291 ifdef USEDDK
292 WLFLAGS += -DMEMORY_TAG="'7034'"
293 else
294 WLFLAGS += -DMEMORY_TAG='DWMB'
295 endif
296 endif
298 WLFILES_SRC += src/wl/sys/wl_ndconfig.c
299 WLFILES_SRC += src/shared/bcmwifi.c
300 WLFILES_SRC += src/shared/bcmstdlib.c
302 # support host supplied nvram variables
303 ifeq ($(WLTEST),1)
304 ifeq ($(WLHOSTVARS), 1)
305 WLFLAGS += -DBCMHOSTVARS
306 endif
307 endif
309 ifeq ($(WLVISTA),1)
310 WLFLAGS += -DEXT_STA
312 WLFLAGS += -DWLNOEIND
313 WLFLAGS += -DWL_MONITOR
314 WLFLAGS += -DIBSS_PEER_GROUP_KEY
315 WLFLAGS += -DIBSS_PEER_DISCOVERY_EVENT
316 WLFLAGS += -DIBSS_PEER_MGMT
317 endif
318 ifeq ($(WLXP),1)
319 WLFLAGS += -DWLNOEIND
320 endif
322 # HIGH driver for BMAC ?? any ndis/xp/vista ?
323 ifeq ($(WL_SPLIT),1)
325 endif
327 # DHD host: ?? to clean up and to support all other DHD OSes
328 ifeq ($(WLNDIS_DHD),1)
329 WLFLAGS += -DSHOW_EVENTS -DBCMPERFSTATS
330 WLFLAGS += -DBDC -DBCMDONGLEHOST
331 WLFLAGS += -DBCM4325
332 ifeq ($(BCMSDIO),)
333 WLFLAGS += -DBCMDHDUSB
334 WLFLAGS += -DBCM4328 -DBCM4322
335 endif
337 WLFILES_SRC += src/dhd/sys/dhd_cdc.c
338 WLFILES_SRC += src/dhd/sys/dhd_common.c
340 BCMPCI=0
342 ifeq ($(BCMDBUS),)
343 WLFILES_SRC += src/dhd/sys/dhd_usb_ndis.c
344 endif
346 ifeq ($(WLVISTA),1)
347 WLFILES_SRC += src/wl/sys/wlc_rate.c
348 endif
350 ifeq ($(WLXP),1)
351 WLFLAGS += -DNDIS_DMAWAR
352 # move these non-wl flag to makefiles
353 WLFLAGS += -DBINARY_COMPATIBLE -DWIN32_LEAN_AND_MEAN=1
354 endif
355 endif
356 endif
357 #endif
360 #ifdef BINOSL
361 ifeq ($(BINOSL),1)
362 WLFLAGS += -DBINOSL
363 endif
364 #endif
366 ## wl features
367 # NCONF -- 0 is remove from code, else bit mask of supported nphy revs
368 ifneq ($(NCONF),)
369 WLFLAGS += -DNCONF=$(NCONF)
370 endif
372 # ACONF -- 0 is remove from code, else bit mask of supported aphy revs
373 ifneq ($(ACONF),)
374 WLFLAGS += -DACONF=$(ACONF)
375 endif
377 # GCONF -- 0 is remove from code, else bit mask of supported gphy revs
378 ifneq ($(GCONF),)
379 WLFLAGS += -DGCONF=$(GCONF)
380 endif
382 # LPCONF -- 0 is remove from code, else bit mask of supported lpphy revs
383 ifneq ($(LPCONF),)
384 WLFLAGS += -DLPCONF=$(LPCONF)
385 endif
388 #ifdef AP
389 # ap
390 ifeq ($(AP),1)
391 WLFILES_SRC_HI += src/wl/sys/wlc_ap.c
392 WLFILES_SRC_HI += src/wl/sys/wlc_apps.c
393 WLFILES_SRC_HI += src/wl/sys/wlc_apcs.c
394 WLFLAGS += -DAP
396 ifeq ($(MBSS),1)
397 WLFLAGS += -DMBSS
398 endif
400 # WME_PER_AC_TX_PARAMS
401 ifeq ($(WME_PER_AC_TX_PARAMS),1)
402 WLFLAGS += -DWME_PER_AC_TX_PARAMS
403 endif
405 # WME_PER_AC_TUNING
406 ifeq ($(WME_PER_AC_TUNING),1)
407 WLFLAGS += -DWME_PER_AC_TUNING
408 endif
410 endif
411 #endif
413 #ifdef STA
414 # sta
415 ifeq ($(STA),1)
416 WLFLAGS += -DSTA
417 endif
418 #endif
420 #ifdef APSTA
421 # apsta
422 ifeq ($(APSTA),1)
423 WLFLAGS += -DAPSTA
424 endif
425 # apsta
426 #endif
428 #ifdef WET
429 # wet
430 ifeq ($(WET),1)
431 WLFLAGS += -DWET
432 WLFILES_SRC_HI += src/wl/sys/wlc_wet.c
433 endif
434 #endif
436 #ifdef RXCHAIN_PWRSAVE
437 ifeq ($(RXCHAIN_PWRSAVE), 1)
438 WLFLAGS += -DRXCHAIN_PWRSAVE
439 endif
440 #endif
442 #ifdef RADIO_PWRSAVE
443 ifeq ($(RADIO_PWRSAVE), 1)
444 WLFLAGS += -DRADIO_PWRSAVE
445 endif
446 #endif
448 #ifdef WMF
449 ifeq ($(WMF), 1)
450 WLFILES_SRC_HI += src/wl/sys/wlc_wmf.c
451 WLFLAGS += -DWMF
452 endif
453 #endif
455 #ifdef MCAST_REGEN
456 ifeq ($(MCAST_REGEN), 1)
457 WLFLAGS += -DMCAST_REGEN
458 endif
459 #endif
461 #ifdef WLOVERTHRUSTER
462 ifeq ($(WLOVERTHRUSTER), 1)
463 WLFLAGS += -DWLOVERTHRUSTER
464 endif
465 #endif
467 #ifdef MAC_SPOOF
468 # mac spoof
469 ifeq ($(MAC_SPOOF),1)
470 WLFLAGS += -DMAC_SPOOF
471 endif
472 #endif
474 #ifndef LINUX_HYBRID
475 # Router IBSS Security Support
476 ifeq ($(ROUTER_SECURE_IBSS),1)
477 WLFLAGS += -DIBSS_PEER_GROUP_KEY
478 WLFLAGS += -DIBSS_PSK
479 WLFLAGS += -DIBSS_PEER_MGMT
480 WLFLAGS += -DIBSS_PEER_DISCOVERY_EVENT
481 endif
482 #endif
484 #ifdef WLLED
485 # led
486 ifeq ($(WLLED),1)
487 WLFLAGS += -DWLLED
488 WLFILES_SRC_HI += src/wl/sys/wlc_led.c
489 endif
490 #endif
492 #ifdef WL_MONITOR
493 # MONITOR
494 ifeq ($(WL_MONITOR),1)
495 WLFLAGS += -DWL_MONITOR
496 endif
497 #endif
499 #ifdef ND_ALL_PASSIVE
500 ifeq ($(ND_ALL_PASSIVE),1)
501 WLFLAGS += -DND_ALL_PASSIVE
502 endif
503 #endif
505 #ifdef WME
506 # WME
507 ifeq ($(WME),1)
508 WLFLAGS += -DWME
509 ifeq ($(WLCAC), 1)
510 ifeq ($(WL), 1)
511 WLFLAGS += -DWLCAC
512 WLFILES_SRC_HI += src/wl/sys/wlc_cac.c
513 endif
514 endif
515 endif
516 #endif
518 #ifdef WLBA
519 # WLBA
520 ifeq ($(WLBA),1)
521 WLFLAGS += -DWLBA
522 WLFILES_SRC_HI += src/wl/sys/wlc_ba.c
523 endif
524 #endif
526 #ifdef WLPIO
527 # WLPIO
528 ifeq ($(WLPIO),1)
529 WLFLAGS += -DWLPIO
530 WLFILES_SRC_LO += src/wl/sys/wlc_pio.c
531 endif
532 #endif
534 #ifdef WLAFTERBURNER
535 # WLAFTERBURNER
536 ifeq ($(WLAFTERBURNER),1)
537 WLFLAGS += -DWLAFTERBURNER
538 endif
539 #endif
541 #ifdef CRAM
542 # CRAM
543 ifeq ($(CRAM),1)
544 WLFLAGS += -DCRAM
545 WLFILES_SRC_HI += src/wl/sys/wlc_cram.c
546 endif
547 #endif
549 #ifdef WL11N
550 # 11N
551 ifeq ($(WL11N),1)
552 WLFLAGS += -DWL11N
553 endif
554 #endif
556 #ifdef WL11H
557 # 11H
558 ifeq ($(WL11H),1)
559 WLFLAGS += -DWL11H
560 endif
561 #endif
563 #ifdef WL11D
564 # 11D
565 ifeq ($(WL11D),1)
566 WLFLAGS += -DWL11D
567 endif
568 #endif
570 #ifdef DBAND
571 # DBAND
572 ifeq ($(DBAND),1)
573 WLFLAGS += -DDBAND
574 endif
575 #endif
577 #ifdef WLRM
578 # WLRM
579 ifeq ($(WLRM),1)
580 WLFLAGS += -DWLRM
581 endif
582 #endif
584 #ifdef WLCQ
585 # WLCQ
586 ifeq ($(WLCQ),1)
587 WLFLAGS += -DWLCQ
588 endif
589 #endif
591 #ifdef WLCNT
592 # WLCNT
593 ifeq ($(WLCNT),1)
594 WLFLAGS += -DWLCNT
595 endif
596 #endif
598 #ifdef WLCHANIM
599 # WLCHANIM
600 ifeq ($(WLCHANIM),1)
601 WLFLAGS += -DWLCHANIM
602 endif
603 #endif
605 ifndef DELTASTATS
606 ifeq ($(WLCNT),1)
607 DELTASTATS := 1
608 endif
609 endif
611 # DELTASTATS
612 ifeq ($(DELTASTATS),1)
613 WLFLAGS += -DDELTASTATS
614 endif
616 #ifdef WLCNTSCB
617 # WLCNTSCB
618 ifeq ($(WLCNTSCB),1)
619 WLFLAGS += -DWLCNTSCB
620 endif
621 #endif
624 #ifdef WLCOEX
625 # WLCOEX
626 ifeq ($(WLCOEX),1)
627 WLFLAGS += -DWLCOEX
628 endif
629 #endif
631 ## wl security
632 # external linux supplicant
633 #ifdef LINUX_CRYPTO
634 ifeq ($(LINUX_CRYPTO), 1)
635 WLFLAGS += -DLINUX_CRYPTO
636 endif
637 #endif
639 #ifdef BCMSUP_PSK
640 # in-driver supplicant
641 ifeq ($(BCMSUP_PSK),1)
642 WLFLAGS += -DBCMSUP_PSK
643 WLFILES_SRC_HI += src/wl/sys/wlc_sup.c
644 ifneq ($(BCMROMOFFLOAD),1)
645 WLFILES_SRC_HI += src/bcmcrypto/aes.c
646 WLFILES_SRC_HI += src/bcmcrypto/aeskeywrap.c
647 WLFILES_SRC_HI += src/bcmcrypto/hmac.c
648 WLFILES_SRC_HI += src/bcmcrypto/prf.c
649 WLFILES_SRC_HI += src/bcmcrypto/sha1.c
650 ##NetBSD 2.0 has MD5 and AES built in
651 ifneq ($(OSLBSD),1)
652 WLFILES_SRC_HI += src/bcmcrypto/md5.c
653 WLFILES_SRC_HI += src/bcmcrypto/rijndael-alg-fst.c
654 endif
655 endif
656 WLFILES_SRC_HI += src/bcmcrypto/passhash.c
657 endif
658 #endif
661 #ifdef BCMAUTH_PSK
662 # in-driver authenticator
663 ifeq ($(BCMAUTH_PSK),1)
664 WLFLAGS += -DBCMAUTH_PSK
665 WLFILES_SRC_HI += src/wl/sys/wlc_auth.c
666 endif
667 #endif
669 #ifdef BCMWPA2
670 # BCMWPA2
671 ifeq ($(BCMWPA2),1)
672 WLFLAGS += -DBCMWPA2
673 endif
674 #endif
676 #ifdef BCMCCMP
677 # Soft AES CCMP
678 ifeq ($(BCMCCMP),1)
679 WLFLAGS += -DBCMCCMP
680 ifneq ($(BCMROMOFFLOAD),1)
681 WLFILES_SRC_HI += src/bcmcrypto/aes.c
682 ##BSD has AES built in
683 ifneq ($(BSD),1)
684 WLFILES_SRC_HI +=src/bcmcrypto/rijndael-alg-fst.c
685 endif
686 endif
687 endif
688 #endif
691 #ifdef BCMWAPI_WPI
692 ifeq ($(BCMWAPI_WPI),1)
693 WLFILES_SRC_HI += src/bcmcrypto/sms4.c
694 WLFLAGS += -DBCMWAPI_WPI
695 ifeq ($(BCMSMS4_TEST),1)
696 WLFLAGS += -DBCMSMS4_TEST
697 endif
698 endif
699 #endif
701 # BCMDMA64
702 ifeq ($(BCMDMA64),1)
703 WLFLAGS += -DBCMDMA64
704 endif
706 ifeq ($(BCMDMA64OSL),1)
707 WLFLAGS += -DBCMDMA64OSL
708 endif
710 ifeq ($(BCMDMASGLISTOSL),1)
711 WLFLAGS += -DBCMDMASGLISTOSL
712 endif
714 # Early DMA TX Free for LOW driver
715 ifeq ($(WL_DMA_TX_FREE),1)
716 ifneq ($(WL_HIGH),1)
717 ifeq ($(PT_GIANT),1)
718 WLFLAGS += -DDMA_TX_FREE
719 endif
720 endif
721 endif
723 ## wl over jtag
724 #ifdef BCMJTAG
725 ifeq ($(BCMJTAG),1)
726 WLFLAGS += -DBCMJTAG -DBCMSLTGT
727 WLFILES_SRC += src/shared/bcmjtag.c
728 WLFILES_SRC += src/shared/bcmjtag_linux.c
729 WLFILES_SRC += src/shared/ejtag.c
730 WLFILES_SRC += src/shared/jtagm.c
731 endif
732 #endif
734 #ifdef WLAMSDU
735 ifeq ($(WLAMSDU),1)
736 WLFLAGS += -DWLAMSDU
737 WLFILES_SRC_HI += src/wl/sys/wlc_amsdu.c
738 endif
739 #endif
741 #ifdef WLAMSDU_SWDEAGG
742 ifeq ($(WLAMSDU_SWDEAGG),1)
743 WLFLAGS += -DWLAMSDU_SWDEAGG
744 endif
745 #endif
747 #ifdef WLAMPDU
748 ifeq ($(WLAMPDU),1)
749 WLFLAGS += -DWLAMPDU
750 WLFILES_SRC_HI += src/wl/sys/wlc_ampdu.c
751 endif
752 #endif
754 #ifdef WOWL
755 ifeq ($(WOWL),1)
756 WLFLAGS += -DWOWL
757 WLFILES_SRC += src/wl/sys/d11wakeucode.c
758 WLFILES_SRC += src/wl/sys/wlc_wowl.c
759 WLFILES_SRC += src/wl/sys/wowlaestbls.c
760 endif
761 #endif
763 #ifdef BTC2WIRE
764 ifeq ($(BTC2WIRE),1)
765 WLFLAGS += -DBTC2WIRE
766 WLFILES_SRC_LO += src/wl/sys/d11ucode_2w.c
767 endif
768 #endif
770 #ifdef WL_ASSOC_RECREATE
771 ifeq ($(WL_ASSOC_RECREATE),1)
772 ifeq ($(STA),1)
773 WLFLAGS += -DWL_ASSOC_RECREATE
774 endif
775 endif
776 #endif
779 #ifdef WLBTAMP
780 ifeq ($(WLBTAMP),1)
781 WLFLAGS += -DWLBTAMP
782 WLFILES_SRC_HI += src/wl/sys/wlc_bta.c
783 endif
784 #endif
786 #ifdef WLPLT
787 ifeq ($(WLPLT),1)
788 WLFLAGS += -DWLPLT
789 WLFILES_SRC_HI += src/wl/sys/wlc_plt.c
790 endif
791 #endif
794 ## --- which buses
796 # silicon backplane
798 #ifdef BCMSIBUS
799 ifeq ($(BCMSIBUS),1)
800 WLFLAGS += -DBCMBUSTYPE=SI_BUS
801 BCMPCI=0
802 endif
803 #endif
805 ifeq ($(SOCI_SB),1)
806 WLFLAGS += -DBCMCHIPTYPE=SOCI_SB
807 else
808 ifeq ($(SOCI_AI),1)
809 WLFLAGS += -DBCMCHIPTYPE=SOCI_AI
810 endif
811 endif
815 #ifndef LINUX_HYBRID
816 # AP/ROUTER with SDSTD
817 ifeq ($(WLAPSDSTD),1)
818 WLFILES_SRC += src/shared/nvramstubs.c
819 WLFILES_SRC += src/shared/bcmsrom.c
820 endif
821 #endif
823 ## --- basic shared files
825 #ifdef HNDDMA
826 ifeq ($(HNDDMA),1)
827 WLFILES_SRC_LO += src/shared/hnddma.c
828 endif
829 #endif
831 #ifdef BCMUTILS
832 ifeq ($(BCMUTILS),1)
833 WLFILES_SRC += src/shared/bcmutils.c
834 endif
835 #endif
837 #ifdef BCMASSERT_LOG
838 ifeq ($(BCMASSERT_LOG),1)
839 WLFLAGS += -DBCMASSERT_LOG
840 WLFILES_SRC_HI += src/shared/bcm_assert_log.c
841 endif
842 #endif
844 #ifdef BCMSROM
845 ifeq ($(BCMSROM),1)
846 WLFILES_SRC_LO += src/shared/bcmsrom.c
847 WLFILES_SRC_LO += src/shared/bcmotp.c
848 endif
849 #endif
851 #ifdef BCMOTP
852 ifeq ($(BCMOTP),1)
853 WLFILES_SRC_LO += src/shared/bcmotp.c
854 WLFLAGS += -DBCMNVRAMR
855 endif
856 #endif
859 #ifdef SIUTILS
860 ifeq ($(SIUTILS),1)
861 WLFILES_SRC_LO += src/shared/siutils.c
862 WLFILES_SRC_LO += src/shared/sbutils.c
863 WLFILES_SRC_LO += src/shared/aiutils.c
864 WLFILES_SRC_LO += src/shared/hndpmu.c
865 ifneq ($(BCMPCI), 0)
866 WLFILES_SRC_LO += src/shared/nicpci.c
867 endif
868 endif
869 #endif
871 #ifdef SBMIPS
872 ifeq ($(SBMIPS),1)
873 WLFLAGS += -DBCMMIPS
874 WLFILES_SRC_LO += src/shared/hndmips.c
875 WLFILES_SRC_LO += src/shared/hndchipc.c
876 endif
877 #endif
879 #ifdef SBPCI
880 ifeq ($(SBPCI),1)
881 WLFILES_SRC_LO += src/shared/hndpci.c
882 endif
883 #endif
885 #ifdef SFLASH
886 ifeq ($(SFLASH),1)
887 WLFILES_SRC_LO += src/shared/sflash.c
888 endif
889 #endif
891 #ifdef FLASHUTL
892 ifeq ($(FLASHUTL),1)
893 WLFILES_SRC_LO += src/shared/flashutl.c
894 endif
895 #endif
897 ## --- shared OSL
898 #ifdef OSLUM
899 # linux user mode
900 ifeq ($(OSLUM),1)
901 WLFILES_SRC += src/shared/usermode_osl.c
902 WLFLAGS += -DUSER_MODE
903 endif
904 #endif
906 #ifdef OSLLX
907 # linux osl
908 ifeq ($(OSLLX),1)
909 WLFILES_SRC += src/shared/linux_osl.c
910 endif
911 #endif
913 #ifdef OSLVX
914 # vx osl
915 ifeq ($(OSLVX),1)
916 WLFILES_SRC += src/shared/vx_osl.c
917 WLFILES_SRC += src/shared/bcmallocache.c
918 endif
919 #endif
921 #ifdef OSLBSD
922 # bsd osl
923 ifeq ($(OSLBSD),1)
924 WLFILES_SRC += src/shared/bsd_osl.c
925 WLFILES_SRC += src/shared/nvramstubs.c
926 endif
927 #endif
929 #ifdef OSLCFE
930 ifeq ($(OSLCFE),1)
931 WLFILES_SRC += src/shared/cfe_osl.c
932 endif
933 #endif
935 #ifdef OSLRTE
936 ifeq ($(OSLRTE),1)
937 WLFILES_SRC += src/shared/hndrte_osl.c
938 endif
939 #endif
941 #ifdef OSLNDIS
942 ifeq ($(OSLNDIS),1)
943 WLFILES_SRC += src/shared/ndshared.c
944 WLFILES_SRC += src/shared/ndis_osl.c
945 endif
946 #endif
948 #ifndef LINUX_HYBRID
949 ifeq ($(CONFIG_USBRNDIS_RETAIL),1)
950 WLFLAGS += -DCONFIG_USBRNDIS_RETAIL
951 WLFILES_SRC += src/wl/sys/wl_ndconfig.c
952 WLFILES_SRC += src/shared/bcmwifi.c
953 endif
955 ifeq ($(NVRAM),1)
956 WLFILES_SRC_LO += src/dongle/rte/test/nvram.c
957 WLFILES_SRC_LO += src/dongle/rte/sim/nvram.c
958 WLFILES_SRC_LO += src/shared/nvram/nvram.c
959 endif
961 ifeq ($(NVRAMVX),1)
962 WLFILES_SRC_LO += src/shared/nvram/nvram_rw.c
963 endif
964 #endif
966 #ifdef BCMNVRAMR
967 ifeq ($(BCMNVRAMR),1)
968 WLFILES_SRC_LO += src/shared/nvram/nvram_ro.c
969 WLFILES_SRC_LO += src/shared/sflash.c
970 WLFILES_SRC_LO += src/shared/bcmotp.c
971 WLFLAGS += -DBCMNVRAMR
972 endif
973 #else
974 ifneq ($(BCMNVRAMR),1)
975 ifeq ($(WLLXNOMIPSEL),1)
976 ifneq ($(WLUMK),1)
977 WLFILES_SRC += src/shared/nvramstubs.c
978 endif
979 else
980 ifeq ($(WLNDIS),1)
981 WLFILES_SRC += src/shared/nvramstubs.c
982 else
983 ifeq ($(BCMNVRAMW),1)
984 WLFILES_SRC_LO += src/shared/nvram/nvram_ro.c
985 WLFILES_SRC_LO += src/shared/sflash.c
986 endif
987 endif
988 endif
989 ifeq ($(BCMNVRAMW),1)
990 WLFILES_SRC_LO += src/shared/bcmotp.c
991 WLFLAGS += -DBCMNVRAMW
992 endif
993 endif
994 #endif
996 # Auto-select OTP: BCMAUTOOTP defined
997 # IPX OTP: nothing defined
998 # HND OTP: BCMHNDOTP defined
999 ifeq ($(BCMAUTOOTP),1)
1000 WLFLAGS += -DBCMAUTOOTP
1001 endif
1002 ifeq ($(BCMHNDOTP),1)
1003 WLFLAGS += -DBCMHNDOTP
1004 endif
1007 #ifdef WLDIAG
1008 ifeq ($(WLDIAG),1)
1009 WLFLAGS += -DWLDIAG
1010 WLFILES_SRC_LO += src/wl/sys/wlc_diag.c
1011 endif
1012 #endif
1015 #ifdef BCMQT
1016 ifeq ($(BCMQT),1)
1017 # Set flag to indicate emulated chip
1018 WLFLAGS += -DBCMSLTGT -DBCMQT
1019 ifeq ($(WLRTE),1)
1020 # Use of RTE implies embedded (CPU emulated)
1021 WLFLAGS += -DBCMQT_CPU
1022 endif
1023 endif
1024 #endif
1026 #ifdef WLPFN
1027 ifeq ($(WLPFN),1)
1028 WLFLAGS += -DWLPFN
1029 WLFILES_SRC += src/wl/sys/wl_pfn.c
1030 endif
1031 #endif
1033 #ifdef TOE
1034 ifeq ($(TOE),1)
1035 WLFLAGS += -DTOE
1036 WLFILES_SRC += src/wl/sys/wl_toe.c
1037 endif
1038 #endif
1040 #ifdef ARPOE
1041 ifeq ($(ARPOE),1)
1042 WLFLAGS += -DARPOE
1043 WLFILES_SRC += src/wl/sys/wl_arpoe.c
1044 endif
1045 #endif
1047 #ifdef PCOEM_LINUXSTA
1048 ifeq ($(PCOEM_LINUXSTA),1)
1049 WLFLAGS += -DPCOEM_LINUXSTA
1050 endif
1051 #endif
1053 #ifdef LINUXSTA_PS
1054 ifeq ($(LINUXSTA_PS),1)
1055 WLFLAGS += -DLINUXSTA_PS
1056 endif
1057 #endif
1059 #ifndef LINUX_HYBRID
1060 ifeq ($(KEEP_ALIVE),1)
1061 WLFLAGS += -DKEEP_ALIVE
1062 WLFILES_SRC += src/wl/sys/wl_keep_alive.c
1063 endif
1065 #ifdef OPENSRC_IOV_IOCTL
1066 ifeq ($(OPENSRC_IOV_IOCTL),1)
1067 WLFLAGS += -DOPENSRC_IOV_IOCTL
1068 endif
1069 #endif
1071 ifeq ($(PACKET_FILTER),1)
1072 WLFLAGS += -DPACKET_FILTER
1073 WLFILES_SRC += src/wl/sys/wlc_pkt_filter.c
1074 endif
1076 ifeq ($(SEQ_CMDS),1)
1077 WLFLAGS += -DSEQ_CMDS
1078 WLFILES_SRC += src/wl/sys/wlc_seq_cmds.c
1079 endif
1081 ifeq ($(RECEIVE_THROTTLE),1)
1082 WLFLAGS += -DWL_PM2_RCV_DUR_LIMIT
1083 endif
1085 ifeq ($(ASYNC_TSTAMPED_LOGS),1)
1086 WLFLAGS += -DBCMTSTAMPEDLOGS
1087 endif
1088 #endif
1091 # Sort and remove duplicates from WLFILES*
1092 ifeq ($(WL_LOW),1)
1093 WLFILES_SRC += $(sort $(WLFILES_SRC_LO))
1094 endif
1095 ifeq ($(WL_HIGH),1)
1096 WLFILES_SRC += $(sort $(WLFILES_SRC_HI))
1097 endif
1098 ifeq ($(SAMPLE_COLLECT),1)
1099 WLFLAGS += -DSAMPLE_COLLECT
1100 endif
1102 ifeq ($(SMF_STATS),1)
1103 WLFLAGS += -DSMF_STATS
1104 endif
1106 #ifdef PHYMON
1107 ifeq ($(PHYMON),1)
1108 WLFLAGS += -DPHYMON
1109 endif
1110 #endif
1112 # Legacy WLFILES pathless definition, please use new src relative path
1113 # in make files.
1114 WLFILES := $(sort $(notdir $(WLFILES_SRC)))