BCM WL 6.30.102.9 (r366174)
[tomato.git] / release / src-rt / wl / config / wl.mk
blobd1e79bf6d2022b657a17813affb34a62d681df1e
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) 2012, 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 355911 2012-09-10 11:44:52Z $
21 # debug/internal
22 ifeq ($(DEBUG),1)
23 WLFLAGS += -DBCMDBG -DWLTEST -DRWL_WIFI -DWIFI_ACT_FRAME -DWLRWL
24 WLRWL = 1
25 else ifeq ($(WLDEBUG),1)
26 BCMUTILS = 1
27 OSLLX = 1
28 WLFLAGS += -DBCMDBG -DWLTEST -DWIFI_ACT_FRAME
29 else
30 #ifdef WLTEST
31 # mfgtest builds
32 ifeq ($(WLTEST),1)
33 WLFLAGS += -DWLTEST
34 endif
35 #endif
36 endif
38 ifeq ($(HSPOT),1)
39 WLBSSLOAD = 1
40 L2_FILTER = 1
41 WLDLS = 1
42 WLWNM = 1
43 WIFI_ACT_FRAME = 1
44 WL11U = 1
45 WLPROBRESP_SW = 1
46 endif
48 ifneq ($(MINIAP),1)
49 WLFLAGS += -DENABLE_ACPHY
50 endif
51 WLFLAGS += -DPPR_API
53 #ifdef WL11AC
54 ifneq ($(WL11AC),0)
55 WL11AC := 1
56 WLFLAGS += -DWL11AC -DWL_BEAMFORMING
57 endif
58 #endif
63 #ifdef PKTQ_LOG
64 ifeq ($(PKTQ_LOG),1)
65 WLFLAGS += -DPKTQ_LOG
66 endif
67 #endif
69 #ifdef BCMDBG_TRAP
70 # CPU debug traps (lomem access, divide by 0, etc) are enabled except when mogrified out for
71 # external releases.
72 WLFLAGS += -DBCMDBG_TRAP
73 #endif
75 ## wl driver common
77 ifndef WL_LOW
78 WL_LOW = 1
79 endif
81 ifndef WL_HIGH
82 WL_HIGH = 1
83 endif
85 ## iff one of WLC_LOW and WLC_HIGH is defined, SPLIT is true
86 WL_SPLIT = 0
87 ifeq ($(WL_LOW),1)
88 ifneq ($(WL_HIGH),1)
89 WL_SPLIT = 1
90 endif
91 endif
93 ifeq ($(WL_HIGH),1)
94 ifneq ($(WL_LOW),1)
95 WL_SPLIT = 1
96 ifeq ($(RPC_NOCOPY),1)
97 WLFLAGS += -DBCM_RPC_NOCOPY
98 endif
99 ifeq ($(RPC_RXNOCOPY),1)
100 WLFLAGS += -DBCM_RPC_RXNOCOPY
101 endif
102 ifeq ($(RPC_TXNOCOPY),1)
103 WLFLAGS += -DBCM_RPC_TXNOCOPY
104 endif
105 ifeq ($(RPC_TOC),1)
106 WLFLAGS += -DBCM_RPC_TOC
107 endif
108 ifeq ($(RPC_ROC),1)
109 WLFLAGS += -DBCM_RPC_ROC
110 endif
111 ifeq ($(BMAC_ENABLE_LINUX_HOST_RPCAGG),1)
112 WLFLAGS += -DBMAC_ENABLE_LINUX_HOST_RPCAGG
113 endif
114 ifeq ($(DBUS_LINUX_RXDPC),1)
115 WLFLAGS += -DDBUS_LINUX_RXDPC
116 endif
117 ifneq ($(BCM_RPC_TP_DBUS_NTXQ),)
118 WLFLAGS += -DBCM_RPC_TP_DBUS_NTXQ=$(BCM_RPC_TP_DBUS_NTXQ)
119 endif
120 ifneq ($(BCM_RPC_TP_DBUS_NRXQ),)
121 WLFLAGS += -DBCM_RPC_TP_DBUS_NRXQ=$(BCM_RPC_TP_DBUS_NRXQ)
122 endif
123 ifeq ($(BCMUSBDEV_EP_FOR_RPCRETURN),1)
124 WLFLAGS += -DBCMUSBDEV_EP_FOR_RPCRETURN
125 endif
126 endif
127 endif
129 ifeq ($(WL_LOW),1)
130 WLFLAGS += -DWLC_LOW
131 ifneq ($(WL_HIGH),1)
132 ifneq ($(BCM_RPC_TP_FLOWCTL_QWM_HIGH),)
133 WLFLAGS += -DBCM_RPC_TP_FLOWCTL_QWM_HIGH=$(BCM_RPC_TP_FLOWCTL_QWM_HIGH)
134 endif
135 endif
136 endif
138 ifeq ($(WL_HIGH),1)
139 WLFLAGS += -DWLC_HIGH
140 endif
142 ifeq ($(GTK_RESET),1)
143 WLFLAGS += -DGTK_RESET
144 endif
146 ifeq ($(USBAP),1)
147 WLFLAGS += -DUSBAP
148 WLFLAGS += -DEHCI_FASTPATH_TX -DEHCI_FASTPATH_RX
149 endif
151 # split driver infrastructure files
152 ifeq ($(WL_SPLIT),1)
153 WLFILES_SRC += src/shared/bcm_xdr.c
154 WLFILES_SRC += src/shared/bcm_rpc.c
155 ifneq ($(USBAP),1)
156 WLFILES_SRC_HI += src/shared/nvramstubs.c
157 endif
158 ifeq ($(OSLLX),1)
159 WLFILES_SRC_HI += src/shared/linux_rpc_osl.c
160 endif
162 ifeq ($(OSLNDIS),1)
163 WLFILES_SRC_HI += src/shared/ndis_rpc_osl.c
164 endif
166 ifeq ($(BCMDBUS),1)
167 WLFILES_SRC_HI += src/shared/bcm_rpc_tp_dbus.c
168 endif
170 WLFILES_SRC_HI += src/wl/sys/wlc_bmac_stubs.c
171 WLFILES_SRC_HI += src/wl/sys/wlc_rpctx.c
172 WLFILES_SRC_LO += src/wl/sys/wlc_high_stubs.c
174 WLFILES_SRC_HI += src/wl/phy/wlc_ppr.c
176 ifeq ($(WL_HIGH),1)
177 ifeq ($(BCMSDIO),1)
178 ifneq ($(WLVISTA)$(WLWIN7)$(WLWIN8),)
179 WLFILES_SRC_HI += src/shared/sdh_ndis.c
180 endif
181 else
182 WLFLAGS += -DBCMBUSTYPE=RPC_BUS
183 WLFLAGS += -DOSLREGOPS
184 ifeq ($(WLNDIS),1)
185 WLFLAGS += -DBCMUSB
186 endif
187 endif
188 endif
189 WLFLAGS += -DPREATTACH_NORECLAIM
190 endif
192 #ifdef WL
193 ifeq ($(WL),1)
194 # WLFILES_SRC += src/shared/bcmwifi/src/bcmwifi_channels.c
195 WLFILES_SRC += src/shared/bcmwifi_channels.c
196 WLFILES_SRC += src/shared/bcmevent.c
197 WLFILES_SRC += src/shared/bcm_mpool.c
198 WLFILES_SRC += src/shared/bcm_notif.c
199 WLFILES_SRC += src/wl/sys/wlc_alloc.c
200 WLFILES_SRC += src/wl/sys/wlc_intr.c
201 WLFILES_SRC += src/wl/sys/wlc_hw.c
203 WLFILES_SRC_LO += src/shared/qmath.c
204 WLFILES_SRC_LO += src/wl/sys/d11ucode_gt15.c
205 WLFILES_SRC_LO += src/wl/sys/d11ucode_ge24.c
206 WLFILES_SRC_LO += src/wl/phy/wlc_ppr.c
207 WLFILES_SRC_LO += src/wl/phy/wlc_phy_cmn.c
208 WLFILES_SRC_LO += src/wl/phy/wlc_phy_ssn.c
209 WLFILES_SRC_LO += src/wl/phy/wlc_phy_n.c
210 WLFILES_SRC_LO += src/wl/phy/wlc_phy_radio_n.c
211 WLFILES_SRC_LO += src/wl/phy/wlc_phytbl_n.c
212 WLFILES_SRC_LO += src/wl/phy/wlc_phytbl_ssn.c
213 WLFILES_SRC_LO += src/wl/sys/wlc_phy_shim.c
214 WLFILES_SRC_LO += src/wl/sys/wlc_bmac.c
216 ifneq ($(MINIAP),1)
217 WLFILES_SRC_LO += src/wl/sys/d11ucode_ge40.c
218 WLFILES_SRC_LO += src/wl/phy/wlc_phytbl_ac.c
219 WLFILES_SRC_LO += src/wl/phy/wlc_phy_ac.c
220 WLFILES_SRC_LO += src/wl/sys/d11ucode_le15.c
221 WLFILES_SRC_LO += src/wl/phy/wlc_phy_ht.c
222 WLFILES_SRC_LO += src/wl/phy/wlc_phytbl_ht.c
223 WLFILES_SRC_LO += src/wl/phy/wlc_phy_lcn40.c
224 WLFILES_SRC_LO += src/wl/phy/wlc_phytbl_lcn40.c
225 WLFILES_SRC_LO += src/wl/phy/wlc_phy_lcn.c
226 WLFILES_SRC_LO += src/wl/phy/wlc_phytbl_lcn.c
227 WLFILES_SRC_LO += src/wl/phy/wlc_phy_lp.c
228 WLFILES_SRC_LO += src/wl/phy/wlc_phytbl_lp.c
229 WLFILES_SRC_LO += src/wl/phy/wlc_phy_abg.c
230 endif
232 WLFILES_SRC_HI += src/wl/sys/wlc.c
233 WLFILES_SRC_HI += src/wl/sys/wlc_utils.c
234 WLFILES_SRC_HI += src/wl/sys/wlc_prot.c
235 WLFILES_SRC_HI += src/wl/sys/wlc_prot_g.c
236 WLFILES_SRC_HI += src/wl/sys/wlc_prot_n.c
237 WLFILES_SRC_HI += src/wl/sys/wlc_assoc.c
238 WLFILES_SRC_HI += src/wl/sys/wlc_rate.c
239 WLFILES_SRC_HI += src/wl/sys/wlc_stf.c
240 WLFILES_SRC_HI += src/wl/sys/wlc_lq.c
241 ifneq ($(WLWSEC),0)
242 WLFLAGS += -DWLWSEC
243 WLFILES_SRC_HI += src/wl/sys/wlc_security.c
244 WLFILES_SRC_HI += src/wl/sys/wlc_key.c
245 endif
246 WLFILES_SRC_HI += src/wl/sys/wlc_scb.c
247 WLFILES_SRC_HI += src/wl/sys/wlc_rate_sel.c
248 WLFILES_SRC_HI += src/wl/sys/wlc_scb_ratesel.c
250 #ifdef WL_LPC
251 ifeq ($(WL_LPC),1)
252 WLFLAGS += -DWL_LPC
253 WLFILES_SRC_LO += src/wl/sys/wlc_power_sel.c
254 WLFILES_SRC_LO += src/wl/sys/wlc_scb_powersel.c
255 else
256 ifeq ($(LP_P2P_SOFTAP),1)
257 WLFLAGS += -DLP_P2P_SOFTAP
258 endif
259 endif
260 #endif
262 WLFILES_SRC_HI += src/wl/sys/wlc_antsel.c
263 WLFILES_SRC_HI += src/wl/sys/wlc_bsscfg.c
264 WLFILES_SRC_HI += src/wl/sys/wlc_vndr_ie_list.c
265 WLFILES_SRC_HI += src/wl/sys/wlc_scan.c
266 WLFILES_SRC_HI += src/wl/phy/wlc_phy_iovar.c
267 WLFILES_SRC_HI += src/wl/sys/wlc_rm.c
268 WLFILES_SRC_HI += src/wl/sys/wlc_tso.c
269 ifeq ($(WL11AC),1)
270 WLFILES_SRC_HI += src/wl/sys/wlc_vht.c
271 WLFILES_SRC_HI += src/wl/sys/wlc_txbf.c
272 endif
273 #ifdef WL11H
274 ifeq ($(WL11H),1)
275 WLFLAGS += -DWL11H
276 WLFILES_SRC_HI += src/wl/sys/wlc_11h.c
277 WLFLAGS += -DWLCSA
278 WLFILES_SRC_HI += src/wl/sys/wlc_csa.c
279 WLFLAGS += -DWLQUIET
280 WLFILES_SRC_HI += src/wl/sys/wlc_quiet.c
281 endif
282 #endif /* WL11H */
283 # tpc module is shared by 11h tpc and wl tx power control */
284 WLTPC := 1
285 ifeq ($(WLTPC),1)
286 WLFLAGS += -DWLTPC
287 WLFILES_SRC_HI += src/wl/sys/wlc_tpc.c
288 #ifdef WL_AP_TPC
289 ifeq ($(WL_AP_TPC),1)
290 WLFLAGS += -DWL_AP_TPC
291 endif
292 #endif
293 endif
294 WLFILES_SRC_HI += src/wl/sys/wlc_dfs.c
295 #ifdef WL11D
296 ifeq ($(WL11D),1)
297 WLFLAGS += -DWL11D
298 WLFILES_SRC_HI += src/wl/sys/wlc_11d.c
299 endif
300 #endif /* WL11D */
301 # cntry module is shared by 11h/11d and wl channel */
302 WLCNTRY := 1
303 ifeq ($(WLCNTRY),1)
304 WLFLAGS += -DWLCNTRY
305 WLFILES_SRC_HI += src/wl/sys/wlc_cntry.c
306 endif
307 WLFILES_SRC_HI += src/wl/sys/wlc_event.c
308 ifeq ($(WLCHANNEL_DUMMY),1)
309 WLFILES_SRC_HI += src/wl/sys/wlc_channel_dummy.c
310 else
311 WLFILES_SRC_HI += src/wl/sys/wlc_channel.c
312 WLFILES_SRC_HI += src/wl/clm/src/wlc_clm.c
313 WLFILES_SRC_HI += src/wl/clm/src/wlc_clm_data.c
314 ifeq ($(WLCLMINC),1)
315 WLFILES_SRC_HI += src/wl/clm/src/wlc_clm_data_inc.c
316 endif
317 endif
318 WLFILES_SRC_HI += src/shared/bcmwpa.c
319 #ifndef LINUX_CRYPTO
320 ifneq ($(LINUX_CRYPTO),1)
321 WLFILES_SRC_HI += src/bcmcrypto/rc4.c
322 WLFILES_SRC_HI += src/bcmcrypto/tkhash.c
323 WLFILES_SRC_HI += src/bcmcrypto/tkmic.c
324 WLFILES_SRC_HI += src/bcmcrypto/wep.c
325 endif
326 #endif /* LINUX_CRYPTO */
327 #ifdef WLEXTLOG
328 ifeq ($(WLEXTLOG),1)
329 WLFLAGS += -DWLEXTLOG
330 WLFILES_SRC += src/wl/sys/wlc_extlog.c
331 endif
332 #endif
333 #ifdef WLSCANCACHE
334 ifeq ($(WLSCANCACHE),1)
335 WLFLAGS += -DWLSCANCACHE
336 WLFILES_SRC_HI += src/wl/sys/wlc_scandb.c
337 endif
338 #endif
339 WLFILES_SRC_HI += src/wl/sys/wlc_hrt.c
340 endif
341 #endif /* WL */
343 #ifdef BCMDBUS
344 ifeq ($(BCMDBUS),1)
345 WLFLAGS += -DBCMDBUS
346 WLFILES_SRC += src/shared/dbus.c
348 ifeq ($(BCMTRXV2),1)
349 WLFLAGS += -DBCMTRXV2
350 endif
352 ifeq ($(BCMSDIO),1)
353 ifeq ($(WL_HIGH),1)
354 WLFILES_SRC_HI += src/shared/siutils.c
355 WLFILES_SRC_HI += src/shared/bcmotp.c
356 WLFILES_SRC_HI += src/shared/sbutils.c
357 WLFILES_SRC_HI += src/shared/aiutils.c
358 WLFILES_SRC_HI += src/shared/hndpmu.c
359 endif
360 endif
362 ifeq ($(WLLX),1)
363 ifeq ($(BCMSDIO),1)
364 WLFILES_SRC += src/shared/dbus_sdh.c
365 WLFILES_SRC += src/shared/dbus_sdh_linux.c
366 else
367 WLFILES_SRC += src/shared/dbus_usb.c
368 WLFILES_SRC += src/shared/dbus_usb_linux.c
369 endif
370 else
371 ifeq ($(WLNDIS),1)
372 ifeq ($(BCMSDIO),1)
373 ifneq ($(WLWIN7)$(WLWIN8),)
374 WLFILES_SRC += src/shared/dbus_sdio.c
375 WLFILES_SRC += src/shared/dbus_sdio_ndis.c
376 else
377 WLFILES_SRC += src/shared/dbus_sdh.c
378 WLFILES_SRC += src/shared/dbus_sdh_ndis.c
379 endif
380 else
381 WLFILES_SRC += src/shared/dbus_usb.c
382 WLFILES_SRC += src/shared/dbus_usb_ndis.c
383 endif
384 endif
385 endif
386 endif
387 #endif
389 #ifndef LINUX_HYBRID
390 ifeq ($(BCM_DNGL_EMBEDIMAGE),1)
391 WLFLAGS += -DBCM_DNGL_EMBEDIMAGE
392 endif
393 #endif
395 # For USBAP to select which images to embed
396 ifeq ($(EMBED_IMAGE_4319usb),1)
397 WLFLAGS += -DEMBED_IMAGE_4319usb
398 endif
399 ifeq ($(EMBED_IMAGE_4319sd),1)
400 WLFLAGS += -DEMBED_IMAGE_4319sd
401 endif
402 ifeq ($(EMBED_IMAGE_4322),1)
403 WLFLAGS += -DEMBED_IMAGE_4322
404 endif
406 ifeq ($(EMBED_IMAGE_43236b),1)
407 WLFLAGS += -DEMBED_IMAGE_43236b
408 endif
409 ifeq ($(EMBED_IMAGE_4325sd),1)
410 WLFLAGS += -DEMBED_IMAGE_4325sd
411 endif
413 ifeq ($(DNGL_WD_KEEP_ALIVE),1)
414 WLFLAGS += -DDNGL_WD_KEEP_ALIVE
415 endif
417 ## wl OSL
418 #ifdef WLVX
419 ifeq ($(WLVX),1)
420 WLFILES_SRC += src/wl/sys/wl_vx.c
421 WLFILES_SRC += src/shared/bcmstdlib.c
422 WLFLAGS += -DSEC_TXC_ENABLED
423 endif
424 #endif
426 #ifdef WLBSD
427 ifeq ($(WLBSD),1)
428 WLFILES_SRC += src/wl/sys/wl_bsd.c
429 endif
430 #endif
432 #ifdef WLLX
433 ifeq ($(WLLX),1)
434 ifneq ($(WL_HIGH),1)
435 WLFILES_SRC_LO += src/wl/sys/wl_linux_bmac.c
436 WLFILES_SRC_LO += src/shared/bcm_rpc_char.c
437 endif
439 WLFILES_SRC_HI += src/wl/sys/wl_linux.c
440 endif
441 #endif
443 #ifdef WLLXIW
444 ifeq ($(WLLXIW),1)
445 WLFILES_SRC_HI += src/wl/sys/wl_iw.c
446 WLFLAGS += -DWLLXIW
447 endif
448 #endif
450 #ifdef WLLXCFG80211
451 ifdef ($(WLLXCFG80211),1)
452 WLFILES_SRC_HI += src/wl/sys/wl_cfg80211_hybrid.c
453 endif
454 #endif
456 ifeq ($(BCM_STA_CFG80211),1)
457 WLFILES_SRC_HI += src/wl/sys/wl_cfg80211.c
458 WLFILES_SRC_HI += src/wl/sys/wl_cfgp2p.c
459 WLFILES_SRC_HI += src/wl/sys/wldev_common.c
460 WLFILES_SRC_HI += src/wl/sys/wl_linux_mon.c
461 endif
463 #ifdef WLCFE
464 ifeq ($(WLCFE),1)
465 WLFILES_SRC += src/wl/sys/wl_cfe.c
466 endif
467 #endif
469 #ifdef WLRTE
470 ifeq ($(WLRTE),1)
471 WLFILES_SRC += src/wl/sys/wl_rte.c
472 ifneq ($(WL_HIGH),1)
473 WLFILES_SRC_LO += src/shared/bcm_rpc_tp_rte.c
474 endif
475 endif
476 #endif
478 ifeq ($(BCMECICOEX),1)
479 WLFLAGS += -DBCMECICOEX
480 endif
482 ifeq ($(DNGL_WD_KEEP_ALIVE),1)
483 WLFLAGS += -DDNGL_WD_KEEP_ALIVE
484 endif
487 ifeq ($(TRAFFIC_MGMT),1)
488 WLFLAGS += -DTRAFFIC_MGMT
489 WLFILES_SRC += src/wl/sys/wlc_traffic_mgmt.c
491 ifeq ($(TRAFFIC_SHAPING),1)
492 WLFLAGS += -DTRAFFIC_SHAPING
493 endif
495 ifeq ($(TRAFFIC_MGMT_RSSI_POLICY),1)
496 WLFLAGS += -DTRAFFIC_MGMT_RSSI_POLICY=$(AP)
497 endif
499 endif
501 #ifdef NDIS
502 # anything Windows/NDIS specific for 2k/xp/vista/windows7
503 ifeq ($(WLNDIS),1)
504 WLFILES_SRC += src/wl/sys/wl_ndis.c
506 ifeq ($(WLNDIS_DHD),)
507 WLFILES_SRC += src/wl/sys/nhd_ndis.c
508 ifeq ($(WL_SPLIT),1)
509 ifdef USEDDK
510 WLFLAGS += -DMEMORY_TAG="'7034'"
511 else
512 WLFLAGS += -DMEMORY_TAG='DWMB'
513 endif
514 else
515 ifdef USEDDK
516 WLFLAGS += -DMEMORY_TAG="'7034'"
517 else
518 WLFLAGS += -DMEMORY_TAG='NWMB'
519 endif
520 endif
521 else
522 WLFILES_SRC += src/dhd/sys/dhd_ndis.c
523 ifdef USEDDK
524 WLFLAGS += -DMEMORY_TAG="'7034'"
525 else
526 WLFLAGS += -DMEMORY_TAG='DWMB'
527 endif
528 endif
530 WLFILES_SRC += src/wl/sys/wl_ndconfig.c
531 # WLFILES_SRC += src/shared/bcmwifi/src/bcmwifi_channels.c
532 WLFILES_SRC += src/shared/bcmwifi_channels.c
533 WLFILES_SRC += src/shared/bcmstdlib.c
535 # support host supplied nvram variables
536 ifeq ($(WLTEST),1)
537 ifeq ($(WLHOSTVARS), 1)
538 WLFLAGS += -DBCMHOSTVARS
539 endif
540 else
541 ifeq ($(BCMEXTNVM),1)
542 ifeq ($(WLHOSTVARS), 1)
543 WLFLAGS += -DBCMHOSTVARS
544 endif
545 endif
546 endif
548 ifneq ($(WLVISTA)$(WLWIN7)$(WLWIN8),)
549 WLFLAGS += -DEXT_STA
550 WLFLAGS += -DWL_MONITOR
551 WLFLAGS += -DIBSS_PEER_GROUP_KEY
552 WLFLAGS += -DIBSS_PEER_DISCOVERY_EVENT
553 WLFLAGS += -DIBSS_PEER_MGMT
554 endif
556 ifneq ($(WLWIN7)$(WLWIN8),)
557 WLFLAGS += -DAP
558 endif
560 ifeq ($(WLXP),1)
561 WLFLAGS += -DWLNOEIND
562 endif
564 ifeq ($(WLVIF),1)
565 WLFLAGS += -DWLVIF
566 endif
568 # HIGH driver for BMAC ?? any ndis/xp/vista ?
569 ifeq ($(WL_SPLIT),1)
570 endif
572 # DHD host: ?? to clean up and to support all other DHD OSes
573 ifeq ($(WLNDIS_DHD),1)
574 WLFLAGS += -DSHOW_EVENTS -DBCMPERFSTATS
575 WLFLAGS += -DBDC -DBCMDONGLEHOST
576 WLFLAGS += -DBCM4325
578 ifneq ($(BCMSDIO),1)
579 WLFLAGS += -DBCMDHDUSB
580 WLFLAGS += -DBCM4328 -DBCM4322
581 endif
583 WLFILES_SRC += src/shared/bcmevent.c
584 WLFILES_SRC += src/dhd/sys/dhd_cdc.c
585 WLFILES_SRC += src/dhd/sys/dhd_common.c
587 BCMPCI = 0
589 ifneq ($(BCMDBUS),1)
590 WLFILES_SRC += src/dhd/sys/dhd_usb_ndis.c
591 endif
593 ifneq ($(WLVISTA)$(WLWIN7)$(WLWIN8),)
594 WLFILES_SRC += src/wl/sys/wlc_rate.c
595 endif
597 ifneq ($(WLWIN7)$(WLWIN8),)
598 WLFILES_SRC += src/wl/sys/wlc_ap.c
599 WLFILES_SRC += src/wl/sys/wlc_apps.c
600 endif
602 ifeq ($(WLXP),1)
603 WLFLAGS += -DNDIS_DMAWAR
604 # move these non-wl flag to makefiles
605 WLFLAGS += -DBINARY_COMPATIBLE -DWIN32_LEAN_AND_MEAN=1
606 endif
608 endif
609 endif
610 #endif
612 ifeq ($(ADV_PS_POLL),1)
613 WLFLAGS += -DADV_PS_POLL
614 endif
616 #ifdef DHDOID
617 ifeq ($(DHDOID),1)
618 WLFLAGS += -DWLC_HOSTOID
619 WLFILES_SRC += src/wl/sys/wlc_hostoid.c
620 endif
621 #endif
624 #ifdef BINOSL
625 ifeq ($(BINOSL),1)
626 WLFLAGS += -DBINOSL
627 endif
628 #endif
630 ## wl features
631 # ACCONF -- 0 is remove from code, else bit mask of supported acphy revs
632 ifneq ($(ACCONF),)
633 WLFLAGS += -DACCONF=$(ACCONF)
634 endif
636 # NCONF -- 0 is remove from code, else bit mask of supported nphy revs
637 ifneq ($(NCONF),)
638 WLFLAGS += -DNCONF=$(NCONF)
639 endif
641 # HTCONF -- 0 is remove from code, else bit mask of supported htphy revs
642 ifneq ($(HTCONF),)
643 WLFLAGS += -DHTCONF=$(HTCONF)
644 endif
646 # ACONF -- 0 is remove from code, else bit mask of supported aphy revs
647 ifneq ($(ACONF),)
648 WLFLAGS += -DACONF=$(ACONF)
649 endif
651 # GCONF -- 0 is remove from code, else bit mask of supported gphy revs
652 ifneq ($(GCONF),)
653 WLFLAGS += -DGCONF=$(GCONF)
654 endif
656 # LPCONF -- 0 is remove from code, else bit mask of supported lpphy revs
657 ifneq ($(LPCONF),)
658 WLFLAGS += -DLPCONF=$(LPCONF)
659 endif
661 # SSLPNCONF -- 0 is remove from code, else bit mask of supported sslpnphy revs
662 ifneq ($(SSLPNCONF),)
663 WLFLAGS += -DSSLPNCONF=$(SSLPNCONF)
664 endif
666 # LCNCONF -- 0 is remove from code, else bit mask of supported lcnphy revs
667 ifneq ($(LCNCONF),)
668 WLFLAGS += -DLCNCONF=$(LCNCONF)
669 endif
671 #ifdef SOFTAP
672 ifeq ($(SOFTAP),1)
673 WLFLAGS += -DSOFTAP
674 endif
675 #endif
677 #ifdef AP
678 # ap
679 ifeq ($(AP),1)
680 WLFILES_SRC_HI += src/wl/sys/wlc_ap.c
681 WLFILES_SRC_HI += src/wl/sys/wlc_apps.c
682 WLFLAGS += -DAP
684 ifeq ($(MBSS),1)
685 WLFLAGS += -DMBSS
686 endif
688 ifeq ($(WDS),1)
689 WLFLAGS += -DWDS
690 endif
692 ifeq ($(DWDS),1)
693 WLFLAGS += -DDWDS
694 endif
696 # Channel Select
697 ifeq ($(APCS),1)
698 WLFILES_SRC_HI += src/wl/sys/wlc_apcs.c
699 WLFLAGS += -DAPCS
700 endif
702 # WME_PER_AC_TX_PARAMS
703 ifeq ($(WME_PER_AC_TX_PARAMS),1)
704 WLFLAGS += -DWME_PER_AC_TX_PARAMS
705 endif
707 # WME_PER_AC_TUNING
708 ifeq ($(WME_PER_AC_TUNING),1)
709 WLFLAGS += -DWME_PER_AC_TUNING
710 endif
712 endif
713 #endif
715 #ifdef STA
716 # sta
717 ifeq ($(STA),1)
718 WLFLAGS += -DSTA
719 endif
720 #endif
722 #ifdef EXT_STA_DONGLE
723 # Microsoft Extensible STA for Dongle
724 ifeq ($(EXT_STA_DONGLE),1)
725 WLFLAGS += -DEXT_STA
726 WLFLAGS += -DIBSS_PEER_GROUP_KEY
727 WLFLAGS += -DIBSS_PEER_DISCOVERY_EVENT
728 WLFLAGS += -DIBSS_PEER_MGMT
729 endif
730 #endif
732 #ifdef APSTA
733 # apsta
734 ifeq ($(APSTA),1)
735 WLFLAGS += -DAPSTA
736 endif
737 # apsta
738 #endif
740 #ifdef WET
741 # wet
742 ifeq ($(WET),1)
743 WLFLAGS += -DWET
744 WLFILES_SRC_HI += src/wl/sys/wlc_wet.c
745 endif
746 #endif
748 #ifdef RXCHAIN_PWRSAVE
749 ifeq ($(RXCHAIN_PWRSAVE), 1)
750 WLFLAGS += -DRXCHAIN_PWRSAVE
751 endif
752 #endif
754 #ifdef RADIO_PWRSAVE
755 ifeq ($(RADIO_PWRSAVE), 1)
756 WLFLAGS += -DRADIO_PWRSAVE
757 endif
758 #endif
760 #ifdef WMF
761 ifeq ($(WMF), 1)
762 WLFILES_SRC_HI += src/wl/sys/wlc_wmf.c
763 WLFLAGS += -DWMF
764 endif
765 ifeq ($(IGMP_UCQUERY), 1)
766 WLFLAGS += -DWL_IGMP_UCQUERY
767 endif
768 #endif
770 #ifdef MCAST_REGEN
771 ifeq ($(MCAST_REGEN), 1)
772 WLFLAGS += -DMCAST_REGEN
773 endif
774 #endif
776 #ifdef ROUTER_COMA
777 ifeq ($(ROUTER_COMA), 1)
778 WLFILES_SRC_HI += src/shared/hndmips.c
779 WLFILES_SRC_HI += src/shared/hndchipc.c
780 WLFLAGS += -DROUTER_COMA
781 endif
782 #endif
785 #ifdef WLOVERTHRUSTER
786 ifeq ($(WLOVERTHRUSTER), 1)
787 WLFLAGS += -DWLOVERTHRUSTER
788 endif
789 #endif
791 #ifdef MAC_SPOOF
792 # mac spoof
793 ifeq ($(MAC_SPOOF),1)
794 WLFLAGS += -DMAC_SPOOF
795 endif
796 #endif
798 #ifdef PSTA
799 # Proxy STA
800 ifeq ($(PSTA),1)
801 WLFILES_SRC_HI += src/wl/sys/wlc_psta.c
802 WLFLAGS += -DPSTA
803 endif
804 #endif
806 #ifdef DPSTA
807 # Dualband Proxy STA
808 ifeq ($(DPSTA),1)
809 WLFLAGS += -DDPSTA
810 endif
811 #endif
813 #ifndef LINUX_HYBRID
814 # Router IBSS Security Support
815 ifeq ($(ROUTER_SECURE_IBSS),1)
816 WLFLAGS += -DIBSS_PEER_GROUP_KEY
817 WLFLAGS += -DIBSS_PSK
818 WLFLAGS += -DIBSS_PEER_MGMT
819 WLFLAGS += -DIBSS_PEER_DISCOVERY_EVENT
820 endif
821 #endif
823 #ifdef WLLED
824 # led
825 ifeq ($(WLLED),1)
826 WLFLAGS += -DWLLED
827 WLFILES_SRC_HI += src/wl/sys/wlc_led.c
828 endif
829 #endif
831 #ifdef WL_MONITOR
832 # MONITOR
833 ifeq ($(WL_MONITOR),1)
834 WLFLAGS += -DWL_MONITOR
835 endif
836 #endif
838 #ifdef WL_PROMISC
839 # PROMISC
840 ifeq ($(PROMISC),1)
841 WLFLAGS += -DWL_PROMISC
842 endif
843 #endif
845 ifeq ($(WL_ALL_PASSIVE),1)
846 WLFLAGS += -DWL_ALL_PASSIVE
847 endif
849 #ifdef ND_ALL_PASSIVE
850 ifeq ($(ND_ALL_PASSIVE),1)
851 WLFLAGS += -DND_ALL_PASSIVE
852 endif
853 #endif
855 #ifdef WME
856 # WME
857 ifeq ($(WME),1)
858 WLFLAGS += -DWME
859 ifeq ($(WLCAC), 1)
860 ifeq ($(WL), 1)
861 WLFLAGS += -DWLCAC
862 WLFILES_SRC_HI += src/wl/sys/wlc_cac.c
863 endif
864 endif
865 endif
866 #endif
868 #ifdef WLPIO
869 # WLPIO
870 ifeq ($(WLPIO),1)
871 WLFLAGS += -DWLPIO
872 WLFILES_SRC_LO += src/wl/sys/wlc_pio.c
873 endif
874 #endif
876 #ifdef WL11N
877 # 11N
878 ifeq ($(WL11N),1)
879 WLFLAGS += -DWL11N
880 endif
881 #endif
883 #ifdef WL11N_20MHZONLY
884 # 11N 20MHz only optimization
885 ifeq ($(WL11N_20MHZONLY),1)
886 WLFLAGS += -DWL11N_20MHZONLY
887 endif
888 #endif
890 #ifdef WL11N_SINGLESTREAM
891 # 11N single stream optimization
892 ifeq ($(WL11N_SINGLESTREAM),1)
893 WLFLAGS += -DWL11N_SINGLESTREAM
894 endif
895 #endif
897 #ifdef WL11H
898 # 11H
899 ifeq ($(WL11H),1)
900 WLFLAGS += -DWL11H
901 endif
902 #endif
904 #ifdef WL11D
905 # 11D
906 ifeq ($(WL11D),1)
907 WLFLAGS += -DWL11D
908 endif
909 #endif
911 #ifdef WL11U
912 # 11U
913 ifeq ($(WL11U),1)
914 WLFLAGS += -DWL11U -DWIFI_ACT_FRAME
915 WLFILES_SRC_HI += src/wl/sys/wlc_11u.c
916 endif
917 #endif
919 #ifdef WLPROBRESP_SW
920 # WLPROBRESP_SW
921 ifeq ($(WLPROBRESP_SW),1)
922 WLFLAGS += -DWLPROBRESP_SW
923 WLFILES_SRC_HI += src/wl/sys/wlc_probresp.c
924 endif
925 #endif
927 #ifdef DBAND
928 # DBAND
929 ifeq ($(DBAND),1)
930 WLFLAGS += -DDBAND
931 endif
932 #endif
934 #ifdef WLRM
935 # WLRM
936 ifeq ($(WLRM),1)
937 WLFLAGS += -DWLRM
938 endif
939 #endif
941 #ifdef WLCQ
942 # WLCQ
943 ifeq ($(WLCQ),1)
944 WLFLAGS += -DWLCQ
945 endif
946 #endif
948 #ifdef WLCNT
949 # WLCNT
950 ifeq ($(WLCNT),1)
951 WLFLAGS += -DWLCNT
952 ifndef DELTASTATS
953 DELTASTATS := 1
954 endif
955 endif
956 #endif
958 # DELTASTATS
959 ifeq ($(DELTASTATS),1)
960 WLFLAGS += -DDELTASTATS
961 endif
963 #ifdef WLCHANIM
964 # WLCHANIM
965 ifeq ($(WLCHANIM),1)
966 WLFLAGS += -DWLCHANIM
967 endif
968 #endif
970 #ifdef WLCNTSCB
971 # WLCNTSCB
972 ifeq ($(WLCNTSCB),1)
973 WLFLAGS += -DWLCNTSCB
974 endif
975 #endif
978 #ifdef WLCOEX
979 # WLCOEX
980 ifeq ($(WLCOEX),1)
981 WLFLAGS += -DWLCOEX
982 endif
983 #endif
985 ## wl security
986 # external linux supplicant
987 #ifdef LINUX_CRYPTO
988 ifeq ($(LINUX_CRYPTO), 1)
989 WLFLAGS += -DLINUX_CRYPTO
990 endif
991 #endif
993 ifeq ($(WLFBT),1)
994 WLFLAGS += -DWLFBT
995 endif
997 ifeq ($(WLWNM),1)
998 WLFLAGS += -DWLWNM
999 endif
1001 #ifdef BCMSUP_PSK
1002 # in-driver supplicant
1003 ifeq ($(BCMSUP_PSK),1)
1004 WLFLAGS += -DBCMSUP_PSK -DBCMINTSUP
1005 WLFILES_SRC_HI += src/wl/sys/wlc_sup.c
1006 WLFILES_SRC_HI += src/bcmcrypto/aes.c
1007 WLFILES_SRC_HI += src/bcmcrypto/aeskeywrap.c
1008 WLFILES_SRC_HI += src/bcmcrypto/hmac.c
1009 WLFILES_SRC_HI += src/bcmcrypto/prf.c
1010 WLFILES_SRC_HI += src/bcmcrypto/sha1.c
1011 ifeq ($(WLFBT),1)
1012 WLFILES_SRC_HI += src/bcmcrypto/hmac_sha256.c
1013 WLFILES_SRC_HI += src/bcmcrypto/sha256.c
1014 endif
1015 # NetBSD 2.0 has MD5 and AES built in
1016 ifneq ($(OSLBSD),1)
1017 WLFILES_SRC_HI += src/bcmcrypto/md5.c
1018 WLFILES_SRC_HI += src/bcmcrypto/rijndael-alg-fst.c
1019 endif
1020 WLFILES_SRC_HI += src/bcmcrypto/passhash.c
1021 endif
1022 #endif
1025 #ifdef BCMAUTH_PSK
1026 # in-driver authenticator
1027 ifeq ($(BCMAUTH_PSK),1)
1028 WLFLAGS += -DBCMAUTH_PSK
1029 WLFILES_SRC_HI += src/wl/sys/wlc_auth.c
1030 endif
1031 #endif
1033 #ifdef WLTDLS
1034 ifeq ($(WLTDLS), 1)
1035 ifndef ($(WLFBT),1)
1036 WLFILES_SRC_HI += src/bcmcrypto/sha256.c
1037 WLFILES_SRC_HI += src/bcmcrypto/hmac_sha256.c
1038 endif
1039 endif
1040 #endif
1042 #ifdef BCMCCMP
1043 # Soft AES CCMP
1044 ifeq ($(BCMCCMP),1)
1045 WLFLAGS += -DBCMCCMP
1046 WLFILES_SRC_HI += src/bcmcrypto/aes.c
1047 # BSD has AES built in
1048 ifneq ($(BSD),1)
1049 WLFILES_SRC_HI += src/bcmcrypto/rijndael-alg-fst.c
1050 endif
1051 endif
1052 #endif
1054 #ifdef MFP
1055 # Management Frame Protection
1056 ifeq ($(MFP),1)
1057 WLFLAGS += -DMFP
1058 WLFILES_SRC_HI += src/bcmcrypto/aes.c
1059 WLFILES_SRC_HI += src/bcmcrypto/sha256.c
1060 WLFILES_SRC_HI += src/bcmcrypto/hmac_sha256.c
1061 # BSD has AES built in
1062 ifneq ($(BSD),1)
1063 WLFILES_SRC_HI += src/bcmcrypto/rijndael-alg-fst.c
1064 endif
1065 endif
1066 #endif
1070 #ifdef WIFI_ACT_FRAME
1071 # WIFI_ACT_FRAME
1072 ifeq ($(WIFI_ACT_FRAME),1)
1073 WLFLAGS += -DWIFI_ACT_FRAME
1074 endif
1075 #endif
1077 # BCMDMA32
1078 ifeq ($(BCMDMA32),1)
1079 WLFLAGS += -DBCMDMA32
1080 endif
1082 ifeq ($(BCMDMA64OSL),1)
1083 WLFLAGS += -DBCMDMA64OSL
1084 endif
1086 ifeq ($(BCMDMASGLISTOSL),1)
1087 WLFLAGS += -DBCMDMASGLISTOSL
1088 endif
1090 # Early DMA TX Free for LOW driver
1091 ifeq ($(WL_DMA_TX_FREE),1)
1092 ifneq ($(WL_HIGH),1)
1093 ifeq ($(PT_GIANT),1)
1094 WLFLAGS += -DDMA_TX_FREE
1095 endif
1096 endif
1097 endif
1099 ## wl over jtag
1100 #ifdef BCMJTAG
1101 ifeq ($(BCMJTAG),1)
1102 WLFLAGS += -DBCMJTAG -DBCMSLTGT
1103 WLFILES_SRC += src/shared/bcmjtag.c
1104 WLFILES_SRC += src/shared/bcmjtag_linux.c
1105 WLFILES_SRC += src/shared/ejtag.c
1106 WLFILES_SRC += src/shared/jtagm.c
1107 endif
1108 #endif
1110 #ifdef WLAMSDU
1111 ifeq ($(WLAMSDU),1)
1112 WLFLAGS += -DWLAMSDU
1113 WLFILES_SRC_HI += src/wl/sys/wlc_amsdu.c
1114 endif
1115 #endif
1117 #ifdef WLAMSDU_SWDEAGG
1118 ifeq ($(WLAMSDU_SWDEAGG),1)
1119 WLFLAGS += -DWLAMSDU_SWDEAGG
1120 endif
1121 #endif
1123 #ifdef WLNAR
1124 ifeq ($(WLNAR),1)
1125 WLFILES_SRC_HI += src/wl/sys/wlc_nar.c
1126 WLFLAGS += -DWLNAR
1127 endif
1128 #endif
1130 #ifdef WLAMPDU
1131 ifeq ($(WLAMPDU),1)
1132 WLFLAGS += -DWLAMPDU
1133 WLFILES_SRC_HI += src/wl/sys/wlc_ampdu.c
1134 WLFILES_SRC_HI += src/wl/sys/wlc_ampdu_rx.c
1135 WLFILES_SRC_HI += src/wl/sys/wlc_ampdu_cmn.c
1136 ifeq ($(WLAMPDU_UCODE),1)
1137 WLFLAGS += -DWLAMPDU_UCODE -DWLAMPDU_MAC
1138 endif
1139 ifeq ($(WLAMPDU_HW),1)
1140 WLFLAGS += -DWLAMPDU_HW -DWLAMPDU_MAC
1141 endif
1142 ifeq ($(WLAMPDU_PRECEDENCE),1)
1143 WLFLAGS += -DWLAMPDU_PRECEDENCE
1144 endif
1145 endif
1146 #endif
1148 #ifdef WOWL
1149 ifeq ($(WOWL),1)
1150 WLFLAGS += -DWOWL
1151 WLFILES_SRC_HI += src/wl/sys/d11ucode_wowl.c
1152 WLFILES_SRC_HI += src/wl/sys/wlc_wowl.c
1153 WLFILES_SRC_HI += src/wl/sys/wowlaestbls.c
1154 endif
1155 #endif
1157 #ifdef BTC2WIRE
1158 ifeq ($(BTC2WIRE),1)
1159 WLFLAGS += -DBTC2WIRE
1160 WLFILES_SRC_LO += src/wl/sys/d11ucode_2w.c
1161 endif
1162 #endif
1164 #ifdef WL_ASSOC_RECREATE
1165 ifeq ($(WL_ASSOC_RECREATE),1)
1166 ifeq ($(STA),1)
1167 WLFLAGS += -DWL_ASSOC_RECREATE
1168 endif
1169 endif
1170 #endif
1173 #ifdef WLTDLS
1174 ifeq ($(TDLS_TESTBED), 1)
1175 WLFLAGS += -DTDLS_TESTBED
1176 endif
1177 ifeq ($(WLTDLS), 1)
1178 WLFLAGS += -DWLTDLS
1179 WLFILES_SRC_HI += src/wl/sys/wlc_tdls.c
1180 endif
1181 #endif
1183 #ifdef WLDLS
1184 ifeq ($(WLDLS), 1)
1185 WLFLAGS += -DWLDLS
1186 WLFILES_SRC_HI += src/wl/sys/wlc_dls.c
1187 endif
1188 #endif
1190 #ifdef WLBSSLOAD
1191 # WLBSSLOAD
1192 ifeq ($(WLBSSLOAD),1)
1193 WLFLAGS += -DWLBSSLOAD
1194 WLFILES_SRC_HI += src/wl/sys/wlc_bssload.c
1195 endif
1196 #endif
1198 #ifdef L2_FILTER
1199 ifeq ($(L2_FILTER),1)
1200 WLFLAGS += -DL2_FILTER
1201 ifeq ($(L2_FILTER_STA),1)
1202 WLFLAGS += -DL2_FILTER_STA
1203 endif
1204 WLFILES_SRC += src/wl/sys/wlc_l2_filter.c
1205 endif
1206 #endif
1208 #ifdef WLP2P
1209 ifeq ($(WLP2P),1)
1210 WLFLAGS += -DWLP2P
1211 WLFILES_SRC_HI += src/wl/sys/wlc_p2p.c
1212 WLFLAGS += -DWL_BSSCFG_TX_SUPR -DWIFI_ACT_FRAME
1213 WLMCNX := 1
1214 ifndef WLMCHAN
1215 WLMCHAN := 1
1216 endif
1217 endif
1218 #endif /* WLP2P */
1219 #ifdef WLOFFLD
1220 ifeq ($(WLOFFLD),1)
1221 ifeq ($(WL_SPLIT),0)
1222 WLFLAGS += -DWLOFFLD
1223 WLFILES_SRC_HI += src/wl/sys/wlc_offloads.c
1224 WLFILES_SRC_HI += src/shared/bcm_ol_msg.c
1225 endif
1226 endif
1227 #endif /* WLOFFLD */
1229 ifeq ($(WLMCNX),1)
1230 WLFLAGS += -DWLP2P_UCODE
1231 WLFILES_SRC_LO += src/wl/sys/d11ucode_p2p.c
1232 WLFLAGS += -DWLMCNX
1233 WLFILES_SRC_HI += src/wl/sys/wlc_mcnx.c
1234 endif
1236 ifeq ($(WLP2P_UCODE_ONLY),1)
1237 WLFLAGS += -DWLP2P_UCODE_ONLY
1238 endif
1240 #ifdef WLMCHAN
1241 ifeq ($(WLMCHAN),1)
1242 WLFLAGS += -DWLMCHAN
1243 WLFILES_SRC_HI += src/wl/sys/wlc_mchan.c
1244 ifndef WLMULTIQUEUE
1245 WLMULTIQUEUE := 1
1246 endif
1247 endif
1248 #endif /* WLMCHAN */
1250 #ifdef WLMULTIQUEUE
1251 ifeq ($(WLMULTIQUEUE), 1)
1252 WLFLAGS += -DWL_MULTIQUEUE
1253 endif
1254 #endif /* WLMULTIQUEUE */
1256 ifeq ($(WLMCHAN), 1)
1257 ifeq ($(WL_SPLIT), 1)
1258 CCA_STATS = 0
1259 endif
1260 endif
1262 ifeq ($(CCA_STATS),1)
1263 WLFLAGS += -DCCA_STATS
1264 WLFILES_SRC_HI += src/wl/sys/wlc_cca.c
1265 ifeq ($(ISID_STATS),1)
1266 WLFLAGS += -DISID_STATS
1267 WLFILES_SRC_HI += src/wl/sys/wlc_interfere.c
1268 endif
1269 endif
1271 #ifdef WLRWL
1272 ifeq ($(WLRWL),1)
1273 WLFLAGS += -DWLRWL -DRWL_WIFI
1274 WLFILES_SRC_HI += src/wl/sys/wlc_rwl.c
1275 endif
1276 #endif
1278 ifneq ($(WLNDIS_DHD),1)
1279 endif
1281 #ifdef WLPLT
1282 ifeq ($(WLPLT),1)
1283 WLFLAGS += -DWLPLT
1284 WLFILES_SRC_HI += src/wl/sys/wlc_plt.c
1285 endif
1286 #endif
1290 #ifdef WLMEDIA
1291 ifeq ($(WLMEDIA),1)
1292 WLFLAGS += -DWLMEDIA_EN
1293 WLFLAGS += -DWLMEDIA_RATESTATS
1294 WLFLAGS += -DWLMEDIA_MULTIQUEUE
1295 WLFLAGS += -DWLMEDIA_TXFIFO_FLUSH_SCB
1296 WLFLAGS += -DWLMEDIA_AMPDUSTATS
1297 WLFLAGS += -DWLMEDIA_TXFAILEVENT
1298 WLFLAGS += -DWLMEDIA_LQSTATS
1299 WLFLAGS += -DWLMEDIA_CALDBG
1300 WLFLAGS += -DWLMEDIA_EXT
1301 WLFLAGS += -DWLMEDIA_TXFILTER_OVERRIDE
1302 WLFLAGS += -DWLMEDIA_TSF
1303 WLFLAGS += -DWLMEDIA_PEAKRATE
1304 endif
1305 #endif
1307 #ifdef WLPKTDLYSTAT
1308 ifeq ($(WLPKTDLYSTAT),1)
1309 WLFLAGS += -DWLPKTDLYSTAT
1310 endif
1311 #endif
1313 ## --- which buses
1315 # silicon backplane
1317 #ifdef BCMSIBUS
1318 ifeq ($(BCMSIBUS),1)
1319 WLFLAGS += -DBCMBUSTYPE=SI_BUS
1320 BCMPCI = 0
1321 endif
1322 #endif
1324 ifeq ($(SOCI_SB),1)
1325 WLFLAGS += -DBCMCHIPTYPE=SOCI_SB
1326 else
1327 ifeq ($(SOCI_AI),1)
1328 WLFLAGS += -DBCMCHIPTYPE=SOCI_AI
1329 endif
1330 endif
1334 #ifndef LINUX_HYBRID
1335 # AP/ROUTER with SDSTD
1336 ifeq ($(WLAPSDSTD),1)
1337 WLFILES_SRC += src/shared/nvramstubs.c
1338 WLFILES_SRC += src/shared/bcmsrom.c
1339 endif
1340 #endif
1342 ## --- basic shared files
1344 #ifdef BCMHIGHSDIO
1345 ifeq ($(BCMHIGHSDIO),1)
1346 WLFLAGS += -DBCMHIGHSDIO
1347 endif
1348 #endif
1350 #ifdef BCMLOSDIO
1351 ifeq ($(BCMLOSDIO),1)
1352 WLFLAGS += -DBCMLOSDIO
1353 endif
1354 #endif
1356 #ifdef BCMHIGHUSB
1357 ifeq ($(BCMHIGHUSB),1)
1358 WLFLAGS += -DBCMHIGHUSB
1359 endif
1360 #endif
1362 #ifdef BCMLOUSB
1363 ifeq ($(BCMLOUSB),1)
1364 WLFLAGS += -DBCMLOUSB
1365 endif
1366 #endif
1368 #ifdef HNDDMA
1369 ifeq ($(HNDDMA),1)
1370 WLFILES_SRC_LO += src/shared/hnddma.c
1371 endif
1372 #endif
1374 #ifdef MSGTRACE
1375 ifeq ($(MSGTRACE),1)
1376 WLFILES_SRC += src/shared/msgtrace.c
1377 WLFLAGS += -DMSGTRACE
1378 endif
1379 #endif
1381 #ifdef BCMUTILS
1382 ifeq ($(BCMUTILS),1)
1383 WLFILES_SRC += src/shared/bcmutils.c
1384 endif
1385 #endif
1388 #ifdef BCMSROM
1389 ifeq ($(BCMSROM),1)
1390 ifeq ($(BCMSDIO),1)
1391 ifeq ($(WL_HIGH),1)
1392 WLFILES_SRC_HI += src/shared/bcmsrom.c
1393 WLFILES_SRC_HI += src/shared/bcmotp.c
1394 endif
1395 endif
1396 WLFILES_SRC_LO += src/shared/bcmsrom.c
1397 WLFILES_SRC_LO += src/shared/bcmotp.c
1398 endif
1399 #endif
1401 #ifdef BCMOTP
1402 ifeq ($(BCMOTP),1)
1403 WLFILES_SRC_LO += src/shared/bcmotp.c
1404 WLFLAGS += -DBCMNVRAMR
1405 endif
1406 #endif
1408 #ifdef SIUTILS
1409 ifeq ($(SIUTILS),1)
1410 WLFILES_SRC_LO += src/shared/siutils.c
1411 WLFILES_SRC_LO += src/shared/sbutils.c
1412 WLFILES_SRC_LO += src/shared/aiutils.c
1413 WLFILES_SRC_LO += src/shared/hndpmu.c
1414 ifneq ($(BCMPCI), 0)
1415 WLFILES_SRC_LO += src/shared/nicpci.c
1416 endif
1417 endif
1418 #endif /* SIUTILS */
1420 #ifdef SBMIPS
1421 ifeq ($(SBMIPS),1)
1422 WLFLAGS += -DBCMMIPS
1423 WLFILES_SRC_LO += src/shared/hndmips.c
1424 WLFILES_SRC_LO += src/shared/hndchipc.c
1425 endif
1426 #endif
1428 #ifdef SBPCI
1429 ifeq ($(SBPCI),1)
1430 WLFILES_SRC_LO += src/shared/hndpci.c
1431 endif
1432 #endif
1434 #ifdef SFLASH
1435 ifeq ($(SFLASH),1)
1436 WLFILES_SRC_LO += src/shared/sflash.c
1437 endif
1438 #endif
1440 #ifdef FLASHUTL
1441 ifeq ($(FLASHUTL),1)
1442 WLFILES_SRC_LO += src/shared/flashutl.c
1443 endif
1444 #endif
1446 ## --- shared OSL
1447 #ifdef OSLLX
1448 # linux osl
1449 ifeq ($(OSLLX),1)
1450 WLFILES_SRC += src/shared/linux_osl.c
1451 endif
1452 #endif
1454 #ifdef OSLVX
1455 # vx osl
1456 ifeq ($(OSLVX),1)
1457 WLFILES_SRC += src/shared/vx_osl.c
1458 WLFILES_SRC += src/shared/bcmallocache.c
1459 endif
1460 #endif
1462 #ifdef OSLBSD
1463 # bsd osl
1464 ifeq ($(OSLBSD),1)
1465 WLFILES_SRC += src/shared/bsd_osl.c
1466 WLFILES_SRC += src/shared/nvramstubs.c
1467 endif
1468 #endif
1470 #ifdef OSLCFE
1471 ifeq ($(OSLCFE),1)
1472 WLFILES_SRC += src/shared/cfe_osl.c
1473 endif
1474 #endif
1476 #ifdef OSLRTE
1477 ifeq ($(OSLRTE),1)
1478 WLFILES_SRC += src/shared/hndrte_osl.c
1479 endif
1480 #endif
1482 #ifdef OSLNDIS
1483 ifeq ($(OSLNDIS),1)
1484 WLFILES_SRC += src/shared/ndshared.c
1485 WLFILES_SRC += src/shared/ndis_osl.c
1486 endif
1487 #endif
1489 #ifndef LINUX_HYBRID
1490 ifeq ($(CONFIG_USBRNDIS_RETAIL),1)
1491 WLFLAGS += -DCONFIG_USBRNDIS_RETAIL
1492 WLFILES_SRC += src/wl/sys/wl_ndconfig.c
1493 # WLFILES_SRC += src/shared/bcmwifi/src/bcmwifi_channels.c
1494 WLFILES_SRC += src/shared/bcmwifi_channels.c
1495 endif
1497 ifeq ($(NVRAM),1)
1498 WLFILES_SRC_LO += src/dongle/rte/test/nvram.c
1499 WLFILES_SRC_LO += src/dongle/rte/sim/nvram.c
1500 WLFILES_SRC_LO += src/shared/nvram.c
1501 endif
1503 ifeq ($(NVRAMVX),1)
1504 WLFILES_SRC_LO += src/shared/nvram_rw.c
1505 endif
1506 #endif /* LINUX_HYBRID */
1508 #ifdef BCMNVRAMR
1509 ifeq ($(BCMNVRAMR),1)
1510 WLFILES_SRC_LO += src/shared/nvram_ro.c
1511 WLFILES_SRC_LO += src/shared/sflash.c
1512 WLFILES_SRC_LO += src/shared/bcmotp.c
1513 WLFLAGS += -DBCMNVRAMR
1514 endif
1515 #else /* !BCMNVRAMR */
1516 ifneq ($(BCMNVRAMR),1)
1517 ifeq ($(WLLXNOMIPSEL),1)
1518 ifneq ($(WLUMK),1)
1519 WLFILES_SRC += src/shared/nvramstubs.c
1520 endif
1521 else
1522 ifeq ($(WLNDIS),1)
1523 WLFILES_SRC += src/shared/nvramstubs.c
1524 else
1525 ifeq ($(BCMNVRAMW),1)
1526 WLFILES_SRC_LO += src/shared/nvram_ro.c
1527 WLFILES_SRC_LO += src/shared/sflash.c
1528 endif
1529 endif
1530 endif
1531 ifeq ($(BCMNVRAMW),1)
1532 WLFILES_SRC_LO += src/shared/bcmotp.c
1533 WLFLAGS += -DBCMNVRAMW
1534 endif
1535 endif
1536 #endif /* !BCMNVRAMR */
1538 # Define one OTP mechanism, or none to support all dynamically
1539 ifeq ($(BCMHNDOTP),1)
1540 WLFLAGS += -DBCMHNDOTP
1541 endif
1542 ifeq ($(BCMIPXOTP),1)
1543 WLFLAGS += -DBCMIPXOTP
1544 endif
1547 #ifdef WLDIAG
1548 ifeq ($(WLDIAG),1)
1549 WLFLAGS += -DWLDIAG
1550 WLFILES_SRC_LO += src/wl/sys/wlc_diag.c
1551 endif
1552 #endif
1554 #ifdef BCMDBG
1555 ifneq ($(BCMDBG),1)
1556 ifeq ($(WLTINYDUMP),1)
1557 WLFLAGS += -DWLTINYDUMP
1558 endif
1559 endif
1560 #endif
1562 #ifdef BCMQT
1563 ifeq ($(BCMQT),1)
1564 # Set flag to indicate emulated chip
1565 WLFLAGS += -DBCMSLTGT -DBCMQT
1566 ifeq ($(WLRTE),1)
1567 # Use of RTE implies embedded (CPU emulated)
1568 WLFLAGS += -DBCMQT_CPU
1569 endif
1570 endif
1571 #endif
1573 #ifdef WLPFN
1574 ifeq ($(WLPFN),1)
1575 WLFLAGS += -DWLPFN
1576 WLFILES_SRC += src/wl/sys/wl_pfn.c
1577 ifeq ($(WLPFN_AUTO_CONNECT),1)
1578 WLFLAGS += -DWLPFN_AUTO_CONNECT
1579 endif
1580 endif
1581 #endif
1583 #ifdef TOE
1584 ifeq ($(TOE),1)
1585 WLFLAGS += -DTOE
1586 WLFILES_SRC += src/wl/sys/wl_toe.c
1587 endif
1588 #endif
1590 #ifdef ARPOE
1591 ifeq ($(ARPOE),1)
1592 WLFLAGS += -DARPOE
1593 WLFILES_SRC += src/wl/sys/wl_arpoe.c
1594 endif
1595 #endif
1597 #ifdef NWOE
1598 ifeq ($(NWOE),1)
1599 WLFLAGS += -DNWOE
1600 WLFILES_SRC += src/wl/sys/wl_nwoe.c
1601 WLFILES_SRC += src/wl/lwip/src/core/def.c
1602 WLFILES_SRC += src/wl/lwip/src/core/dns.c
1603 WLFILES_SRC += src/wl/lwip/src/core/mem.c
1604 WLFILES_SRC += src/wl/lwip/src/core/netif.c
1605 WLFILES_SRC += src/wl/lwip/src/core/raw.c
1606 WLFILES_SRC += src/wl/lwip/src/core/stats.c
1607 WLFILES_SRC += src/wl/lwip/src/core/tcp.c
1608 WLFILES_SRC += src/wl/lwip/src/core/tcp_out.c
1609 WLFILES_SRC += src/wl/lwip/src/core/udp.c
1610 WLFILES_SRC += src/wl/lwip/src/core/dhcp.c
1611 WLFILES_SRC += src/wl/lwip/src/core/init.c
1612 WLFILES_SRC += src/wl/lwip/src/core/memp.c
1613 WLFILES_SRC += src/wl/lwip/src/core/pbuf.c
1614 WLFILES_SRC += src/wl/lwip/src/core/sys.c
1615 WLFILES_SRC += src/wl/lwip/src/core/tcp_in.c
1616 WLFILES_SRC += src/wl/lwip/src/core/timers.c
1617 WLFILES_SRC += src/wl/lwip/src/netif/etharp.c
1618 WLFILES_SRC += src/wl/lwip/src/core/ipv4/autoip.c
1619 WLFILES_SRC += src/wl/lwip/src/core/ipv4/icmp.c
1620 WLFILES_SRC += src/wl/lwip/src/core/ipv4/igmp.c
1621 WLFILES_SRC += src/wl/lwip/src/core/ipv4/inet.c
1622 WLFILES_SRC += src/wl/lwip/src/core/ipv4/inet_chksum.c
1623 WLFILES_SRC += src/wl/lwip/src/core/ipv4/ip_addr.c
1624 WLFILES_SRC += src/wl/lwip/src/core/ipv4/ip.c
1625 WLFILES_SRC += src/wl/lwip/src/core/ipv4/ip_frag.c
1626 endif
1627 #endif
1629 #ifdef WLNDOE
1630 ifeq ($(WLNDOE),1)
1631 WLFLAGS += -DWLNDOE
1632 WLFILES_SRC += src/wl/sys/wl_ndoe.c
1633 endif
1634 #endif
1636 #ifdef PCOEM_LINUXSTA
1637 ifeq ($(PCOEM_LINUXSTA),1)
1638 WLFLAGS += -DPCOEM_LINUXSTA
1639 endif
1640 #endif
1642 #ifdef LINUXSTA_PS
1643 ifeq ($(LINUXSTA_PS),1)
1644 WLFLAGS += -DLINUXSTA_PS
1645 endif
1646 #endif
1648 #ifndef LINUX_HYBRID
1649 ifeq ($(KEEP_ALIVE),1)
1650 WLFLAGS += -DKEEP_ALIVE
1651 WLFILES_SRC += src/wl/sys/wl_keep_alive.c
1652 endif
1654 #ifdef OPENSRC_IOV_IOCTL
1655 ifeq ($(OPENSRC_IOV_IOCTL),1)
1656 WLFLAGS += -DOPENSRC_IOV_IOCTL
1657 endif
1658 #endif
1660 ifeq ($(PACKET_FILTER),1)
1661 WLFLAGS += -DPACKET_FILTER
1662 WLFILES_SRC += src/wl/sys/wlc_pkt_filter.c
1663 endif
1665 ifeq ($(SEQ_CMDS),1)
1666 WLFLAGS += -DSEQ_CMDS
1667 WLFILES_SRC_HI += src/wl/sys/wlc_seq_cmds.c
1668 endif
1670 ifeq ($(RECEIVE_THROTTLE),1)
1671 WLFLAGS += -DWL_PM2_RCV_DUR_LIMIT
1672 endif
1674 ifeq ($(ASYNC_TSTAMPED_LOGS),1)
1675 WLFLAGS += -DBCMTSTAMPEDLOGS
1676 endif
1678 ifeq ($(WL11K),1)
1679 WLFLAGS += -DWL11K
1680 WLFILES_SRC += src/wl/sys/wlc_rrm.c
1681 endif
1682 ifeq ($(WLWNM),1)
1683 WLFLAGS += -DWLWNM
1684 WLFILES_SRC += src/wl/sys/wlc_wnm.c
1685 endif
1686 #endif
1688 # Sort and remove duplicates from WLFILES*
1689 ifeq ($(WL_LOW),1)
1690 WLFILES_SRC += $(sort $(WLFILES_SRC_LO))
1691 endif
1692 ifeq ($(WL_HIGH),1)
1693 WLFILES_SRC += $(sort $(WLFILES_SRC_HI))
1694 endif
1696 # wl patch code
1697 ifneq ($(WLPATCHFILE), )
1698 WLFLAGS += -DWLC_PATCH
1699 WLC_PATCH_IOCTL ?= 1
1700 ifeq ($(WLC_PATCH_IOCTL),1)
1701 WLFLAGS += -DWLC_PATCH_IOCTL
1702 endif
1703 WLFILES_SRC += $(WLPATCHFILE)
1704 endif
1706 ifeq ($(SAMPLE_COLLECT),1)
1707 WLFLAGS += -DSAMPLE_COLLECT
1708 endif
1710 ifeq ($(SMF_STATS),1)
1711 WLFLAGS += -DSMF_STATS
1712 endif
1714 #ifdef PHYMON
1715 ifeq ($(PHYMON),1)
1716 WLFLAGS += -DPHYMON
1717 endif
1718 #endif
1720 #ifdef USBSHIM
1721 ifeq ($(USBSHIM),1)
1722 WLFLAGS += -DUSBSHIM
1723 endif # USBSHIM
1724 #endif
1726 #ifdef BCM_DCS
1727 ifeq ($(BCM_DCS),1)
1728 WLFLAGS += -DBCM_DCS
1729 endif
1730 #endif
1732 ifeq ($(WLMCHAN), 1)
1733 ifeq ($(WL_SPLIT), 1)
1734 WL_THREAD = 1
1735 USBOS_THREAD = 1
1736 endif
1737 endif
1739 ifeq ($(WL_THREAD),1)
1740 WLFLAGS += -DWL_THREAD
1741 endif
1743 ifneq ($(WL_THREADNICE),)
1744 WLFLAGS += -DWL_THREADNICE=$(WL_THREADNICE)
1745 endif
1747 ifeq ($(USBOS_THREAD),1)
1748 WLFLAGS += -DUSBOS_THREAD
1749 endif
1750 ifeq ($(WL_NVRAM_FILE),1)
1751 WLFLAGS += -DWL_NVRAM_FILE
1752 endif
1754 ifeq ($(WL_FW_DECOMP),1)
1755 WLFLAGS += -DWL_FW_DECOMP
1756 WLFILES_SRC_HI += src/shared/zlib/adler32.c
1757 WLFILES_SRC_HI += src/shared/zlib/inffast.c
1758 WLFILES_SRC_HI += src/shared/zlib/inflate.c
1759 WLFILES_SRC_HI += src/shared/zlib/infcodes.c
1760 WLFILES_SRC_HI += src/shared/zlib/infblock.c
1761 WLFILES_SRC_HI += src/shared/zlib/inftrees.c
1762 WLFILES_SRC_HI += src/shared/zlib/infutil.c
1763 WLFILES_SRC_HI += src/shared/zlib/zutil.c
1764 WLFILES_SRC_HI += src/shared/zlib/crc32.c
1765 endif
1767 ifeq ($(WL_WOWL_MEDIA),1)
1768 WLFLAGS += -DWL_WOWL_MEDIA
1769 endif
1771 ifeq ($(WL_USB_ZLP_PAD),1)
1772 WLFLAGS += -DWL_USB_ZLP_PAD
1773 endif
1775 ifeq ($(WL_URB_ZPKT),1)
1776 WLFLAGS += -DWL_URB_ZPKT
1777 endif
1779 #ifdef SAVERESTORE
1780 ifeq ($(SAVERESTORE),1)
1781 WLFLAGS += -DSAVERESTORE
1782 WLFILES_SRC_LO += src/shared/sr_array.c
1783 WLFILES_SRC_LO += src/shared/saverestore.c
1784 endif
1785 #endif
1787 #ifdef BCM_REQUEST_FW
1788 ifeq ($(BCM_REQUEST_FW), 1)
1789 WLFLAGS += -DBCM_REQUEST_FW
1790 endif
1791 #endif
1793 # HW CSO support (D11 rev40 feature)
1794 ifeq ($(WLCSO),1)
1795 WLFLAGS += -DWLCSO
1796 endif
1798 # add a flag to indicate the split to linux kernels
1799 WLFLAGS += -DPHY_HAL
1801 #ifdef WET_TUNNEL
1802 ifeq ($(WET_TUNNEL),1)
1803 WLFLAGS += -DWET_TUNNEL
1804 WLFILES_SRC_HI += src/wl/sys/wlc_wet_tunnel.c
1805 endif
1806 #endif
1808 #ifdef WL_BCN_COALESCING
1809 ifeq ($(WL_BCN_COALESCING),1)
1810 WLFLAGS += -DWL_BCN_COALESCING
1811 WLFILES_SRC += src/wl/sys/wlc_bcn_clsg.c
1812 endif
1813 #endif
1817 # Legacy WLFILES pathless definition, please use new src relative path
1818 # in make files.
1819 WLFILES := $(sort $(notdir $(WLFILES_SRC)))