1# bcmdhd 2# 3# Portions of this code are copyright (c) 2022 Cypress Semiconductor Corporation 4# 5# Copyright (C) 1999-2017, Broadcom Corporation 6# 7# Unless you and Broadcom execute a separate written software license 8# agreement governing use of this software, this software is licensed to you 9# under the terms of the GNU General Public License version 2 (the "GPL"), 10# available at http://www.broadcom.com/licenses/GPLv2.php, with the 11# following added to such license: 12# 13# As a special exception, the copyright holders of this software give you 14# permission to link this software with independent modules, and to copy and 15# distribute the resulting executable under terms of your choice, provided that 16# you also meet, for each linked independent module, the terms and conditions of 17# the license of that module. An independent module is a module which is not 18# derived from this software. The special exception does not apply to any 19# modifications of the software. 20# 21# Notwithstanding the above, under no circumstances may you combine this 22# software in any way with any other Broadcom software provided under a license 23# other than the GPL, without Broadcom's express prior written consent. 24# 25# 26# <<Broadcom-WL-IPTag/Open:>> 27# 28 29##################### 30# SDIO Basic feature 31##################### 32CONFIG_DHD_PLATFORM=Rockchip 33CONFIG_BCMDHD_OOB=y 34CONFIG_BCMDHD_SDIO=y 35CONFIG_BCMDHD_WPA3=y 36CONFIG_BCMDHD_SDMMC=y 37CONFIG_DHD_ANDROID_VTS=y 38CONFIG_BCMDHD=m 39 40 41DHDCFLAGS += -Wall -Wstrict-prototypes -Dlinux -DLINUX -DBCMDRIVER \ 42 -DBCMDONGLEHOST -DUNRELEASEDCHIP -DBCMDMA32 -DBCMFILEIMAGE \ 43 -DDHDTHREAD -DSHOW_EVENTS -DBCMDBG -DWLP2P \ 44 -DWIFI_ACT_FRAME -DARP_OFFLOAD_SUPPORT \ 45 -DKEEP_ALIVE -DCSCAN -DPKT_FILTER_SUPPORT \ 46 -DEMBEDDED_PLATFORM -DPNO_SUPPORT -DSHOW_LOGTRACE \ 47 -DGET_CUSTOM_MAC_ENABLE \ 48 -DSEC_ENHANCEMENT -DDHD_FW_COREDUMP -DCHIPS_CUSTOMER_HW6 \ 49 -DDHD_RND_DEBUG -DDHD_DUMP_FILE_WRITE_FROM_KERNEL \ 50 -DDHD_DONOT_FORWARD_BCMEVENT_AS_NETWORK_PKT -DWL11AX 51 52GCCVERSIONGTEQ9 := $(shell expr `$(CROSS_COMPILE)gcc -dumpversion | cut -f1 -d.` \>= 9) 53ifeq "$(GCCVERSIONGTEQ9)" "1" 54 DHDCFLAGS += -Wno-error=date-time 55endif 56#DHDCFLAGS += $(call cc-disable-warning, date-time) 57#DHDCFLAGS += $(call cc-disable-warning, stringop-overflow) 58DHDCFLAGS += -Wno-implicit-function-declaration -Wno-incompatible-pointer-types 59DHDCFLAGS += -Wno-unused-const-variable -Wno-unused-function 60 61################# 62# Common feature 63################# 64DHDCFLAGS += -DAUTOMOTIVE_FEATURE 65DHDCFLAGS += -DWL_VIRTUAL_APSTA 66# Dongle init fail 67DHDCFLAGS += -DDEBUG_DNGL_INIT_FAIL 68DHDCFLAGS += -DPOWERUP_MAX_RETRY=0 69DHDCFLAGS += -DWL_SUPPORT_AUTO_CHANNEL 70 71# Wapi 72DHDCFLAGS += -DBCMWAPI_WPI -DBCMWAPI_WAI 73 74# Allow wl event forwarding as network packet 75DHDCFLAGS += -DWL_EVENT_ENAB 76 77DHDCFLAGS += -DWL_CFG80211 78# Print out kernel panic point of file and line info when assertion happened 79DHDCFLAGS += -DBCMASSERT_LOG 80 81# Enable Log Dump 82#DHDCFLAGS += -DDHD_LOG_DUMP 83DHDCFLAGS += -DOEM_ANDROID 84 85# Enable Register access via dhd IOVAR 86DHDCFLAGS += -DDHD_PCIE_REG_ACCESS -DDHD_BUS_MEM_ACCESS 87 88# CUSTOMER4 flags 89DHDCFLAGS += -DDHD_PKTID_AUDIT_ENABLED 90DHDCFLAGS += -DSUPPORT_HIDDEN_AP 91DHDCFLAGS += -DPASS_ALL_MCAST_PKTS -DESCAN_BUF_OVERFLOW_MGMT -DPKTPRIO_OVERRIDE 92DHDCFLAGS += -DUSE_INITIAL_SHORT_DWELL_TIME 93DHDCFLAGS += -DSOFTAP_UAPSD_OFF 94DHDCFLAGS += -DSUPPORT_LTECX -DSUPPORT_2G_VHT 95DHDCFLAGS += -DSUPPORT_WL_TXPOWER -DBLOCK_IPV6_PACKET -DSUPPORT_DEEP_SLEEP 96DHDCFLAGS += -DSUPPORT_AMPDU_MPDU_CMD -DSOFTAP_SEND_HANGEVT -DNUM_SCB_MAX_PROBE=3 97DHDCFLAGS += -DCUSTOM_TCPACK_DELAY_TIME=10 98DHDCFLAGS += -DDEBUGFS_CFG80211 99DHDCFLAGS += -DSUPPORT_SOFTAP_WPAWPA2_MIXED 100DHDCFLAGS += -DSUPPORT_2G_VHT -DSUPPORT_5G_1024QAM_VHT 101#DHDCFLAGS += -DEWP_ECNTRS_LOGGING 102#DHDCFLAGS += -DEWP_ETD_PRSRV_LOGS 103DHDCFLAGS += -DCFI_CHECK 104 105# Runtime PM feature 106# DHDCFLAGS += -DDHD_PCIE_RUNTIMEPM -DMAX_IDLE_COUNT=11 -DCUSTOM_DHD_RUNTIME_MS=100 107 108# DMA64 suppports on 64bit Architecture 109ifeq ($(CONFIG_ARM64),y) 110 DHDCFLAGS := $(filter-out -DBCMDMA32,$(DHDCFLAGS)) 111 DHDCFLAGS += -DBCMDMA64OSL 112endif 113 114# DMA64 suppports on x64bit Architecture 115#ifeq ($(CONFIG_64BIT),y) 116# DHDCFLAGS := $(filter-out -DBCMDMA32,$(DHDCFLAGS)) 117# DHDCFLAGS += -DBCMDMA64OSL 118#endif // endif 119 120## OOB 121ifeq ($(CONFIG_BCMDHD_OOB_HOST_WAKE),y) 122 DHDCFLAGS += -DBCMPCIE_OOB_HOST_WAKE 123endif 124 125# keepalive 126DHDCFLAGS += -DCUSTOM_KEEP_ALIVE_SETTING=28000 127 128DHDCFLAGS += -DVSDB 129 130# For p2p connection issue 131DHDCFLAGS += -DWL_SCB_TIMEOUT=10 132 133# TDLS enable 134DHDCFLAGS += -DWLTDLS -DWLTDLS_AUTO_ENABLE 135# For TDLS tear down inactive time 40 sec 136DHDCFLAGS += -DCUSTOM_TDLS_IDLE_MODE_SETTING=10000 137# for TDLS RSSI HIGH for establishing TDLS link 138DHDCFLAGS += -DCUSTOM_TDLS_RSSI_THRESHOLD_HIGH=-80 139# for TDLS RSSI HIGH for tearing down TDLS link 140DHDCFLAGS += -DCUSTOM_TDLS_RSSI_THRESHOLD_LOW=-85 141 142# Roaming 143DHDCFLAGS += -DROAM_AP_ENV_DETECTION 144DHDCFLAGS += -DROAM_ENABLE -DROAM_CHANNEL_CACHE -DROAM_API 145DHDCFLAGS += -DENABLE_FW_ROAM_SUSPEND 146# Roaming trigger 147DHDCFLAGS += -DCUSTOM_ROAM_TRIGGER_SETTING=-75 148DHDCFLAGS += -DCUSTOM_ROAM_DELTA_SETTING=10 149# Set PM 2 always regardless suspend/resume 150DHDCFLAGS += -DSUPPORT_PM2_ONLY 151 152# FT roam 153DHDCFLAGS += -DWLFBT -DGTK_OFFLOAD_SUPPORT 154DHDCFLAGS += -DBCMCCX 155DHDCFLAGS += -DWBTEXT 156DHDCFLAGS += -DDHD_LOSSLESS_ROAMING 157 158# Hog flags 159#DHDCFLAGS += -DENABLE_HOGSQS 160#ifeq ($(ENABLE_HOGSQS), y) 161#DHDCFLAGS += -DM_HOGSQS_CFG=0x1910 162#endif // endif 163 164# For special PNO Event keep wake lock for 10sec 165DHDCFLAGS += -DCUSTOM_PNO_EVENT_LOCK_xTIME=10 166DHDCFLAGS += -DMIRACAST_AMPDU_SIZE=8 167#Vendor Extension 168#DHDCFLAGS += -DWL_VENDOR_EXT_SUPPORT 169#Gscan 170DHDCFLAGS += -DGSCAN_SUPPORT 171#PNO Scan Result Version 172DHDCFLAGS += -DPFN_SCANRESULT_2 173#RSSI Monitor 174DHDCFLAGS += -DRSSI_MONITOR_SUPPORT 175#APF 176DHDCFLAGS += -DAPF 177#NDOffload 178DHDCFLAGS += -DNDO_CONFIG_SUPPORT 179DHDCFLAGS += -DIPV6_NDO_SUPPORT 180 181#Link Statistics 182DHDCFLAGS += -DLINKSTAT_SUPPORT 183 184#Debugaility 185DHDCFLAGS += -DDBG_PKT_MON -DDBG_PKT_MON_INIT_DEFAULT 186DHDCFLAGS += -DWL_SCHED_SCAN 187DHDCFLAGS += -DDNGL_EVENT_SUPPORT 188 189#RSSI Monitor 190DHDCFLAGS += -DRSSI_MONITOR_SUPPORT 191 192# Early suspend 193DHDCFLAGS += -DDHD_USE_EARLYSUSPEND 194 195# For Scan result patch 196DHDCFLAGS += -DESCAN_RESULT_PATCH 197 198# NAN 199#DHDCFLAGS += -DWL_NAN -DWL_NAN_DISC_CACHE 200 201 202ifeq ($(CONFIG_DHD_PLATFORM), Rockchip) 203 DHDCFLAGS += -DCONFIG_DHD_PLAT_ROCKCHIP 204 DHDCFLAGS += -DWL_ENABLE_P2P_IF 205 DHDCFLAGS += -DDHD_FIRMWARE_DIR_PATH=\"/vendor/etc/firmware\" 206ifeq ($(CONFIG_BCMDHD_SDIO),y) 207 DHDCFLAGS += -DDHD_OF_SUPPORT 208 DHDCFLAGS += -DDHD_CUSTOM_PLAT_DATA 209# DHDCFLAGS += -DDHD_SDIO_MEM_BUF 210# DHDCFLAGS += -DANDROID_SDIO_RESET 211 DHDOFILES += dhd_custom_rockchip.o 212endif 213ifeq ($(CONFIG_BCMDHD_OOB),y) 214 DHDCFLAGS += -DOOB_INTR_ONLY -DCUSTOMER_OOB -DHW_OOB 215else 216 DHDCFLAGS += -DSDIO_ISR_THREAD 217endif 218endif 219 220 221# For Static Buffer 222ifeq ($(CONFIG_DHD_USE_STATIC_BUF),y) 223 DHDCFLAGS += -DENHANCED_STATIC_BUF 224 DHDCFLAGS += -DSTATIC_WL_PRIV_STRUCT 225endif 226ifneq ($(CONFIG_DHD_USE_SCHED_SCAN),) 227DHDCFLAGS += -DWL_SCHED_SCAN 228endif 229 230# Prevent rx thread monopolize 231DHDCFLAGS += -DWAIT_DEQUEUE 232 233# idle count 234DHDCFLAGS += -DDHD_USE_IDLECOUNT 235 236# SKB TAILPAD to avoid out of boundary memory access 237DHDCFLAGS += -DDHDENABLE_TAILPAD 238 239# Wi-Fi Direct 240DHDCFLAGS += -DWL_CFG80211_VSDB_PRIORITIZE_SCAN_REQUEST 241DHDCFLAGS += -DWL_CFG80211_STA_EVENT 242DHDCFLAGS += -DWL_IFACE_COMB_NUM_CHANNELS 243DHDCFLAGS += -DWL_SUPPORT_MULTIP2P 244#SCAN time 245DHDCFLAGS += -DCUSTOM_SET_SHORT_DWELL_TIME 246DHDCFLAGS += -DCUSTOM_FORCE_NODFS_FLAG 247ifeq ($(CONFIG_ANDROID),y) 248 DHDCFLAGS += -DKEEP_WIFION_OPTION 249 DHDCFLAGS += -Wno-date-time 250 251# To support android12 Wifi-HAL 252ifeq ($(CONFIG_ANDROID12),y) 253 DHDCFLAGS += -DANDROID12_SUPPORT 254endif 255 256# To support ACS on hostapd 257# DHDCFLAGS += -DWL_SUPPORT_ACS_OFFLOAD 258endif 259 260# SoftAP 261DHDCFLAGS += -DSET_RANDOM_MAC_SOFTAP 262DHDCFLAGS += -DWL_CFG80211_ACL 263ifeq ($(CONFIG_WL_AP_IF),y) 264 DHDCFLAGS += -DWL_STATIC_IF 265 DHDCFLAGS += -DDHD_NUM_STATIC_IFACES=2 266endif 267 268# QT support 269ifeq ($(CONFIG_QT), y) 270 DHDCFLAGS += -DBCMQT_HW -DBCMSLTGT -DBCMQT 271endif 272 273# Disable FRAMEBURST on VSDB 274DHDCFLAGS += -DDISABLE_FRAMEBURST_VSDB 275 276# WPS 277DHDCFLAGS += -DWL_WPS_SYNC -DBCMCRYPTO_COMPONENT 278 279#WPA3 280ifneq ($(CONFIG_BCMDHD_WPA3),) 281 DHDCFLAGS += -DWL_SAE 282endif 283 284ifneq ($(CONFIG_BCMDHD_PCIE),) 285DHDCFLAGS += -DDHD_4WAYM4_FAIL_DISCONNECT 286endif 287 288#6Ghz 289ifneq ($(CONFIG_BCMDHD_6E),) 290 DHDCFLAGS += -DWL_6E 291endif 292 293# Uncomment the below line for AP to receive disconnect management frame. 294# DHDCFLAGS += -DWL_CFG80211_AP_RX_MGMT_DISCONNECT 295 296# Bandsteer support 297# DHDCFLAGS += -DDHD_BANDSTEER 298 299########################## 300# driver type 301# m: module type driver 302# y: built-in type driver 303########################## 304DRIVER_TYPE ?= $(CONFIG_CYW_BCMDHD) 305 306############################# 307# Bring up WARs for CYW89570. 308# # To be removed later 309# ############################# 310ifneq ($(CONFIG_WIRELESS_EXT),) 311 DHDOFILES += wl_iw.o bcm_app_utils.o 312 DHDCFLAGS += -DWL_WIRELESS_EXT -DWLLXIW -DUSE_IW 313endif 314 315ifeq ($(CONFIG_TRXHDR_V3),y) 316 DHDCFLAGS += -DBCMTRXV3 317else 318 DHDCFLAGS += -DBCMTRXV4 319endif 320 321######################### 322# Chip dependent feature 323######################### 324 325 DHDCFLAGS += -DUSE_WL_TXBF 326 DHDCFLAGS += -DCUSTOM_DPC_CPUCORE=0 327 328# New Features 329 DHDCFLAGS += -DWL11U 330 DHDCFLAGS += -DMFP 331# Disabling LPC for 89570 for now. 332# DHDCFLAGS += -DDHD_ENABLE_LPC 333 DHDCFLAGS += -DCUSTOM_COUNTRY_CODE 334 DHDCFLAGS += -DNDO_CONFIG_SUPPORT 335 DHDCFLAGS += -DIPV6_NDO_SUPPORT 336 DHDCFLAGS += -DIGUANA_LEGACY_CHIPS 337 338ifeq ($(CONFIG_BCMDHD_SDMMC),y) 339 DHDCFLAGS += -DBCMLXSDMMC -DCUSTOM_TXGLOM=1 340ifneq ($(CONFIG_HAVE_IMX8_SOC),) 341 DHDCFLAGS += \ 342 -DCONFIG_DTS \ 343 -DOEM_EMBEDDED_LINUX \ 344 -DPLATFORM_IMX \ 345 -DSDIO_ISR_THREAD \ 346 -DWL_VIF_SUPPORT 347endif 348endif 349 350ifeq ($(CONFIG_BCMDHD_SDIOH_STD),y) 351 DHDCFLAGS += -DBCMSDIOH_STD 352endif 353 354ifeq ($(CONFIG_BCMDHD_SDIO),y) 355 DHDCFLAGS += -DBDC -DHW_OOB -DDHD_BCMEVENTS -DMMC_SDIO_ABORT 356 DHDCFLAGS += -DBCMSDIO -DUSE_SDIOFIFO_IOVAR 357 DHDCFLAGS += -DPROP_TXSTATUS -DLIMIT_BORROW 358 DHDCFLAGS += -DPROP_TXSTATUS_VSDB 359 DHDCFLAGS += -DUSE_WL_FRAMEBURST 360# tput enhancement 361 DHDCFLAGS += -DCUSTOM_GLOM_SETTING=8 -DCUSTOM_RXCHAIN=1 362 DHDCFLAGS += -DUSE_DYNAMIC_F2_BLKSIZE -DDYNAMIC_F2_BLKSIZE_FOR_NONLEGACY=128 363 DHDCFLAGS += -DBCMSDIOH_TXGLOM -DAMPDU_HOSTREORDER 364 DHDCFLAGS += -DDHDTCPACK_SUPPRESS 365 DHDCFLAGS += -DRXFRAME_THREAD 366 DHDCFLAGS += -DREPEAT_READFRAME 367 DHDCFLAGS += -DCUSTOM_MAX_TXGLOM_SIZE=40 368 DHDCFLAGS += -DMAX_HDR_READ=128 369 DHDCFLAGS += -DDHD_FIRSTREAD=64 370ifneq ($(CONFIG_BCM4373),) 371 DHDCFLAGS += -DCUSTOM_AMPDU_BA_WSIZE=32 372else 373 DHDCFLAGS += -DCUSTOM_AMPDU_BA_WSIZE=64 374 375endif 376 377# bcn_timeout 378 DHDCFLAGS += -DCUSTOM_BCN_TIMEOUT_SETTING=5 379 380 DHDCFLAGS += -DWLFC_STATE_PREALLOC 381 DHDCFLAGS += -DREVERSE_AIFSN 382 383# btsharedsdio 384ifneq ($(CONFIG_BT_OVER_SDIO),) 385 DHDCFLAGS += -DBT_OVER_SDIO 386endif 387endif 388 389# Expand TCP tx queue to 10 times of default size 390 DHDCFLAGS += -DTSQ_MULTIPLIER=10 391 392ifneq ($(CONFIG_BCMDHD_PCIE),) 393 DHDCFLAGS += -DPCIE_FULL_DONGLE -DBCMPCIE -DCUSTOM_DPC_PRIO_SETTING=-1 394# tput enhancement 395 DHDCFLAGS += -DCUSTOM_AMPDU_BA_WSIZE=64 396 DHDCFLAGS += -DPROP_TXSTATUS_VSDB 397# Disable watchdog thread 398 DHDCFLAGS += -DCUSTOM_DHD_WATCHDOG_MS=0 399# HEAP ASLR 400 DHDCFLAGS += -DBCM_ASLR_HEAP 401 DHDCFLAGS += -DMAX_CNTL_TX_TIMEOUT=1 402ifneq ($(CONFIG_ARCH_MSM),) 403 DHDCFLAGS += -DMSM_PCIE_LINKDOWN_RECOVERY 404endif 405ifeq ($(CONFIG_DHD_USE_STATIC_BUF),y) 406 DHDCFLAGS += -DDHD_USE_STATIC_IOCTLBUF 407endif 408 409# Enable health check event handling 410 DHDCFLAGS += -DDNGL_EVENT_SUPPORT 411 DHDCFLAGS += -DHCHK_COMMON_SW_EVENT 412ifneq ($(CONFIG_DHD_OF_SUPPORT),) 413 DHDCFLAGS += -DDHD_OF_SUPPORT 414 DHDOFILES += dhd_custom_msm.o 415ifneq ($(CONFIG_BROADCOM_WIFI_RESERVED_MEM),) 416 DHDOFILES += dhd_custom_memprealloc.o 417endif 418endif 419 420# Enable Load Balancing support by default. 421# DHD_LB_RXP - Perform RX Packet processing in parallel 422# DHD_LB_STATS - To display the Load Blancing statistics 423DHDCFLAGS += -DDHD_LB -DDHD_LB_RXP -DDHD_LB_STATS 424DHDCFLAGS += -DDHD_LB_PRIMARY_CPUS=0xF0 -DDHD_LB_SECONDARY_CPUS=0x0E 425 426# Runtime PM feature 427# DHDCFLAGS += -DDHD_PCIE_RUNTIMEPM -DMAX_IDLE_COUNT=11 -DCUSTOM_DHD_RUNTIME_MS=100 428 429# debug info 430 DHDCFLAGS += -DDHD_WAKE_STATUS -DDHD_WAKE_RX_STATUS 431 432# Enable SSSR Dump 433 DHDCFLAGS += -DDHD_SSSR_DUMP 434endif 435 436# Print 802.1X packets 437 DHDCFLAGS += -DDHD_8021X_DUMP 438# prioritize 802.1x packet 439 DHDCFLAGS += -DEAPOL_PKT_PRIO 440 441# Enable MSI interrupt Support 442 DHDCFLAGS += -DDHD_MSI_SUPPORT 443 444# Enabling temporarily due to build failure 445 DHDCFLAGS += -DDHD_PKTTS -DTX_STATUS_LATENCY_STATS 446 447ifneq ($(filter y, $(CONFIG_BCM4354) $(CONFIG_BCM4356)),) 448 DHDCFLAGS += -DUSE_WL_TXBF 449 DHDCFLAGS += -DUSE_WL_FRAMEBURST 450 DHDCFLAGS += -DCUSTOM_DPC_CPUCORE=0 451 DHDCFLAGS += -DPROP_TXSTATUS_VSDB 452 DHDCFLAGS += -DCUSTOM_PSPRETEND_THR=30 453 DHDCFLAGS += -DMAX_AP_CLIENT_CNT=10 454 DHDCFLAGS += -DMAX_GO_CLIENT_CNT=5 455# New Features 456 DHDCFLAGS += -DWL11U 457 DHDCFLAGS += -DMFP 458 DHDCFLAGS += -DDHD_ENABLE_LPC 459 DHDCFLAGS += -DCUSTOM_COUNTRY_CODE 460 DHDCFLAGS += -DSAR_SUPPORT 461# debug info 462 DHDCFLAGS += -DDHD_WAKE_STATUS 463ifeq ($(CONFIG_BCMDHD_SDIO),y) 464 DHDCFLAGS += -DBDC -DOOB_INTR_ONLY -DHW_OOB -DDHD_BCMEVENTS -DMMC_SDIO_ABORT 465 DHDCFLAGS += -DBCMSDIO -DBCMLXSDMMC -DUSE_SDIOFIFO_IOVAR 466 DHDCFLAGS += -DPROP_TXSTATUS 467 DHDCFLAGS += -DCUSTOM_AMPDU_MPDU=16 468 DHDCFLAGS += -DCUSTOM_AMPDU_BA_WSIZE=64 469# tput enhancement 470 DHDCFLAGS += -DCUSTOM_GLOM_SETTING=8 -DCUSTOM_RXCHAIN=1 471 DHDCFLAGS += -DUSE_DYNAMIC_F2_BLKSIZE -DDYNAMIC_F2_BLKSIZE_FOR_NONLEGACY=128 472 DHDCFLAGS += -DBCMSDIOH_TXGLOM -DCUSTOM_TXGLOM=1 -DBCMSDIOH_TXGLOM_HIGHSPEED 473 DHDCFLAGS += -DDHDTCPACK_SUPPRESS 474 DHDCFLAGS += -DRXFRAME_THREAD 475 DHDCFLAGS += -DREPEAT_READFRAME 476 DHDCFLAGS += -DCUSTOM_MAX_TXGLOM_SIZE=40 477 DHDCFLAGS += -DMAX_HDR_READ=128 478 DHDCFLAGS += -DDHD_FIRSTREAD=128 479# bcn_timeout 480 DHDCFLAGS += -DCUSTOM_BCN_TIMEOUT=5 481 DHDCFLAGS += -DWLFC_STATE_PREALLOC 482endif 483 484ifneq ($(CONFIG_BCMDHD_PCIE),) 485 DHDCFLAGS += -DPCIE_FULL_DONGLE -DBCMPCIE -DCUSTOM_DPC_PRIO_SETTING=-1 486# tput enhancement 487 DHDCFLAGS += -DCUSTOM_AMPDU_BA_WSIZE=64 488 DHDCFLAGS += -DPROP_TXSTATUS_VSDB 489# Disable watchdog thread 490 DHDCFLAGS += -DCUSTOM_DHD_WATCHDOG_MS=0 491 DHDCFLAGS += -DMAX_CNTL_TX_TIMEOUT=1 492 DHDCFLAGS += -DSUPPORT_LINKDOWN_RECOVERY 493# Enable health check event handling 494 DHDCFLAGS += -DDNGL_EVENT_SUPPORT 495 DHDCFLAGS += -DHCHK_COMMON_SW_EVENT 496endif 497ifeq ($(CONFIG_DHD_USE_STATIC_BUF),y) 498 DHDCFLAGS += -DDHD_USE_STATIC_IOCTLBUF 499endif 500# Print 802.1X packets 501 DHDCFLAGS += -DDHD_8021X_DUMP 502# Print DHCP packets 503 DHDCFLAGS += -DDHD_DHCP_DUMP 504endif 505 506ifneq ($(CONFIG_BCM4339),) 507 DHDCFLAGS += -DBCM4339_CHIP -DHW_OOB 508 509 # tput enhancement 510 DHDCFLAGS += -DCUSTOM_GLOM_SETTING=8 -DCUSTOM_RXCHAIN=1 511 DHDCFLAGS += -DUSE_DYNAMIC_F2_BLKSIZE -DDYNAMIC_F2_BLKSIZE_FOR_NONLEGACY=128 512 DHDCFLAGS += -DBCMSDIOH_TXGLOM -DCUSTOM_TXGLOM=1 -DBCMSDIOH_TXGLOM_HIGHSPEED 513 DHDCFLAGS += -DDHDTCPACK_SUPPRESS 514 DHDCFLAGS += -DUSE_WL_TXBF 515 DHDCFLAGS += -DUSE_WL_FRAMEBURST 516 DHDCFLAGS += -DRXFRAME_THREAD 517 DHDCFLAGS += -DCUSTOM_AMPDU_BA_WSIZE=64 518 DHDCFLAGS += -DCUSTOM_DPC_CPUCORE=0 519 DHDCFLAGS += -DPROP_TXSTATUS_VSDB 520 DHDCFLAGS += -DCUSTOM_MAX_TXGLOM_SIZE=32 521 522 # New Features 523 DHDCFLAGS += -DWL11U 524 DHDCFLAGS += -DDHD_ENABLE_LPC 525 DHDCFLAGS += -DCUSTOM_PSPRETEND_THR=30 526endif 527 528#EXTRA_LDFLAGS += --strip-debug 529 530ifeq ($(DRIVER_TYPE),y) 531 DHDCFLAGS += -DENABLE_INSMOD_NO_FW_LOAD 532 DHDCFLAGS += -DUSE_LATE_INITCALL_SYNC 533 # Use kernel strlcpy() implementation instead of one, defined in bcmstdlib_s.c 534 DHDCFLAGS += -DBCM_USE_PLATFORM_STRLCPY 535endif 536 537DHDOFILES += dhd_pno.o dhd_common.o dhd_ip.o dhd_custom_gpio.o \ 538 dhd_linux.o dhd_linux_sched.o dhd_cfg80211.o dhd_linux_wq.o aiutils.o \ 539 bcmevent.o bcmutils.o bcmwifi_channels.o hndpmu.o linux_osl.o linux_pkt.o \ 540 sbutils.o siutils.o wl_android.o wl_roam.o wl_cfg80211.o wl_cfgscan.o wl_cfgp2p.o \ 541 wl_cfg_btcoex.o wldev_common.o dhd_linux_platdev.o \ 542 dhd_pno.o dhd_linux_pktdump.o wl_cfg_btcoex.o hnd_pktq.o \ 543 hnd_pktpool.o wl_cfgvendor.o bcmxtlv.o bcm_app_utils.o dhd_debug.o \ 544 dhd_debug_linux.o dhd_mschdbg.o bcmbloom.o dhd_dbg_ring.o bcmstdlib_s.o \ 545 dhd_linux_exportfs.o 546 547ifneq ($(CONFIG_DHD_MONITOR_INTERFACE),) 548 DHDCFLAGS += -DDHD_MONITOR_INTERFACE 549 DHDOFILES += wl_linux_mon.o 550endif 551 552ifneq ($(CONFIG_DHD_OF_SUPPORT),) 553 DHDCFLAGS += -DDHD_OF_SUPPORT 554 DHDOFILES += dhd_custom_msm.o 555ifneq ($(CONFIG_BROADCOM_WIFI_RESERVED_MEM),) 556 DHDOFILES += dhd_custom_memprealloc.o 557endif 558endif 559 560ifeq ($(CONFIG_BCMDHD_SDMMC),y) 561 DHDOFILES += bcmsdh_sdmmc.o bcmsdh_sdmmc_linux.o 562endif 563 564ifeq ($(CONFIG_BCMDHD_SDIO),y) 565 DHDOFILES += bcmsdh.o bcmsdh_linux.o 566 DHDOFILES += dhd_cdc.o dhd_wlfc.o dhd_sdio.o 567endif 568 569ifeq ($(CONFIG_BCMDHD_SDIOH_STD),y) 570 DHDOFILES += bcmsdstd.o bcmsdstd_linux.o 571endif 572 573ifneq ($(CONFIG_BCMDHD_PCIE),) 574 DHDOFILES += dhd_pcie.o dhd_pcie_linux.o dhd_msgbuf.o dhd_flowring.o 575 DHDOFILES += pcie_core.o 576endif 577 578ifneq ($(filter -DDHD_LB, $(DHDCFLAGS)),) 579DHDOFILES += dhd_linux_lb.o 580endif 581ifneq ($(filter -DDHD_BANDSTEER, $(DHDCFLAGS)),) 582 DHDOFILES += dhd_bandsteer.o 583endif 584 585ifneq ($(CONFIG_QT),y) 586 DHDCFLAGS += -DRTT_SUPPORT -DRTT_DEBUG 587 DHDOFILES += dhd_rtt.o 588endif 589EXTRA_CFLAGS += $(DHDCFLAGS) -DDHD_DEBUG 590EXTRA_CFLAGS += -DSRCBASE=\"$(src)\" 591EXTRA_CFLAGS += -I$(src)/include/ -I$(src)/ 592KBUILD_CFLAGS += -I$(KDIR)/include -I$(CURDIR) 593 594bcmdhd-objs := $(DHDOFILES) 595obj-$(DRIVER_TYPE) += bcmdhd.o 596 597all: 598 @echo "$(MAKE) --no-print-directory -C $(KDIR) M=$(CURDIR) modules" 599 @$(MAKE) --no-print-directory -C $(KDIR) M=$(CURDIR) modules 600 601clean: 602 rm -rf *.o *.ko *.mod.c *~ .*.cmd *.o.cmd .*.o.cmd \ 603 Module.symvers modules.order .tmp_versions modules.builtin 604 605install: 606 @$(MAKE) --no-print-directory -C $(KDIR) \ 607 SUBDIRS=$(CURDIR) modules_install 608