Kbuild 43 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674
  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_MSMCOBALT), 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. ############ CDS (Connectivity driver services) ############
  579. CDS_DIR := core/cds
  580. CDS_INC_DIR := $(CDS_DIR)/inc
  581. CDS_SRC_DIR := $(CDS_DIR)/src
  582. CDS_INC := -I$(WLAN_ROOT)/$(CDS_INC_DIR) \
  583. -I$(WLAN_ROOT)/$(CDS_SRC_DIR)
  584. CDS_OBJS := $(CDS_SRC_DIR)/cds_api.o \
  585. $(CDS_SRC_DIR)/cds_reg_service.o \
  586. $(CDS_SRC_DIR)/cds_mq.o \
  587. $(CDS_SRC_DIR)/cds_packet.o \
  588. $(CDS_SRC_DIR)/cds_regdomain.o \
  589. $(CDS_SRC_DIR)/cds_sched.o \
  590. $(CDS_SRC_DIR)/cds_concurrency.o \
  591. $(CDS_SRC_DIR)/cds_utils.o \
  592. $(CDS_SRC_DIR)/cds_mc_timer.o
  593. ########### BMI ###########
  594. BMI_DIR := core/bmi
  595. BMI_INC := -I$(WLAN_ROOT)/$(BMI_DIR)/inc
  596. BMI_OBJS := $(BMI_DIR)/src/bmi.o \
  597. $(BMI_DIR)/src/ol_fw.o \
  598. $(BMI_DIR)/src/ol_fw_common.o
  599. BMI_OBJS += $(BMI_DIR)/src/bmi_1.o
  600. ########### WMI ###########
  601. WMI_ROOT_DIR := wmi
  602. WMI_SRC_DIR := $(WMI_ROOT_DIR)/src
  603. WMI_INC_DIR := $(WMI_ROOT_DIR)/inc
  604. WMI_OBJ_DIR := $(WLAN_COMMON_ROOT)/$(WMI_SRC_DIR)
  605. WMI_INC := -I$(WLAN_COMMON_INC)/$(WMI_INC_DIR)
  606. WMI_OBJS := $(WMI_OBJ_DIR)/wmi_unified.o \
  607. $(WMI_OBJ_DIR)/wmi_tlv_helper.o \
  608. $(WMI_OBJ_DIR)/wmi_unified_tlv.o \
  609. $(WMI_OBJ_DIR)/wmi_unified_api.o \
  610. $(WMI_OBJ_DIR)/wmi_unified_non_tlv.o
  611. ########### FWLOG ###########
  612. FWLOG_DIR := core/utils/fwlog
  613. FWLOG_INC := -I$(WLAN_ROOT)/$(FWLOG_DIR)
  614. FWLOG_OBJS := $(FWLOG_DIR)/dbglog_host.o
  615. ############ TXRX ############
  616. TXRX_DIR := core/dp/txrx
  617. TXRX_INC := -I$(WLAN_ROOT)/$(TXRX_DIR)
  618. TXRX_OBJS := $(TXRX_DIR)/ol_txrx.o \
  619. $(TXRX_DIR)/ol_cfg.o \
  620. $(TXRX_DIR)/ol_rx.o \
  621. $(TXRX_DIR)/ol_rx_fwd.o \
  622. $(TXRX_DIR)/ol_txrx.o \
  623. $(TXRX_DIR)/ol_rx_defrag.o \
  624. $(TXRX_DIR)/ol_tx_desc.o \
  625. $(TXRX_DIR)/ol_tx.o \
  626. $(TXRX_DIR)/ol_rx_reorder_timeout.o \
  627. $(TXRX_DIR)/ol_rx_reorder.o \
  628. $(TXRX_DIR)/ol_rx_pn.o \
  629. $(TXRX_DIR)/ol_tx_queue.o \
  630. $(TXRX_DIR)/ol_txrx_peer_find.o \
  631. $(TXRX_DIR)/ol_txrx_event.o \
  632. $(TXRX_DIR)/ol_txrx_encap.o \
  633. $(TXRX_DIR)/ol_tx_send.o \
  634. $(TXRX_DIR)/ol_tx_sched.o \
  635. $(TXRX_DIR)/ol_tx_classify.o
  636. ifeq ($(CONFIG_WLAN_TX_FLOW_CONTROL_V2), y)
  637. TXRX_OBJS += $(TXRX_DIR)/ol_txrx_flow_control.o
  638. endif
  639. ############ DP 3.0 ############
  640. DP_INC := -I$(WLAN_COMMON_ROOT)/dp/inc \
  641. -I$(WLAN_COMMON_ROOT)/dp/wifi3.0
  642. DP_SRC := $(WLAN_COMMON_ROOT)/dp/wifi3.0
  643. DP_OBJS := $(DP_SRC)/dp_main.o \
  644. $(DP_SRC)/dp_tx.o \
  645. $(DP_SRC)/dp_tx_desc.o \
  646. $(DP_SRC)/dp_rx.o \
  647. $(DP_SRC)/dp_rx_err.o \
  648. $(DP_SRC)/dp_htt.o \
  649. $(DP_SRC)/dp_peer.o \
  650. $(DP_SRC)/dp_rx_desc.o
  651. ############ CFG ############
  652. WCFG_DIR := $(WLAN_COMMON_ROOT)/wlan_cfg
  653. WCFG_INC := -I$(WCFG_DIR)
  654. WCFG_OBJS := $(WCFG_DIR)/wlan_cfg.o
  655. ############ OL ############
  656. OL_DIR := core/dp/ol
  657. OL_INC := -I$(WLAN_ROOT)/$(OL_DIR)/inc
  658. ############ CDP ############
  659. CDP_ROOT_DIR := dp
  660. CDP_INC_DIR := $(CDP_ROOT_DIR)/inc
  661. CDP_INC := -I$(WLAN_COMMON_INC)/$(CDP_INC_DIR)
  662. ############ PKTLOG ############
  663. PKTLOG_DIR := core/utils/pktlog
  664. PKTLOG_INC := -I$(WLAN_ROOT)/$(PKTLOG_DIR)/include
  665. PKTLOG_OBJS := $(PKTLOG_DIR)/pktlog_ac.o \
  666. $(PKTLOG_DIR)/pktlog_internal.o \
  667. $(PKTLOG_DIR)/linux_ac.o
  668. ############ HTT ############
  669. HTT_DIR := core/dp/htt
  670. HTT_INC := -I$(WLAN_ROOT)/$(HTT_DIR)
  671. HTT_OBJS := $(HTT_DIR)/htt_tx.o \
  672. $(HTT_DIR)/htt.o \
  673. $(HTT_DIR)/htt_t2h.o \
  674. $(HTT_DIR)/htt_h2t.o \
  675. $(HTT_DIR)/htt_fw_stats.o \
  676. $(HTT_DIR)/htt_rx.o
  677. ############## INIT-DEINIT ###########
  678. INIT_DEINIT_DIR := init_deinit/dispatcher
  679. INIT_DEINIT_INC_DIR := $(INIT_DEINIT_DIR)/inc
  680. INIT_DEINIT_SRC_DIR := $(INIT_DEINIT_DIR)/src
  681. INIT_DEINIT_OBJ_DIR := $(WLAN_COMMON_ROOT)/$(INIT_DEINIT_SRC_DIR)
  682. INIT_DEINIT_INC := -I$(WLAN_COMMON_INC)/$(INIT_DEINIT_INC_DIR)
  683. INIT_DEINIT_OBJS := $(INIT_DEINIT_OBJ_DIR)/dispatcher_init_deinit.o
  684. ############## HTC ##########
  685. HTC_DIR := htc
  686. HTC_INC := -I$(WLAN_COMMON_INC)/$(HTC_DIR)
  687. HTC_OBJS := $(WLAN_COMMON_ROOT)/$(HTC_DIR)/htc.o \
  688. $(WLAN_COMMON_ROOT)/$(HTC_DIR)/htc_send.o \
  689. $(WLAN_COMMON_ROOT)/$(HTC_DIR)/htc_recv.o \
  690. $(WLAN_COMMON_ROOT)/$(HTC_DIR)/htc_services.o
  691. ########### HIF ###########
  692. HIF_DIR := hif
  693. HIF_CE_DIR := $(HIF_DIR)/src/ce
  694. HIF_DISPATCHER_DIR := $(HIF_DIR)/src/dispatcher
  695. HIF_PCIE_DIR := $(HIF_DIR)/src/pcie
  696. HIF_SNOC_DIR := $(HIF_DIR)/src/snoc
  697. HIF_USB_DIR := $(HIF_DIR)/src/usb
  698. HIF_SDIO_DIR := $(HIF_DIR)/src/sdio
  699. HIF_SDIO_NATIVE_DIR := $(HIF_SDIO_DIR)/native_sdio
  700. HIF_SDIO_NATIVE_INC_DIR := $(HIF_SDIO_NATIVE_DIR)/include
  701. HIF_SDIO_NATIVE_SRC_DIR := $(HIF_SDIO_NATIVE_DIR)/src
  702. HIF_INC := -I$(WLAN_COMMON_INC)/$(HIF_DIR)/inc \
  703. -I$(WLAN_COMMON_INC)/$(HIF_DIR)/src \
  704. -I$(WLAN_COMMON_INC)/$(HIF_CE_DIR)
  705. ifeq ($(CONFIG_HIF_PCI), 1)
  706. HIF_INC += -I$(WLAN_COMMON_INC)/$(HIF_DISPATCHER_DIR)
  707. HIF_INC += -I$(WLAN_COMMON_INC)/$(HIF_PCIE_DIR)
  708. endif
  709. ifeq ($(CONFIG_HIF_SNOC), 1)
  710. HIF_INC += -I$(WLAN_COMMON_INC)/$(HIF_DISPATCHER_DIR)
  711. HIF_INC += -I$(WLAN_COMMON_INC)/$(HIF_SNOC_DIR)
  712. endif
  713. ifeq ($(CONFIG_HIF_USB), 1)
  714. HIF_INC += -I$(WLAN_COMMON_INC)/$(HIF_DISPATCHER_DIR)
  715. HIF_INC += -I$(WLAN_COMMON_INC)/$(HIF_USB_DIR)
  716. endif
  717. ifeq ($(CONFIG_HIF_SDIO), 1)
  718. HIF_INC += -I$(WLAN_COMMON_INC)/$(HIF_DISPATCHER_DIR)
  719. HIF_INC += -I$(WLAN_COMMON_INC)/$(HIF_SDIO_DIR)
  720. HIF_INC += -I$(WLAN_COMMON_INC)/$(HIF_SDIO_NATIVE_INC_DIR)
  721. endif
  722. HIF_COMMON_OBJS := $(WLAN_COMMON_ROOT)/$(HIF_DIR)/src/ath_procfs.o \
  723. $(WLAN_COMMON_ROOT)/$(HIF_DIR)/src/hif_main.o \
  724. $(WLAN_COMMON_ROOT)/$(HIF_DIR)/src/mp_dev.o
  725. HIF_CE_OBJS := $(WLAN_COMMON_ROOT)/$(HIF_CE_DIR)/ce_bmi.o \
  726. $(WLAN_COMMON_ROOT)/$(HIF_CE_DIR)/ce_diag.o \
  727. $(WLAN_COMMON_ROOT)/$(HIF_CE_DIR)/ce_main.o \
  728. $(WLAN_COMMON_ROOT)/$(HIF_CE_DIR)/ce_service.o \
  729. $(WLAN_COMMON_ROOT)/$(HIF_CE_DIR)/ce_tasklet.o \
  730. $(WLAN_COMMON_ROOT)/$(HIF_DIR)/src/regtable.o \
  731. $(WLAN_COMMON_ROOT)/$(HIF_CE_DIR)/ce_service_srng.o \
  732. ifeq ($(CONFIG_LITHIUM),y)
  733. HIF_CE_OBJS += $(WLAN_COMMON_ROOT)/$(HIF_DIR)/src/qca6290def.o
  734. endif
  735. HIF_USB_OBJS := $(WLAN_COMMON_ROOT)/$(HIF_USB_DIR)/usbdrv.o \
  736. $(WLAN_COMMON_ROOT)/$(HIF_USB_DIR)/hif_usb.o \
  737. $(WLAN_COMMON_ROOT)/$(HIF_USB_DIR)/if_usb.o \
  738. $(WLAN_COMMON_ROOT)/$(HIF_USB_DIR)/regtable_usb.o
  739. HIF_SDIO_OBJS := $(WLAN_COMMON_ROOT)/$(HIF_SDIO_DIR)/hif_sdio_send.o \
  740. $(WLAN_COMMON_ROOT)/$(HIF_SDIO_DIR)/hif_bmi_reg_access.o \
  741. $(WLAN_COMMON_ROOT)/$(HIF_SDIO_DIR)/hif_diag_reg_access.o \
  742. $(WLAN_COMMON_ROOT)/$(HIF_SDIO_DIR)/hif_sdio_dev.o \
  743. $(WLAN_COMMON_ROOT)/$(HIF_SDIO_DIR)/hif_sdio.o \
  744. $(WLAN_COMMON_ROOT)/$(HIF_SDIO_DIR)/hif_sdio_recv.o \
  745. $(WLAN_COMMON_ROOT)/$(HIF_SDIO_DIR)/regtable_sdio.o
  746. HIF_SDIO_NATIVE_OBJS := $(WLAN_COMMON_ROOT)/$(HIF_SDIO_NATIVE_SRC_DIR)/hif.o \
  747. $(WLAN_COMMON_ROOT)/$(HIF_SDIO_NATIVE_SRC_DIR)/hif_scatter.o
  748. ifeq ($(CONFIG_WLAN_NAPI), y)
  749. HIF_OBJS += $(WLAN_COMMON_ROOT)/$(HIF_DIR)/src/hif_napi.o
  750. endif
  751. HIF_PCIE_OBJS := $(WLAN_COMMON_ROOT)/$(HIF_PCIE_DIR)/if_pci.o
  752. HIF_SNOC_OBJS := $(WLAN_COMMON_ROOT)/$(HIF_SNOC_DIR)/if_snoc.o
  753. HIF_SDIO_OBJS += $(WLAN_COMMON_ROOT)/$(HIF_SDIO_DIR)/if_sdio.o
  754. HIF_OBJS += $(WLAN_COMMON_ROOT)/$(HIF_DISPATCHER_DIR)/multibus.o
  755. HIF_OBJS += $(WLAN_COMMON_ROOT)/$(HIF_DISPATCHER_DIR)/dummy.o
  756. ifeq ($(CONFIG_HIF_PCI), 1)
  757. HIF_OBJS += $(HIF_PCIE_OBJS)
  758. HIF_OBJS += $(HIF_COMMON_OBJS)
  759. HIF_OBJS += $(HIF_CE_OBJS)
  760. HIF_OBJS += $(WLAN_COMMON_ROOT)/$(HIF_DISPATCHER_DIR)/multibus_pci.o
  761. endif
  762. ifeq ($(CONFIG_HIF_SNOC), 1)
  763. HIF_OBJS += $(HIF_SNOC_OBJS)
  764. HIF_OBJS += $(HIF_COMMON_OBJS)
  765. HIF_OBJS += $(HIF_CE_OBJS)
  766. HIF_OBJS += $(WLAN_COMMON_ROOT)/$(HIF_DISPATCHER_DIR)/multibus_snoc.o
  767. endif
  768. ifeq ($(CONFIG_HIF_SDIO), 1)
  769. HIF_OBJS += $(HIF_SDIO_OBJS)
  770. HIF_OBJS += $(HIF_SDIO_NATIVE_OBJS)
  771. HIF_OBJS += $(HIF_COMMON_OBJS)
  772. HIF_OBJS += $(WLAN_COMMON_ROOT)/$(HIF_DISPATCHER_DIR)/multibus_sdio.o
  773. endif
  774. ifeq ($(CONFIG_HIF_USB), 1)
  775. HIF_OBJS += $(HIF_USB_OBJS)
  776. HIF_OBJS += $(HIF_COMMON_OBJS)
  777. HIF_OBJS += $(WLAN_COMMON_ROOT)/$(HIF_DISPATCHER_DIR)/multibus_usb.o
  778. endif
  779. ############ HAL ############
  780. HAL_DIR := hal
  781. HAL_INC := -I$(WLAN_COMMON_INC)/$(HAL_DIR)/inc \
  782. -I$(WLAN_COMMON_INC)/$(HAL_DIR)/wifi3.0
  783. HAL_OBJS := $(WLAN_COMMON_ROOT)/$(HAL_DIR)/wifi3.0/hal_srng.o \
  784. $(WLAN_COMMON_ROOT)/$(HAL_DIR)/wifi3.0/hal_rx.o \
  785. $(WLAN_COMMON_ROOT)/$(HAL_DIR)/wifi3.0/hal_wbm.o
  786. ############ WMA ############
  787. WMA_DIR := core/wma
  788. WMA_INC_DIR := $(WMA_DIR)/inc
  789. WMA_SRC_DIR := $(WMA_DIR)/src
  790. WMA_INC := -I$(WLAN_ROOT)/$(WMA_INC_DIR) \
  791. -I$(WLAN_ROOT)/$(WMA_SRC_DIR)
  792. ifeq ($(CONFIG_WLAN_FEATURE_NAN_DATAPATH), y)
  793. WMA_NDP_OBJS += $(WMA_SRC_DIR)/wma_nan_datapath.o
  794. endif
  795. WMA_OBJS := $(WMA_SRC_DIR)/wma_main.o \
  796. $(WMA_SRC_DIR)/wma_scan_roam.o \
  797. $(WMA_SRC_DIR)/wma_dev_if.o \
  798. $(WMA_SRC_DIR)/wma_mgmt.o \
  799. $(WMA_SRC_DIR)/wma_power.o \
  800. $(WMA_SRC_DIR)/wma_data.o \
  801. $(WMA_SRC_DIR)/wma_utils.o \
  802. $(WMA_SRC_DIR)/wma_features.o \
  803. $(WMA_SRC_DIR)/wma_dfs_interface.o \
  804. $(WMA_SRC_DIR)/wlan_qct_wma_legacy.o\
  805. $(WMA_NDP_OBJS)
  806. ifeq ($(CONFIG_WLAN_FEATURE_DSRC), y)
  807. WMA_OBJS+= $(WMA_DIR)/wma_ocb.o
  808. endif
  809. ifeq ($(CONFIG_MPC_UT_FRAMEWORK),y)
  810. WMA_OBJS += $(WMA_SRC_DIR)/wma_utils_ut.o
  811. endif
  812. ############## PLD ##########
  813. PLD_DIR := core/pld
  814. PLD_INC_DIR := $(PLD_DIR)/inc
  815. PLD_SRC_DIR := $(PLD_DIR)/src
  816. PLD_INC := -I$(WLAN_ROOT)/$(PLD_INC_DIR) \
  817. -I$(WLAN_ROOT)/$(PLD_SRC_DIR)
  818. PLD_OBJS := $(PLD_SRC_DIR)/pld_common.o
  819. ifeq ($(CONFIG_PCI), y)
  820. PLD_OBJS += $(PLD_SRC_DIR)/pld_pcie.o
  821. endif
  822. ifeq ($(CONFIG_ICNSS),y)
  823. PLD_OBJS += $(PLD_SRC_DIR)/pld_snoc.o
  824. endif
  825. ifeq ($(CONFIG_CNSS_SDIO),y)
  826. PLD_OBJS += $(PLD_SRC_DIR)/pld_sdio.o
  827. endif
  828. ifeq ($(CONFIG_PLD_USB_CNSS), y)
  829. PLD_OBJS += $(PLD_SRC_DIR)/pld_usb.o
  830. endif
  831. TARGET_INC := -I$(WLAN_ROOT)/../fw-api/hw/qca6290/v1 \
  832. -I$(WLAN_ROOT)/../fw-api/fw
  833. LINUX_INC := -Iinclude/linux
  834. INCS := $(HDD_INC) \
  835. $(EPPING_INC) \
  836. $(LINUX_INC) \
  837. $(MAC_INC) \
  838. $(SAP_INC) \
  839. $(SME_INC) \
  840. $(SYS_INC) \
  841. $(QDF_INC) \
  842. $(CDS_INC) \
  843. $(DFS_INC)
  844. INCS += $(WMA_INC) \
  845. $(UAPI_INC) \
  846. $(COMMON_INC) \
  847. $(WMI_INC) \
  848. $(FWLOG_INC) \
  849. $(TXRX_INC) \
  850. $(OL_INC) \
  851. $(CDP_INC) \
  852. $(PKTLOG_INC) \
  853. $(HTT_INC) \
  854. $(INIT_DEINIT_INC) \
  855. $(HTC_INC) \
  856. $(DFS_INC) \
  857. $(WCFG_INC) \
  858. $(DP_INC)
  859. INCS += $(HIF_INC) \
  860. $(BMI_INC) \
  861. $(HAL_INC)
  862. INCS += $(TARGET_INC)
  863. INCS += $(NLINK_INC) \
  864. $(PTT_INC) \
  865. $(WLAN_LOGGING_INC)
  866. INCS += $(PLD_INC)
  867. ifeq ($(CONFIG_REMOVE_PKT_LOG), 0)
  868. INCS += $(PKTLOG_INC)
  869. endif
  870. ifeq ($(BUILD_DIAG_VERSION), 1)
  871. INCS += $(HOST_DIAG_LOG_INC)
  872. endif
  873. OBJS := $(HDD_OBJS) \
  874. $(EPPING_OBJS) \
  875. $(MAC_OBJS) \
  876. $(SAP_OBJS) \
  877. $(SME_OBJS) \
  878. $(SYS_OBJS) \
  879. $(QDF_OBJS) \
  880. $(CDS_OBJS) \
  881. $(DFS_OBJS)
  882. OBJS += $(WMA_OBJS) \
  883. $(TXRX_OBJS) \
  884. $(WMI_OBJS) \
  885. $(FWLOG_OBJS) \
  886. $(HTC_OBJS) \
  887. $(INIT_DEINIT_OBJS) \
  888. $(DFS_OBJS)
  889. OBJS += $(HIF_OBJS) \
  890. $(BMI_OBJS) \
  891. $(HTT_OBJS) \
  892. $(HAL_OBJS)
  893. OBJS += $(WLAN_LOGGING_OBJS)
  894. OBJS += $(NLINK_OBJS)
  895. OBJS += $(PTT_OBJS)
  896. OBJS += $(PLD_OBJS)
  897. ifeq ($(CONFIG_REMOVE_PKT_LOG), 0)
  898. OBJS += $(PKTLOG_OBJS)
  899. endif
  900. ifeq ($(BUILD_DIAG_VERSION), 1)
  901. OBJS += $(HOST_DIAG_LOG_OBJS)
  902. endif
  903. OBJS += $(DP_OBJS) \
  904. $(WCFG_OBJS)
  905. EXTRA_CFLAGS += $(INCS)
  906. CDEFINES := -DANI_LITTLE_BYTE_ENDIAN \
  907. -DANI_LITTLE_BIT_ENDIAN \
  908. -DDOT11F_LITTLE_ENDIAN_HOST \
  909. -DANI_COMPILER_TYPE_GCC \
  910. -DANI_OS_TYPE_ANDROID=6 \
  911. -DPTT_SOCK_SVC_ENABLE \
  912. -Wall\
  913. -Werror\
  914. -D__linux__ \
  915. -DHAL_SELF_STA_PER_BSS=1 \
  916. -DFEATURE_WLAN_WAPI \
  917. -DFEATURE_OEM_DATA_SUPPORT\
  918. -DSOFTAP_CHANNEL_RANGE \
  919. -DWLAN_AP_STA_CONCURRENCY \
  920. -DFEATURE_WLAN_SCAN_PNO \
  921. -DWLAN_FEATURE_PACKET_FILTERING \
  922. -DWLAN_FEATURE_P2P_DEBUG \
  923. -DWLAN_ENABLE_AGEIE_ON_SCAN_RESULTS \
  924. -DWLANTL_DEBUG\
  925. -DWLAN_NS_OFFLOAD \
  926. -DWLAN_SOFTAP_VSTA_FEATURE \
  927. -DWLAN_FEATURE_GTK_OFFLOAD \
  928. -DWLAN_WAKEUP_EVENTS \
  929. -DFEATURE_WLAN_RA_FILTERING\
  930. -DWLAN_NL80211_TESTMODE \
  931. -DFEATURE_WLAN_LPHB \
  932. -DQCA_SUPPORT_TX_THROTTLE \
  933. -DWMI_INTERFACE_EVENT_LOGGING \
  934. -DATH_SUPPORT_WAPI \
  935. -DWLAN_FEATURE_LINK_LAYER_STATS \
  936. -DFEATURE_WLAN_EXTSCAN \
  937. -DWLAN_FEATURE_MBSSID \
  938. -DCONFIG_160MHZ_SUPPORT \
  939. -DCONFIG_MCL
  940. ifneq ($(CONFIG_HIF_USB), 1)
  941. CDEFINES += -DWLAN_LOGGING_SOCK_SVC_ENABLE
  942. endif
  943. ifeq ($(CONFIG_CNSS), y)
  944. ifeq ($(CONFIG_CNSS_SDIO), y)
  945. CDEFINES += -DCONFIG_PLD_SDIO_CNSS
  946. else
  947. CDEFINES += -DCONFIG_PLD_PCIE_CNSS
  948. endif
  949. endif
  950. ifeq ($(CONFIG_CNSS2), y)
  951. CDEFINES += -DCONFIG_PLD_PCIE_CNSS
  952. endif
  953. ifeq ($(CONFIG_ICNSS), y)
  954. CDEFINES += -DCONFIG_PLD_SNOC_ICNSS
  955. endif
  956. ifeq (y,$(filter y,$(CONFIG_CNSS_EOS) $(CONFIG_ICNSS)))
  957. CDEFINES += -DQCA_WIFI_3_0
  958. CDEFINES += -DQCA_WIFI_3_0_EMU
  959. endif
  960. ifeq (y,$(filter y,$(CONFIG_CNSS_ADRASTEA) $(CONFIG_ICNSS)))
  961. CDEFINES += -DQCA_WIFI_3_0_ADRASTEA
  962. CDEFINES += -DADRASTEA_SHADOW_REGISTERS
  963. CDEFINES += -DADRASTEA_RRI_ON_DDR
  964. endif
  965. ifeq ($(CONFIG_WLAN_FASTPATH), y)
  966. CDEFINES += -DWLAN_FEATURE_FASTPATH
  967. endif
  968. ifeq ($(CONFIG_FEATURE_PKTLOG), y)
  969. CDEFINES += -DFEATURE_PKTLOG
  970. endif
  971. ifeq ($(CONFIG_FEATURE_DP_TRACE), y)
  972. CDEFINES += -DFEATURE_DP_TRACE
  973. endif
  974. ifeq ($(CONFIG_WLAN_NAPI), y)
  975. CDEFINES += -DFEATURE_NAPI
  976. ifeq ($(CONFIG_WLAN_NAPI_DEBUG), y)
  977. CDEFINES += -DFEATURE_NAPI_DEBUG
  978. endif
  979. endif
  980. ifeq (y,$(findstring y,$(CONFIG_ARCH_MSM) $(CONFIG_ARCH_QCOM)))
  981. CDEFINES += -DMSM_PLATFORM
  982. endif
  983. CDEFINES += -DQCA_SUPPORT_TXRX_LOCAL_PEER_ID
  984. ifeq ($(CONFIG_WLAN_TX_FLOW_CONTROL_V2), y)
  985. CDEFINES += -DQCA_LL_TX_FLOW_CONTROL_V2
  986. CDEFINES += -DQCA_LL_TX_FLOW_GLOBAL_MGMT_POOL
  987. else
  988. ifeq ($(CONFIG_ROME_IF),pci)
  989. ifneq ($(CONFIG_LITHIUM),y)
  990. CDEFINES += -DQCA_LL_LEGACY_TX_FLOW_CONTROL
  991. endif
  992. endif
  993. endif
  994. ifneq ($(CONFIG_QCA_CLD_WLAN),)
  995. CDEFINES += -DWCN_PRONTO
  996. CDEFINES += -DWCN_PRONTO_V1
  997. endif
  998. ifeq ($(BUILD_DEBUG_VERSION),1)
  999. CDEFINES += -DWLAN_DEBUG \
  1000. -DTRACE_RECORD \
  1001. -DLIM_TRACE_RECORD \
  1002. -DSME_TRACE_RECORD \
  1003. -DHDD_TRACE_RECORD \
  1004. -DPE_DEBUG_LOGW \
  1005. -DPE_DEBUG_LOGE
  1006. endif
  1007. ifeq ($(CONFIG_SLUB_DEBUG_ON),y)
  1008. CDEFINES += -DTIMER_MANAGER
  1009. CDEFINES += -DMEMORY_DEBUG
  1010. endif
  1011. ifeq ($(HAVE_CFG80211),1)
  1012. CDEFINES += -DWLAN_FEATURE_P2P
  1013. CDEFINES += -DWLAN_FEATURE_WFD
  1014. ifeq ($(CONFIG_QCOM_VOWIFI_11R),y)
  1015. CDEFINES += -DKERNEL_SUPPORT_11R_CFG80211
  1016. CDEFINES += -DUSE_80211_WMMTSPEC_FOR_RIC
  1017. endif
  1018. endif
  1019. ifeq ($(CONFIG_QCOM_ESE),y)
  1020. CDEFINES += -DFEATURE_WLAN_ESE
  1021. CDEFINES += -DQCA_COMPUTE_TX_DELAY
  1022. CDEFINES += -DQCA_COMPUTE_TX_DELAY_PER_TID
  1023. endif
  1024. #normally, TDLS negative behavior is not needed
  1025. ifeq ($(CONFIG_QCOM_TDLS),y)
  1026. CDEFINES += -DFEATURE_WLAN_TDLS
  1027. endif
  1028. ifeq ($(CONFIG_QCACLD_WLAN_LFR3),y)
  1029. CDEFINES += -DWLAN_FEATURE_ROAM_OFFLOAD
  1030. endif
  1031. ifeq ($(CONFIG_QCACLD_WLAN_LFR2),y)
  1032. CDEFINES += -DWLAN_FEATURE_HOST_ROAM
  1033. endif
  1034. ifeq ($(BUILD_DIAG_VERSION),1)
  1035. CDEFINES += -DFEATURE_WLAN_DIAG_SUPPORT
  1036. CDEFINES += -DFEATURE_WLAN_DIAG_SUPPORT_CSR
  1037. CDEFINES += -DFEATURE_WLAN_DIAG_SUPPORT_LIM
  1038. ifeq ($(CONFIG_HIF_PCI), 1)
  1039. CDEFINES += -DCONFIG_ATH_PROCFS_DIAG_SUPPORT
  1040. endif
  1041. endif
  1042. ifeq ($(CONFIG_HIF_USB), 1)
  1043. CDEFINES += -DCONFIG_ATH_PROCFS_DIAG_SUPPORT
  1044. CDEFINES += -DQCA_SUPPORT_OL_RX_REORDER_TIMEOUT
  1045. CDEFINES += -DCONFIG_ATH_PCIE_MAX_PERF=0 -DCONFIG_ATH_PCIE_AWAKE_WHILE_DRIVER_LOAD=0 -DCONFIG_DISABLE_CDC_MAX_PERF_WAR=0
  1046. endif
  1047. ifeq ($(CONFIG_WLAN_FEATURE_11W),y)
  1048. CDEFINES += -DWLAN_FEATURE_11W
  1049. endif
  1050. ifeq ($(CONFIG_QCA_TXDESC_SANITY_CHECKS), 1)
  1051. CDEFINES += -DQCA_SUPPORT_TXDESC_SANITY_CHECKS
  1052. endif
  1053. ifeq ($(CONFIG_QCOM_LTE_COEX),y)
  1054. CDEFINES += -DFEATURE_WLAN_CH_AVOID
  1055. endif
  1056. ifeq ($(CONFIG_WLAN_FEATURE_LPSS),y)
  1057. CDEFINES += -DWLAN_FEATURE_LPSS
  1058. endif
  1059. ifneq ($(TARGET_BUILD_VARIANT),user)
  1060. CDEFINES += -DDESC_DUP_DETECT_DEBUG
  1061. CDEFINES += -DDEBUG_RX_RING_BUFFER
  1062. endif
  1063. ifeq ($(PANIC_ON_BUG),1)
  1064. CDEFINES += -DPANIC_ON_BUG
  1065. endif
  1066. ifeq ($(WLAN_OPEN_SOURCE), 1)
  1067. CDEFINES += -DWLAN_OPEN_SOURCE
  1068. endif
  1069. ifeq ($(CONFIG_FEATURE_STATS_EXT), 1)
  1070. CDEFINES += -DWLAN_FEATURE_STATS_EXT
  1071. endif
  1072. ifeq ($(CONFIG_QCACLD_FEATURE_NAN),y)
  1073. CDEFINES += -DWLAN_FEATURE_NAN
  1074. endif
  1075. ifeq ($(CONFIG_QCA_IBSS_SUPPORT), 1)
  1076. CDEFINES += -DQCA_IBSS_SUPPORT
  1077. endif
  1078. #Enable OL debug and wmi unified functions
  1079. ifeq ($(CONFIG_ATH_PERF_PWR_OFFLOAD), 1)
  1080. CDEFINES += -DATH_PERF_PWR_OFFLOAD
  1081. endif
  1082. #Disable packet log
  1083. ifeq ($(CONFIG_REMOVE_PKT_LOG), 1)
  1084. CDEFINES += -DREMOVE_PKT_LOG
  1085. endif
  1086. #Enable 11AC TX
  1087. ifeq ($(CONFIG_ATH_11AC_TXCOMPACT), 1)
  1088. CDEFINES += -DATH_11AC_TXCOMPACT
  1089. endif
  1090. #Enable OS specific IRQ abstraction
  1091. ifeq ($(CONFIG_ATH_SUPPORT_SHARED_IRQ), 1)
  1092. CDEFINES += -DATH_SUPPORT_SHARED_IRQ
  1093. endif
  1094. #Enable message based HIF instead of RAW access in BMI
  1095. ifeq ($(CONFIG_HIF_MESSAGE_BASED), 1)
  1096. CDEFINES += -DHIF_MESSAGE_BASED
  1097. endif
  1098. #Enable PCI specific APIS (dma, etc)
  1099. ifeq ($(CONFIG_HIF_PCI), 1)
  1100. CDEFINES += -DHIF_PCI
  1101. endif
  1102. ifeq ($(CONFIG_HIF_SNOC), 1)
  1103. CDEFINES += -DHIF_SNOC
  1104. endif
  1105. #Enable High Latency related Flags
  1106. ifeq ($(CONFIG_QCA_WIFI_SDIO), 1)
  1107. CDEFINES += -DCONFIG_HL_SUPPORT \
  1108. -DCONFIG_AR6320_SUPPORT \
  1109. -DSDIO_3_0 \
  1110. -DHIF_SDIO \
  1111. -DCONFIG_DISABLE_CDC_MAX_PERF_WAR=0 \
  1112. -DCONFIG_ATH_PROCFS_DIAG_SUPPORT \
  1113. -DFEATURE_HL_GROUP_CREDIT_FLOW_CONTROL \
  1114. -DHIF_MBOX_SLEEP_WAR \
  1115. -DDEBUG_HL_LOGGING \
  1116. -DQCA_BAD_PEER_TX_FLOW_CL \
  1117. -DCONFIG_TX_DESC_HI_PRIO_RESERVE \
  1118. -DCONFIG_PER_VDEV_TX_DESC_POOL \
  1119. -DCONFIG_SDIO \
  1120. -DFEATURE_WLAN_FORCE_SAP_SCC
  1121. endif
  1122. ifeq ($(CONFIG_WLAN_FEATURE_DSRC), y)
  1123. CDEFINES += -DWLAN_FEATURE_DSRC
  1124. endif
  1125. #Enable USB specific APIS
  1126. ifeq ($(CONFIG_HIF_USB), 1)
  1127. CDEFINES += -DHIF_USB \
  1128. -DCONFIG_PLD_USB_CNSS \
  1129. -DCONFIG_HL_SUPPORT
  1130. endif
  1131. #Enable FW logs through ini
  1132. CDEFINES += -DCONFIG_FW_LOGS_BASED_ON_INI
  1133. #Enable pci read/write config functions
  1134. ifeq ($(CONFIG_ATH_PCI), 1)
  1135. CDEFINES += -DATH_PCI
  1136. endif
  1137. #Enable power management suspend/resume functionality
  1138. ifeq ($(CONFIG_ATH_BUS_PM), 1)
  1139. CDEFINES += -DATH_BUS_PM
  1140. endif
  1141. #Enable FLOWMAC module support
  1142. ifeq ($(CONFIG_ATH_SUPPORT_FLOWMAC_MODULE), 1)
  1143. CDEFINES += -DATH_SUPPORT_FLOWMAC_MODULE
  1144. endif
  1145. #Enable spectral support
  1146. ifeq ($(CONFIG_ATH_SUPPORT_SPECTRAL), 1)
  1147. CDEFINES += -DATH_SUPPORT_SPECTRAL
  1148. endif
  1149. #Enable WDI Event support
  1150. ifeq ($(CONFIG_WDI_EVENT_ENABLE), 1)
  1151. CDEFINES += -DWDI_EVENT_ENABLE
  1152. endif
  1153. #Endianess selection
  1154. ifeq ($(CONFIG_LITTLE_ENDIAN), 1)
  1155. AH_LITTLE_ENDIAN=1234
  1156. CDEFINES += -DAH_BYTE_ORDER=$(AH_LITTLE_ENDIAN)
  1157. else
  1158. AH_BIG_ENDIAN=4321
  1159. CDEFINES += -DAH_BYTE_ORDER=$(AH_BIG_ENDIAN)
  1160. CDEFINES += -DBIG_ENDIAN_HOST
  1161. endif
  1162. #Enable TX reclaim support
  1163. ifeq ($(CONFIG_TX_CREDIT_RECLAIM_SUPPORT), 1)
  1164. CDEFINES += -DTX_CREDIT_RECLAIM_SUPPORT
  1165. endif
  1166. #Enable FTM support
  1167. ifeq ($(CONFIG_QCA_WIFI_FTM), 1)
  1168. CDEFINES += -DQCA_WIFI_FTM
  1169. endif
  1170. #Enable Checksum Offload support
  1171. ifeq ($(CONFIG_CHECKSUM_OFFLOAD), 1)
  1172. CDEFINES += -DCHECKSUM_OFFLOAD
  1173. endif
  1174. #Enable Checksum Offload support
  1175. ifeq ($(CONFIG_IPA_OFFLOAD), 1)
  1176. CDEFINES += -DIPA_OFFLOAD
  1177. endif
  1178. ifneq ($(CONFIG_ARCH_MDM9630), y)
  1179. ifeq ($(CONFIG_ARCH_MDM9640), y)
  1180. CDEFINES += -DQCA_CONFIG_SMP
  1181. endif
  1182. endif
  1183. #Enable GTK Offload
  1184. ifeq ($(CONFIG_GTK_OFFLOAD), 1)
  1185. CDEFINES += -DWLAN_FEATURE_GTK_OFFLOAD
  1186. CDEFINES += -DIGTK_OFFLOAD
  1187. endif
  1188. #Enable GTK Offload
  1189. ifeq ($(CONFIG_EXT_WOW), 1)
  1190. CDEFINES += -DWLAN_FEATURE_EXTWOW_SUPPORT
  1191. endif
  1192. #Mark it as SMP Kernel
  1193. ifeq ($(CONFIG_SMP),y)
  1194. CDEFINES += -DQCA_CONFIG_SMP
  1195. endif
  1196. ifeq ($(CONFIG_WLAN_FEATURE_RX_WAKELOCK), y)
  1197. CDEFINES += -DWLAN_FEATURE_HOLD_RX_WAKELOCK
  1198. endif
  1199. #Enable Channel Matrix restriction for all Rome only targets
  1200. ifneq (y,$(filter y,$(CONFIG_CNSS_EOS) $(CONFIG_ICNSS)))
  1201. CDEFINES += -DWLAN_ENABLE_CHNL_MATRIX_RESTRICTION
  1202. endif
  1203. #Enable OBSS feature
  1204. CDEFINES += -DQCA_HT_2040_COEX
  1205. #features specific to mobile router use case
  1206. ifeq ($(CONFIG_MOBILE_ROUTER), y)
  1207. #enable MCC TO SCC switch
  1208. CDEFINES += -DFEATURE_WLAN_MCC_TO_SCC_SWITCH
  1209. #enable wlan auto shutdown feature
  1210. CDEFINES += -DFEATURE_WLAN_AUTO_SHUTDOWN
  1211. #enable for MBSSID
  1212. CDEFINES += -DWLAN_FEATURE_MBSSID
  1213. #enable AP-AP ACS Optimization
  1214. CDEFINES += -DFEATURE_WLAN_AP_AP_ACS_OPTIMIZE
  1215. #Enable 4address scheme
  1216. CDEFINES += -DFEATURE_WLAN_STA_4ADDR_SCHEME
  1217. #Disable STA-AP Mode DFS support
  1218. CDEFINES += -DFEATURE_WLAN_STA_AP_MODE_DFS_DISABLE
  1219. else #CONFIG_MOBILE_ROUTER
  1220. #Open P2P device interface only for non-Mobile router use cases
  1221. CDEFINES += -DWLAN_OPEN_P2P_INTERFACE
  1222. #Enable 2.4 GHz social channels in 5 GHz only mode for p2p usage
  1223. CDEFINES += -DWLAN_ENABLE_SOCIAL_CHANNELS_5G_ONLY
  1224. endif #CONFIG_MOBILE_ROUTER
  1225. #Green AP feature
  1226. ifeq ($(CONFIG_QCACLD_FEATURE_GREEN_AP),y)
  1227. CDEFINES += -DFEATURE_GREEN_AP
  1228. endif
  1229. #Enable RX Full re-order OL feature only "LL and NON-MDM9630 platform"
  1230. ifneq ($(CONFIG_ARCH_MDM9630), y)
  1231. ifeq ($(CONFIG_HIF_PCI), 1)
  1232. CDEFINES += -DWLAN_FEATURE_RX_FULL_REORDER_OL
  1233. endif
  1234. endif
  1235. #Enable Signed firmware support for split binary format
  1236. ifeq ($(CONFIG_QCA_SIGNED_SPLIT_BINARY_SUPPORT), 1)
  1237. CDEFINES += -DQCA_SIGNED_SPLIT_BINARY_SUPPORT
  1238. endif
  1239. #Enable single firmware binary format
  1240. ifeq ($(CONFIG_QCA_SINGLE_BINARY_SUPPORT), 1)
  1241. CDEFINES += -DQCA_SINGLE_BINARY_SUPPORT
  1242. endif
  1243. #Enable collecting target RAM dump after kernel panic
  1244. ifeq ($(CONFIG_TARGET_RAMDUMP_AFTER_KERNEL_PANIC), 1)
  1245. CDEFINES += -DTARGET_RAMDUMP_AFTER_KERNEL_PANIC
  1246. endif
  1247. #Enable/disable secure firmware feature
  1248. ifeq ($(CONFIG_FEATURE_SECURE_FIRMWARE), 1)
  1249. CDEFINES += -DFEATURE_SECURE_FIRMWARE
  1250. endif
  1251. ifeq ($(CONFIG_ATH_PCIE_ACCESS_DEBUG), 1)
  1252. CDEFINES += -DCONFIG_ATH_PCIE_ACCESS_DEBUG
  1253. endif
  1254. # Enable feature support fo Linux version QCMBR
  1255. ifeq ($(CONFIG_LINUX_QCMBR),y)
  1256. CDEFINES += -DLINUX_QCMBR
  1257. endif
  1258. # Enable featue sync tsf between multi devices
  1259. ifeq ($(CONFIG_WLAN_SYNC_TSF), y)
  1260. CDEFINES += -DWLAN_FEATURE_TSF
  1261. endif
  1262. # Enable full rx re-order offload for adrastea
  1263. ifeq (y, $(filter y, $(CONFIG_CNSS_ADRASTEA) $(CONFIG_ICNSS)))
  1264. CDEFINES += -DWLAN_FEATURE_RX_FULL_REORDER_OL
  1265. endif
  1266. # Enable athdiag procfs debug support for adrastea
  1267. ifeq (y, $(filter y, $(CONFIG_CNSS_ADRASTEA) $(CONFIG_ICNSS)))
  1268. CDEFINES += -DCONFIG_ATH_PROCFS_DIAG_SUPPORT
  1269. endif
  1270. # Enable 11AC TX compact feature for adrastea
  1271. ifeq (y, $(filter y, $(CONFIG_CNSS_ADRASTEA) $(CONFIG_ICNSS)))
  1272. CDEFINES += -DATH_11AC_TXCOMPACT
  1273. endif
  1274. # NOTE: CONFIG_64BIT_PADDR requires CONFIG_HELIUMPLUS
  1275. ifeq (y,$(filter y,$(CONFIG_CNSS_EOS) $(CONFIG_ICNSS)))
  1276. CONFIG_HELIUMPLUS := y
  1277. CONFIG_64BIT_PADDR := y
  1278. CONFIG_FEATURE_TSO := y
  1279. CONFIG_FEATURE_TSO_DEBUG := y
  1280. ifeq ($(CONFIG_HELIUMPLUS),y)
  1281. CDEFINES += -DHELIUMPLUS_PADDR64
  1282. CDEFINES += -DHELIUMPLUS
  1283. CDEFINES += -DAR900B
  1284. ifeq ($(CONFIG_64BIT_PADDR),y)
  1285. CDEFINES += -DHTT_PADDR64
  1286. endif
  1287. endif
  1288. endif
  1289. ifeq ($(CONFIG_FEATURE_TSO),y)
  1290. CDEFINES += -DFEATURE_TSO
  1291. endif
  1292. ifeq ($(CONFIG_FEATURE_TSO_DEBUG),y)
  1293. CDEFINES += -DFEATURE_TSO_DEBUG
  1294. endif
  1295. ifeq ($(CONFIG_WLAN_LRO), y)
  1296. CDEFINES += -DFEATURE_LRO
  1297. endif
  1298. ifeq ($(CONFIG_MOBILE_ROUTER), y)
  1299. CDEFINES += -DFEATURE_AP_MCC_CH_AVOIDANCE
  1300. endif
  1301. ifeq ($(CONFIG_MPC_UT_FRAMEWORK), y)
  1302. CDEFINES += -DMPC_UT_FRAMEWORK
  1303. endif
  1304. ifeq ($(CONFIG_WLAN_OFFLOAD_PACKETS),y)
  1305. CDEFINES += -DWLAN_FEATURE_OFFLOAD_PACKETS
  1306. endif
  1307. ifeq ($(CONFIG_WLAN_FEATURE_MEMDUMP),y)
  1308. CDEFINES += -DWLAN_FEATURE_MEMDUMP
  1309. endif
  1310. ifeq ($(CONFIG_WLAN_FEATURE_DISA),y)
  1311. CDEFINES += -DWLAN_FEATURE_DISA
  1312. endif
  1313. ifeq ($(CONFIG_LFR_SUBNET_DETECTION), y)
  1314. CDEFINES += -DFEATURE_LFR_SUBNET_DETECTION
  1315. endif
  1316. ifeq ($(CONFIG_MCC_TO_SCC_SWITCH), y)
  1317. CDEFINES += -DFEATURE_WLAN_MCC_TO_SCC_SWITCH
  1318. endif
  1319. ifeq ($(CONFIG_WLAN_FEATURE_NAN_DATAPATH), y)
  1320. CDEFINES += -DWLAN_FEATURE_NAN_DATAPATH
  1321. endif
  1322. ifeq ($(CONFIG_LITHIUM),y)
  1323. CDEFINES += -DQCA6290_HEADERS_DEF
  1324. CDEFINES += -DQCA_WIFI_QCA8074
  1325. CDEFINES += -DQCA_WIFI_NAPIER_EMULATION
  1326. CDEFINES += -DQCA_WIFI_QCA8074_VP
  1327. CDEFINES += -DDP_INTR_POLL_BASED
  1328. endif
  1329. # Dummy flag for WIN/MCL converged data path compilation
  1330. CDEFINES += -DDP_PRINT_ENABLE=0
  1331. CDEFINES += -DATH_SUPPORT_WRAP=0
  1332. #CDEFINES += -DQCA_HOST2FW_RXBUF_RING=0
  1333. #endof dummy flags
  1334. KBUILD_CPPFLAGS += $(CDEFINES)
  1335. # Currently, for versions of gcc which support it, the kernel Makefile
  1336. # is disabling the maybe-uninitialized warning. Re-enable it for the
  1337. # WLAN driver. Note that we must use EXTRA_CFLAGS here so that it
  1338. # will override the kernel settings.
  1339. ifeq ($(call cc-option-yn, -Wmaybe-uninitialized),y)
  1340. EXTRA_CFLAGS += -Wmaybe-uninitialized
  1341. ifneq (y,$(CONFIG_ARCH_MSM))
  1342. EXTRA_CFLAGS += -Wframe-larger-than=4096
  1343. endif
  1344. endif
  1345. # Module information used by KBuild framework
  1346. obj-$(CONFIG_QCA_CLD_WLAN) += $(MODNAME).o
  1347. $(MODNAME)-y := $(OBJS)