Kbuild 45 KB

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