Kbuild 40 KB

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