Kbuild 33 KB

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