Kbuild 40 KB

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