Kbuild 34 KB

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