Include wl_high.ko module
[tomato.git] / release / src-rt / wl / config / wl.mk
blobe70ab2c287ca94de63941f77cec79e6f71b550ec
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) 2010, Broadcom Corporation. All Rights Reserved.
5 #
6 # Permission to use, copy, modify, and/or distribute this software for any
7 # purpose with or without fee is hereby granted, provided that the above
8 # copyright notice and this permission notice appear in all copies.
9 #
10 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
13 # SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
15 # OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
16 # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 # $Id: wl.mk,v 1.369.2.53 2011-01-26 19:40:43 Exp $
20 #ifdef WL_PPR_SUBBAND
21 ifeq ($(WL_PPR_SUBBAND),1)
22 WLFLAGS += -DWL_PPR_SUBBAND
23 endif
24 #endif
27 # debug/internal
28 ifeq ($(DEBUG),1)
29 WLFLAGS += -DBCMDBG -DWLTEST -DWLTIMER -DWIFI_ACT_FRAME
30 #ifndef LINUX_HYBRID
31 WLFLAGS += -DRWL_WIFI -DWLRWL
32 WLRWL = 1
33 #endif
34 else
35 #ifdef WLTEST
36 # mfgtest builds
37 ifeq ($(WLTEST),1)
38 WLFLAGS += -DWLTEST
39 endif
40 #endif
41 endif
43 #ifdef WLMFG
44 # wl mfg support
45 ifeq ($(WLMFG),1)
46 WLFLAGS += -DWLMFG -DWLTEST
47 WLFILES_SRC_HI += src/wl/sys/wlc_mfg.c
48 endif
49 #endif
52 #ifdef BCMDBG_MEM
53 ifeq ($(BCMDBG_MEM),1)
54 WLFLAGS += -DBCMDBG_MEM
55 endif
56 #endif
58 #ifdef BCMDBG_PKT
59 ifeq ($(BCMDBG_PKT),1)
60 WLFLAGS += -DBCMDBG_PKT
61 endif
62 #endif
64 #ifdef BCMDBG_TRAP
65 # CPU debug traps (lomem access, divide by 0, etc) are enabled except when mogrified out for
66 # external releases.
67 WLFLAGS += -DBCMDBG_TRAP
68 #endif
70 #ifdef WLLMAC
71 ifeq ($(WLLMAC),1)
72 WLFLAGS += -DWLLMAC -DEXTENDED_SCAN
73 endif
74 #endif
77 ## wl driver common
79 ifndef WL_LOW
80 WL_LOW = 1
81 endif
83 ifndef WL_HIGH
84 WL_HIGH = 1
85 endif
87 ## iff one of WLC_LOW and WLC_HIGH is defined, SPLIT is true
88 WL_SPLIT = 0
89 ifeq ($(WL_LOW),1)
90 ifneq ($(WL_HIGH),1)
91 WL_SPLIT = 1
92 endif
93 endif
95 ifeq ($(WL_HIGH),1)
96 ifneq ($(WL_LOW),1)
97 WL_SPLIT = 1
98 ifeq ($(RPC_NOCOPY),1)
99 WLFLAGS += -DBCM_RPC_NOCOPY
100 endif
101 ifeq ($(RPC_RXNOCOPY),1)
102 WLFLAGS += -DBCM_RPC_RXNOCOPY
103 endif
104 ifeq ($(RPC_TXNOCOPY),1)
105 WLFLAGS += -DBCM_RPC_TXNOCOPY
106 endif
107 ifeq ($(RPC_TOC),1)
108 WLFLAGS += -DBCM_RPC_TOC
109 endif
110 ifeq ($(RPC_ROC),1)
111 WLFLAGS += -DBCM_RPC_ROC
112 endif
113 ifeq ($(BMAC_ENABLE_LINUX_HOST_RPCAGG),1)
114 WLFLAGS += -DBMAC_ENABLE_LINUX_HOST_RPCAGG
115 endif
116 ifeq ($(DBUS_LINUX_RXDPC),1)
117 WLFLAGS += -DDBUS_LINUX_RXDPC
118 endif
119 ifneq ($(BCM_RPC_TP_DBUS_NTXQ),)
120 WLFLAGS += -DBCM_RPC_TP_DBUS_NTXQ=$(BCM_RPC_TP_DBUS_NTXQ)
121 endif
122 ifneq ($(BCM_RPC_TP_DBUS_NRXQ),)
123 WLFLAGS += -DBCM_RPC_TP_DBUS_NRXQ=$(BCM_RPC_TP_DBUS_NRXQ)
124 endif
125 ifeq ($(BCMUSBDEV_EP_FOR_RPCRETURN),1)
126 WLFLAGS += -DBCMUSBDEV_EP_FOR_RPCRETURN
127 endif
128 endif
129 endif
131 ifeq ($(WL_LOW),1)
132 WLFLAGS += -DWLC_LOW
133 ifneq ($(WL_HIGH),1)
134 ifneq ($(BCM_RPC_TP_FLOWCTL_QWM_HIGH),)
135 WLFLAGS += -DBCM_RPC_TP_FLOWCTL_QWM_HIGH=$(BCM_RPC_TP_FLOWCTL_QWM_HIGH)
136 endif
137 endif
138 endif
140 ifeq ($(WL_HIGH),1)
141 WLFLAGS += -DWLC_HIGH
142 endif
144 ifeq ($(GTK_RESET),1)
145 WLFLAGS += -DGTK_RESET
146 endif
148 ifeq ($(WLUSBAP),1)
149 WLFLAGS += -DUSBAP
150 #WLFLAGS += -DEHCI_FASTPATH_TX -DEHCI_FASTPATH_RX
151 endif
153 # split driver infrastructure files
154 ifeq ($(WL_SPLIT),1)
155 WLFILES_SRC += src/shared/bcm_xdr.c
156 WLFILES_SRC += src/shared/bcm_rpc.c
157 ifneq ($(WLUSBAP),1)
158 WLFILES_SRC_HI += src/shared/nvramstubs.c
159 endif
160 ifeq ($(OSLLX),1)
161 WLFILES_SRC_HI += src/shared/linux_rpc_osl.c
162 endif
164 ifeq ($(OSLNDIS),1)
165 WLFILES_SRC_HI += src/shared/ndis_rpc_osl.c
166 endif
168 ifeq ($(BCMDBUS),1)
169 WLFILES_SRC_HI += src/shared/bcm_rpc_tp_dbus.c
170 endif
172 WLFILES_SRC_HI += src/wl/sys/wlc_bmac_stubs.c
173 WLFILES_SRC_HI += src/wl/sys/wlc_rpctx.c
174 WLFILES_SRC_LO += src/wl/sys/wlc_high_stubs.c
176 ifeq ($(WL_HIGH),1)
177 # for SDIO BMAC, OSLREGOPS can not be a global define, dbus need direct register access
178 # OSLREGOPS is defined in wlc_cfg.h
179 ifeq ($(BCMSDIO),1)
180 ifneq ($(WLVISTA)$(WLWIN7),)
181 WLFILES_SRC_HI += src/shared/sdh_ndis.c
182 endif
183 else
184 WLFLAGS += -DBCMBUSTYPE=RPC_BUS
185 WLFLAGS += -DOSLREGOPS
186 endif
187 endif
188 endif
190 #ifdef WL
191 ifeq ($(WL),1)
192 WLFILES_SRC += src/shared/bcmwifi.c
193 WLFILES_SRC += src/shared/bcmevent.c
194 WLFILES_SRC += src/wl/sys/wlc_alloc.c
196 WLFILES_SRC_LO += src/shared/qmath.c
197 WLFILES_SRC_LO += src/wl/sys/d11ucode_le15.c
198 WLFILES_SRC_LO += src/wl/sys/d11ucode_gt15.c
199 WLFILES_SRC_LO += src/wl/sys/d11ucode_ge24.c
200 WLFILES_SRC_LO += src/wl/phy/wlc_phy_cmn.c
201 WLFILES_SRC_LO += src/wl/phy/wlc_phy_ssn.c
202 WLFILES_SRC_LO += src/wl/phy/wlc_phy_n.c
203 WLFILES_SRC_LO += src/wl/phy/wlc_phytbl_n.c
204 WLFILES_SRC_LO += src/wl/phy/wlc_phytbl_ssn.c
205 WLFILES_SRC_LO += src/wl/sys/wlc_phy_shim.c
206 WLFILES_SRC_LO += src/wl/sys/wlc_bmac.c
208 ifneq ($(MINIAP),1)
209 WLFILES_SRC_LO += src/wl/phy/wlc_phy_ht.c
210 WLFILES_SRC_LO += src/wl/phy/wlc_phytbl_ht.c
211 WLFILES_SRC_LO += src/wl/phy/wlc_phy_lcn40.c
212 WLFILES_SRC_LO += src/wl/phy/wlc_phytbl_lcn40.c
213 WLFILES_SRC_LO += src/wl/phy/wlc_phy_lcn.c
214 WLFILES_SRC_LO += src/wl/phy/wlc_phytbl_lcn.c
215 WLFILES_SRC_LO += src/wl/phy/wlc_phy_lp.c
216 WLFILES_SRC_LO += src/wl/phy/wlc_phytbl_lp.c
217 WLFILES_SRC_LO += src/wl/phy/wlc_phy_abg.c
218 endif
220 WLFILES_SRC_HI += src/wl/sys/wlc.c
221 WLFILES_SRC_HI += src/wl/sys/wlc_assoc.c
222 WLFILES_SRC_HI += src/wl/sys/wlc_rate.c
223 WLFILES_SRC_HI += src/wl/sys/wlc_stf.c
224 ifneq ($(WLWSEC),0)
225 WLFLAGS += -DWLWSEC
226 WLFILES_SRC_HI += src/wl/sys/wlc_security.c
227 WLFILES_SRC_HI += src/wl/sys/wlc_key.c
228 endif
229 WLFILES_SRC_HI += src/wl/sys/wlc_scb.c
230 WLFILES_SRC_HI += src/wl/sys/wlc_rate_sel.c
231 WLFILES_SRC_HI += src/wl/sys/wlc_antsel.c
232 WLFILES_SRC_HI += src/wl/sys/wlc_bsscfg.c
233 WLFILES_SRC_HI += src/wl/sys/wlc_scan.c
234 WLFILES_SRC_HI += src/wl/phy/wlc_phy_iovar.c
235 WLFILES_SRC_HI += src/wl/sys/wlc_rm.c
236 # tpc module is shared by 11h tpc and wl tx power control */
237 WLTPC := 1
238 ifeq ($(WLTPC),1)
239 WLFLAGS += -DWLTPC
240 endif
241 ifeq ($(WLLMAC),1)
242 WLFILES_SRC += src/wl/sys/wlc_lmac.c
243 ifeq ($(STA), 1)
244 WLFILES_SRC += src/wl/sys/wlc_lmac_sta.c
245 endif
246 ifeq ($(WLLMACPROTO),1)
247 WLFLAGS += -DWLLMACPROTO
248 WLFILES_SRC += src/wl/sys/wlc_lmac_proto.c
249 endif
250 ifeq ($(WLLMAC_ONLY),1)
251 WLFLAGS += -DWLLMAC_ONLY
252 WLFLAGS += -DWLNOEIND
253 WLFILES_SRC_HI += src/wl/sys/wlc_channel_dummy.c
254 else
255 WLFILES_SRC_HI += src/wl/sys/wlc_event.c
256 WLFILES_SRC_HI += src/wl/sys/wlc_channel.c
257 endif
258 else
259 WLFILES_SRC_HI += src/wl/sys/wlc_event.c
260 ifeq ($(WLCHANNEL_DUMMY),1)
261 WLFILES_SRC_HI += src/wl/sys/wlc_channel_dummy.c
262 else
263 WLFILES_SRC_HI += src/wl/sys/wlc_channel.c
264 endif
265 endif
266 WLFILES_SRC_HI += src/shared/bcmwpa.c
267 #ifndef LINUX_CRYPTO
268 ifneq ($(LINUX_CRYPTO),1)
269 WLFILES_SRC_HI += src/bcmcrypto/rc4.c
270 WLFILES_SRC_HI += src/bcmcrypto/tkhash.c
271 WLFILES_SRC_HI += src/bcmcrypto/tkmic.c
272 WLFILES_SRC_HI += src/bcmcrypto/wep.c
273 endif
274 #endif /* LINUX_CRYPTO */
275 #ifdef WLEXTLOG
276 ifeq ($(WLEXTLOG),1)
277 WLFLAGS += -DWLEXTLOG
278 WLFILES_SRC += src/wl/sys/wlc_extlog.c
279 endif
280 #endif
281 #ifdef WLSCANCACHE
282 ifeq ($(WLSCANCACHE),1)
283 WLFLAGS += -DWLSCANCACHE
284 WLFILES_SRC += src/wl/sys/wlc_scandb.c
285 endif
286 #endif
288 endif
289 #endif /* WL */
291 #ifdef BCMDBUS
292 ifeq ($(BCMDBUS),1)
293 WLFLAGS += -DBCMDBUS
294 WLFILES_SRC += src/shared/dbus.c
296 ifeq ($(BCMSDIO),1)
297 ifeq ($(WL_HIGH),1)
298 WLFILES_SRC_HI += src/shared/siutils.c
299 WLFILES_SRC_HI += src/shared/bcmotp.c
300 WLFILES_SRC_HI += src/shared/sbutils.c
301 WLFILES_SRC_HI += src/shared/aiutils.c
302 WLFILES_SRC_HI += src/shared/hndpmu.c
303 endif
304 endif
306 ifeq ($(WLLX),1)
307 ifeq ($(BCMSDIO),1)
308 WLFILES_SRC += src/shared/dbus_sdh.c
309 WLFILES_SRC += src/shared/dbus_sdio_linux.c
310 else
311 WLFILES_SRC += src/shared/dbus_usb.c
312 WLFILES_SRC += src/shared/dbus_usb_linux.c
313 endif
314 else
315 ifeq ($(WLNDIS),1)
316 ifeq ($(BCMSDIO),1)
317 ifneq ($(WLVISTA)$(WLWIN7),)
318 WLFILES_SRC += src/shared/dbus_sdio.c
319 WLFILES_SRC += src/shared/dbus_sdio_ndis.c
320 else
321 WLFILES_SRC += src/shared/dbus_sdh.c
322 WLFILES_SRC += src/shared/dbus_sdh_ndis.c
323 endif
324 else
325 WLFILES_SRC += src/shared/dbus_usb.c
326 WLFILES_SRC += src/shared/dbus_usb_ndis.c
327 endif
328 endif
329 endif
330 endif
331 #endif
333 #ifndef LINUX_HYBRID
334 ifeq ($(BCM_DNGL_EMBEDIMAGE),1)
335 WLFLAGS += -DBCM_DNGL_EMBEDIMAGE
336 endif
337 #endif
339 # For USBAP to select which images to embed
340 ifeq ($(EMBED_IMAGE_4319usb),1)
341 WLFLAGS += -DEMBED_IMAGE_4319usb
342 endif
343 ifeq ($(EMBED_IMAGE_4319sd),1)
344 WLFLAGS += -DEMBED_IMAGE_4319sd
345 endif
346 ifeq ($(EMBED_IMAGE_4322),1)
347 WLFLAGS += -DEMBED_IMAGE_4322
348 endif
350 ifeq ($(EMBED_IMAGE_43236b1),1)
351 WLFLAGS += -DEMBED_IMAGE_43236b1
352 endif
353 ifeq ($(EMBED_IMAGE_43237a0),1)
354 WLFLAGS += -DEMBED_IMAGE_43237a0
355 endif
357 ifeq ($(WL_DNGL_WD),1)
358 WLFLAGS += -DWL_DNGL_WD
359 ifneq ($(WL_DNGL_WD_DEFAULT_TIMEOUT),)
360 WLFLAGS += -DWL_DNGL_WD_DEFAULT_TIMEOUT=$(WL_DNGL_WD_DEFAULT_TIMEOUT)
361 endif
362 endif
364 ## wl OSL
365 #ifdef WLVX
366 ifeq ($(WLVX),1)
367 WLFILES_SRC += src/wl/sys/wl_vx.c
368 WLFILES_SRC += src/shared/bcmstdlib.c
369 WLFLAGS += -DSEC_TXC_ENABLED
370 endif
371 #endif
373 #ifdef WLBSD
374 ifeq ($(WLBSD),1)
375 WLFILES_SRC += src/wl/sys/wl_bsd.c
376 endif
377 #endif
379 #ifdef WLUM
380 ifeq ($(WLUM),1)
381 WLFILES_SRC += src/wl/sys/wl_usermode.c
382 WLFLAGS += -DUSER_MODE
383 endif
384 #endif
386 #ifdef WLLX
387 ifeq ($(WLLX),1)
388 ifneq ($(WL_HIGH),1)
389 WLFILES_SRC_LO += src/wl/sys/wl_linux_bmac.c
390 WLFILES_SRC_LO += src/shared/bcm_rpc_char.c
391 endif
393 WLFILES_SRC_HI += src/wl/sys/wl_linux.c
394 #ifdef WLUMK
395 ifeq ($(WLUMK),1)
396 WLFILES_SRC_HI += src/wl/sys/wl_cdev.c
397 WLFLAGS += -DWL_UMK
398 endif
399 #endif
400 endif
401 #endif
403 #ifdef WLLXIW
404 ifeq ($(WLLXIW),1)
405 WLFILES_SRC_HI += src/wl/sys/wl_iw.c
406 WLFLAGS += -DWLLXIW
407 endif
408 #endif
410 #ifdef WLCFE
411 ifeq ($(WLCFE),1)
412 WLFILES_SRC += src/wl/sys/wl_cfe.c
413 endif
414 #endif
416 #ifdef WLRTE
417 ifeq ($(WLRTE),1)
418 WLFILES_SRC += src/wl/sys/wl_rte.c
419 ifneq ($(WL_HIGH),1)
420 WLFILES_SRC_LO += src/shared/bcm_rpc_tp_rte.c
421 endif
422 endif
423 #endif
425 ifeq ($(BCMECICOEX),1)
426 WLFLAGS += -DBCMECICOEX
427 endif
429 ifeq ($(CCA_STATS),1)
430 WLFLAGS += -DCCA_STATS
431 ifeq ($(ISID_STATS),1)
432 WLFLAGS += -DISID_STATS
433 endif
434 endif
436 ifeq ($(DNGL_WD_KEEP_ALIVE),1)
437 WLFLAGS += -DDNGL_WD_KEEP_ALIVE
438 endif
441 #ifdef NDIS
442 # anything Windows/NDIS specific for 2k/xp/vista/windows7
443 ifeq ($(WLNDIS),1)
444 WLFILES_SRC += src/wl/sys/wl_ndis.c
446 ifeq ($(WLNDIS_DHD),)
447 WLFILES_SRC += src/wl/sys/nhd_ndis.c
448 ifeq ($(WL_SPLIT),1)
449 ifdef USEDDK
450 WLFLAGS += -DMEMORY_TAG="'7034'"
451 else
452 WLFLAGS += -DMEMORY_TAG='DWMB'
453 endif
454 else
455 ifdef USEDDK
456 WLFLAGS += -DMEMORY_TAG="'7034'"
457 else
458 WLFLAGS += -DMEMORY_TAG='NWMB'
459 endif
460 endif
461 else
462 WLFILES_SRC += src/dhd/sys/dhd_ndis.c
463 ifdef USEDDK
464 WLFLAGS += -DMEMORY_TAG="'7034'"
465 else
466 WLFLAGS += -DMEMORY_TAG='DWMB'
467 endif
468 endif
470 WLFILES_SRC += src/wl/sys/wl_ndconfig.c
471 WLFILES_SRC += src/shared/bcmwifi.c
472 WLFILES_SRC += src/shared/bcmstdlib.c
474 # support host supplied nvram variables
475 ifeq ($(WLTEST),1)
476 ifeq ($(WLHOSTVARS), 1)
477 WLFLAGS += -DBCMHOSTVARS
478 endif
479 else
480 ifeq ($(BCMEXTNVM),1)
481 ifeq ($(WLHOSTVARS), 1)
482 WLFLAGS += -DBCMHOSTVARS
483 endif
484 endif
485 endif
487 ifneq ($(WLVISTA)$(WLWIN7),)
488 WLFLAGS += -DEXT_STA
489 WLFLAGS += -DWL_MONITOR
490 WLFLAGS += -DIBSS_PEER_GROUP_KEY
491 WLFLAGS += -DIBSS_PEER_DISCOVERY_EVENT
492 WLFLAGS += -DIBSS_PEER_MGMT
493 endif
495 ifeq ($(WLWIN7),1)
496 WLFLAGS += -DAP
497 endif
499 ifeq ($(WLXP),1)
500 WLFLAGS += -DWLNOEIND
501 endif
503 ifeq ($(WLVIF),1)
504 WLFLAGS += -DWLVIF
505 endif
507 # HIGH driver for BMAC ?? any ndis/xp/vista ?
508 ifeq ($(WL_SPLIT),1)
509 endif
511 # DHD host: ?? to clean up and to support all other DHD OSes
512 ifeq ($(WLNDIS_DHD),1)
513 WLFLAGS += -DSHOW_EVENTS -DBCMPERFSTATS
514 WLFLAGS += -DBDC -DBCMDONGLEHOST
515 WLFLAGS += -DBCM4325
517 ifneq ($(BCMSDIO),1)
518 WLFLAGS += -DBCMDHDUSB
519 WLFLAGS += -DBCM4328 -DBCM4322
520 endif
522 WLFILES_SRC += src/shared/bcmevent.c
523 WLFILES_SRC += src/dhd/sys/dhd_cdc.c
524 WLFILES_SRC += src/dhd/sys/dhd_common.c
526 BCMPCI = 0
528 ifneq ($(BCMDBUS),1)
529 WLFILES_SRC += src/dhd/sys/dhd_usb_ndis.c
530 endif
532 ifneq ($(WLVISTA)$(WLWIN7),)
533 WLFILES_SRC += src/wl/sys/wlc_rate.c
534 endif
536 ifeq ($(WLWIN7),1)
537 WLFILES_SRC += src/wl/sys/wlc_ap.c
538 WLFILES_SRC += src/wl/sys/wlc_apps.c
539 endif
541 ifeq ($(WLXP),1)
542 WLFLAGS += -DNDIS_DMAWAR
543 # move these non-wl flag to makefiles
544 WLFLAGS += -DBINARY_COMPATIBLE -DWIN32_LEAN_AND_MEAN=1
545 endif
547 #ifdef WLBTAMP
548 ifeq ($(WLBTAMP),1)
549 WLFLAGS += -DWLBTAMP
550 WLFILES_SRC += src/dhd/sys/dhd_bta.c
551 #ifdef WLBTWUSB
552 ifeq ($(WLBTWUSB),1)
553 WLFLAGS += -DWLBTWUSB
554 WLFILES_SRC += src/wl/sys/bt_int.c
555 endif
556 #endif /* WLBTWUSB */
557 endif
558 #endif /* WLBTAMP */
559 endif
560 endif
561 #endif
563 ifeq ($(ADV_PS_POLL),1)
564 WLFLAGS += -DADV_PS_POLL
565 endif
567 #ifdef DHDOID
568 ifeq ($(DHDOID),1)
569 WLFLAGS += -DWLC_HOSTOID
570 WLFILES_SRC += src/wl/sys/wlc_hostoid.c
571 endif
572 #endif
575 #ifdef BINOSL
576 ifeq ($(BINOSL),1)
577 WLFLAGS += -DBINOSL
578 endif
579 #endif
581 ## wl features
582 # NCONF -- 0 is remove from code, else bit mask of supported nphy revs
583 ifneq ($(NCONF),)
584 WLFLAGS += -DNCONF=$(NCONF)
585 endif
587 # HTCONF -- 0 is remove from code, else bit mask of supported htphy revs
588 ifneq ($(HTCONF),)
589 WLFLAGS += -DHTCONF=$(HTCONF)
590 endif
592 # ACONF -- 0 is remove from code, else bit mask of supported aphy revs
593 ifneq ($(ACONF),)
594 WLFLAGS += -DACONF=$(ACONF)
595 endif
597 # GCONF -- 0 is remove from code, else bit mask of supported gphy revs
598 ifneq ($(GCONF),)
599 WLFLAGS += -DGCONF=$(GCONF)
600 endif
602 # LPCONF -- 0 is remove from code, else bit mask of supported lpphy revs
603 ifneq ($(LPCONF),)
604 WLFLAGS += -DLPCONF=$(LPCONF)
605 endif
607 # SSLPNCONF -- 0 is remove from code, else bit mask of supported sslpnphy revs
608 ifneq ($(SSLPNCONF),)
609 WLFLAGS += -DSSLPNCONF=$(SSLPNCONF)
610 endif
612 # LCNCONF -- 0 is remove from code, else bit mask of supported lcnphy revs
613 ifneq ($(LCNCONF),)
614 WLFLAGS += -DLCNCONF=$(LCNCONF)
615 endif
617 #ifdef AP
618 # ap
619 ifeq ($(AP),1)
620 WLFILES_SRC_HI += src/wl/sys/wlc_ap.c
621 WLFILES_SRC_HI += src/wl/sys/wlc_apps.c
622 WLFLAGS += -DAP
624 ifeq ($(MBSS),1)
625 WLFLAGS += -DMBSS
626 endif
628 ifeq ($(WDS),1)
629 WLFLAGS += -DWDS
630 endif
632 # Channel Select
633 ifeq ($(APCS),1)
634 WLFILES_SRC_HI += src/wl/sys/wlc_apcs.c
635 WLFLAGS += -DAPCS
636 endif
638 # WME_PER_AC_TX_PARAMS
639 ifeq ($(WME_PER_AC_TX_PARAMS),1)
640 WLFLAGS += -DWME_PER_AC_TX_PARAMS
641 endif
643 # WME_PER_AC_TUNING
644 ifeq ($(WME_PER_AC_TUNING),1)
645 WLFLAGS += -DWME_PER_AC_TUNING
646 endif
648 endif
649 #endif
651 #ifdef STA
652 # sta
653 ifeq ($(STA),1)
654 WLFLAGS += -DSTA
655 endif
656 #endif
658 #ifdef APSTA
659 # apsta
660 ifeq ($(APSTA),1)
661 WLFLAGS += -DAPSTA
662 endif
663 # apsta
664 #endif
666 #ifdef WET
667 # wet
668 ifeq ($(WET),1)
669 WLFLAGS += -DWET
670 WLFILES_SRC_HI += src/wl/sys/wlc_wet.c
671 endif
672 #endif
674 #ifdef RXCHAIN_PWRSAVE
675 ifeq ($(RXCHAIN_PWRSAVE), 1)
676 WLFLAGS += -DRXCHAIN_PWRSAVE
677 endif
678 #endif
680 #ifdef RADIO_PWRSAVE
681 ifeq ($(RADIO_PWRSAVE), 1)
682 WLFLAGS += -DRADIO_PWRSAVE
683 endif
684 #endif
686 #ifdef WMF
687 ifeq ($(WMF), 1)
688 WLFILES_SRC_HI += src/wl/sys/wlc_wmf.c
689 WLFLAGS += -DWMF
690 endif
691 #endif
693 #ifdef MCAST_REGEN
694 ifeq ($(MCAST_REGEN), 1)
695 WLFLAGS += -DMCAST_REGEN
696 endif
697 #endif
699 #ifdef ROUTER_COMA
700 ifeq ($(ROUTER_COMA), 1)
701 WLFILES_SRC_HI += src/shared/hndmips.c
702 WLFILES_SRC_HI += src/shared/hndchipc.c
703 WLFLAGS += -DROUTER_COMA
704 endif
705 #endif
708 #ifdef WLOVERTHRUSTER
709 ifeq ($(WLOVERTHRUSTER), 1)
710 WLFLAGS += -DWLOVERTHRUSTER
711 endif
712 #endif
714 #ifdef MAC_SPOOF
715 # mac spoof
716 ifeq ($(MAC_SPOOF),1)
717 WLFLAGS += -DMAC_SPOOF
718 endif
719 #endif
721 #ifndef LINUX_HYBRID
722 # Router IBSS Security Support
723 ifeq ($(ROUTER_SECURE_IBSS),1)
724 WLFLAGS += -DIBSS_PEER_GROUP_KEY
725 WLFLAGS += -DIBSS_PSK
726 WLFLAGS += -DIBSS_PEER_MGMT
727 WLFLAGS += -DIBSS_PEER_DISCOVERY_EVENT
728 endif
729 #endif
731 #ifdef WLTIMER
732 # timer
733 ifeq ($(WLTIMER),1)
734 WLFLAGS += -DWLTIMER
735 endif
736 #endif
738 #ifdef WLLED
739 # led
740 ifeq ($(WLLED),1)
741 WLFLAGS += -DWLLED
742 WLFILES_SRC_HI += src/wl/sys/wlc_led.c
743 endif
744 #endif
746 #ifdef WL_MONITOR
747 # MONITOR
748 ifeq ($(WL_MONITOR),1)
749 WLFLAGS += -DWL_MONITOR
750 endif
751 #endif
753 #ifdef WL_PROMISC
754 # PROMISC
755 ifeq ($(PROMISC),1)
756 WLFLAGS += -DWL_PROMISC
757 endif
758 #endif
760 ifeq ($(WL_ALL_PASSIVE),1)
761 WLFLAGS += -DWL_ALL_PASSIVE
762 endif
764 #ifdef ND_ALL_PASSIVE
765 ifeq ($(ND_ALL_PASSIVE),1)
766 WLFLAGS += -DND_ALL_PASSIVE
767 endif
768 #endif
770 #ifdef WME
771 # WME
772 ifeq ($(WME),1)
773 WLFLAGS += -DWME
774 ifeq ($(WLCAC), 1)
775 ifeq ($(WL), 1)
776 WLFLAGS += -DWLCAC
777 WLFILES_SRC_HI += src/wl/sys/wlc_cac.c
778 endif
779 endif
780 endif
781 #endif
783 #ifdef WLBA
784 # WLBA
785 ifeq ($(WLBA),1)
786 WLFLAGS += -DWLBA
787 WLFILES_SRC_HI += src/wl/sys/wlc_ba.c
788 endif
789 #endif
791 #ifdef WLPIO
792 # WLPIO
793 ifeq ($(WLPIO),1)
794 WLFLAGS += -DWLPIO
795 WLFILES_SRC_LO += src/wl/sys/wlc_pio.c
796 endif
797 #endif
799 #ifdef WLAFTERBURNER
800 # WLAFTERBURNER
801 ifeq ($(WLAFTERBURNER),1)
802 WLFLAGS += -DWLAFTERBURNER
803 endif
804 #endif
806 #ifdef CRAM
807 # CRAM
808 ifeq ($(CRAM),1)
809 WLFLAGS += -DCRAM
810 WLFILES_SRC_HI += src/wl/sys/wlc_cram.c
811 endif
812 #endif
814 #ifdef WL11N
815 # 11N
816 ifeq ($(WL11N),1)
817 WLFLAGS += -DWL11N
818 endif
819 #endif
821 #ifdef WL11N_20MHZONLY
822 # 11N 20MHz only optimization
823 ifeq ($(WL11N_20MHZONLY),1)
824 WLFLAGS += -DWL11N_20MHZONLY
825 endif
826 #endif
828 #ifdef WL11N_SINGLESTREAM
829 # 11N single stream optimization
830 ifeq ($(WL11N_SINGLESTREAM),1)
831 WLFLAGS += -DWL11N_SINGLESTREAM
832 endif
833 #endif
835 #ifdef WL11H
836 # 11H
837 ifeq ($(WL11H),1)
838 WLFLAGS += -DWL11H
839 endif
840 #endif
842 #ifdef WL11D
843 # 11D
844 ifeq ($(WL11D),1)
845 WLFLAGS += -DWL11D
846 endif
847 #endif
849 #ifdef WL11U
850 # 11U
851 ifeq ($(WL11U),1)
852 WLFLAGS += -DWL11U
853 endif
854 #endif
856 #ifdef WLPROBRESP_SW
857 # WLPROBRESP_SW
858 ifeq ($(WLPROBRESP_SW),1)
859 WLFLAGS += -DWLPROBRESP_SW
860 endif
861 #endif
863 #ifdef DBAND
864 # DBAND
865 ifeq ($(DBAND),1)
866 WLFLAGS += -DDBAND
867 endif
868 #endif
870 #ifdef WLRM
871 # WLRM
872 ifeq ($(WLRM),1)
873 WLFLAGS += -DWLRM
874 endif
875 #endif
877 #ifdef WLCQ
878 # WLCQ
879 ifeq ($(WLCQ),1)
880 WLFLAGS += -DWLCQ
881 endif
882 #endif
884 #ifdef WLCNT
885 # WLCNT
886 ifeq ($(WLCNT),1)
887 WLFLAGS += -DWLCNT
888 endif
889 #endif
891 #ifdef WLCHANIM
892 # WLCHANIM
893 ifeq ($(WLCHANIM),1)
894 WLFLAGS += -DWLCHANIM
895 endif
896 #endif
898 # WL_AP_TPC
899 #ifdef WL_AP_TPC
900 ifeq ($(WL_AP_TPC),1)
901 WLFLAGS += -DWL_AP_TPC
902 endif
903 #endif
905 ifndef DELTASTATS
906 ifeq ($(WLCNT),1)
907 DELTASTATS := 1
908 endif
909 endif
911 ifndef WLMULTIQUEUE
912 ifeq ($(WLMCHAN),1)
913 WLMULTIQUEUE := 1
914 endif
915 endif
917 # DELTASTATS
918 ifeq ($(DELTASTATS),1)
919 WLFLAGS += -DDELTASTATS
920 endif
922 #ifdef WLCNTSCB
923 # WLCNTSCB
924 ifeq ($(WLCNTSCB),1)
925 WLFLAGS += -DWLCNTSCB
926 endif
927 #endif
930 #ifdef WLCOEX
931 # WLCOEX
932 ifeq ($(WLCOEX),1)
933 WLFLAGS += -DWLCOEX
934 endif
935 #endif
937 ## wl security
938 # external linux supplicant
939 #ifdef LINUX_CRYPTO
940 ifeq ($(LINUX_CRYPTO), 1)
941 WLFLAGS += -DLINUX_CRYPTO
942 endif
943 #endif
945 ifeq ($(WLFBT),1)
946 WLFLAGS += -DWLFBT
947 endif
949 ifeq ($(WLWNM),1)
950 WLFLAGS += -DWLWNM
951 endif
953 #ifdef BCMSUP_PSK
954 # in-driver supplicant
955 ifeq ($(BCMSUP_PSK),1)
956 WLFLAGS += -DBCMSUP_PSK -DBCMINTSUP
957 WLFILES_SRC_HI += src/wl/sys/wlc_sup.c
958 WLFILES_SRC_HI += src/bcmcrypto/aes.c
959 WLFILES_SRC_HI += src/bcmcrypto/aeskeywrap.c
960 WLFILES_SRC_HI += src/bcmcrypto/hmac.c
961 WLFILES_SRC_HI += src/bcmcrypto/prf.c
962 WLFILES_SRC_HI += src/bcmcrypto/sha1.c
963 ifeq ($(WLFBT),1)
964 WLFILES_SRC_HI += src/bcmcrypto/hmac_sha256.c
965 WLFILES_SRC_HI += src/bcmcrypto/sha256.c
966 endif
967 # NetBSD 2.0 has MD5 and AES built in
968 ifneq ($(OSLBSD),1)
969 WLFILES_SRC_HI += src/bcmcrypto/md5.c
970 WLFILES_SRC_HI += src/bcmcrypto/rijndael-alg-fst.c
971 endif
972 WLFILES_SRC_HI += src/bcmcrypto/passhash.c
973 endif
974 #endif
977 #ifdef BCMAUTH_PSK
978 # in-driver authenticator
979 ifeq ($(BCMAUTH_PSK),1)
980 WLFLAGS += -DBCMAUTH_PSK
981 WLFILES_SRC_HI += src/wl/sys/wlc_auth.c
982 endif
983 #endif
985 #ifdef BCMCCMP
986 # Soft AES CCMP
987 ifeq ($(BCMCCMP),1)
988 WLFLAGS += -DBCMCCMP
989 WLFILES_SRC_HI += src/bcmcrypto/aes.c
990 # BSD has AES built in
991 ifneq ($(BSD),1)
992 WLFILES_SRC_HI +=src/bcmcrypto/rijndael-alg-fst.c
993 endif
994 endif
995 #endif
997 #ifdef MFP
998 # Management Frame Protection
999 ifeq ($(MFP),1)
1000 WLFLAGS += -DMFP
1001 WLFILES_SRC_HI += src/bcmcrypto/aes.c
1002 WLFILES_SRC_HI += src/bcmcrypto/sha256.c
1003 WLFILES_SRC_HI += src/bcmcrypto/hmac_sha256.c
1004 # BSD has AES built in
1005 ifneq ($(BSD),1)
1006 WLFILES_SRC_HI +=src/bcmcrypto/rijndael-alg-fst.c
1007 endif
1008 endif
1009 #endif
1012 #ifdef BCMWAPI_WPI
1013 ifeq ($(BCMWAPI_WPI),1)
1014 WLFILES_SRC_HI += src/bcmcrypto/sms4.c
1015 WLFLAGS += -DBCMWAPI_WPI
1016 ifeq ($(BCMSMS4_TEST),1)
1017 WLFLAGS += -DBCMSMS4_TEST
1018 endif
1019 endif
1020 #endif
1022 #ifdef WIFI_ACT_FRAME
1023 # WIFI_ACT_FRAME
1024 ifeq ($(WIFI_ACT_FRAME),1)
1025 WLFLAGS += -DWIFI_ACT_FRAME
1026 endif
1027 #endif
1029 # BCMDMA32
1030 ifeq ($(BCMDMA32),1)
1031 WLFLAGS += -DBCMDMA32
1032 endif
1034 ifeq ($(BCMDMA64OSL),1)
1035 WLFLAGS += -DBCMDMA64OSL
1036 endif
1038 ifeq ($(BCMDMASGLISTOSL),1)
1039 WLFLAGS += -DBCMDMASGLISTOSL
1040 endif
1042 # Early DMA TX Free for LOW driver
1043 ifeq ($(WL_DMA_TX_FREE),1)
1044 ifneq ($(WL_HIGH),1)
1045 ifeq ($(PT_GIANT),1)
1046 WLFLAGS += -DDMA_TX_FREE
1047 endif
1048 endif
1049 endif
1051 ## wl over jtag
1052 #ifdef BCMJTAG
1053 ifeq ($(BCMJTAG),1)
1054 WLFLAGS += -DBCMJTAG -DBCMSLTGT
1055 WLFILES_SRC += src/shared/bcmjtag.c
1056 WLFILES_SRC += src/shared/bcmjtag_linux.c
1057 WLFILES_SRC += src/shared/ejtag.c
1058 WLFILES_SRC += src/shared/jtagm.c
1059 endif
1060 #endif
1062 #ifdef WLAMSDU
1063 ifeq ($(WLAMSDU),1)
1064 WLFLAGS += -DWLAMSDU
1065 WLFILES_SRC_HI += src/wl/sys/wlc_amsdu.c
1066 endif
1067 #endif
1069 #ifdef WLAMSDU_SWDEAGG
1070 ifeq ($(WLAMSDU_SWDEAGG),1)
1071 WLFLAGS += -DWLAMSDU_SWDEAGG
1072 endif
1073 #endif
1075 #ifdef WLAMPDU
1076 ifeq ($(WLAMPDU),1)
1077 WLFLAGS += -DWLAMPDU
1078 WLFILES_SRC_HI += src/wl/sys/wlc_ampdu.c
1079 ifeq ($(WLAMPDU_UCODE),1)
1080 WLFLAGS += -DWLAMPDU_UCODE -DWLAMPDU_MAC
1081 endif
1082 ifeq ($(WLAMPDU_HW),1)
1083 WLFLAGS += -DWLAMPDU_HW -DWLAMPDU_MAC
1084 endif
1085 ifeq ($(WLAMPDU_PRECEDENCE),1)
1086 WLFLAGS += -DWLAMPDU_PRECEDENCE
1087 endif
1088 endif
1089 #endif
1091 #ifdef WOWL
1092 ifeq ($(WOWL),1)
1093 WLFLAGS += -DWOWL
1094 WLFILES_SRC_HI += src/wl/sys/d11ucode_wowl.c
1095 WLFILES_SRC_HI += src/wl/sys/wlc_wowl.c
1096 WLFILES_SRC_HI += src/wl/sys/wowlaestbls.c
1097 endif
1098 #endif
1100 #ifdef BTC2WIRE
1101 ifeq ($(BTC2WIRE),1)
1102 WLFLAGS += -DBTC2WIRE
1103 WLFILES_SRC_LO += src/wl/sys/d11ucode_2w.c
1104 endif
1105 #endif
1107 #ifdef WL_ASSOC_RECREATE
1108 ifeq ($(WL_ASSOC_RECREATE),1)
1109 ifeq ($(STA),1)
1110 WLFLAGS += -DWL_ASSOC_RECREATE
1111 endif
1112 endif
1113 #endif
1116 #ifdef WLP2P
1117 ifeq ($(WLP2P),1)
1118 WLFLAGS += -DWLP2P -DWL_BSSCFG_TX_SUPR -DWIFI_ACT_FRAME
1119 WLFILES_SRC_HI += src/wl/sys/wlc_p2p.c
1120 WLFILES_SRC_LO += src/wl/sys/d11ucode_p2p.c
1121 ifeq ($(WLMCHAN), 1)
1122 WLFLAGS += -DWLMCHAN
1123 WLFILES_SRC_HI += src/wl/sys/wlc_mchan.c
1124 endif
1125 ifeq ($(WLMULTIQUEUE), 1)
1126 WLFLAGS += -DWL_MULTIQUEUE
1127 endif
1128 endif
1129 #endif
1131 #ifdef WLRWL
1132 ifeq ($(WLRWL),1)
1133 WLFLAGS += -DWLRWL
1134 WLFILES_SRC_HI += src/wl/sys/wlc_rwl.c
1135 endif
1136 #endif
1138 ifneq ($(WLNDIS_DHD),1)
1139 #ifdef WLBTAMP
1140 ifeq ($(AP)$(STA),11)
1141 ifeq ($(WLBTAMP),1)
1142 WLFLAGS += -DWLBTAMP
1143 WLFILES_SRC_HI += src/wl/sys/wlc_bta.c
1144 #ifdef WLBTWUSB
1145 ifeq ($(WLBTWUSB),1)
1146 WLFLAGS += -DWLBTWUSB
1147 WLFILES_SRC_HI += src/wl/sys/bt_int.c
1148 endif
1149 #endif /* WLBTWUSB */
1150 endif
1151 endif
1152 #endif /* WLBTAMP */
1153 endif
1155 #ifdef WLPLT
1156 ifeq ($(WLPLT),1)
1157 WLFLAGS += -DWLPLT
1158 WLFILES_SRC_HI += src/wl/sys/wlc_plt.c
1159 endif
1160 #endif
1163 #ifdef WLNINTENDO2
1164 ifeq ($(WLNINTENDO2),1)
1165 WLFLAGS += -DWLNINTENDO2
1166 endif
1167 #endif
1169 #ifdef WLMEDIA
1170 ifeq ($(WLMEDIA),1)
1171 WLFLAGS += -DWLMEDIA_EN
1172 WLFLAGS += -DWLMEDIA_RATESTATS
1173 WLFLAGS += -DWLMEDIA_MULTIQUEUE
1174 WLFLAGS += -DWLMEDIA_TXFIFO_FLUSH_SCB
1175 WLFLAGS += -DWLMEDIA_AMPDUSTATS
1176 WLFLAGS += -DWLMEDIA_TXFAILEVENT
1177 WLFLAGS += -DWLMEDIA_LQSTATS
1178 WLFLAGS += -DWLMEDIA_CALDBG
1179 WLFLAGS += -DWLMEDIA_EXT
1180 WLFLAGS += -DWLMEDIA_TXFILTER_OVERRIDE
1181 WLFLAGS += -DWLMEDIA_TSF
1182 WLFLAGS += -DWLMEDIA_PEAKRATE
1183 endif
1184 #endif
1186 #ifdef WLPKTDLYSTAT
1187 ifeq ($(WLPKTDLYSTAT),1)
1188 WLFLAGS += -DWLPKTDLYSTAT
1189 endif
1190 #endif
1192 ## --- which buses
1194 # silicon backplane
1196 #ifdef BCMSIBUS
1197 ifeq ($(BCMSIBUS),1)
1198 WLFLAGS += -DBCMBUSTYPE=SI_BUS
1199 BCMPCI = 0
1200 endif
1201 #endif
1203 ifeq ($(SOCI_SB),1)
1204 WLFLAGS += -DBCMCHIPTYPE=SOCI_SB
1205 else
1206 ifeq ($(SOCI_AI),1)
1207 WLFLAGS += -DBCMCHIPTYPE=SOCI_AI
1208 endif
1209 endif
1213 #ifndef LINUX_HYBRID
1214 # AP/ROUTER with SDSTD
1215 ifeq ($(WLAPSDSTD),1)
1216 WLFILES_SRC += src/shared/nvramstubs.c
1217 WLFILES_SRC += src/shared/bcmsrom.c
1218 endif
1219 #endif
1221 ## --- basic shared files
1223 #ifdef BCMHIGHSDIO
1224 ifeq ($(BCMHIGHSDIO),1)
1225 WLFLAGS += -DBCMHIGHSDIO
1226 endif
1227 #endif
1229 #ifdef BCMLOSDIO
1230 ifeq ($(BCMLOSDIO),1)
1231 WLFLAGS += -DBCMLOSDIO
1232 endif
1233 #endif
1235 #ifdef BCMHIGHUSB
1236 ifeq ($(BCMHIGHUSB),1)
1237 WLFLAGS += -DBCMHIGHUSB
1238 endif
1239 #endif
1241 #ifdef BCMLOUSB
1242 ifeq ($(BCMLOUSB),1)
1243 WLFLAGS += -DBCMLOUSB
1244 endif
1245 #endif
1247 #ifdef HNDDMA
1248 ifeq ($(HNDDMA),1)
1249 WLFILES_SRC_LO += src/shared/hnddma.c
1250 endif
1251 #endif
1253 #ifdef MSGTRACE
1254 ifeq ($(MSGTRACE),1)
1255 WLFILES_SRC += src/shared/msgtrace.c
1256 WLFLAGS += -DMSGTRACE
1257 endif
1258 #endif
1260 #ifdef BCMUTILS
1261 ifeq ($(BCMUTILS),1)
1262 WLFILES_SRC += src/shared/bcmutils.c
1263 endif
1264 #endif
1267 #ifdef BCMSROM
1268 ifeq ($(BCMSROM),1)
1269 ifeq ($(BCMSDIO),1)
1270 ifeq ($(WL_HIGH),1)
1271 WLFILES_SRC_HI += src/shared/bcmsrom.c
1272 WLFILES_SRC_HI += src/shared/bcmotp.c
1273 endif
1274 endif
1275 WLFILES_SRC_LO += src/shared/bcmsrom.c
1276 WLFILES_SRC_LO += src/shared/bcmotp.c
1277 endif
1278 #endif
1280 #ifdef BCMOTP
1281 ifeq ($(BCMOTP),1)
1282 WLFILES_SRC_LO += src/shared/bcmotp.c
1283 WLFLAGS += -DBCMNVRAMR
1284 endif
1285 #endif
1287 #ifdef SIUTILS
1288 ifeq ($(SIUTILS),1)
1289 WLFILES_SRC_LO += src/shared/siutils.c
1290 WLFILES_SRC_LO += src/shared/sbutils.c
1291 WLFILES_SRC_LO += src/shared/aiutils.c
1292 WLFILES_SRC_LO += src/shared/hndpmu.c
1293 ifneq ($(BCMPCI), 0)
1294 WLFILES_SRC_LO += src/shared/nicpci.c
1295 endif
1296 endif
1297 #endif /* SIUTILS */
1299 #ifdef SBMIPS
1300 ifeq ($(SBMIPS),1)
1301 WLFLAGS += -DBCMMIPS
1302 WLFILES_SRC_LO += src/shared/hndmips.c
1303 WLFILES_SRC_LO += src/shared/hndchipc.c
1304 endif
1305 #endif
1307 #ifdef SBPCI
1308 ifeq ($(SBPCI),1)
1309 WLFILES_SRC_LO += src/shared/hndpci.c
1310 endif
1311 #endif
1313 #ifdef SFLASH
1314 ifeq ($(SFLASH),1)
1315 WLFILES_SRC_LO += src/shared/sflash.c
1316 endif
1317 #endif
1319 #ifdef FLASHUTL
1320 ifeq ($(FLASHUTL),1)
1321 WLFILES_SRC_LO += src/shared/flashutl.c
1322 endif
1323 #endif
1325 ## --- shared OSL
1326 #ifdef OSLUM
1327 # linux user mode
1328 ifeq ($(OSLUM),1)
1329 WLFILES_SRC += src/shared/usermode_osl.c
1330 WLFLAGS += -DUSER_MODE
1331 endif
1332 #endif
1334 #ifdef OSLLX
1335 # linux osl
1336 ifeq ($(OSLLX),1)
1337 WLFILES_SRC += src/shared/linux_osl.c
1338 endif
1339 #endif
1341 #ifdef OSLVX
1342 # vx osl
1343 ifeq ($(OSLVX),1)
1344 WLFILES_SRC += src/shared/vx_osl.c
1345 WLFILES_SRC += src/shared/bcmallocache.c
1346 endif
1347 #endif
1349 #ifdef OSLBSD
1350 # bsd osl
1351 ifeq ($(OSLBSD),1)
1352 WLFILES_SRC += src/shared/bsd_osl.c
1353 WLFILES_SRC += src/shared/nvramstubs.c
1354 endif
1355 #endif
1357 #ifdef OSLCFE
1358 ifeq ($(OSLCFE),1)
1359 WLFILES_SRC += src/shared/cfe_osl.c
1360 endif
1361 #endif
1363 #ifdef OSLRTE
1364 ifeq ($(OSLRTE),1)
1365 WLFILES_SRC += src/shared/hndrte_osl.c
1366 endif
1367 #endif
1369 #ifdef OSLNDIS
1370 ifeq ($(OSLNDIS),1)
1371 WLFILES_SRC += src/shared/ndshared.c
1372 WLFILES_SRC += src/shared/ndis_osl.c
1373 endif
1374 #endif
1376 #ifndef LINUX_HYBRID
1377 ifeq ($(CONFIG_USBRNDIS_RETAIL),1)
1378 WLFLAGS += -DCONFIG_USBRNDIS_RETAIL
1379 WLFILES_SRC += src/wl/sys/wl_ndconfig.c
1380 WLFILES_SRC += src/shared/bcmwifi.c
1381 endif
1383 ifeq ($(NVRAM),1)
1384 WLFILES_SRC_LO += src/dongle/rte/test/nvram.c
1385 WLFILES_SRC_LO += src/dongle/rte/sim/nvram.c
1386 WLFILES_SRC_LO += src/shared/nvram/nvram.c
1387 endif
1389 ifeq ($(NVRAMVX),1)
1390 WLFILES_SRC_LO += src/shared/nvram/nvram_rw.c
1391 endif
1392 #endif /* LINUX_HYBRID */
1394 #ifdef BCMNVRAMR
1395 ifeq ($(BCMNVRAMR),1)
1396 WLFILES_SRC_LO += src/shared/nvram/nvram_ro.c
1397 WLFILES_SRC_LO += src/shared/sflash.c
1398 WLFILES_SRC_LO += src/shared/bcmotp.c
1399 WLFLAGS += -DBCMNVRAMR
1400 endif
1401 #else /* !BCMNVRAMR */
1402 ifneq ($(BCMNVRAMR),1)
1403 ifeq ($(WLLXNOMIPSEL),1)
1404 ifneq ($(WLUMK),1)
1405 WLFILES_SRC += src/shared/nvramstubs.c
1406 endif
1407 else
1408 ifeq ($(WLNDIS),1)
1409 WLFILES_SRC += src/shared/nvramstubs.c
1410 else
1411 ifeq ($(BCMNVRAMW),1)
1412 WLFILES_SRC_LO += src/shared/nvram/nvram_ro.c
1413 WLFILES_SRC_LO += src/shared/sflash.c
1414 endif
1415 endif
1416 endif
1417 ifeq ($(BCMNVRAMW),1)
1418 WLFILES_SRC_LO += src/shared/bcmotp.c
1419 WLFLAGS += -DBCMNVRAMW
1420 endif
1421 endif
1422 #endif /* !BCMNVRAMR */
1424 # Define one OTP mechanism, or none to support all dynamically
1425 ifeq ($(BCMHNDOTP),1)
1426 WLFLAGS += -DBCMHNDOTP
1427 endif
1428 ifeq ($(BCMIPXOTP),1)
1429 WLFLAGS += -DBCMIPXOTP
1430 endif
1433 #ifdef WLDIAG
1434 ifeq ($(WLDIAG),1)
1435 WLFLAGS += -DWLDIAG
1436 WLFILES_SRC_LO += src/wl/sys/wlc_diag.c
1437 endif
1438 #endif
1440 #ifdef BCMDBG
1441 ifneq ($(BCMDBG),1)
1442 ifeq ($(WLTINYDUMP),1)
1443 WLFLAGS += -DWLTINYDUMP
1444 endif
1445 endif
1446 #endif
1448 #ifdef BCMQT
1449 ifeq ($(BCMQT),1)
1450 # Set flag to indicate emulated chip
1451 WLFLAGS += -DBCMSLTGT -DBCMQT
1452 ifeq ($(WLRTE),1)
1453 # Use of RTE implies embedded (CPU emulated)
1454 WLFLAGS += -DBCMQT_CPU
1455 endif
1456 endif
1457 #endif
1459 #ifdef WLPFN
1460 ifeq ($(WLPFN),1)
1461 WLFLAGS += -DWLPFN
1462 WLFILES_SRC += src/wl/sys/wl_pfn.c
1463 ifeq ($(WLPFN_AUTO_CONNECT),1)
1464 WLFLAGS += -DWLPFN_AUTO_CONNECT
1465 endif
1466 endif
1467 #endif
1469 #ifdef TOE
1470 ifeq ($(TOE),1)
1471 WLFLAGS += -DTOE
1472 WLFILES_SRC += src/wl/sys/wl_toe.c
1473 endif
1474 #endif
1476 #ifdef ARPOE
1477 ifeq ($(ARPOE),1)
1478 WLFLAGS += -DARPOE
1479 WLFILES_SRC += src/wl/sys/wl_arpoe.c
1480 endif
1481 #endif
1483 #ifdef PLC
1484 ifeq ($(PLC),1)
1485 WLFLAGS += -DPLC
1486 WLFILES_SRC += src/wl/sys/wl_plc_linux.c
1487 endif
1488 #endif
1490 #ifdef PCOEM_LINUXSTA
1491 ifeq ($(PCOEM_LINUXSTA),1)
1492 WLFLAGS += -DPCOEM_LINUXSTA
1493 endif
1494 #endif
1496 #ifdef LINUXSTA_PS
1497 ifeq ($(LINUXSTA_PS),1)
1498 WLFLAGS += -DLINUXSTA_PS
1499 endif
1500 #endif
1502 #ifndef LINUX_HYBRID
1503 ifeq ($(KEEP_ALIVE),1)
1504 WLFLAGS += -DKEEP_ALIVE
1505 WLFILES_SRC += src/wl/sys/wl_keep_alive.c
1506 endif
1508 #ifdef OPENSRC_IOV_IOCTL
1509 ifeq ($(OPENSRC_IOV_IOCTL),1)
1510 WLFLAGS += -DOPENSRC_IOV_IOCTL
1511 endif
1512 #endif
1514 ifeq ($(PACKET_FILTER),1)
1515 WLFLAGS += -DPACKET_FILTER
1516 WLFILES_SRC += src/wl/sys/wlc_pkt_filter.c
1517 endif
1519 ifeq ($(SEQ_CMDS),1)
1520 WLFLAGS += -DSEQ_CMDS
1521 WLFILES_SRC_HI += src/wl/sys/wlc_seq_cmds.c
1522 endif
1524 ifeq ($(RECEIVE_THROTTLE),1)
1525 WLFLAGS += -DWL_PM2_RCV_DUR_LIMIT
1526 endif
1528 ifeq ($(ASYNC_TSTAMPED_LOGS),1)
1529 WLFLAGS += -DBCMTSTAMPEDLOGS
1530 endif
1532 ifeq ($(WL11K),1)
1533 WLFLAGS += -DWL11K
1534 WLFILES_SRC += src/wl/sys/wlc_rrm.c
1535 endif
1536 ifeq ($(WLWNM),1)
1537 WLFLAGS += -DWLWNM
1538 WLFILES_SRC += src/wl/sys/wlc_wnm.c
1539 endif
1540 #endif
1542 # Sort and remove duplicates from WLFILES*
1543 ifeq ($(WL_LOW),1)
1544 WLFILES_SRC += $(sort $(WLFILES_SRC_LO))
1545 endif
1546 ifeq ($(WL_HIGH),1)
1547 WLFILES_SRC += $(sort $(WLFILES_SRC_HI))
1548 endif
1550 # wl patch code
1551 ifneq ($(WLPATCHFILE), )
1552 WLFLAGS += -DWLC_PATCH
1553 WLFILES_SRC += $(WLPATCHFILE)
1554 endif
1556 ifeq ($(SAMPLE_COLLECT),1)
1557 WLFLAGS += -DSAMPLE_COLLECT
1558 endif
1560 # add a flag to indicate the split to linux kernels
1561 WLFLAGS += -DPHY_HAL
1563 ifeq ($(SMF_STATS),1)
1564 WLFLAGS += -DSMF_STATS
1565 endif
1567 #ifdef PHYMON
1568 ifeq ($(PHYMON),1)
1569 WLFLAGS += -DPHYMON
1570 endif
1571 #endif
1573 #ifdef USBSHIM
1574 ifeq ($(USBSHIM),1)
1575 WLFLAGS += -DUSBSHIM
1576 endif # USBSHIM
1577 #endif
1579 #ifdef BCM_DCS
1580 ifeq ($(BCM_DCS),1)
1581 WLFLAGS += -DBCM_DCS
1582 endif
1583 #endif
1585 ifeq ($(WL_THREAD),1)
1586 WLFLAGS += -DWL_THREAD
1587 endif
1589 ifeq ($(USBOS_THREAD),1)
1590 WLFLAGS += -DUSBOS_THREAD
1591 endif
1592 ifeq ($(WL_NVRAM_FILE),1)
1593 WLFLAGS += -DWL_NVRAM_FILE
1594 endif
1596 ifeq ($(WL_FW_DECOMP),1)
1597 WLFLAGS += -DWL_FW_DECOMP
1598 WLFILES_SRC_HI += src/shared/zlib/adler32.c
1599 WLFILES_SRC_HI += src/shared/zlib/inffast.c
1600 WLFILES_SRC_HI += src/shared/zlib/inflate.c
1601 WLFILES_SRC_HI += src/shared/zlib/infcodes.c
1602 WLFILES_SRC_HI += src/shared/zlib/infblock.c
1603 WLFILES_SRC_HI += src/shared/zlib/inftrees.c
1604 WLFILES_SRC_HI += src/shared/zlib/infutil.c
1605 WLFILES_SRC_HI += src/shared/zlib/zutil.c
1606 WLFILES_SRC_HI += src/shared/zlib/crc32.c
1607 endif
1609 ifeq ($(WL_WOWL_MEDIA),1)
1610 WLFLAGS += -DWL_WOWL_MEDIA
1611 endif
1613 ifeq ($(WL_USB_ZLP_PAD),1)
1614 WLFLAGS += -DWL_USB_ZLP_PAD
1615 endif
1617 ifeq ($(WL_URB_ZPKT),1)
1618 WLFLAGS += -DWL_URB_ZPKT
1619 endif
1621 ifeq ($(WL_VMEM_NVRAM_DECOMP),1)
1622 WLFLAGS += -DWL_VMEM_NVRAM_DECOMP
1623 endif
1626 # add a flag to indicate the split to linux kernels
1627 WLFLAGS += -DPHY_HAL
1629 ifeq ($(MEDIA_IPTV),1)
1630 WLFLAGS += -DWLMEDIA_IPTV
1631 WLFLAGS += -DWET_TUNNEL
1632 WLFILES_SRC_HI += src/wl/sys/wlc_wet_tunnel.c
1633 endif
1635 # Legacy WLFILES pathless definition, please use new src relative path
1636 # in make files.
1637 WLFILES := $(sort $(notdir $(WLFILES_SRC)))