This repository has been archived by the owner on Nov 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Kbuild
executable file
·302 lines (251 loc) · 8.81 KB
/
Kbuild
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
MODNAME := wlan
BCM_DIR := bcmdhd
BCM_INC_DIR := $(BCM_DIR)/include
BCM_SRC_DIR := $(BCM_DIR)
BCM_INC := -I$(WLAN_ROOT)/$(BCM_INC_DIR) \
-I$(WLAN_ROOT)/$(BCM_SRC_DIR)
BCM_OBJS := $(BCM_SRC_DIR)/bcmsdh.o \
$(BCM_SRC_DIR)/bcmsdh_linux.o \
$(BCM_SRC_DIR)/bcmsdh_sdmmc.o \
$(BCM_SRC_DIR)/bcmsdh_sdmmc_linux.o \
$(BCM_SRC_DIR)/dhd_cdc.o \
$(BCM_SRC_DIR)/dhd_cfg80211.o \
$(BCM_SRC_DIR)/dhd_common.o \
$(BCM_SRC_DIR)/dhd_custom_gpio.o \
$(BCM_SRC_DIR)/dhd_ip.o \
$(BCM_SRC_DIR)/dhd_linux.o \
$(BCM_SRC_DIR)/dhd_linux_sched.o \
$(BCM_SRC_DIR)/dhd_sdio.o \
$(BCM_SRC_DIR)/dhd_pno.o \
$(BCM_SRC_DIR)/dhd_wlfc.o \
$(BCM_SRC_DIR)/dhd_linux_wq.o \
$(BCM_SRC_DIR)/aiutils.o \
$(BCM_SRC_DIR)/bcmevent.o \
$(BCM_SRC_DIR)/bcmutils.o \
$(BCM_SRC_DIR)/bcmwifi_channels.o \
$(BCM_SRC_DIR)/hndpmu.o \
$(BCM_SRC_DIR)/linux_osl.o \
$(BCM_SRC_DIR)/sbutils.o \
$(BCM_SRC_DIR)/siutils.o \
$(BCM_SRC_DIR)/wldev_common.o \
$(BCM_SRC_DIR)/wl_cfg_btcoex.o \
$(BCM_SRC_DIR)/wl_android.o \
$(BCM_SRC_DIR)/wl_cfg80211.o \
$(BCM_SRC_DIR)/wl_cfgp2p.o \
$(BCM_SRC_DIR)/wl_linux_mon.o \
$(BCM_SRC_DIR)/dhd_linux_platdev.o
LINUX_INC := -Iinclude/linux
INCS := $(BCM_INC)
OBJS := $(BCM_OBJS)
EXTRA_CFLAGS += $(INCS)
#####################
# SDIO Basic feature
#####################
DHDCFLAGS = -Wall -Wstrict-prototypes -Dlinux -DLINUX -DBCMDRIVER \
-DBCMDONGLEHOST -DUNRELEASEDCHIP -DBCMDMA32 -DBCMFILEIMAGE \
-DDHDTHREAD -DBDC -DOOB_INTR_ONLY \
-DDHD_BCMEVENTS -DSHOW_EVENTS -DBCMDBG \
-DMMC_SDIO_ABORT -DBCMSDIO -DBCMLXSDMMC -DWLP2P \
-DWIFI_ACT_FRAME -DARP_OFFLOAD_SUPPORT \
-DKEEP_ALIVE -DCSCAN -DPKT_FILTER_SUPPORT \
-DEMBEDDED_PLATFORM -DPNO_SUPPORT
####################
# Common feature
####################
DHDCFLAGS += -DCUSTOMER_HW2 -DCUSTOMER_HW5
DHDCFLAGS += -DWL_CFG80211
# 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
# 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
# VSDB
DHDCFLAGS += -DVSDB
DHDCFLAGS += -DPROP_TXSTATUS
# 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
DHDCFLAGS += -DENABLE_FW_ROAM_SUSPEND
# Support MAC ACL setting
DHDCFLAGS += -DWL_CFG80211_ACL
# SoftAP
DHDCFLAGS += -DWL_SUPPORT_AUTO_CHANNEL -DSUPPORT_HIDDEN_AP
DHDCFLAGS += -DDISABLE_11H_SOFTAP
DHDCFLAGS += -DSUPPORT_PM2_ONLY
DHDCFLAGS += -DSUPPORT_AMPDU_MPDU_CMD
DHDCFLAGS += -DSUPPORT_HOSTAPD_BGN_MODE
# For Scan result patch
DHDCFLAGS += -DESCAN_RESULT_PATCH
DHDCFLAGS += -DDUAL_ESCAN_RESULT_BUFFER
# 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
endif
# DTIM listen interval in suspend mode(0 means follow AP's DTIM period)
DHDCFLAGS += -DCUSTOM_SUSPEND_BCN_LI_DTIM=3
# Ioctl timeout 5000ms
DHDCFLAGS += -DIOCTL_RESP_TIMEOUT=5000
# DPC priority
#DHDCFLAGS += -DCUSTOM_DPC_PRIO_SETTING=98
# 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
# idle count
DHDCFLAGS += -DDHD_USE_IDLECOUNT
# custom specific value define
# For special PNO Event keep wake lock for 10sec
DHDCFLAGS += -DCUSTOM_PNO_EVENT_LOCK_xTIME=10
# set keep alive period
ifneq ($(CONFIG_SOMC_WLAN_KEEP_ALIVE_SETTING),)
DHDCFLAGS += -DCUSTOM_KEEP_ALIVE_SETTING=$(CONFIG_SOMC_WLAN_KEEP_ALIVE_SETTING)
else
DHDCFLAGS += -DCUSTOM_KEEP_ALIVE_SETTING=55000
endif
# set roam setting values
DHDCFLAGS += -DCUSTOM_ROAM_TRIGGER_SETTING=-75
DHDCFLAGS += -DCUSTOM_ROAM_DELTA_SETTING=10
# Used short dwell time during initial scan
DHDCFLAGS += -DUSE_INITIAL_SHORT_DWELL_TIME
# SKB TAILPAD to avoid out of boundary memory access
DHDCFLAGS += -DDHDENABLE_TAILPAD
# Connection statistics
DHDCFLAGS += -DCONNECTION_STATISTICS
DHDCFLAGS += -DSUPPORT_P2P_GO_PS
ifeq ($(CONFIG_BCMDHD_INSMOD_NO_FW_LOAD),y)
DHDCFLAGS += -DENABLE_INSMOD_NO_FW_LOAD
endif
# read custom mac address function
DHDCFLAGS += -DGET_CUSTOM_MAC_ENABLE
# WAPI
DHDCFLAGS += -DBCMWAPI_WPI -DBCMWAPI_WAI
#########################
# Chip dependent feature
#########################
ifneq ($(CONFIG_BCM4354),)
DHDCFLAGS += -DSOMC_MIMO
DHDCFLAGS += -DBCM4354_CHIP -DHW_OOB -DSUPPORT_MULTIPLE_REVISION
DHDCFLAGS += -DMIMO_ANT_SETTING
DHDCFLAGS += -DUSE_CID_CHECK
DHDCFLAGS += -DENABLE_BCN_LI_BCN_WAKEUP
DHDCFLAGS += -DSDIO_CRC_ERROR_FIX
# 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 += -DREPEAT_READFRAME
DHDCFLAGS += -DCUSTOM_AMPDU_BA_WSIZE=64 -DCUSTOM_IBSS_AMPDU_BA_WSIZE=16
DHDCFLAGS += -DCUSTOM_DPC_CPUCORE=0
DHDCFLAGS += -DPROP_TXSTATUS_VSDB
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
# New Features
DHDCFLAGS += -DWL11U
DHDCFLAGS += -DBCMCCX
DHDCFLAGS += -DWLTDLS
DHDCFLAGS += -DWLFBT
DHDCFLAGS += -DDHD_ENABLE_LPC
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
DHDCFLAGS += -DCUSTOM_PSPRETEND_THR=30
DHDCFLAGS += -DDISABLE_WL_FRAMEBURST_SOFTAP
endif
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
DHDCFLAGS += -DMAX_CNTL_TX_TIMEOUT=3
# New Features
DHDCFLAGS += -DWL11U
DHDCFLAGS += -DBCMCCX
DHDCFLAGS += -DWLTDLS
DHDCFLAGS += -DWLFBT
DHDCFLAGS += -DDHD_ENABLE_LPC
DHDCFLAGS += -DSUPPORT_LTECX
# DHDCFLAGS += -DSUPPORT_2G_VHT
DHDCFLAGS += -DSUPPORT_WL_TXPOWER
ifeq ($(CONFIG_BCM4339),y)
DHDCFLAGS += -DENABLE_INSMOD_NO_FW_LOAD
DHDCFLAGS += -DUSE_LATE_INITCALL_SYNC
endif
DHDCFLAGS += -DCUSTOM_PSPRETEND_THR=30
DHDCFLAGS += -DDISABLE_WL_FRAMEBURST_SOFTAP
endif
ifneq ($(CONFIG_SEMC_WLAN_BAND),)
DHDCFLAGS += -DSEMC_WLAN_BAND=$(CONFIG_SEMC_WLAN_BAND)
endif
ifneq ($(CONFIG_SOMC_WLAN_BCN_TIMEOUT),)
DHDCFLAGS += -DSOMC_WLAN_BCN_TIMEOUT=$(CONFIG_SOMC_WLAN_BCN_TIMEOUT)
endif
DHDCFLAGS += -DSOMC_MAX_ASSOC_NUM=10
# Default Listen Interval in Beacons
ifneq ($(CONFIG_SOMC_WLAN_LISTEN_INTERVAL),)
DHDCFLAGS += -DCUSTOM_LISTEN_INTERVAL=$(CONFIG_SOMC_WLAN_LISTEN_INTERVAL)
endif
ifneq ($(CONFIG_SOMC_WLAN_SCAN_NPROBES),)
DHDCFLAGS += -DSOMC_WLAN_SCAN_NPROBES=$(CONFIG_SOMC_WLAN_SCAN_NPROBES)
endif
#EXTRA_LDFLAGS += --strip-debug
EXTRA_CFLAGS += -DDHD_DEBUG
EXTRA_CFLAGS += -DSRCBASE=\"$(src)\"
KBUILD_CPPFLAGS += $(DHDCFLAGS)
# Module information used by KBuild framework
obj-$(CONFIG_BCMDHD) += $(MODNAME).o
$(MODNAME)-y := $(OBJS)