1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
|
# bcmdhd
#####################
# Basic feature
#####################
DHDCFLAGS += -Wall -Wstrict-prototypes -Dlinux -DLINUX -DBCMDRIVER \
-DBCMDONGLEHOST -DUNRELEASEDCHIP -DBCMDMA32 -DBCMFILEIMAGE \
-DDHDTHREAD -DDHD_BCMEVENTS -DSHOW_EVENTS -DBCMDBG -DWLP2P \
-DWIFI_ACT_FRAME -DARP_OFFLOAD_SUPPORT -DKEEP_ALIVE -DCSCAN \
-DPKT_FILTER_SUPPORT -DEMBEDDED_PLATFORM -DPNO_SUPPORT
#####################
# Bus Interface Type
#####################
ifneq ($(CONFIG_BCMDHD_PCIE),)
BUS_IFACE_PCIE=y
else
BUS_IFACE_SDIO=y
endif
#####################
# SDIO I/F
#####################
ifeq ($(BUS_IFACE_SDIO),y)
DHDCFLAGS += -DBDC -DOOB_INTR_ONLY -DDHD_BCMEVENTS -DMMC_SDIO_ABORT
DHDCFLAGS += -DBCMSDIO -DBCMLXSDMMC -DUSE_SDIOFIFO_IOVAR
DHDCFLAGS += -U__ARM_ARCH_7A__
# DPC priority
DHDCFLAGS += -DCUSTOM_DPC_PRIO_SETTING=98
# idle count
DHDCFLAGS += -DDHD_USE_IDLECOUNT
# SKB TAILPAD to avoid out of boundary memory access
DHDCFLAGS += -DDHDENABLE_TAILPAD
DHDCFLAGS += -DSUPPORT_P2P_GO_PS
endif
#####################
# PCIE I/F
#####################
ifeq ($(BUS_IFACE_PCIE),y)
DHDCFLAGS += -DPCIE_FULL_DONGLE -DBCMPCIE
# DPC priority
DHDCFLAGS += -DCUSTOM_DPC_PRIO_SETTING=-1
# Disable watchdog thread
DHDCFLAGS += -DCUSTOM_DHD_WATCHDOG_MS=0
# Enable Link down recovery
DHDCFLAGS += -DSUPPORT_LINKDOWN_RECOVERY
#ifeq ($(CONFIG_BCMDHD_DEBUG_PAGEALLOC),y)
# Debugging Pagealloc
# DHDCFLAGS += -DDHD_DEBUG_PAGEALLOC
#endif
# log both directions control rings
# DHDCFLAGS += -DCTRLRING_LOGGING
endif
#################
# Common feature
#################
DHDCFLAGS += -DCUSTOMER_HW4
DHDCFLAGS += -DWL_CFG80211
# Debug
DHDCFLAGS += -DSIMPLE_MAC_PRINT
DHDCFLAGS += -DDEBUGFS_CFG80211
# Print out kernel panic point of file and line info when assertion happened
DHDCFLAGS += -DBCMASSERT_LOG
# Print 8021X
DHDCFLAGS += -DDHD_8021X_DUMP
# Print DHCP
DHDCFLAGS += -DDHD_DHCP_DUMP
# VSDB
DHDCFLAGS += -DPROP_TXSTATUS
DHDCFLAGS += -DVSDB
# Wi-Fi Direct
DHDCFLAGS += -DWL_CFG80211_VSDB_PRIORITIZE_SCAN_REQUEST
# For p2p connection issue
DHDCFLAGS += -DWL_SCB_TIMEOUT=10
# For TDLS tear down inactive time 10 sec
DHDCFLAGS += -DCUSTOM_TDLS_IDLE_MODE_SETTING=10000
# for TDLS RSSI HIGH for establishing TDLS link
DHDCFLAGS += -DCUSTOM_TDLS_RSSI_THRESHOLD_HIGH=-80
# for TDLS RSSI HIGH for tearing down TDLS link
DHDCFLAGS += -DCUSTOM_TDLS_RSSI_THRESHOLD_LOW=-85
# Roaming
DHDCFLAGS += -DROAM_AP_ENV_DETECTION
DHDCFLAGS += -DROAM_ENABLE -DROAM_CHANNEL_CACHE -DROAM_API
DHDCFLAGS += -DENABLE_FW_ROAM_SUSPEND
DHDCFLAGS += -DDISABLE_ROAM_OFFLOAD
# CCX
ifeq ($(CONFIG_BRCM_CCX),y)
DHDCFLAGS += -DBCMCCX
endif
# SoftAP
DHDCFLAGS += -DWL_SUPPORT_AUTO_CHANNEL -DSUPPORT_HIDDEN_AP
DHDCFLAGS += -DSUPPORT_SOFTAP_SINGL_DISASSOC
DHDCFLAGS += -DDISABLE_11H_SOFTAP
# HW4 specific features
DHDCFLAGS += -DSUPPORT_PM2_ONLY
DHDCFLAGS += -DSUPPORT_DEEP_SLEEP
DHDCFLAGS += -DSUPPORT_AMPDU_MPDU_CMD
DHDCFLAGS += -DBLOCK_IPV6_PACKET -DPASS_IPV4_SUSPEND
# For special PNO Event keep wake lock for 10sec
DHDCFLAGS += -DCUSTOM_PNO_EVENT_LOCK_xTIME=10
# For Passing all multicast packets to host when not in suspend mode.
DHDCFLAGS += -DPASS_ALL_MCAST_PKTS
# Early suspend
DHDCFLAGS += -DDHD_USE_EARLYSUSPEND
# WiFi turn off delay
DHDCFLAGS += -DWIFI_TURNOFF_DELAY=100
# For Scan result patch
DHDCFLAGS += -DESCAN_RESULT_PATCH
DHDCFLAGS += -DDUAL_ESCAN_RESULT_BUFFER
DHDCFLAGS += -DESCAN_BUF_OVERFLOW_MGMT
# For Static Buffer
ifeq ($(CONFIG_BROADCOM_WIFI_RESERVED_MEM),y)
DHDCFLAGS += -DCONFIG_DHD_USE_STATIC_BUF
DHDCFLAGS += -DENHANCED_STATIC_BUF
DHDCFLAGS += -DSTATIC_WL_PRIV_STRUCT
ifeq ($(CONFIG_64BIT),y)
#DHDCFLAGS += -DUSE_KMALLOC_FOR_FLOW_RING
#DHDCFLAGS += -DDHD_USE_STATIC_FLOWRING
endif
ifeq ($(CONFIG_BCMDHD_DEBUG_PAGEALLOC),y)
# Preallocation for memory dump
DHDCFLAGS += -DUSE_STATIC_MEMDUMP
endif
endif
# DTIM listen interval in suspend mode(0 means follow AP's DTIM period)
DHDCFLAGS += -DCUSTOM_SUSPEND_BCN_LI_DTIM=0
# Ioctl timeout 5000ms
DHDCFLAGS += -DIOCTL_RESP_TIMEOUT=5000
# Priority mismatch fix with kernel stack
DHDCFLAGS += -DPKTPRIO_OVERRIDE
# Prevent rx thread monopolize
DHDCFLAGS += -DWAIT_DEQUEUE
# Config PM Control
DHDCFLAGS += -DCONFIG_CONTROL_PM
# Use Android wake lock mechanism
DHDCFLAGS += -DCONFIG_HAS_WAKELOCK
# Used short dwell time during initial scan
DHDCFLAGS += -DUSE_INITIAL_SHORT_DWELL_TIME
##############################
# Android Platform Definition
##############################
##########
# KitKat
##########
# Definitions are filtered by Kernel version
DHDCFLAGS += -DWL_ENABLE_P2P_IF
DHDCFLAGS += -DWL_SUPPORT_BACKPORTED_KPATCHES
# Default definitions for KitKat
DHDCFLAGS += -DWL_CFG80211_STA_EVENT
DHDCFLAGS += -DWL_IFACE_COMB_NUM_CHANNELS
# To support p2p private command on kernel 3.8 or above
DHDCFLAGS += -DWL_NEWCFG_PRIVCMD_SUPPORT
##########################
# driver type
# m: module type driver
# y: built-in type driver
##########################
DRIVER_TYPE ?= m
#########################
# Chip dependent feature
#########################
# Chipsets supported both SDIO and PCIE
ifneq ($(CONFIG_BCM4358),)
DHDCFLAGS += -DBCM4358_CHIP -DSUPPORT_MULTIPLE_REVISION
DHDCFLAGS += -DMIMO_ANT_SETTING
DHDCFLAGS += -DUSE_CID_CHECK
DHDCFLAGS += -DENABLE_BCN_LI_BCN_WAKEUP
DHDCFLAGS += -DDHD_DONOT_FORWARD_BCMEVENT_AS_NETWORK_PKT
DHDCFLAGS += -DCUSTOM_BCN_TIMEOUT=4
DHDCFLAGS += -DSOFTAP_UAPSD_OFF
# tput enhancement for common
DHDCFLAGS += -DUSE_WL_TXBF
DHDCFLAGS += -DUSE_WL_FRAMEBURST
DHDCFLAGS += -DPROP_TXSTATUS_VSDB
DHDCFLAGS += -DDISABLE_FRAMEBURST_VSDB
DHDCFLAGS += -DDISABLE_PM_BCNRX
# tput enhancement for SDIO
ifeq ($(BUS_IFACE_SDIO),y)
DHDCFLAGS += -DHW_OOB
DHDCFLAGS += -DCUSTOM_GLOM_SETTING=8 -DCUSTOM_RXCHAIN=1
DHDCFLAGS += -DUSE_DYNAMIC_F2_BLKSIZE -DDYNAMIC_F2_BLKSIZE_FOR_NONLEGACY=128
DHDCFLAGS += -DBCMSDIOH_TXGLOM -DCUSTOM_TXGLOM=1 -DBCMSDIOH_TXGLOM_HIGHSPEED
DHDCFLAGS += -DRXFRAME_THREAD
DHDCFLAGS += -DCUSTOM_AMPDU_BA_WSIZE=64 -DCUSTOM_IBSS_AMPDU_BA_WSIZE=16
DHDCFLAGS += -DCUSTOM_DPC_CPUCORE=0
DHDCFLAGS += -DCUSTOM_DEF_TXGLOM_SIZE=40 -DDHD_TXBOUND=40
DHDCFLAGS += -DENABLE_ADAPTIVE_SCHED -DCUSTOM_CPUFREQ_THRESH=1000000
DHDCFLAGS += -DCUSTOM_MAX_TXGLOM_SIZE=40
DHDCFLAGS += -DMAX_HDR_READ=128
DHDCFLAGS += -DDHD_FIRSTREAD=128
DHDCFLAGS += -DCUSTOM_AMPDU_MPDU=16
DHDCFLAGS += -DDHDTCPACK_SUPPRESS
endif
# tput enhancement for PCIE
ifeq ($(BUS_IFACE_PCIE),y)
DHDCFLAGS += -DCUSTOM_AMPDU_BA_WSIZE=64 -DCUSTOM_IBSS_AMPDU_BA_WSIZE=16
DHDCFLAGS += -DCUSTOM_AMPDU_MPDU=32
DHDCFLAGS += -DCUSTOM_AMPDU_RELEASE=16
DHDCFLAGS += -DCUSTOM_AMSDU_AGGSF=4
endif
ifeq ($(CONFIG_ARCH_MSM),y)
#DHDCFLAGS += -DSET_RPS_CPUS
endif
# New Features
DHDCFLAGS += -DWL11U
DHDCFLAGS += -DBCMCCX
DHDCFLAGS += -DWES_SUPPORT
DHDCFLAGS += -DOKC_SUPPORT
DHDCFLAGS += -DWLTDLS
DHDCFLAGS += -DWLFBT
DHDCFLAGS += -DDHD_ENABLE_LPC
DHDCFLAGS += -DWLAIBSS
DHDCFLAGS += -DSUPPORT_LTECX
DHDCFLAGS += -DSUPPORT_2G_VHT
DHDCFLAGS += -DSUPPORT_WL_TXPOWER
ifeq ($(CONFIG_BCM4358),y)
DHDCFLAGS += -DENABLE_INSMOD_NO_FW_LOAD
DHDCFLAGS += -DUSE_LATE_INITCALL_SYNC
DRIVER_TYPE = y
endif
ifeq ($(BUS_IFACE_SDIO),y)
DHDCFLAGS += -DCUSTOM_PSPRETEND_THR=30
endif
endif
ifneq ($(CONFIG_BCM4354),)
DHDCFLAGS += -DBCM4354_CHIP -DSUPPORT_MULTIPLE_REVISION
DHDCFLAGS += -DMIMO_ANT_SETTING
DHDCFLAGS += -DUSE_CID_CHECK
DHDCFLAGS += -DENABLE_BCN_LI_BCN_WAKEUP
DHDCFLAGS += -DSOFTAP_UAPSD_OFF
# tput enhancement for common
DHDCFLAGS += -DUSE_WL_TXBF
DHDCFLAGS += -DUSE_WL_FRAMEBURST
DHDCFLAGS += -DPROP_TXSTATUS_VSDB
# tput enhancement for SDIO
ifeq ($(BUS_IFACE_SDIO),y)
DHDCFLAGS += -DHW_OOB
DHDCFLAGS += -DCUSTOM_GLOM_SETTING=8 -DCUSTOM_RXCHAIN=1
DHDCFLAGS += -DUSE_DYNAMIC_F2_BLKSIZE -DDYNAMIC_F2_BLKSIZE_FOR_NONLEGACY=128
DHDCFLAGS += -DBCMSDIOH_TXGLOM -DCUSTOM_TXGLOM=1 -DBCMSDIOH_TXGLOM_HIGHSPEED
DHDCFLAGS += -DRXFRAME_THREAD
DHDCFLAGS += -DCUSTOM_AMPDU_BA_WSIZE=64 -DCUSTOM_IBSS_AMPDU_BA_WSIZE=16
DHDCFLAGS += -DCUSTOM_DPC_CPUCORE=0
DHDCFLAGS += -DCUSTOM_DEF_TXGLOM_SIZE=40 -DDHD_TXBOUND=40
DHDCFLAGS += -DENABLE_ADAPTIVE_SCHED -DCUSTOM_CPUFREQ_THRESH=1000000
DHDCFLAGS += -DCUSTOM_MAX_TXGLOM_SIZE=40
DHDCFLAGS += -DMAX_HDR_READ=128
DHDCFLAGS += -DDHD_FIRSTREAD=128
DHDCFLAGS += -DCUSTOM_AMPDU_MPDU=16
DHDCFLAGS += -DDHDTCPACK_SUPPRESS
endif
# tput enhancement for PCIE
ifeq ($(BUS_IFACE_PCIE),y)
DHDCFLAGS += -DCUSTOM_AMPDU_BA_WSIZE=64 -DCUSTOM_IBSS_AMPDU_BA_WSIZE=16
DHDCFLAGS += -DCUSTOM_AMPDU_MPDU=32
DHDCFLAGS += -DCUSTOM_AMPDU_RELEASE=16
endif
# New Features
DHDCFLAGS += -DWL11U
DHDCFLAGS += -DBCMCCX
DHDCFLAGS += -DWES_SUPPORT
DHDCFLAGS += -DOKC_SUPPORT
DHDCFLAGS += -DWLTDLS
DHDCFLAGS += -DWLFBT
DHDCFLAGS += -DDHD_ENABLE_LPC
DHDCFLAGS += -DWLAIBSS
DHDCFLAGS += -DSUPPORT_LTECX
DHDCFLAGS += -DSUPPORT_2G_VHT
DHDCFLAGS += -DSUPPORT_WL_TXPOWER
ifeq ($(CONFIG_BCM4354),y)
DHDCFLAGS += -DENABLE_INSMOD_NO_FW_LOAD
DHDCFLAGS += -DUSE_LATE_INITCALL_SYNC
DRIVER_TYPE = y
endif
ifeq ($(BUS_IFACE_SDIO),y)
DHDCFLAGS += -DCUSTOM_PSPRETEND_THR=30
endif
endif
# Chipsets supported SDIO only
ifeq ($(BUS_IFACE_SDIO),y)
ifneq ($(CONFIG_BCM4339),)
DHDCFLAGS += -DBCM4339_CHIP -DHW_OOB
DHDCFLAGS += -DUSE_CID_CHECK
DHDCFLAGS += -DENABLE_BCN_LI_BCN_WAKEUP
DHDCFLAGS += -DUSE_SDIOFIFO_IOVAR
# tput enhancement
DHDCFLAGS += -DCUSTOM_GLOM_SETTING=8 -DCUSTOM_RXCHAIN=1
DHDCFLAGS += -DUSE_DYNAMIC_F2_BLKSIZE -DDYNAMIC_F2_BLKSIZE_FOR_NONLEGACY=128
DHDCFLAGS += -DBCMSDIOH_TXGLOM -DCUSTOM_TXGLOM=1 -DBCMSDIOH_TXGLOM_HIGHSPEED
DHDCFLAGS += -DDHDTCPACK_SUPPRESS
DHDCFLAGS += -DUSE_WL_TXBF
DHDCFLAGS += -DUSE_WL_FRAMEBURST
DHDCFLAGS += -DRXFRAME_THREAD
DHDCFLAGS += -DCUSTOM_AMPDU_BA_WSIZE=64 -DCUSTOM_IBSS_AMPDU_BA_WSIZE=16
DHDCFLAGS += -DCUSTOM_DPC_CPUCORE=0
DHDCFLAGS += -DPROP_TXSTATUS_VSDB
ifeq ($(CONFIG_ARCH_MSM),y)
DHDCFLAGS += -DCUSTOM_DEF_TXGLOM_SIZE=32 -DDHD_TXBOUND=32
DHDCFLAGS += -DENABLE_ADAPTIVE_SCHED -DCUSTOM_CPUFREQ_THRESH=1000000
endif
DHDCFLAGS += -DCUSTOM_MAX_TXGLOM_SIZE=32
# New Features
DHDCFLAGS += -DWL11U
DHDCFLAGS += -DBCMCCX
DHDCFLAGS += -DWES_SUPPORT
DHDCFLAGS += -DOKC_SUPPORT
DHDCFLAGS += -DWLTDLS -DWLTDLS_AUTO_ENABLE
DHDCFLAGS += -DWLFBT
DHDCFLAGS += -DDHD_ENABLE_LPC
DHDCFLAGS += -DWLAIBSS
DHDCFLAGS += -DSUPPORT_LTECX
DHDCFLAGS += -DSUPPORT_2G_VHT
DHDCFLAGS += -DSUPPORT_WL_TXPOWER
DHDCFLAGS += -DBCMCCX_S69
ifeq ($(CONFIG_BCM4339),y)
DHDCFLAGS += -DENABLE_INSMOD_NO_FW_LOAD
DHDCFLAGS += -DUSE_LATE_INITCALL_SYNC
DRIVER_TYPE = y
endif
DHDCFLAGS += -DCUSTOM_PSPRETEND_THR=30
endif
ifneq ($(CONFIG_BCM4335),)
DHDCFLAGS += -DBCM4335_CHIP -DHW_OOB -DSUPPORT_MULTIPLE_REVISION
DHDCFLAGS += -DUSE_CID_CHECK
DHDCFLAGS += -DENABLE_BCN_LI_BCN_WAKEUP
DHDCFLAGS += -DUSE_SDIOFIFO_IOVAR
# tput enhancement
DHDCFLAGS += -DCUSTOM_GLOM_SETTING=8 -DCUSTOM_RXCHAIN=1
DHDCFLAGS += -DUSE_DYNAMIC_F2_BLKSIZE -DDYNAMIC_F2_BLKSIZE_FOR_NONLEGACY=128
DHDCFLAGS += -DBCMSDIOH_TXGLOM -DCUSTOM_TXGLOM=1 -DBCMSDIOH_TXGLOM_HIGHSPEED
DHDCFLAGS += -DDHDTCPACK_SUPPRESS
# DHDCFLAGS += -DDHD_SET_FW_HIGHSPEED
DHDCFLAGS += -DUSE_WL_TXBF
DHDCFLAGS += -DUSE_WL_FRAMEBURST
DHDCFLAGS += -DRXFRAME_THREAD
DHDCFLAGS += -DREPEAT_READFRAME
DHDCFLAGS += -DCUSTOM_AMPDU_BA_WSIZE=64
DHDCFLAGS += -DCUSTOM_DPC_CPUCORE=0
DHDCFLAGS += -DPROP_TXSTATUS_VSDB
# DHDCFLAGS += -DTPUT_DEBUG
ifeq ($(CONFIG_MACH_JF),y)
DHDCFLAGS += -DCUSTOM_DEF_TXGLOM_SIZE=32 -DDHD_TXBOUND=32
endif
ifeq ($(CONFIG_ARCH_MSM),y)
DHDCFLAGS += -DCUSTOM_DEF_TXGLOM_SIZE=32 -DDHD_TXBOUND=32
DHDCFLAGS += -DENABLE_ADAPTIVE_SCHED -DCUSTOM_CPUFREQ_THRESH=1000000
endif
DHDCFLAGS += -DCUSTOM_MAX_TXGLOM_SIZE=32
# New Features
DHDCFLAGS += -DWL11U
DHDCFLAGS += -DBCMCCX
DHDCFLAGS += -DWES_SUPPORT
DHDCFLAGS += -DOKC_SUPPORT
DHDCFLAGS += -DWLTDLS -DWLTDLS_AUTO_ENABLE
DHDCFLAGS += -DWLFBT
DHDCFLAGS += -DDHD_ENABLE_LPC
DHDCFLAGS += -DWLAIBSS
DHDCFLAGS += -DSUPPORT_LTECX
DHDCFLAGS += -DSUPPORT_2G_VHT
DHDCFLAGS += -DSUPPORT_WL_TXPOWER
# For BT LOCK
ifeq ($(CONFIG_BCM4335BT),y)
DHDCFLAGS += -DENABLE_4335BT_WAR
endif
ifeq ($(CONFIG_BCM4335),y)
DHDCFLAGS += -DENABLE_INSMOD_NO_FW_LOAD
DHDCFLAGS += -DUSE_LATE_INITCALL_SYNC
DRIVER_TYPE = y
endif
endif
ifneq ($(CONFIG_BCM4334),)
DHDCFLAGS += -DBCM4334_CHIP -DHW_OOB -DSUPPORT_MULTIPLE_REVISION
DHDCFLAGS += -DUSE_CID_CHECK
DHDCFLAGS += -DENABLE_BCN_LI_BCN_WAKEUP
DHDCFLAGS += -DUSE_DYNAMIC_F2_BLKSIZE -DDYNAMIC_F2_BLKSIZE_FOR_NONLEGACY=64
DHDCFLAGS += -DCUSTOM_GLOM_SETTING=5
DHDCFLAGS += -DPROP_TXSTATUS_VSDB
DHDCFLAGS += -DWES_SUPPORT
DHDCFLAGS += -DSUPPORT_WL_TXPOWER
ifeq ($(CONFIG_ARCH_MSM8960),y)
DHDCFLAGS += -DDHD_SDALIGN=4
endif
# New Features
DHDCFLAGS += -DWL11U
ifeq ($(CONFIG_BCM4334),y)
DHDCFLAGS += -DENABLE_INSMOD_NO_FW_LOAD
DHDCFLAGS += -DUSE_LATE_INITCALL_SYNC
DRIVER_TYPE = y
endif
endif
ifneq ($(CONFIG_BCM4343),)
DHDCFLAGS += -DBCM43430_CHIP -DSUPPORT_MULTIPLE_REVISION -DHW_OOB
DHDCFLAGS += -DMCAST_LIST_ACCUMULATION
DHDCFLAGS += -DCUSTOM_GLOM_SETTING=0
ifeq ($(CONFIG_BCM4343),y)
DHDCFLAGS += -DENABLE_INSMOD_NO_FW_LOAD
DHDCFLAGS += -DUSE_LATE_INITCALL_SYNC
DRIVER_TYPE = y
endif
# Remove common feature for BCM4343
DHDCFLAGS :=$(filter-out -DSUPPORT_AMPDU_MPDU_CMD,$(DHDCFLAGS))
DHDCFLAGS :=$(filter-out -DVSDB,$(DHDCFLAGS))
DHDCFLAGS :=$(filter-out -DPROP_TXSTATUS,$(DHDCFLAGS))
DHDCFLAGS :=$(filter-out -DROAM_AP_ENV_DETECTION,$(DHDCFLAGS))
DHDCFLAGS :=$(filter-out -DDHD_USE_IDLECOUNT,$(DHDCFLAGS))
DHDCFLAGS :=$(filter-out -DDISABLE_11H_SOFTAP,$(DHDCFLAGS))
endif
ifneq ($(CONFIG_BCM4330),)
DHDCFLAGS += -DBCM4330_CHIP -DSUPPORT_MULTIPLE_REVISION
DHDCFLAGS += -DMCAST_LIST_ACCUMULATION
DHDCFLAGS += -DCUSTOM_GLOM_SETTING=0
DHDCFLAGS += -DWL_CFG80211_GON_COLLISION
ifeq ($(CONFIG_BCM4330),y)
DHDCFLAGS += -DENABLE_INSMOD_NO_FW_LOAD
DHDCFLAGS += -DUSE_LATE_INITCALL_SYNC
DRIVER_TYPE = y
endif
# Remove common feature for BCM4330
DHDCFLAGS :=$(filter-out -DSUPPORT_AMPDU_MPDU_CMD,$(DHDCFLAGS))
DHDCFLAGS :=$(filter-out -DVSDB,$(DHDCFLAGS))
DHDCFLAGS :=$(filter-out -DPROP_TXSTATUS,$(DHDCFLAGS))
DHDCFLAGS :=$(filter-out -DROAM_AP_ENV_DETECTION,$(DHDCFLAGS))
DHDCFLAGS :=$(filter-out -DDHD_USE_IDLECOUNT,$(DHDCFLAGS))
DHDCFLAGS :=$(filter-out -DDISABLE_11H_SOFTAP,$(DHDCFLAGS))
endif
ifneq ($(CONFIG_BCM43241),)
DHDCFLAGS += -DBCM43241_CHIP -DHW_OOB
DHDCFLAGS += -DMIMO_ANT_SETTING
DHDCFLAGS += -DCUSTOM_GLOM_SETTING=1 -DCUSTOM_SDIO_F2_BLKSIZE=128
DHDCFLAGS += -DUSE_SDIOFIFO_IOVAR
DHDCFLAGS += -DAMPDU_HOSTREORDER
ifeq ($(CONFIG_BCM43241),m)
DHDCFLAGS += -fno-pic
endif
ifeq ($(CONFIG_BCM43241),y)
DHDCFLAGS += -DENABLE_INSMOD_NO_FW_LOAD
DHDCFLAGS += -DUSE_LATE_INITCALL_SYNC
DRIVER_TYPE = y
endif
endif
endif # chipset supported SDIO only
#############################
# Platform dependent feature
#############################
ifeq ($(CONFIG_SPI_SC8810),y)
DHDCFLAGS += -DREAD_MACADDR -DBCMSPI -DBCMSPI_ANDROID -DSPI_PIO_32BIT_RW -DSPI_PIO_RW_BIGENDIAN
DHDCFLAGS += -UCUSTOM_DPC_PRIO_SETTING
#Remove defines for SDMMC
DHDCFLAGS :=$(filter-out -DOOB_INTR_ONLY,$(DHDCFLAGS))
DHDCFLAGS :=$(filter-out -DBCMLXSDMMC,$(DHDCFLAGS))
#Remove defines for JB
DHDCFLAGS :=$(filter-out -DWL_ENABLE_P2P_IF,$(DHDCFLAGS))
DHDCFLAGS :=$(filter-out -DMULTIPLE_SUPPLICANT,$(DHDCFLAGS))
DHDCFLAGS :=$(filter-out -DWL_CFG80211_STA_EVENT,$(DHDCFLAGS))
endif
# For SLP feature
ifeq ($(CONFIG_SLP),y)
DHDCFLAGS += -DUSE_INITIAL_2G_SCAN
DHDCFLAGS += -DPLATFORM_SLP -DWRITE_MACADDR
DHDCFLAGS += -DSUPPORT_MULTIPLE_CHIPS -DENABLE_4335BT_WAR
DHDCFLAGS += -USUPPORT_MULTIPLE_REVISION -UCONFIG_HAS_WAKELOCK
endif
# GGSM_WIFI_5GHz_CHANNELS feature is define for only GGSM model
ifeq ($(GGSM_WIFI_5GHz_CHANNELS),true)
DHDCFLAGS += -DCUSTOMER_SET_COUNTRY
endif
ifeq ($(CONFIG_OF),y)
ifneq ($(CONFIG_MACH_UNIVERSAL7420),)
obj-$(CONFIG_MACH_UNIVERSAL7420) += dhd_custom_exynos.o
DHDCFLAGS += -DDHD_OF_SUPPORT
DHDCFLAGS += -DBCMPCIE_OOB_HOST_WAKE
endif
ifneq ($(CONFIG_ARCH_EXYNOS),)
obj-$(CONFIG_ARCH_EXYNOS) += dhd_custom_exynos.o
DHDCFLAGS += -DDHD_OF_SUPPORT
DHDCFLAGS += -DBCMPCIE_OOB_HOST_WAKE
endif
ifneq ($(CONFIG_MACH_UNIVERSAL5433),)
obj-$(CONFIG_MACH_UNIVERSAL5433) += dhd_custom_exynos.o
DHDCFLAGS += -DDHD_OF_SUPPORT
DHDCFLAGS += -DBCMPCIE_OOB_HOST_WAKE
endif
ifneq ($(CONFIG_MACH_UNIVERSAL5430),)
obj-$(CONFIG_MACH_UNIVERSAL5430) += dhd_custom_exynos.o
DHDCFLAGS += -DDHD_OF_SUPPORT
endif
ifneq ($(CONFIG_MACH_UNIVERSAL5422),)
obj-$(CONFIG_MACH_UNIVERSAL5422) += dhd_custom_exynos.o
DHDCFLAGS += -DDHD_OF_SUPPORT
endif
ifneq ($(CONFIG_ARCH_MSM8994),)
obj-$(CONFIG_ARCH_MSM8994) += dhd_custom_arch_msm.o
#DHDCFLAGS += -DDHD_OF_SUPPORT
endif
endif
##############################################################
# dhd_sec_feature.h
DHDCFLAGS += -include "dhd_sec_feature.h"
##############################################################
#########
# Others
#########
#EXTRA_LDFLAGS += --strip-debug
EXTRA_CFLAGS += $(DHDCFLAGS) -DDHD_DEBUG
EXTRA_CFLAGS += -DSRCBASE=\"$(src)\"
EXTRA_CFLAGS += -I$(src)/include/ -I$(src)/
KBUILD_CFLAGS += -I$(LINUXDIR)/include -I$(shell pwd)
DHDOFILES := dhd_pno.o dhd_common.o dhd_ip.o dhd_custom_gpio.o dhd_custom_sec.o \
dhd_linux.o dhd_linux_sched.o dhd_cfg80211.o dhd_linux_wq.o aiutils.o bcmevent.o \
bcmutils.o bcmwifi_channels.o hndpmu.o linux_osl.o sbutils.o siutils.o \
wl_android.o wl_cfg80211.o wl_cfgp2p.o wl_cfg_btcoex.o wldev_common.o \
wl_linux_mon.o wl_roam.o dhd_linux_platdev.o dhd_linux_wq.o wl_cfg_btcoex.o \
dhd_wlfc.o hnd_pktq.o hnd_pktpool.o wl_cfgnan.o bcmxtlv.o
ifeq ($(BUS_IFACE_SDIO),y)
DHDOFILES += bcmsdh.o bcmsdh_linux.o bcmsdh_sdmmc.o bcmsdh_sdmmc_linux.o
DHDOFILES += dhd_cdc.o dhd_sdio.o
endif
ifeq ($(BUS_IFACE_PCIE),y)
DHDOFILES += dhd_pcie.o dhd_pcie_linux.o pcie_core.o dhd_flowring.o dhd_msgbuf.o
endif
# For SPI projects
ifeq ($(CONFIG_SPI_SC8810),y)
DHDOFILES += bcmsdspi_linux.o bcmspibrcm.o
DHDOFILES :=$(filter-out bcmsdh_sdmmc.o,$(DHDOFILES))
DHDOFILES :=$(filter-out bcmsdh_sdmmc_linux.o,$(DHDOFILES))
endif
dhd-y := $(DHDOFILES)
obj-$(DRIVER_TYPE) += dhd.o
all:
@echo "$(MAKE) --no-print-directory -C $(KDIR) SUBDIRS=$(CURDIR) modules"
@$(MAKE) --no-print-directory -C $(KDIR) SUBDIRS=$(CURDIR) modules
clean:
rm -rf *.o *.ko *.mod.c *~ .*.cmd *.o.cmd .*.o.cmd \
Module.symvers modules.order .tmp_versions modules.builtin
install:
@$(MAKE) --no-print-directory -C $(KDIR) \
SUBDIRS=$(CURDIR) modules_install
|