Kbuild 32 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327
  1. # We can build either as part of a standalone Kernel build or as
  2. # an external module. Determine which mechanism is being used
  3. ifeq ($(MODNAME),)
  4. KERNEL_BUILD := 1
  5. else
  6. KERNEL_BUILD := 0
  7. endif
  8. ifeq ($(CONFIG_CNSS), y)
  9. ifndef CONFIG_ROME_IF
  10. #use pci as default interface
  11. CONFIG_ROME_IF = pci
  12. endif
  13. endif
  14. ifeq ($(KERNEL_BUILD),1)
  15. # These are provided in external module based builds
  16. # Need to explicitly define for Kernel-based builds
  17. MODNAME := wlan
  18. WLAN_ROOT := drivers/staging/qcacld-3.0
  19. endif
  20. # Make WLAN as open-source driver by default
  21. WLAN_OPEN_SOURCE := 1
  22. ifeq ($(KERNEL_BUILD), 0)
  23. # These are configurable via Kconfig for kernel-based builds
  24. # Need to explicitly configure for Android-based builds
  25. ifeq ($(CONFIG_ARCH_MDM9630), y)
  26. CONFIG_MOBILE_ROUTER := y
  27. endif
  28. ifeq ($(CONFIG_ARCH_MDM9640), y)
  29. CONFIG_MOBILE_ROUTER := y
  30. endif
  31. #Flag to enable Legacy Fast Roaming3(LFR3)
  32. CONFIG_QCACLD_WLAN_LFR3 := y
  33. #JB kernel has PMKSA patches, hence enabling this flag
  34. CONFIG_PRIMA_WLAN_OKC := y
  35. # JB kernel has CPU enablement patches, so enable
  36. ifeq ($(CONFIG_ROME_IF),pci)
  37. CONFIG_PRIMA_WLAN_11AC_HIGH_TP := y
  38. endif
  39. ifeq ($(CONFIG_ROME_IF),usb)
  40. CONFIG_PRIMA_WLAN_11AC_HIGH_TP := n
  41. endif
  42. ifeq ($(CONFIG_ROME_IF),sdio)
  43. CONFIG_PRIMA_WLAN_11AC_HIGH_TP := n
  44. endif
  45. ifneq ($(CONFIG_MOBILE_ROUTER), y)
  46. #Flag to enable TDLS feature
  47. CONFIG_QCOM_TDLS := y
  48. endif
  49. ifeq ($(CONFIG_MOBILE_ROUTER), y)
  50. CONFIG_QCACLD_FEATURE_GREEN_AP := y
  51. endif
  52. #Flag to enable Fast Transition (11r) feature
  53. CONFIG_QCOM_VOWIFI_11R := y
  54. ifneq ($(CONFIG_QCA_CLD_WLAN),)
  55. ifeq ($(CONFIG_CNSS),y)
  56. #Flag to enable Protected Managment Frames (11w) feature
  57. CONFIG_WLAN_FEATURE_11W := y
  58. #Flag to enable LTE CoEx feature
  59. CONFIG_QCOM_LTE_COEX := y
  60. ifneq ($(CONFIG_MOBILE_ROUTER), y)
  61. #Flag to enable LPSS feature
  62. CONFIG_WLAN_FEATURE_LPSS := y
  63. endif
  64. endif
  65. endif
  66. #Flag to enable Protected Managment Frames (11w) feature
  67. ifeq ($(CONFIG_ROME_IF),usb)
  68. CONFIG_WLAN_FEATURE_11W := y
  69. endif
  70. ifeq ($(CONFIG_ROME_IF),sdio)
  71. CONFIG_WLAN_FEATURE_11W := y
  72. endif
  73. ifneq ($(CONFIG_MOBILE_ROUTER), y)
  74. #Flag to enable NAN
  75. CONFIG_QCACLD_FEATURE_NAN := y
  76. endif
  77. #Flag to enable Linux QCMBR feature as default feature
  78. ifeq ($(CONFIG_ROME_IF),usb)
  79. CONFIG_LINUX_QCMBR :=y
  80. endif
  81. ifeq ($(CONFIG_CNSS_EOS),y)
  82. CONFIG_FEATURE_BMI_2 :=y
  83. endif
  84. CONFIG_MPC_UT_FRAMEWORK := y
  85. #Flag to enable offload packets feature
  86. CONFIG_WLAN_OFFLOAD_PACKETS := y
  87. #Flag to enable memdump feature
  88. CONFIG_WLAN_FEATURE_MEMDUMP := y
  89. #Flag to enable Fast Path feature
  90. CONFIG_WLAN_FASTPATH := y
  91. # Flag to enable NAPI
  92. CONFIG_WLAN_NAPI := y
  93. CONFIG_WLAN_NAPI_DEBUG := n
  94. # Flag to enable FW based TX Flow control
  95. ifeq ($(CONFIG_CNSS_EOS),y)
  96. CONFIG_WLAN_TX_FLOW_CONTROL_V2 := y
  97. else
  98. CONFIG_WLAN_TX_FLOW_CONTROL_V2 := n
  99. endif
  100. # Flag to enable LRO (Large Receive Offload)
  101. ifeq ($(CONFIG_CNSS_EOS), y)
  102. ifeq ($(CONFIG_INET_LRO), y)
  103. CONFIG_WLAN_LRO := y
  104. else
  105. CONFIG_WLAN_LRO := n
  106. endif
  107. endif
  108. endif
  109. ifneq ($(CONFIG_MOBILE_ROUTER), y)
  110. # To enable ESE upload, dependent config
  111. # CONFIG_QCOM_ESE must be enabled.
  112. CONFIG_QCOM_ESE := y
  113. CONFIG_QCOM_ESE_UPLOAD := y
  114. endif
  115. # Feature flags which are not (currently) configurable via Kconfig
  116. #Whether to build debug version
  117. BUILD_DEBUG_VERSION := 1
  118. #Enable this flag to build driver in diag version
  119. BUILD_DIAG_VERSION := 1
  120. #Do we panic on bug? default is to warn
  121. PANIC_ON_BUG := 1
  122. #Enable OL debug and wmi unified functions
  123. CONFIG_ATH_PERF_PWR_OFFLOAD := 1
  124. #Disable packet log
  125. CONFIG_REMOVE_PKT_LOG := 0
  126. #Enable 11AC TX
  127. ifeq ($(CONFIG_ROME_IF),pci)
  128. CONFIG_ATH_11AC_TXCOMPACT := 1
  129. endif
  130. ifeq ($(CONFIG_ROME_IF),usb)
  131. CONFIG_ATH_11AC_TXCOMPACT := 0
  132. endif
  133. #Enable OS specific IRQ abstraction
  134. CONFIG_ATH_SUPPORT_SHARED_IRQ := 1
  135. #Enable message based HIF instead of RAW access in BMI
  136. ifeq ($(CONFIG_QCA_WIFI_SDIO), 1)
  137. CONFIG_HIF_MESSAGE_BASED := 0
  138. else
  139. CONFIG_HIF_MESSAGE_BASED := 1
  140. endif
  141. #Enable PCI specific APIS (dma, etc)
  142. ifeq ($(CONFIG_ROME_IF),pci)
  143. CONFIG_HIF_PCI := 1
  144. endif
  145. #Enable pci read/write config functions
  146. ifeq ($(CONFIG_ROME_IF),pci)
  147. CONFIG_ATH_PCI := 1
  148. endif
  149. ifeq ($(CONFIG_ROME_IF),usb)
  150. #CONFIG_ATH_PCI := 1
  151. endif
  152. ifneq ($(CONFIG_MOBILE_ROUTER), y)
  153. #Enable IBSS support on CLD
  154. CONFIG_QCA_IBSS_SUPPORT := 1
  155. endif
  156. #Enable power management suspend/resume functionality to PCI
  157. CONFIG_ATH_BUS_PM := 1
  158. #Enable FLOWMAC module support
  159. CONFIG_ATH_SUPPORT_FLOWMAC_MODULE := 0
  160. #Enable spectral support
  161. CONFIG_ATH_SUPPORT_SPECTRAL := 0
  162. #Enable HOST statistics support
  163. CONFIG_SUPPORT_HOST_STATISTICS := 0
  164. #Enable WDI Event support
  165. CONFIG_WDI_EVENT_ENABLE := 1
  166. #Endianess selection
  167. CONFIG_LITTLE_ENDIAN := 1
  168. #Enable TX reclaim support
  169. CONFIG_TX_CREDIT_RECLAIM_SUPPORT := 0
  170. #Enable FTM support
  171. CONFIG_QCA_WIFI_FTM := 1
  172. #Enable Checksum Offload
  173. CONFIG_CHECKSUM_OFFLOAD := 1
  174. #Enable GTK offload
  175. CONFIG_GTK_OFFLOAD := 1
  176. #Enable EXT WOW
  177. ifeq ($(CONFIG_ROME_IF),pci)
  178. CONFIG_EXT_WOW := 1
  179. endif
  180. #Set this to 1 to catch erroneous Target accesses during debug.
  181. CONFIG_ATH_PCIE_ACCESS_DEBUG := 0
  182. #Enable IPA offload
  183. ifeq ($(CONFIG_IPA), y)
  184. CONFIG_IPA_OFFLOAD := 1
  185. endif
  186. #Enable Signed firmware support for split binary format
  187. CONFIG_QCA_SIGNED_SPLIT_BINARY_SUPPORT := 0
  188. #Enable single firmware binary format
  189. CONFIG_QCA_SINGLE_BINARY_SUPPORT := 0
  190. #Enable collecting target RAM dump after kernel panic
  191. CONFIG_TARGET_RAMDUMP_AFTER_KERNEL_PANIC := 1
  192. #Flag to enable/disable secure firmware feature
  193. CONFIG_FEATURE_SECURE_FIRMWARE := 0
  194. #Flag to enable Stats Ext implementation
  195. CONFIG_FEATURE_STATS_EXT := 1
  196. #Flag to force the inclusion of the 802.11p channels because support
  197. #for these channels has not yet been added to the kernel.
  198. CONFIG_STATICALLY_ADD_11P_CHANNELS := n
  199. ifeq ($(CONFIG_CFG80211),y)
  200. HAVE_CFG80211 := 1
  201. else
  202. ifeq ($(CONFIG_CFG80211),m)
  203. HAVE_CFG80211 := 1
  204. else
  205. HAVE_CFG80211 := 0
  206. endif
  207. endif
  208. ############ UAPI ############
  209. UAPI_DIR := uapi
  210. UAPI_INC := -I$(WLAN_ROOT)/$(UAPI_DIR)/linux
  211. ############ COMMON ############
  212. COMMON_DIR := core/common
  213. COMMON_INC := -I$(WLAN_ROOT)/$(COMMON_DIR)
  214. ############ HDD ############
  215. HDD_DIR := core/hdd
  216. HDD_INC_DIR := $(HDD_DIR)/inc
  217. HDD_SRC_DIR := $(HDD_DIR)/src
  218. HDD_INC := -I$(WLAN_ROOT)/$(HDD_INC_DIR) \
  219. -I$(WLAN_ROOT)/$(HDD_SRC_DIR)
  220. HDD_OBJS := $(HDD_SRC_DIR)/wlan_hdd_assoc.o \
  221. $(HDD_SRC_DIR)/wlan_hdd_cfg.o \
  222. $(HDD_SRC_DIR)/wlan_hdd_debugfs.o \
  223. $(HDD_SRC_DIR)/wlan_hdd_driver_ops.o \
  224. $(HDD_SRC_DIR)/wlan_hdd_ftm.o \
  225. $(HDD_SRC_DIR)/wlan_hdd_hostapd.o \
  226. $(HDD_SRC_DIR)/wlan_hdd_ioctl.o \
  227. $(HDD_SRC_DIR)/wlan_hdd_main.o \
  228. $(HDD_SRC_DIR)/wlan_hdd_ocb.o \
  229. $(HDD_SRC_DIR)/wlan_hdd_oemdata.o \
  230. $(HDD_SRC_DIR)/wlan_hdd_power.o \
  231. $(HDD_SRC_DIR)/wlan_hdd_scan.o \
  232. $(HDD_SRC_DIR)/wlan_hdd_softap_tx_rx.o \
  233. $(HDD_SRC_DIR)/wlan_hdd_tx_rx.o \
  234. $(HDD_SRC_DIR)/wlan_hdd_trace.o \
  235. $(HDD_SRC_DIR)/wlan_hdd_wext.o \
  236. $(HDD_SRC_DIR)/wlan_hdd_wmm.o \
  237. $(HDD_SRC_DIR)/wlan_hdd_wowl.o
  238. ifeq ($(CONFIG_WLAN_LRO), y)
  239. HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_lro.o
  240. endif
  241. ifeq ($(CONFIG_WLAN_NAPI), y)
  242. HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_napi.o
  243. endif
  244. ifeq ($(CONFIG_IPA_OFFLOAD), 1)
  245. HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_ipa.o
  246. endif
  247. ifeq ($(HAVE_CFG80211),1)
  248. HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_cfg80211.o \
  249. $(HDD_SRC_DIR)/wlan_hdd_ext_scan.o \
  250. $(HDD_SRC_DIR)/wlan_hdd_stats.o \
  251. $(HDD_SRC_DIR)/wlan_hdd_p2p.o
  252. endif
  253. ifeq ($(CONFIG_QCACLD_FEATURE_GREEN_AP),y)
  254. HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_green_ap.o
  255. endif
  256. ifeq ($(CONFIG_QCACLD_FEATURE_NAN),y)
  257. HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_nan.o
  258. endif
  259. ifeq ($(CONFIG_QCOM_TDLS),y)
  260. HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_tdls.o
  261. endif
  262. ifeq ($(CONFIG_MPC_UT_FRAMEWORK),y)
  263. HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_conc_ut.o
  264. endif
  265. ifeq ($(CONFIG_WLAN_FEATURE_MEMDUMP),y)
  266. HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_memdump.o
  267. endif
  268. ########### HOST DIAG LOG ###########
  269. HOST_DIAG_LOG_DIR := core/utils/host_diag_log
  270. HOST_DIAG_LOG_INC_DIR := $(HOST_DIAG_LOG_DIR)/inc
  271. HOST_DIAG_LOG_SRC_DIR := $(HOST_DIAG_LOG_DIR)/src
  272. HOST_DIAG_LOG_INC := -I$(WLAN_ROOT)/$(HOST_DIAG_LOG_INC_DIR) \
  273. -I$(WLAN_ROOT)/$(HOST_DIAG_LOG_SRC_DIR)
  274. HOST_DIAG_LOG_OBJS += $(HOST_DIAG_LOG_SRC_DIR)/host_diag_log.o
  275. ############ EPPING ############
  276. EPPING_DIR := core/utils/epping
  277. EPPING_INC_DIR := $(EPPING_DIR)/inc
  278. EPPING_SRC_DIR := $(EPPING_DIR)/src
  279. EPPING_INC := -I$(WLAN_ROOT)/$(EPPING_INC_DIR)
  280. EPPING_OBJS := $(EPPING_SRC_DIR)/epping_main.o \
  281. $(EPPING_SRC_DIR)/epping_txrx.o \
  282. $(EPPING_SRC_DIR)/epping_tx.o \
  283. $(EPPING_SRC_DIR)/epping_rx.o \
  284. $(EPPING_SRC_DIR)/epping_helper.o \
  285. ############ MAC ############
  286. MAC_DIR := core/mac
  287. MAC_INC_DIR := $(MAC_DIR)/inc
  288. MAC_SRC_DIR := $(MAC_DIR)/src
  289. MAC_INC := -I$(WLAN_ROOT)/$(MAC_INC_DIR) \
  290. -I$(WLAN_ROOT)/$(MAC_SRC_DIR)/dph \
  291. -I$(WLAN_ROOT)/$(MAC_SRC_DIR)/include \
  292. -I$(WLAN_ROOT)/$(MAC_SRC_DIR)/pe/include \
  293. -I$(WLAN_ROOT)/$(MAC_SRC_DIR)/pe/lim
  294. MAC_CFG_OBJS := $(MAC_SRC_DIR)/cfg/cfg_api.o \
  295. $(MAC_SRC_DIR)/cfg/cfg_debug.o \
  296. $(MAC_SRC_DIR)/cfg/cfg_param_name.o \
  297. $(MAC_SRC_DIR)/cfg/cfg_proc_msg.o \
  298. $(MAC_SRC_DIR)/cfg/cfg_send_msg.o
  299. MAC_DPH_OBJS := $(MAC_SRC_DIR)/dph/dph_hash_table.o
  300. MAC_LIM_OBJS := $(MAC_SRC_DIR)/pe/lim/lim_aid_mgmt.o \
  301. $(MAC_SRC_DIR)/pe/lim/lim_admit_control.o \
  302. $(MAC_SRC_DIR)/pe/lim/lim_api.o \
  303. $(MAC_SRC_DIR)/pe/lim/lim_assoc_utils.o \
  304. $(MAC_SRC_DIR)/pe/lim/lim_debug.o \
  305. $(MAC_SRC_DIR)/pe/lim/lim_ft.o \
  306. $(MAC_SRC_DIR)/pe/lim/lim_ibss_peer_mgmt.o \
  307. $(MAC_SRC_DIR)/pe/lim/lim_link_monitoring_algo.o \
  308. $(MAC_SRC_DIR)/pe/lim/lim_p2p.o \
  309. $(MAC_SRC_DIR)/pe/lim/lim_process_action_frame.o \
  310. $(MAC_SRC_DIR)/pe/lim/lim_process_assoc_req_frame.o \
  311. $(MAC_SRC_DIR)/pe/lim/lim_process_assoc_rsp_frame.o \
  312. $(MAC_SRC_DIR)/pe/lim/lim_process_auth_frame.o \
  313. $(MAC_SRC_DIR)/pe/lim/lim_process_beacon_frame.o \
  314. $(MAC_SRC_DIR)/pe/lim/lim_process_cfg_updates.o \
  315. $(MAC_SRC_DIR)/pe/lim/lim_process_deauth_frame.o \
  316. $(MAC_SRC_DIR)/pe/lim/lim_process_disassoc_frame.o \
  317. $(MAC_SRC_DIR)/pe/lim/lim_process_message_queue.o \
  318. $(MAC_SRC_DIR)/pe/lim/lim_process_mlm_req_messages.o \
  319. $(MAC_SRC_DIR)/pe/lim/lim_process_mlm_rsp_messages.o \
  320. $(MAC_SRC_DIR)/pe/lim/lim_process_probe_req_frame.o \
  321. $(MAC_SRC_DIR)/pe/lim/lim_process_probe_rsp_frame.o \
  322. $(MAC_SRC_DIR)/pe/lim/lim_process_sme_req_messages.o \
  323. $(MAC_SRC_DIR)/pe/lim/lim_prop_exts_utils.o \
  324. $(MAC_SRC_DIR)/pe/lim/lim_scan_result_utils.o \
  325. $(MAC_SRC_DIR)/pe/lim/lim_security_utils.o \
  326. $(MAC_SRC_DIR)/pe/lim/lim_send_management_frames.o \
  327. $(MAC_SRC_DIR)/pe/lim/lim_send_messages.o \
  328. $(MAC_SRC_DIR)/pe/lim/lim_send_sme_rsp_messages.o \
  329. $(MAC_SRC_DIR)/pe/lim/lim_ser_des_utils.o \
  330. $(MAC_SRC_DIR)/pe/lim/lim_session.o \
  331. $(MAC_SRC_DIR)/pe/lim/lim_session_utils.o \
  332. $(MAC_SRC_DIR)/pe/lim/lim_sme_req_utils.o \
  333. $(MAC_SRC_DIR)/pe/lim/lim_sta_hash_api.o \
  334. $(MAC_SRC_DIR)/pe/lim/lim_timer_utils.o \
  335. $(MAC_SRC_DIR)/pe/lim/lim_trace.o \
  336. $(MAC_SRC_DIR)/pe/lim/lim_utils.o
  337. ifeq ($(CONFIG_QCOM_ESE),y)
  338. ifneq ($(CONFIG_QCOM_ESE_UPLOAD),y)
  339. MAC_LIM_OBJS += $(MAC_SRC_DIR)/pe/lim/limProcessEseFrame.o
  340. endif
  341. endif
  342. ifeq ($(CONFIG_QCOM_TDLS),y)
  343. MAC_LIM_OBJS += $(MAC_SRC_DIR)/pe/lim/lim_process_tdls.o
  344. endif
  345. MAC_SCH_OBJS := $(MAC_SRC_DIR)/pe/sch/sch_api.o \
  346. $(MAC_SRC_DIR)/pe/sch/sch_beacon_gen.o \
  347. $(MAC_SRC_DIR)/pe/sch/sch_beacon_process.o \
  348. $(MAC_SRC_DIR)/pe/sch/sch_debug.o \
  349. $(MAC_SRC_DIR)/pe/sch/sch_message.o
  350. MAC_RRM_OBJS := $(MAC_SRC_DIR)/pe/rrm/rrm_api.o
  351. MAC_OBJS := $(MAC_CFG_OBJS) \
  352. $(MAC_DPH_OBJS) \
  353. $(MAC_LIM_OBJS) \
  354. $(MAC_SCH_OBJS) \
  355. $(MAC_RRM_OBJS)
  356. ############ SAP ############
  357. SAP_DIR := core/sap
  358. SAP_INC_DIR := $(SAP_DIR)/inc
  359. SAP_SRC_DIR := $(SAP_DIR)/src
  360. SAP_INC := -I$(WLAN_ROOT)/$(SAP_INC_DIR) \
  361. -I$(WLAN_ROOT)/$(SAP_SRC_DIR)
  362. SAP_OBJS := $(SAP_SRC_DIR)/sap_api_link_cntl.o \
  363. $(SAP_SRC_DIR)/sap_ch_select.o \
  364. $(SAP_SRC_DIR)/sap_fsm.o \
  365. $(SAP_SRC_DIR)/sap_module.o
  366. ############ DFS ############ 350
  367. DFS_DIR := $(SAP_DIR)/dfs
  368. DFS_INC_DIR := $(DFS_DIR)/inc
  369. DFS_SRC_DIR := $(DFS_DIR)/src
  370. DFS_INC := -I$(WLAN_ROOT)/$(DFS_INC_DIR) \
  371. -I$(WLAN_ROOT)/$(DFS_SRC_DIR)
  372. DFS_OBJS := $(DFS_SRC_DIR)/dfs_bindetects.o \
  373. $(DFS_SRC_DIR)/dfs.o \
  374. $(DFS_SRC_DIR)/dfs_debug.o\
  375. $(DFS_SRC_DIR)/dfs_fcc_bin5.o\
  376. $(DFS_SRC_DIR)/dfs_init.o\
  377. $(DFS_SRC_DIR)/dfs_misc.o\
  378. $(DFS_SRC_DIR)/dfs_nol.o\
  379. $(DFS_SRC_DIR)/dfs_phyerr_tlv.o\
  380. $(DFS_SRC_DIR)/dfs_process_phyerr.o\
  381. $(DFS_SRC_DIR)/dfs_process_radarevent.o\
  382. $(DFS_SRC_DIR)/dfs_staggered.o
  383. ############ SME ############
  384. SME_DIR := core/sme
  385. SME_INC_DIR := $(SME_DIR)/inc
  386. SME_SRC_DIR := $(SME_DIR)/src
  387. SME_INC := -I$(WLAN_ROOT)/$(SME_INC_DIR) \
  388. -I$(WLAN_ROOT)/$(SME_SRC_DIR)/csr
  389. SME_CSR_OBJS := $(SME_SRC_DIR)/csr/csr_api_roam.o \
  390. $(SME_SRC_DIR)/csr/csr_api_scan.o \
  391. $(SME_SRC_DIR)/csr/csr_cmd_process.o \
  392. $(SME_SRC_DIR)/csr/csr_link_list.o \
  393. $(SME_SRC_DIR)/csr/csr_neighbor_roam.o \
  394. $(SME_SRC_DIR)/csr/csr_util.o
  395. ifeq ($(CONFIG_QCOM_ESE),y)
  396. ifneq ($(CONFIG_QCOM_ESE_UPLOAD),y)
  397. SME_CSR_OBJS += $(SME_SRC_DIR)/csr/csrEse.o
  398. endif
  399. endif
  400. ifeq ($(CONFIG_QCOM_TDLS),y)
  401. SME_CSR_OBJS += $(SME_SRC_DIR)/csr/csr_tdls_process.o
  402. endif
  403. SME_QOS_OBJS := $(SME_SRC_DIR)/qos/sme_qos.o
  404. SME_CMN_OBJS := $(SME_SRC_DIR)/common/sme_api.o \
  405. $(SME_SRC_DIR)/common/sme_ft_api.o \
  406. $(SME_SRC_DIR)/common/sme_power_save.o \
  407. $(SME_SRC_DIR)/common/sme_trace.o
  408. SME_OEM_DATA_OBJS := $(SME_SRC_DIR)/oem_data/oem_data_api.o
  409. SME_P2P_OBJS = $(SME_SRC_DIR)/p2p/p2p_api.o
  410. SME_RRM_OBJS := $(SME_SRC_DIR)/rrm/sme_rrm.o
  411. ifeq ($(CONFIG_QCACLD_FEATURE_NAN),y)
  412. SME_NAN_OBJS = $(SME_SRC_DIR)/nan/nan_api.o
  413. endif
  414. SME_OBJS := $(SME_CMN_OBJS) \
  415. $(SME_CSR_OBJS) \
  416. $(SME_OEM_DATA_OBJS) \
  417. $(SME_P2P_OBJS) \
  418. $(SME_QOS_OBJS) \
  419. $(SME_RRM_OBJS) \
  420. $(SME_NAN_OBJS)
  421. ############ NLINK ############
  422. NLINK_DIR := core/utils/nlink
  423. NLINK_INC_DIR := $(NLINK_DIR)/inc
  424. NLINK_SRC_DIR := $(NLINK_DIR)/src
  425. NLINK_INC := -I$(WLAN_ROOT)/$(NLINK_INC_DIR)
  426. NLINK_OBJS := $(NLINK_SRC_DIR)/wlan_nlink_srv.o
  427. ############ PTT ############
  428. PTT_DIR := core/utils/ptt
  429. PTT_INC_DIR := $(PTT_DIR)/inc
  430. PTT_SRC_DIR := $(PTT_DIR)/src
  431. PTT_INC := -I$(WLAN_ROOT)/$(PTT_INC_DIR)
  432. PTT_OBJS := $(PTT_SRC_DIR)/wlan_ptt_sock_svc.o
  433. ############ WLAN_LOGGING ############
  434. WLAN_LOGGING_DIR := core/utils/logging
  435. WLAN_LOGGING_INC_DIR := $(WLAN_LOGGING_DIR)/inc
  436. WLAN_LOGGING_SRC_DIR := $(WLAN_LOGGING_DIR)/src
  437. WLAN_LOGGING_INC := -I$(WLAN_ROOT)/$(WLAN_LOGGING_INC_DIR)
  438. WLAN_LOGGING_OBJS := $(WLAN_LOGGING_SRC_DIR)/wlan_logging_sock_svc.o
  439. ############ SYS ############
  440. SYS_DIR := core/mac/src/sys
  441. SYS_INC := -I$(WLAN_ROOT)/$(SYS_DIR)/common/inc \
  442. -I$(WLAN_ROOT)/$(SYS_DIR)/legacy/src/platform/inc \
  443. -I$(WLAN_ROOT)/$(SYS_DIR)/legacy/src/system/inc \
  444. -I$(WLAN_ROOT)/$(SYS_DIR)/legacy/src/utils/inc
  445. SYS_COMMON_SRC_DIR := $(SYS_DIR)/common/src
  446. SYS_LEGACY_SRC_DIR := $(SYS_DIR)/legacy/src
  447. SYS_OBJS := $(SYS_COMMON_SRC_DIR)/wlan_qct_sys.o \
  448. $(SYS_LEGACY_SRC_DIR)/platform/src/sys_wrapper.o \
  449. $(SYS_LEGACY_SRC_DIR)/system/src/mac_init_api.o \
  450. $(SYS_LEGACY_SRC_DIR)/system/src/sys_entry_func.o \
  451. $(SYS_LEGACY_SRC_DIR)/utils/src/dot11f.o \
  452. $(SYS_LEGACY_SRC_DIR)/utils/src/log_api.o \
  453. $(SYS_LEGACY_SRC_DIR)/utils/src/mac_trace.o \
  454. $(SYS_LEGACY_SRC_DIR)/utils/src/parser_api.o \
  455. $(SYS_LEGACY_SRC_DIR)/utils/src/utils_api.o \
  456. $(SYS_LEGACY_SRC_DIR)/utils/src/utils_parser.o
  457. ############ CDF (Connectivity driver framework) ############
  458. CDF_DIR := core/cdf
  459. CDF_INC_DIR := $(CDF_DIR)/inc
  460. CDF_SRC_DIR := $(CDF_DIR)/src
  461. CDF_INC := -I$(WLAN_ROOT)/$(CDF_INC_DIR) \
  462. -I$(WLAN_ROOT)/$(CDF_SRC_DIR)
  463. CDF_OBJS := $(CDF_SRC_DIR)/cdf_event.o \
  464. $(CDF_SRC_DIR)/cdf_list.o \
  465. $(CDF_SRC_DIR)/cdf_lock.o \
  466. $(CDF_SRC_DIR)/cdf_memory.o \
  467. $(CDF_SRC_DIR)/cdf_threads.o \
  468. $(CDF_SRC_DIR)/cdf_mc_timer.o \
  469. $(CDF_SRC_DIR)/cdf_trace.o \
  470. $(CDF_SRC_DIR)/cdf_nbuf.o \
  471. $(CDF_SRC_DIR)/cdf_defer.o
  472. ############ CDS (Connectivity driver services) ############
  473. CDS_DIR := core/cds
  474. CDS_INC_DIR := $(CDS_DIR)/inc
  475. CDS_SRC_DIR := $(CDS_DIR)/src
  476. CDS_INC := -I$(WLAN_ROOT)/$(CDS_INC_DIR) \
  477. -I$(WLAN_ROOT)/$(CDS_SRC_DIR)
  478. CDS_OBJS := $(CDS_SRC_DIR)/cds_api.o \
  479. $(CDS_SRC_DIR)/cds_reg_service.o \
  480. $(CDS_SRC_DIR)/cds_mq.o \
  481. $(CDS_SRC_DIR)/cds_packet.o \
  482. $(CDS_SRC_DIR)/cds_regdomain.o \
  483. $(CDS_SRC_DIR)/cds_sched.o \
  484. $(CDS_SRC_DIR)/cds_concurrency.o \
  485. $(CDS_SRC_DIR)/cds_utils.o
  486. ########### BMI ###########
  487. BMI_DIR := core/bmi
  488. BMI_INC := -I$(WLAN_ROOT)/$(BMI_DIR)/inc
  489. ifneq ($(CONFIG_ICNSS), y)
  490. BMI_OBJS := $(BMI_DIR)/src/bmi.o \
  491. $(BMI_DIR)/src/ol_fw.o
  492. ifeq ($(CONFIG_FEATURE_BMI_2), y)
  493. BMI_OBJS += $(BMI_DIR)/src/bmi_2.o
  494. else
  495. BMI_OBJS += $(BMI_DIR)/src/bmi_1.o
  496. endif
  497. endif
  498. ########### WMI ###########
  499. WMI_DIR := core/wmi
  500. WMI_INC := -I$(WLAN_ROOT)/$(WMI_DIR)
  501. WMI_OBJS := $(WMI_DIR)/wmi_unified.o \
  502. $(WMI_DIR)/wmi_tlv_helper.o
  503. ########### FWLOG ###########
  504. FWLOG_DIR := core/utils/fwlog
  505. FWLOG_INC := -I$(WLAN_ROOT)/$(FWLOG_DIR)
  506. FWLOG_OBJS := $(FWLOG_DIR)/dbglog_host.o
  507. ############ TXRX ############
  508. TXRX_DIR := core/dp/txrx
  509. TXRX_INC := -I$(WLAN_ROOT)/$(TXRX_DIR)
  510. TXRX_OBJS := $(TXRX_DIR)/ol_txrx.o \
  511. $(TXRX_DIR)/ol_cfg.o \
  512. $(TXRX_DIR)/ol_rx.o \
  513. $(TXRX_DIR)/ol_rx_fwd.o \
  514. $(TXRX_DIR)/ol_txrx.o \
  515. $(TXRX_DIR)/ol_rx_defrag.o \
  516. $(TXRX_DIR)/ol_tx_desc.o \
  517. $(TXRX_DIR)/ol_tx.o \
  518. $(TXRX_DIR)/ol_rx_reorder_timeout.o \
  519. $(TXRX_DIR)/ol_rx_reorder.o \
  520. $(TXRX_DIR)/ol_rx_pn.o \
  521. $(TXRX_DIR)/ol_tx_queue.o \
  522. $(TXRX_DIR)/ol_txrx_peer_find.o \
  523. $(TXRX_DIR)/ol_txrx_event.o \
  524. $(TXRX_DIR)/ol_txrx_encap.o \
  525. $(TXRX_DIR)/ol_tx_send.o
  526. ifeq ($(CONFIG_WLAN_TX_FLOW_CONTROL_V2), y)
  527. TXRX_OBJS += $(TXRX_DIR)/ol_txrx_flow_control.o
  528. endif
  529. ############ OL ############
  530. OL_DIR := core/dp/ol
  531. OL_INC := -I$(WLAN_ROOT)/$(OL_DIR)/inc
  532. ############ PKTLOG ############
  533. PKTLOG_DIR := core/utils/pktlog
  534. PKTLOG_INC := -I$(WLAN_ROOT)/$(PKTLOG_DIR)/include
  535. PKTLOG_OBJS := $(PKTLOG_DIR)/pktlog_ac.o \
  536. $(PKTLOG_DIR)/pktlog_internal.o \
  537. $(PKTLOG_DIR)/linux_ac.o
  538. ############ HTT ############
  539. HTT_DIR := core/dp/htt
  540. HTT_INC := -I$(WLAN_ROOT)/$(HTT_DIR)
  541. HTT_OBJS := $(HTT_DIR)/htt_tx.o \
  542. $(HTT_DIR)/htt.o \
  543. $(HTT_DIR)/htt_t2h.o \
  544. $(HTT_DIR)/htt_h2t.o \
  545. $(HTT_DIR)/htt_fw_stats.o \
  546. $(HTT_DIR)/htt_rx.o
  547. ############## HTC ##########
  548. HTC_DIR := core/htc
  549. HTC_INC := -I$(WLAN_ROOT)/$(HTC_DIR)
  550. HTC_OBJS := $(HTC_DIR)/htc.o \
  551. $(HTC_DIR)/htc_send.o \
  552. $(HTC_DIR)/htc_recv.o \
  553. $(HTC_DIR)/htc_services.o
  554. ########### HIF ###########
  555. HIF_DIR := core/hif
  556. HIF_CE_DIR := $(HIF_DIR)/src/ce
  557. HIF_CNSS_STUB_DIR := $(HIF_DIR)/src/icnss_stub
  558. ifeq ($(CONFIG_HIF_PCI), 1)
  559. HIF_PCIE_DIR := $(HIF_DIR)/src/pcie
  560. else
  561. HIF_SNOC_DIR := $(HIF_DIR)/src/snoc
  562. endif
  563. HIF_INC := -I$(WLAN_ROOT)/$(HIF_DIR)/inc \
  564. -I$(WLAN_ROOT)/$(HIF_DIR)/src \
  565. -I$(WLAN_ROOT)/$(HIF_CE_DIR) \
  566. -I$(WLAN_ROOT)/$(HIF_CNSS_STUB_DIR)
  567. ifeq ($(CONFIG_HIF_PCI), 1)
  568. HIF_INC += -I$(WLAN_ROOT)/$(HIF_PCIE_DIR)
  569. else
  570. HIF_INC += -I$(WLAN_ROOT)/$(HIF_SNOC_DIR)
  571. endif
  572. HIF_OBJS := $(HIF_DIR)/src/ath_procfs.o \
  573. $(HIF_CE_DIR)/ce_diag.o \
  574. $(HIF_CE_DIR)/ce_main.o \
  575. $(HIF_CE_DIR)/ce_service.o \
  576. $(HIF_CE_DIR)/ce_tasklet.o \
  577. $(HIF_DIR)/src/hif_main.o \
  578. $(HIF_DIR)/src/mp_dev.o \
  579. $(HIF_DIR)/src/regtable.o
  580. ifeq ($(CONFIG_CNSS), y)
  581. HIF_OBJS += $(HIF_CNSS_STUB_DIR)/icnss_stub.o \
  582. $(HIF_CE_DIR)/ce_bmi.o
  583. endif
  584. ifeq ($(CONFIG_WLAN_NAPI), y)
  585. HIF_OBJS += $(HIF_DIR)/src/hif_napi.o
  586. endif
  587. ifeq ($(CONFIG_HIF_PCI), 1)
  588. HIF_PCIE_OBJS := $(HIF_PCIE_DIR)/if_pci.o
  589. HIF_OBJS += $(HIF_PCIE_OBJS)
  590. else
  591. HIF_SNOC_OBJS := $(HIF_SNOC_DIR)/if_snoc.o
  592. HIF_OBJS += $(HIF_SNOC_OBJS)
  593. endif
  594. ############ WMA ############
  595. WMA_DIR := core/wma
  596. WMA_INC_DIR := $(WMA_DIR)/inc
  597. WMA_SRC_DIR := $(WMA_DIR)/src
  598. WMA_INC := -I$(WLAN_ROOT)/$(WMA_INC_DIR) \
  599. -I$(WLAN_ROOT)/$(WMA_SRC_DIR)
  600. WMA_OBJS := $(WMA_SRC_DIR)/wma_main.o \
  601. $(WMA_SRC_DIR)/wma_scan_roam.o \
  602. $(WMA_SRC_DIR)/wma_dev_if.o \
  603. $(WMA_SRC_DIR)/wma_mgmt.o \
  604. $(WMA_SRC_DIR)/wma_power.o \
  605. $(WMA_SRC_DIR)/wma_data.o \
  606. $(WMA_SRC_DIR)/wma_utils.o \
  607. $(WMA_SRC_DIR)/wma_features.o \
  608. $(WMA_SRC_DIR)/wma_dfs_interface.o \
  609. $(WMA_SRC_DIR)/wma_ocb.o \
  610. $(WMA_SRC_DIR)/wlan_qct_wma_legacy.o
  611. ifeq ($(CONFIG_MPC_UT_FRAMEWORK),y)
  612. WMA_OBJS += $(WMA_SRC_DIR)/wma_utils_ut.o
  613. endif
  614. TARGET_INC := -I$(WLAN_ROOT)/target/inc
  615. LINUX_INC := -Iinclude/linux
  616. INCS := $(HDD_INC) \
  617. $(EPPING_INC) \
  618. $(LINUX_INC) \
  619. $(MAC_INC) \
  620. $(SAP_INC) \
  621. $(SME_INC) \
  622. $(SYS_INC) \
  623. $(CDF_INC) \
  624. $(CDS_INC) \
  625. $(DFS_INC)
  626. INCS += $(WMA_INC) \
  627. $(UAPI_INC) \
  628. $(COMMON_INC) \
  629. $(WMI_INC) \
  630. $(FWLOG_INC) \
  631. $(TXRX_INC) \
  632. $(OL_INC) \
  633. $(PKTLOG_INC) \
  634. $(HTT_INC) \
  635. $(HTC_INC) \
  636. $(DFS_INC)
  637. INCS += $(HIF_INC) \
  638. $(BMI_INC)
  639. INCS += $(TARGET_INC)
  640. INCS += $(NLINK_INC) \
  641. $(PTT_INC) \
  642. $(WLAN_LOGGING_INC)
  643. ifeq ($(CONFIG_REMOVE_PKT_LOG), 0)
  644. INCS += $(PKTLOG_INC)
  645. endif
  646. ifeq ($(BUILD_DIAG_VERSION), 1)
  647. INCS += $(HOST_DIAG_LOG_INC)
  648. endif
  649. OBJS := $(HDD_OBJS) \
  650. $(EPPING_OBJS) \
  651. $(MAC_OBJS) \
  652. $(SAP_OBJS) \
  653. $(SME_OBJS) \
  654. $(SYS_OBJS) \
  655. $(CDF_OBJS) \
  656. $(CDS_OBJS) \
  657. $(DFS_OBJS)
  658. OBJS += $(WMA_OBJS) \
  659. $(TXRX_OBJS) \
  660. $(WMI_OBJS) \
  661. $(FWLOG_OBJS) \
  662. $(HTC_OBJS) \
  663. $(DFS_OBJS)
  664. OBJS += $(HIF_OBJS) \
  665. $(BMI_OBJS) \
  666. $(HTT_OBJS)
  667. OBJS += $(WLAN_LOGGING_OBJS)
  668. OBJS += $(NLINK_OBJS)
  669. OBJS += $(PTT_OBJS)
  670. ifeq ($(CONFIG_REMOVE_PKT_LOG), 0)
  671. OBJS += $(PKTLOG_OBJS)
  672. endif
  673. ifeq ($(BUILD_DIAG_VERSION), 1)
  674. OBJS += $(HOST_DIAG_LOG_OBJS)
  675. endif
  676. EXTRA_CFLAGS += $(INCS)
  677. CDEFINES := -DANI_LITTLE_BYTE_ENDIAN \
  678. -DANI_LITTLE_BIT_ENDIAN \
  679. -DQC_WLAN_CHIPSET_QCA_CLD \
  680. -DDOT11F_LITTLE_ENDIAN_HOST \
  681. -DANI_COMPILER_TYPE_GCC \
  682. -DANI_OS_TYPE_ANDROID=6 \
  683. -DWLAN_PERF \
  684. -DPTT_SOCK_SVC_ENABLE \
  685. -Wall\
  686. -Werror\
  687. -D__linux__ \
  688. -DHAL_SELF_STA_PER_BSS=1 \
  689. -DWLAN_FEATURE_VOWIFI_11R \
  690. -DWLAN_FEATURE_NEIGHBOR_ROAMING \
  691. -DWLAN_FEATURE_NEIGHBOR_ROAMING_DEBUG \
  692. -DWLAN_FEATURE_VOWIFI_11R_DEBUG \
  693. -DFEATURE_WLAN_WAPI \
  694. -DFEATURE_OEM_DATA_SUPPORT\
  695. -DSOFTAP_CHANNEL_RANGE \
  696. -DWLAN_AP_STA_CONCURRENCY \
  697. -DFEATURE_WLAN_SCAN_PNO \
  698. -DWLAN_FEATURE_PACKET_FILTERING \
  699. -DWLAN_FEATURE_VOWIFI \
  700. -DWLAN_FEATURE_11AC \
  701. -DWLAN_FEATURE_P2P_DEBUG \
  702. -DWLAN_ENABLE_AGEIE_ON_SCAN_RESULTS \
  703. -DWLANTL_DEBUG\
  704. -DWLAN_NS_OFFLOAD \
  705. -DWLAN_SOFTAP_VSTA_FEATURE \
  706. -DWLAN_FEATURE_GTK_OFFLOAD \
  707. -DWLAN_WAKEUP_EVENTS \
  708. -DFEATURE_WLAN_RA_FILTERING\
  709. -DWLAN_KD_READY_NOTIFIER \
  710. -DWLAN_NL80211_TESTMODE \
  711. -DFEATURE_WLAN_LPHB \
  712. -DFEATURE_WLAN_PAL_TIMER_DISABLE \
  713. -DFEATURE_WLAN_PAL_MEM_DISABLE \
  714. -DQCA_SUPPORT_TX_THROTTLE \
  715. -DWMI_INTERFACE_EVENT_LOGGING \
  716. -DATH_SUPPORT_WAPI \
  717. -DWLAN_FEATURE_LINK_LAYER_STATS \
  718. -DWLAN_LOGGING_SOCK_SVC_ENABLE \
  719. -DFEATURE_WLAN_EXTSCAN \
  720. -DFEATURE_WLAN_LFR \
  721. -DWLAN_FEATURE_MBSSID \
  722. -DCONFIG_160MHZ_SUPPORT
  723. ifeq (y,$(filter y,$(CONFIG_CNSS_EOS) $(CONFIG_ICNSS)))
  724. CDEFINES += -DQCA_WIFI_3_0
  725. CDEFINES += -DQCA_WIFI_3_0_EMU
  726. endif
  727. ifeq (y,$(filter y,$(CONFIG_CNSS_ADRASTEA) $(CONFIG_ICNSS)))
  728. CDEFINES += -DQCA_WIFI_3_0_ADRASTEA
  729. CDEFINES += -DADRASTEA_SHADOW_REGISTERS
  730. CDEFINES += -DADRASTEA_RRI_ON_DDR
  731. endif
  732. ifeq ($(CONFIG_WLAN_FASTPATH), y)
  733. CDEFINES += -DWLAN_FEATURE_FASTPATH
  734. endif
  735. ifeq ($(CONFIG_WLAN_NAPI), y)
  736. CDEFINES += -DFEATURE_NAPI
  737. ifeq ($(CONFIG_WLAN_NAPI_DEBUG), y)
  738. CDEFINES += -DFEATURE_NAPI_DEBUG
  739. endif
  740. endif
  741. ifeq ($(CONFIG_FEATURE_BMI_2), y)
  742. CDEFINES += -DFEATURE_BMI_2
  743. endif
  744. ifeq ($(CONFIG_ARCH_MSM), y)
  745. CDEFINES += -DMSM_PLATFORM
  746. endif
  747. CDEFINES += -DQCA_SUPPORT_TXRX_LOCAL_PEER_ID
  748. ifeq ($(CONFIG_WLAN_TX_FLOW_CONTROL_V2), y)
  749. CDEFINES += -DQCA_LL_TX_FLOW_CONTROL_V2
  750. CDEFINES += -DQCA_LL_TX_FLOW_GLOBAL_MGMT_POOL
  751. else
  752. ifeq ($(CONFIG_ROME_IF),pci)
  753. CDEFINES += -DQCA_LL_LEGACY_TX_FLOW_CONTROL
  754. endif
  755. endif
  756. ifeq ($(CONFIG_DEBUG_LL),y)
  757. CDEFINES += -DQCA_PKT_PROTO_TRACE
  758. endif
  759. ifneq ($(CONFIG_QCA_CLD_WLAN),)
  760. CDEFINES += -DWCN_PRONTO
  761. CDEFINES += -DWCN_PRONTO_V1
  762. endif
  763. ifeq ($(BUILD_DEBUG_VERSION),1)
  764. CDEFINES += -DWLAN_DEBUG \
  765. -DTRACE_RECORD \
  766. -DLIM_TRACE_RECORD \
  767. -DSME_TRACE_RECORD \
  768. -DHDD_TRACE_RECORD \
  769. -DPE_DEBUG_LOGW \
  770. -DPE_DEBUG_LOGE \
  771. -DDEBUG
  772. endif
  773. ifeq ($(CONFIG_SLUB_DEBUG_ON),y)
  774. CDEFINES += -DTIMER_MANAGER
  775. CDEFINES += -DMEMORY_DEBUG
  776. endif
  777. ifeq ($(HAVE_CFG80211),1)
  778. CDEFINES += -DWLAN_FEATURE_P2P
  779. CDEFINES += -DWLAN_FEATURE_WFD
  780. ifeq ($(CONFIG_QCOM_VOWIFI_11R),y)
  781. CDEFINES += -DKERNEL_SUPPORT_11R_CFG80211
  782. CDEFINES += -DUSE_80211_WMMTSPEC_FOR_RIC
  783. endif
  784. endif
  785. ifeq ($(CONFIG_QCOM_ESE),y)
  786. CDEFINES += -DFEATURE_WLAN_ESE
  787. CDEFINES += -DQCA_COMPUTE_TX_DELAY
  788. CDEFINES += -DQCA_COMPUTE_TX_DELAY_PER_TID
  789. ifeq ($(CONFIG_QCOM_ESE_UPLOAD),y)
  790. CDEFINES += -DFEATURE_WLAN_ESE_UPLOAD
  791. endif
  792. endif
  793. #normally, TDLS negative behavior is not needed
  794. ifeq ($(CONFIG_QCOM_TDLS),y)
  795. CDEFINES += -DFEATURE_WLAN_TDLS
  796. endif
  797. ifeq ($(CONFIG_QCACLD_WLAN_LFR3),y)
  798. CDEFINES += -DWLAN_FEATURE_ROAM_OFFLOAD
  799. endif
  800. ifeq ($(CONFIG_PRIMA_WLAN_OKC),y)
  801. CDEFINES += -DFEATURE_WLAN_OKC
  802. endif
  803. ifeq ($(CONFIG_PRIMA_WLAN_11AC_HIGH_TP),y)
  804. CDEFINES += -DWLAN_FEATURE_11AC_HIGH_TP
  805. endif
  806. ifeq ($(BUILD_DIAG_VERSION),1)
  807. CDEFINES += -DFEATURE_WLAN_DIAG_SUPPORT
  808. CDEFINES += -DFEATURE_WLAN_DIAG_SUPPORT_CSR
  809. CDEFINES += -DFEATURE_WLAN_DIAG_SUPPORT_LIM
  810. ifeq ($(CONFIG_HIF_PCI), 1)
  811. CDEFINES += -DCONFIG_ATH_PROCFS_DIAG_SUPPORT
  812. endif
  813. endif
  814. ifeq ($(CONFIG_HIF_USB), 1)
  815. CDEFINES += -DCONFIG_ATH_PROCFS_DIAG_SUPPORT
  816. CDEFINES += -DQCA_SUPPORT_OL_RX_REORDER_TIMEOUT
  817. CDEFINES += -DCONFIG_ATH_PCIE_MAX_PERF=0 -DCONFIG_ATH_PCIE_AWAKE_WHILE_DRIVER_LOAD=0 -DCONFIG_DISABLE_CDC_MAX_PERF_WAR=0
  818. CDEFINES += -DQCA_TX_HTT2_SUPPORT
  819. endif
  820. # enable the MAC Address auto-generation feature
  821. CDEFINES += -DWLAN_AUTOGEN_MACADDR_FEATURE
  822. ifeq ($(CONFIG_WLAN_FEATURE_11W),y)
  823. CDEFINES += -DWLAN_FEATURE_11W
  824. endif
  825. ifeq ($(CONFIG_QCOM_LTE_COEX),y)
  826. CDEFINES += -DFEATURE_WLAN_CH_AVOID
  827. endif
  828. ifeq ($(CONFIG_WLAN_FEATURE_LPSS),y)
  829. CDEFINES += -DWLAN_FEATURE_LPSS
  830. endif
  831. ifeq ($(PANIC_ON_BUG),1)
  832. CDEFINES += -DPANIC_ON_BUG
  833. endif
  834. ifeq ($(WLAN_OPEN_SOURCE), 1)
  835. CDEFINES += -DWLAN_OPEN_SOURCE
  836. endif
  837. ifeq ($(CONFIG_FEATURE_STATS_EXT), 1)
  838. CDEFINES += -DWLAN_FEATURE_STATS_EXT
  839. endif
  840. ifeq ($(CONFIG_QCACLD_FEATURE_NAN),y)
  841. CDEFINES += -DWLAN_FEATURE_NAN
  842. endif
  843. ifeq ($(CONFIG_QCA_IBSS_SUPPORT), 1)
  844. CDEFINES += -DQCA_IBSS_SUPPORT
  845. endif
  846. #Enable OL debug and wmi unified functions
  847. ifeq ($(CONFIG_ATH_PERF_PWR_OFFLOAD), 1)
  848. CDEFINES += -DATH_PERF_PWR_OFFLOAD
  849. endif
  850. #Disable packet log
  851. ifeq ($(CONFIG_REMOVE_PKT_LOG), 1)
  852. CDEFINES += -DREMOVE_PKT_LOG
  853. endif
  854. #Enable 11AC TX
  855. ifeq ($(CONFIG_ATH_11AC_TXCOMPACT), 1)
  856. CDEFINES += -DATH_11AC_TXCOMPACT
  857. endif
  858. #Enable OS specific IRQ abstraction
  859. ifeq ($(CONFIG_ATH_SUPPORT_SHARED_IRQ), 1)
  860. CDEFINES += -DATH_SUPPORT_SHARED_IRQ
  861. endif
  862. #Enable message based HIF instead of RAW access in BMI
  863. ifeq ($(CONFIG_HIF_MESSAGE_BASED), 1)
  864. CDEFINES += -DHIF_MESSAGE_BASED
  865. endif
  866. #Enable PCI specific APIS (dma, etc)
  867. ifeq ($(CONFIG_HIF_PCI), 1)
  868. CDEFINES += -DHIF_PCI
  869. endif
  870. #Enable USB specific APIS
  871. ifeq ($(CONFIG_HIF_USB), 1)
  872. CDEFINES += -DHIF_USB
  873. CDEFINES += -DCONFIG_HL_SUPPORT
  874. endif
  875. #Enable FW logs through ini
  876. CDEFINES += -DCONFIG_FW_LOGS_BASED_ON_INI
  877. #Enable pci read/write config functions
  878. ifeq ($(CONFIG_ATH_PCI), 1)
  879. CDEFINES += -DATH_PCI
  880. endif
  881. #Enable power management suspend/resume functionality
  882. ifeq ($(CONFIG_ATH_BUS_PM), 1)
  883. CDEFINES += -DATH_BUS_PM
  884. endif
  885. #Enable FLOWMAC module support
  886. ifeq ($(CONFIG_ATH_SUPPORT_FLOWMAC_MODULE), 1)
  887. CDEFINES += -DATH_SUPPORT_FLOWMAC_MODULE
  888. endif
  889. #Enable spectral support
  890. ifeq ($(CONFIG_ATH_SUPPORT_SPECTRAL), 1)
  891. CDEFINES += -DATH_SUPPORT_SPECTRAL
  892. endif
  893. #Enable WDI Event support
  894. ifeq ($(CONFIG_WDI_EVENT_ENABLE), 1)
  895. CDEFINES += -DWDI_EVENT_ENABLE
  896. endif
  897. #Endianess selection
  898. ifeq ($(CONFIG_LITTLE_ENDIAN), 1)
  899. AH_LITTLE_ENDIAN=1234
  900. CDEFINES += -DAH_BYTE_ORDER=$(AH_LITTLE_ENDIAN)
  901. else
  902. AH_BIG_ENDIAN=4321
  903. CDEFINES += -DAH_BYTE_ORDER=$(AH_BIG_ENDIAN)
  904. CDEFINES += -DBIG_ENDIAN_HOST
  905. endif
  906. #Enable TX reclaim support
  907. ifeq ($(CONFIG_TX_CREDIT_RECLAIM_SUPPORT), 1)
  908. CDEFINES += -DTX_CREDIT_RECLAIM_SUPPORT
  909. endif
  910. #Enable FTM support
  911. ifeq ($(CONFIG_QCA_WIFI_FTM), 1)
  912. CDEFINES += -DQCA_WIFI_FTM
  913. endif
  914. #Enable Checksum Offload support
  915. ifeq ($(CONFIG_CHECKSUM_OFFLOAD), 1)
  916. CDEFINES += -DCHECKSUM_OFFLOAD
  917. endif
  918. #Enable Checksum Offload support
  919. ifeq ($(CONFIG_IPA_OFFLOAD), 1)
  920. CDEFINES += -DIPA_OFFLOAD
  921. endif
  922. ifneq ($(CONFIG_ARCH_MDM9630), y)
  923. ifeq ($(CONFIG_ARCH_MDM9640), y)
  924. CDEFINES += -DQCA_CONFIG_SMP
  925. endif
  926. endif
  927. #Enable GTK Offload
  928. ifeq ($(CONFIG_GTK_OFFLOAD), 1)
  929. CDEFINES += -DWLAN_FEATURE_GTK_OFFLOAD
  930. CDEFINES += -DIGTK_OFFLOAD
  931. endif
  932. #Enable GTK Offload
  933. ifeq ($(CONFIG_EXT_WOW), 1)
  934. CDEFINES += -DWLAN_FEATURE_EXTWOW_SUPPORT
  935. endif
  936. #Mark it as SMP Kernel
  937. ifeq ($(CONFIG_SMP),y)
  938. CDEFINES += -DQCA_CONFIG_SMP
  939. endif
  940. ifeq ($(CONFIG_WLAN_FEATURE_RX_WAKELOCK), y)
  941. CDEFINES += -DWLAN_FEATURE_HOLD_RX_WAKELOCK
  942. endif
  943. #Enable Channel Matrix restriction for all targets
  944. CDEFINES += -DWLAN_ENABLE_CHNL_MATRIX_RESTRICTION
  945. #features specific to mobile router use case
  946. ifeq ($(CONFIG_MOBILE_ROUTER), y)
  947. #enable MCC TO SCC switch
  948. CDEFINES += -DFEATURE_WLAN_MCC_TO_SCC_SWITCH
  949. #enable wlan auto shutdown feature
  950. CDEFINES += -DFEATURE_WLAN_AUTO_SHUTDOWN
  951. #enable for MBSSID
  952. CDEFINES += -DWLAN_FEATURE_MBSSID
  953. #enable AP-AP ACS Optimization
  954. CDEFINES += -DFEATURE_WLAN_AP_AP_ACS_OPTIMIZE
  955. #Enable 4address scheme
  956. CDEFINES += -DFEATURE_WLAN_STA_4ADDR_SCHEME
  957. #Disable STA-AP Mode DFS support
  958. CDEFINES += -DFEATURE_WLAN_STA_AP_MODE_DFS_DISABLE
  959. #Enable OBSS feature
  960. CDEFINES += -DQCA_HT_2040_COEX
  961. #Disable HT40 in 2.4GHZ STA mode
  962. CDEFINES += -DQCA_HT_20_24G_STA_ONLY
  963. else #CONFIG_MOBILE_ROUTER
  964. #Open P2P device interface only for non-Mobile router use cases
  965. CDEFINES += -DWLAN_OPEN_P2P_INTERFACE
  966. #Enable 2.4 GHz social channels in 5 GHz only mode for p2p usage
  967. CDEFINES += -DWLAN_ENABLE_SOCIAL_CHANNELS_5G_ONLY
  968. endif #CONFIG_MOBILE_ROUTER
  969. #Green AP feature
  970. ifeq ($(CONFIG_QCACLD_FEATURE_GREEN_AP),y)
  971. CDEFINES += -DFEATURE_GREEN_AP
  972. endif
  973. #Enable RX Full re-order OL feature only "LL and NON-MDM9630 platform"
  974. ifneq ($(CONFIG_ARCH_MDM9630), y)
  975. ifeq ($(CONFIG_HIF_PCI), 1)
  976. CDEFINES += -DWLAN_FEATURE_RX_FULL_REORDER_OL
  977. endif
  978. endif
  979. #Enable Signed firmware support for split binary format
  980. ifeq ($(CONFIG_QCA_SIGNED_SPLIT_BINARY_SUPPORT), 1)
  981. CDEFINES += -DQCA_SIGNED_SPLIT_BINARY_SUPPORT
  982. endif
  983. #Enable single firmware binary format
  984. ifeq ($(CONFIG_QCA_SINGLE_BINARY_SUPPORT), 1)
  985. CDEFINES += -DQCA_SINGLE_BINARY_SUPPORT
  986. endif
  987. #Enable collecting target RAM dump after kernel panic
  988. ifeq ($(CONFIG_TARGET_RAMDUMP_AFTER_KERNEL_PANIC), 1)
  989. CDEFINES += -DTARGET_RAMDUMP_AFTER_KERNEL_PANIC
  990. endif
  991. #Enable/disable secure firmware feature
  992. ifeq ($(CONFIG_FEATURE_SECURE_FIRMWARE), 1)
  993. CDEFINES += -DFEATURE_SECURE_FIRMWARE
  994. endif
  995. ifeq ($(CONFIG_ATH_PCIE_ACCESS_DEBUG), 1)
  996. CDEFINES += -DCONFIG_ATH_PCIE_ACCESS_DEBUG
  997. endif
  998. # Some kernel include files are being moved. Check to see if
  999. # the old version of the files are present
  1000. ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/mach-msm/include/mach/msm_smd.h),)
  1001. CDEFINES += -DEXISTS_MSM_SMD
  1002. endif
  1003. ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/mach-msm/include/mach/msm_smsm.h),)
  1004. CDEFINES += -DEXISTS_MSM_SMSM
  1005. endif
  1006. # Enable feature support fo Linux version QCMBR
  1007. ifeq ($(CONFIG_LINUX_QCMBR),y)
  1008. CDEFINES += -DLINUX_QCMBR
  1009. endif
  1010. # Enable full rx re-order offload for adrastea
  1011. ifeq (y, $(filter y, $(CONFIG_CNSS_ADRASTEA) $(CONFIG_ICNSS)))
  1012. CDEFINES += -DWLAN_FEATURE_RX_FULL_REORDER_OL
  1013. endif
  1014. # NOTE: CONFIG_64BIT_PADDR requires CONFIG_HELIUMPLUS
  1015. ifeq (y,$(filter y,$(CONFIG_CNSS_EOS) $(CONFIG_ICNSS)))
  1016. CONFIG_HELIUMPLUS := y
  1017. CONFIG_64BIT_PADDR := y
  1018. CONFIG_FEATURE_TSO := y
  1019. CONFIG_FEATURE_TSO_DEBUG := y
  1020. ifeq ($(CONFIG_HELIUMPLUS),y)
  1021. CDEFINES += -DHELIUMPLUS_PADDR64
  1022. CDEFINES += -DHELIUMPLUS
  1023. ifeq ($(CONFIG_64BIT_PADDR),y)
  1024. CDEFINES += -DHTT_PADDR64
  1025. endif
  1026. endif
  1027. endif
  1028. ifeq ($(CONFIG_FEATURE_TSO),y)
  1029. CDEFINES += -DFEATURE_TSO
  1030. endif
  1031. ifeq ($(CONFIG_FEATURE_TSO_DEBUG),y)
  1032. CDEFINES += -DFEATURE_TSO_DEBUG
  1033. endif
  1034. ifeq ($(CONFIG_WLAN_LRO), y)
  1035. CDEFINES += -DFEATURE_LRO
  1036. endif
  1037. ifeq ($(CONFIG_MOBILE_ROUTER), y)
  1038. CDEFINES += -DFEATURE_AP_MCC_CH_AVOIDANCE
  1039. endif
  1040. ifeq ($(CONFIG_MPC_UT_FRAMEWORK), y)
  1041. CDEFINES += -DMPC_UT_FRAMEWORK
  1042. endif
  1043. ifeq ($(CONFIG_WLAN_OFFLOAD_PACKETS),y)
  1044. CDEFINES += -DWLAN_FEATURE_OFFLOAD_PACKETS
  1045. endif
  1046. ifeq ($(CONFIG_WLAN_FEATURE_MEMDUMP),y)
  1047. CDEFINES += -DWLAN_FEATURE_MEMDUMP
  1048. endif
  1049. ifeq ($(CONFIG_STATICALLY_ADD_11P_CHANNELS),y)
  1050. CDEFINES += -DFEATURE_STATICALLY_ADD_11P_CHANNELS
  1051. endif
  1052. KBUILD_CPPFLAGS += $(CDEFINES)
  1053. # Currently, for versions of gcc which support it, the kernel Makefile
  1054. # is disabling the maybe-uninitialized warning. Re-enable it for the
  1055. # WLAN driver. Note that we must use EXTRA_CFLAGS here so that it
  1056. # will override the kernel settings.
  1057. ifeq ($(call cc-option-yn, -Wmaybe-uninitialized),y)
  1058. EXTRA_CFLAGS += -Wmaybe-uninitialized
  1059. endif
  1060. # Module information used by KBuild framework
  1061. obj-$(CONFIG_QCA_CLD_WLAN) += $(MODNAME).o
  1062. $(MODNAME)-y := $(OBJS)