Makefile 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515
  1. # bcmdhd
  2. #
  3. # Portions of this code are copyright (c) 2020 Cypress Semiconductor Corporation
  4. #
  5. # Copyright (C) 1999-2020, 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. # SDIO Basic feature
  30. #####################
  31. DHDCFLAGS += -Wall -Wstrict-prototypes -Dlinux -DLINUX -DBCMDRIVER \
  32. -DBCMDONGLEHOST -DUNRELEASEDCHIP -DBCMDMA32 -DBCMFILEIMAGE \
  33. -DDHDTHREAD -DSHOW_EVENTS -DBCMDBG -DWLP2P \
  34. -DWIFI_ACT_FRAME -DARP_OFFLOAD_SUPPORT \
  35. -DKEEP_ALIVE -DCSCAN -DPKT_FILTER_SUPPORT \
  36. -DEMBEDDED_PLATFORM -DPNO_SUPPORT -DSHOW_LOGTRACE \
  37. -DGET_CUSTOM_MAC_ENABLE \
  38. -DSEC_ENHANCEMENT -DDHD_FW_COREDUMP -DCHIPS_CUSTOMER_HW6 \
  39. -DDHD_RND_DEBUG -DDHD_DUMP_FILE_WRITE_FROM_KERNEL \
  40. -DDHD_DONOT_FORWARD_BCMEVENT_AS_NETWORK_PKT
  41. # In case not supported by compiler, remove the below option
  42. DHDCFLAGS += -Wno-error=date-time
  43. #################
  44. # Common feature
  45. #################
  46. DHDCFLAGS += -DWL_VIRTUAL_APSTA
  47. # Dongle init fail
  48. DHDCFLAGS += -DDEBUG_DNGL_INIT_FAIL
  49. DHDCFLAGS += -DPOWERUP_MAX_RETRY=0
  50. DHDCFLAGS += -DWL_SUPPORT_AUTO_CHANNEL
  51. # DHDCFLAGS += -DWL_STATIC_IF # Shall be enabled to get secondary static interface for AP on Android
  52. # Wapi
  53. DHDCFLAGS += -DBCMWAPI_WPI -DBCMWAPI_WAI
  54. # Allow wl event forwarding as network packet
  55. DHDCFLAGS += -DWL_EVENT_ENAB
  56. DHDCFLAGS += -DWL_CFG80211
  57. # Print out kernel panic point of file and line info when assertion happened
  58. DHDCFLAGS += -DBCMASSERT_LOG
  59. # Enable Log Dump
  60. DHDCFLAGS += -DDHD_LOG_DUMP
  61. DHDCFLAGS += -DOEM_ANDROID
  62. # Enable Register access via dhd IOVAR
  63. DHDCFLAGS += -DDHD_PCIE_REG_ACCESS -DDHD_BUS_MEM_ACCESS
  64. # Disable ASPM to avoid CTO in Interposer
  65. DHDCFLAGS += -DDHD_DISABLE_ASPM
  66. # CUSTOMER4 flags
  67. DHDCFLAGS += -DDHD_PKTID_AUDIT_ENABLED
  68. DHDCFLAGS += -DSUPPORT_HIDDEN_AP
  69. DHDCFLAGS += -DPASS_ALL_MCAST_PKTS -DESCAN_BUF_OVERFLOW_MGMT -DPKTPRIO_OVERRIDE
  70. DHDCFLAGS += -DUSE_INITIAL_SHORT_DWELL_TIME
  71. DHDCFLAGS += -DENABLE_BCN_LI_BCN_WAKEUP -DSOFTAP_UAPSD_OFF
  72. DHDCFLAGS += -DSUPPORT_LTECX -DSUPPORT_2G_VHT
  73. DHDCFLAGS += -DSUPPORT_WL_TXPOWER -DBLOCK_IPV6_PACKET -DSUPPORT_DEEP_SLEEP
  74. DHDCFLAGS += -DSUPPORT_AMPDU_MPDU_CMD -DSOFTAP_SEND_HANGEVT -DNUM_SCB_MAX_PROBE=3
  75. DHDCFLAGS += -DCUSTOM_TCPACK_DELAY_TIME=10
  76. DHDCFLAGS += -DDEBUGFS_CFG80211
  77. DHDCFLAGS += -DSUPPORT_SOFTAP_WPAWPA2_MIXED
  78. DHDCFLAGS += -DSUPPORT_2G_VHT -DSUPPORT_5G_1024QAM_VHT
  79. DHDCFLAGS += -DEWP_ECNTRS_LOGGING
  80. DHDCFLAGS += -DEWP_ETD_PRSRV_LOGS
  81. # Runtime PM feature
  82. # DHDCFLAGS += -DDHD_PCIE_RUNTIMEPM -DMAX_IDLE_COUNT=11 -DCUSTOM_DHD_RUNTIME_MS=100
  83. # DMA64 suppports on 64bit Architecture
  84. ifeq ($(CONFIG_ARM64),y)
  85. DHDCFLAGS := $(filter-out -DBCMDMA32,$(DHDCFLAGS))
  86. DHDCFLAGS += -DBCMDMA64OSL
  87. endif
  88. # DMA64 suppports on x64bit Architecture
  89. #ifeq ($(CONFIG_64BIT),y)
  90. # DHDCFLAGS := $(filter-out -DBCMDMA32,$(DHDCFLAGS))
  91. # DHDCFLAGS += -DBCMDMA64OSL
  92. #endif // endif
  93. ## OOB
  94. ifeq ($(CONFIG_BCMDHD_OOB_HOST_WAKE),y)
  95. DHDCFLAGS += -DBCMPCIE_OOB_HOST_WAKE
  96. endif
  97. # keepalive
  98. DHDCFLAGS += -DCUSTOM_KEEP_ALIVE_SETTING=28000
  99. DHDCFLAGS += -DVSDB
  100. # For p2p connection issue
  101. DHDCFLAGS += -DWL_SCB_TIMEOUT=10
  102. # TDLS enable
  103. DHDCFLAGS += -DWLTDLS -DWLTDLS_AUTO_ENABLE
  104. # For TDLS tear down inactive time 40 sec
  105. DHDCFLAGS += -DCUSTOM_TDLS_IDLE_MODE_SETTING=10000
  106. # for TDLS RSSI HIGH for establishing TDLS link
  107. DHDCFLAGS += -DCUSTOM_TDLS_RSSI_THRESHOLD_HIGH=-80
  108. # for TDLS RSSI HIGH for tearing down TDLS link
  109. DHDCFLAGS += -DCUSTOM_TDLS_RSSI_THRESHOLD_LOW=-85
  110. # Roaming
  111. DHDCFLAGS += -DROAM_AP_ENV_DETECTION
  112. DHDCFLAGS += -DROAM_ENABLE -DROAM_CHANNEL_CACHE -DROAM_API
  113. DHDCFLAGS += -DENABLE_FW_ROAM_SUSPEND
  114. # Roaming trigger
  115. DHDCFLAGS += -DCUSTOM_ROAM_TRIGGER_SETTING=-75
  116. DHDCFLAGS += -DCUSTOM_ROAM_DELTA_SETTING=10
  117. # Set PM 2 always regardless suspend/resume
  118. DHDCFLAGS += -DSUPPORT_PM2_ONLY
  119. # For special PNO Event keep wake lock for 10sec
  120. DHDCFLAGS += -DCUSTOM_PNO_EVENT_LOCK_xTIME=10
  121. DHDCFLAGS += -DMIRACAST_AMPDU_SIZE=8
  122. #Vendor Extension
  123. DHDCFLAGS += -DWL_VENDOR_EXT_SUPPORT
  124. #Gscan
  125. DHDCFLAGS += -DGSCAN_SUPPORT
  126. #PNO Scan Result Version
  127. DHDCFLAGS += -DPFN_SCANRESULT_2
  128. #RSSI Monitor
  129. DHDCFLAGS += -DRSSI_MONITOR_SUPPORT
  130. #RTT
  131. DHDCFLAGS += -DRTT_SUPPORT -DRTT_DEBUG
  132. #APF
  133. DHDCFLAGS += -DAPF
  134. #NDOffload
  135. DHDCFLAGS += -DNDO_CONFIG_SUPPORT
  136. DHDCFLAGS += -DIPV6_NDO_SUPPORT
  137. #Link Statistics
  138. DHDCFLAGS += -DLINKSTAT_SUPPORT
  139. #Debugaility
  140. DHDCFLAGS += -DDBG_PKT_MON -DDBG_PKT_MON_INIT_DEFAULT
  141. DHDCFLAGS += -DWL_SCHED_SCAN
  142. DHDCFLAGS += -DDNGL_EVENT_SUPPORT
  143. #RSSI Monitor
  144. DHDCFLAGS += -DRSSI_MONITOR_SUPPORT
  145. # Early suspend
  146. DHDCFLAGS += -DDHD_USE_EARLYSUSPEND
  147. # For Scan result patch
  148. DHDCFLAGS += -DESCAN_RESULT_PATCH
  149. # NAN
  150. DHDCFLAGS += -DWL_NAN -DWL_NAN_DISC_CACHE
  151. # For Static Buffer
  152. ifeq ($(CONFIG_DHD_USE_STATIC_BUF),y)
  153. DHDCFLAGS += -DENHANCED_STATIC_BUF
  154. DHDCFLAGS += -DSTATIC_WL_PRIV_STRUCT
  155. endif
  156. ifneq ($(CONFIG_DHD_USE_SCHED_SCAN),)
  157. DHDCFLAGS += -DWL_SCHED_SCAN
  158. endif
  159. # Ioctl timeout 5000ms
  160. DHDCFLAGS += -DIOCTL_RESP_TIMEOUT=5000
  161. # Prevent rx thread monopolize
  162. DHDCFLAGS += -DWAIT_DEQUEUE
  163. # idle count
  164. DHDCFLAGS += -DDHD_USE_IDLECOUNT
  165. # SKB TAILPAD to avoid out of boundary memory access
  166. DHDCFLAGS += -DDHDENABLE_TAILPAD
  167. # Wi-Fi Direct
  168. DHDCFLAGS += -DWL_CFG80211_VSDB_PRIORITIZE_SCAN_REQUEST
  169. DHDCFLAGS += -DWL_CFG80211_STA_EVENT
  170. DHDCFLAGS += -DWL_IFACE_COMB_NUM_CHANNELS
  171. DHDCFLAGS += -DWL_SUPPORT_MULTIP2P
  172. #SCAN time
  173. DHDCFLAGS += -DCUSTOM_SET_SHORT_DWELL_TIME
  174. DHDCFLAGS += -DCUSTOM_FORCE_NODFS_FLAG
  175. ifeq ($(CONFIG_ANDROID),y)
  176. DHDCFLAGS += -DKEEP_WIFION_OPTION
  177. endif
  178. # SoftAP
  179. DHDCFLAGS += -DSET_RANDOM_MAC_SOFTAP
  180. DHDCFLAGS += -DWL_CFG80211_ACL
  181. # Disable FRAMEBURST on VSDB
  182. DHDCFLAGS += -DDISABLE_FRAMEBURST_VSDB
  183. # WPS
  184. DHDCFLAGS += -DWL_WPS_SYNC -DBCMCRYPTO_COMPONENT
  185. #WPA3
  186. ifneq ($(CONFIG_BCMDHD_WPA3),)
  187. DHDCFLAGS += -DWL_SAE
  188. endif
  189. ifneq ($(CONFIG_BCMDHD_PCIE),)
  190. DHDCFLAGS += -DDHD_4WAYM4_FAIL_DISCONNECT
  191. endif
  192. # Uncomment the below line for AP to receive disconnect management frame.
  193. # DHDCFLAGS += -DWL_CFG80211_AP_RX_MGMT_DISCONNECT
  194. # Bandsteer support
  195. # DHDCFLAGS += -DDHD_BANDSTEER
  196. ##########################
  197. # driver type
  198. # m: module type driver
  199. # y: built-in type driver
  200. ##########################
  201. DRIVER_TYPE ?= $(CONFIG_BCMDHD)
  202. #########################
  203. # Chip dependent feature
  204. #########################
  205. ifneq ($(filter y, ) $(CONFIG_BCM4358) $(CONFIG_BCM4359) $(CONFIG_BCM4361) $(CONFIG_BCM4373) $(CONFIG_BCM89273),)
  206. DHDCFLAGS += -DUSE_WL_TXBF
  207. DHDCFLAGS += -DCUSTOM_DPC_CPUCORE=0
  208. # New Features
  209. DHDCFLAGS += -DWL11U
  210. DHDCFLAGS += -DMFP
  211. DHDCFLAGS += -DDHD_ENABLE_LPC
  212. DHDCFLAGS += -DCUSTOM_COUNTRY_CODE
  213. DHDCFLAGS += -DRTT_SUPPORT -DRTT_DEBUG
  214. DHDCFLAGS += -DNDO_CONFIG_SUPPORT
  215. DHDCFLAGS += -DIPV6_NDO_SUPPORT
  216. DHDCFLAGS += -DIGUANA_LEGACY_CHIPS
  217. ifneq ($(CONFIG_BCMDHD_SDMMC),)
  218. DHDCFLAGS += -DBCMLXSDMMC -DCUSTOM_TXGLOM=1
  219. endif
  220. ifneq ($(CONFIG_BCMDHD_SDIOH_STD),)
  221. DHDCFLAGS += -DBCMSDIOH_STD
  222. endif
  223. ifneq ($(CONFIG_BCMDHD_SDIO),)
  224. DHDCFLAGS += -DBDC -DHW_OOB -DDHD_BCMEVENTS -DMMC_SDIO_ABORT
  225. DHDCFLAGS += -DBCMSDIO -DUSE_SDIOFIFO_IOVAR
  226. DHDCFLAGS += -DPROP_TXSTATUS -DLIMIT_BORROW
  227. DHDCFLAGS += -DUSE_WL_FRAMEBURST
  228. DHDCFLAGS += -DCUSTOM_AMPDU_MPDU=16
  229. # tput enhancement
  230. DHDCFLAGS += -DCUSTOM_GLOM_SETTING=8 -DCUSTOM_RXCHAIN=1
  231. DHDCFLAGS += -DUSE_DYNAMIC_F2_BLKSIZE -DDYNAMIC_F2_BLKSIZE_FOR_NONLEGACY=128
  232. DHDCFLAGS += -DBCMSDIOH_TXGLOM -DAMPDU_HOSTREORDER
  233. DHDCFLAGS += -DDHDTCPACK_SUPPRESS
  234. DHDCFLAGS += -DRXFRAME_THREAD
  235. DHDCFLAGS += -DREPEAT_READFRAME
  236. DHDCFLAGS += -DCUSTOM_MAX_TXGLOM_SIZE=40
  237. DHDCFLAGS += -DMAX_HDR_READ=128
  238. DHDCFLAGS += -DDHD_FIRSTREAD=64
  239. ifneq ($(CONFIG_BCM4373),)
  240. DHDCFLAGS += -DCUSTOM_AMPDU_BA_WSIZE=32
  241. endif
  242. # bcn_timeout
  243. DHDCFLAGS += -DCUSTOM_BCN_TIMEOUT_SETTING=5
  244. DHDCFLAGS += -DWLFC_STATE_PREALLOC
  245. DHDCFLAGS += -DREVERSE_AIFSN
  246. endif
  247. # Expand TCP tx queue to 10 times of default size
  248. DHDCFLAGS += -DTSQ_MULTIPLIER=10
  249. ifneq ($(CONFIG_BCMDHD_PCIE),)
  250. DHDCFLAGS += -DPCIE_FULL_DONGLE -DBCMPCIE -DCUSTOM_DPC_PRIO_SETTING=-1
  251. # tput enhancement
  252. DHDCFLAGS += -DCUSTOM_AMPDU_BA_WSIZE=64
  253. DHDCFLAGS += -DPROP_TXSTATUS_VSDB
  254. # Disable watchdog thread
  255. DHDCFLAGS += -DCUSTOM_DHD_WATCHDOG_MS=0
  256. # HEAP ASLR
  257. DHDCFLAGS += -DBCM_ASLR_HEAP
  258. DHDCFLAGS += -DMAX_CNTL_TX_TIMEOUT=1
  259. ifneq ($(CONFIG_ARCH_MSM),)
  260. DHDCFLAGS += -DMSM_PCIE_LINKDOWN_RECOVERY
  261. endif
  262. ifeq ($(CONFIG_DHD_USE_STATIC_BUF),y)
  263. DHDCFLAGS += -DDHD_USE_STATIC_IOCTLBUF
  264. endif
  265. # DONGLE_ENABLE_ISOLATION flag causes system freeze during cert test
  266. # DHDCFLAGS += -DDONGLE_ENABLE_ISOLATION
  267. # Enable health check event handling
  268. DHDCFLAGS += -DDNGL_EVENT_SUPPORT
  269. DHDCFLAGS += -DHCHK_COMMON_SW_EVENT
  270. ifneq ($(CONFIG_DHD_OF_SUPPORT),)
  271. DHDCFLAGS += -DDHD_OF_SUPPORT
  272. DHDOFILES += dhd_custom_msm.o
  273. ifneq ($(CONFIG_BROADCOM_WIFI_RESERVED_MEM),)
  274. DHDOFILES += dhd_custom_memprealloc.o
  275. endif
  276. endif
  277. # Enable Load Balancing support by default.
  278. # DHD_LB_RXP - Perform RX Packet processing in parallel
  279. # DHD_LB_STATS - To display the Load Blancing statistics
  280. DHDCFLAGS += -DDHD_LB -DDHD_LB_RXP -DDHD_LB_STATS
  281. DHDCFLAGS += -DDHD_LB_PRIMARY_CPUS=0xF0 -DDHD_LB_SECONDARY_CPUS=0x0E
  282. # Runtime PM feature
  283. # DHDCFLAGS += -DDHD_PCIE_RUNTIMEPM -DMAX_IDLE_COUNT=11 -DCUSTOM_DHD_RUNTIME_MS=100
  284. # debug info
  285. DHDCFLAGS += -DDHD_WAKE_STATUS -DDHD_WAKE_RX_STATUS -DDHD_WAKE_EVENT_STATUS
  286. # Enable SSSR Dump
  287. DHDCFLAGS += -DDHD_SSSR_DUMP
  288. endif
  289. # Print 802.1X packets
  290. DHDCFLAGS += -DDHD_8021X_DUMP
  291. # prioritize 802.1x packet
  292. DHDCFLAGS += -DEAPOL_PKT_PRIO
  293. # Enable MSI interrupt Support
  294. DHDCFLAGS += -DDHD_MSI_SUPPORT
  295. endif
  296. ifneq ($(filter y, $(CONFIG_BCM4354) $(CONFIG_BCM4356)),)
  297. DHDCFLAGS += -DUSE_WL_TXBF
  298. DHDCFLAGS += -DUSE_WL_FRAMEBURST
  299. DHDCFLAGS += -DCUSTOM_DPC_CPUCORE=0
  300. DHDCFLAGS += -DPROP_TXSTATUS_VSDB
  301. DHDCFLAGS += -DCUSTOM_PSPRETEND_THR=30
  302. DHDCFLAGS += -DMAX_AP_CLIENT_CNT=10
  303. DHDCFLAGS += -DMAX_GO_CLIENT_CNT=5
  304. # New Features
  305. DHDCFLAGS += -DWL11U
  306. DHDCFLAGS += -DMFP
  307. DHDCFLAGS += -DDHD_ENABLE_LPC
  308. DHDCFLAGS += -DCUSTOM_COUNTRY_CODE
  309. DHDCFLAGS += -DSAR_SUPPORT
  310. # debug info
  311. DHDCFLAGS += -DDHD_WAKE_STATUS
  312. ifneq ($(CONFIG_BCMDHD_SDIO),)
  313. DHDCFLAGS += -DBDC -DOOB_INTR_ONLY -DHW_OOB -DDHD_BCMEVENTS -DMMC_SDIO_ABORT
  314. DHDCFLAGS += -DBCMSDIO -DBCMLXSDMMC -DUSE_SDIOFIFO_IOVAR
  315. DHDCFLAGS += -DPROP_TXSTATUS
  316. DHDCFLAGS += -DCUSTOM_AMPDU_MPDU=16
  317. DHDCFLAGS += -DCUSTOM_AMPDU_BA_WSIZE=64
  318. # tput enhancement
  319. DHDCFLAGS += -DCUSTOM_GLOM_SETTING=8 -DCUSTOM_RXCHAIN=1
  320. DHDCFLAGS += -DUSE_DYNAMIC_F2_BLKSIZE -DDYNAMIC_F2_BLKSIZE_FOR_NONLEGACY=128
  321. DHDCFLAGS += -DBCMSDIOH_TXGLOM -DCUSTOM_TXGLOM=1 -DBCMSDIOH_TXGLOM_HIGHSPEED
  322. DHDCFLAGS += -DDHDTCPACK_SUPPRESS
  323. DHDCFLAGS += -DRXFRAME_THREAD
  324. DHDCFLAGS += -DREPEAT_READFRAME
  325. DHDCFLAGS += -DCUSTOM_MAX_TXGLOM_SIZE=40
  326. DHDCFLAGS += -DMAX_HDR_READ=128
  327. DHDCFLAGS += -DDHD_FIRSTREAD=128
  328. # bcn_timeout
  329. DHDCFLAGS += -DCUSTOM_BCN_TIMEOUT=5
  330. DHDCFLAGS += -DWLFC_STATE_PREALLOC
  331. endif
  332. ifneq ($(CONFIG_BCMDHD_PCIE),)
  333. DHDCFLAGS += -DPCIE_FULL_DONGLE -DBCMPCIE -DCUSTOM_DPC_PRIO_SETTING=-1
  334. # tput enhancement
  335. DHDCFLAGS += -DCUSTOM_AMPDU_BA_WSIZE=64
  336. DHDCFLAGS += -DPROP_TXSTATUS_VSDB
  337. # Disable watchdog thread
  338. DHDCFLAGS += -DCUSTOM_DHD_WATCHDOG_MS=0
  339. DHDCFLAGS += -DMAX_CNTL_TX_TIMEOUT=1
  340. DHDCFLAGS += -DSUPPORT_LINKDOWN_RECOVERY
  341. # Enable health check event handling
  342. DHDCFLAGS += -DDNGL_EVENT_SUPPORT
  343. DHDCFLAGS += -DHCHK_COMMON_SW_EVENT
  344. endif
  345. ifeq ($(CONFIG_DHD_USE_STATIC_BUF),y)
  346. DHDCFLAGS += -DDHD_USE_STATIC_IOCTLBUF
  347. endif
  348. # DONGLE_ENABLE_ISOLATION flag causes system freeze during cert test
  349. # DHDCFLAGS += -DDONGLE_ENABLE_ISOLATION
  350. # Print 802.1X packets
  351. DHDCFLAGS += -DDHD_8021X_DUMP
  352. # Print DHCP packets
  353. DHDCFLAGS += -DDHD_DHCP_DUMP
  354. endif
  355. ifneq ($(CONFIG_BCM4339),)
  356. DHDCFLAGS += -DBCM4339_CHIP -DHW_OOB
  357. # tput enhancement
  358. DHDCFLAGS += -DCUSTOM_GLOM_SETTING=8 -DCUSTOM_RXCHAIN=1
  359. DHDCFLAGS += -DUSE_DYNAMIC_F2_BLKSIZE -DDYNAMIC_F2_BLKSIZE_FOR_NONLEGACY=128
  360. DHDCFLAGS += -DBCMSDIOH_TXGLOM -DCUSTOM_TXGLOM=1 -DBCMSDIOH_TXGLOM_HIGHSPEED
  361. DHDCFLAGS += -DDHDTCPACK_SUPPRESS
  362. DHDCFLAGS += -DUSE_WL_TXBF
  363. DHDCFLAGS += -DUSE_WL_FRAMEBURST
  364. DHDCFLAGS += -DRXFRAME_THREAD
  365. DHDCFLAGS += -DCUSTOM_AMPDU_BA_WSIZE=64
  366. DHDCFLAGS += -DCUSTOM_DPC_CPUCORE=0
  367. DHDCFLAGS += -DPROP_TXSTATUS_VSDB
  368. DHDCFLAGS += -DCUSTOM_MAX_TXGLOM_SIZE=32
  369. # New Features
  370. DHDCFLAGS += -DWL11U
  371. DHDCFLAGS += -DDHD_ENABLE_LPC
  372. DHDCFLAGS += -DCUSTOM_PSPRETEND_THR=30
  373. endif
  374. #EXTRA_LDFLAGS += --strip-debug
  375. ifeq ($(DRIVER_TYPE),y)
  376. DHDCFLAGS += -DENABLE_INSMOD_NO_FW_LOAD
  377. DHDCFLAGS += -DUSE_LATE_INITCALL_SYNC
  378. # Use kernel strlcpy() implementation instead of one, defined in bcmstdlib_s.c
  379. DHDCFLAGS += -DBCM_USE_PLATFORM_STRLCPY
  380. endif
  381. EXTRA_CFLAGS += $(DHDCFLAGS) -DDHD_DEBUG
  382. EXTRA_CFLAGS += -DSRCBASE=\"$(src)\"
  383. EXTRA_CFLAGS += -I$(src)/include/ -I$(src)/
  384. KBUILD_CFLAGS += -I$(LINUXDIR)/include -I$(CURDIR)
  385. DHDOFILES := dhd_pno.o dhd_common.o dhd_ip.o dhd_custom_gpio.o \
  386. dhd_linux.o dhd_linux_sched.o dhd_cfg80211.o dhd_linux_wq.o aiutils.o \
  387. bcmevent.o bcmutils.o bcmwifi_channels.o hndpmu.o linux_osl.o linux_pkt.o \
  388. sbutils.o siutils.o wl_android.o wl_roam.o wl_cfg80211.o wl_cfgscan.o wl_cfgp2p.o \
  389. wl_cfg_btcoex.o wldev_common.o wl_linux_mon.o dhd_linux_platdev.o \
  390. dhd_pno.o dhd_rtt.o dhd_linux_pktdump.o wl_cfg_btcoex.o hnd_pktq.o \
  391. hnd_pktpool.o wl_cfgvendor.o bcmxtlv.o bcm_app_utils.o dhd_debug.o \
  392. dhd_debug_linux.o wl_cfgnan.o dhd_mschdbg.o bcmbloom.o dhd_dbg_ring.o bcmstdlib_s.o \
  393. dhd_linux_exportfs.o
  394. ifneq ($(CONFIG_DHD_OF_SUPPORT),)
  395. DHDCFLAGS += -DDHD_OF_SUPPORT
  396. DHDOFILES += dhd_custom_msm.o
  397. ifneq ($(CONFIG_BROADCOM_WIFI_RESERVED_MEM),)
  398. DHDOFILES += dhd_custom_memprealloc.o
  399. endif
  400. endif
  401. ifneq ($(CONFIG_BCMDHD_SDMMC),)
  402. DHDOFILES += bcmsdh_sdmmc.o bcmsdh_sdmmc_linux.o
  403. endif
  404. ifneq ($(CONFIG_BCMDHD_SDIO),)
  405. DHDOFILES += bcmsdh.o bcmsdh_linux.o
  406. DHDOFILES += dhd_cdc.o dhd_wlfc.o dhd_sdio.o
  407. endif
  408. ifneq ($(CONFIG_BCMDHD_SDIOH_STD),)
  409. DHDOFILES += bcmsdstd.o bcmsdstd_linux.o
  410. endif
  411. ifneq ($(CONFIG_BCMDHD_PCIE),)
  412. DHDOFILES += dhd_pcie.o dhd_pcie_linux.o dhd_msgbuf.o dhd_flowring.o
  413. DHDOFILES += pcie_core.o
  414. endif
  415. ifeq ($(CONFIG_ARCH_ARKMICRO), y)
  416. #ARCH := arm
  417. #KDIR :=
  418. endif
  419. ifneq ($(filter -DDHD_LB, $(DHDCFLAGS)),)
  420. DHDOFILES += dhd_linux_lb.o
  421. endif
  422. ifneq ($(filter -DDHD_BANDSTEER, $(DHDCFLAGS)),)
  423. DHDOFILES += dhd_bandsteer.o
  424. endif
  425. bcmdhd-objs := $(DHDOFILES)
  426. obj-$(DRIVER_TYPE) += bcmdhd.o
  427. all:
  428. @echo "$(MAKE) --no-print-directory -C $(KDIR) SUBDIRS=$(CURDIR) modules"
  429. @$(MAKE) --no-print-directory -C $(KDIR) SUBDIRS=$(CURDIR) modules
  430. clean:
  431. rm -rf *.o *.ko *.mod.c *~ .*.cmd *.o.cmd .*.o.cmd \
  432. Module.symvers modules.order .tmp_versions modules.builtin
  433. install:
  434. @$(MAKE) --no-print-directory -C $(KDIR) \
  435. SUBDIRS=$(CURDIR) modules_install