Kbuild 33 KB

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