Kbuild 34 KB

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