Kbuild 40 KB

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