Kbuild 48 KB

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