Kbuild 45 KB

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