blob: cebcbeae89be87a60f55683bd6a27a2a838fc4bf [file] [log] [blame]
Zvikomborero VIncent Zvikarambab7261682016-08-03 01:27:15 -04001# We can build either as part of a standalone Kernel build or part
2# of an Android build. Determine which mechanism is being used
3ifeq ($(MODNAME),)
4 KERNEL_BUILD := 1
5else
6 KERNEL_BUILD := 0
7endif
8
9ifeq ($(KERNEL_BUILD),1)
10 # These are provided in Android-based builds
11 # Need to explicitly define for Kernel-based builds
12 MODNAME := wlan
13 WLAN_ROOT := drivers/staging/prima
14endif
15
16ifeq ($(KERNEL_BUILD), 0)
17 # These are configurable via Kconfig for kernel-based builds
18 # Need to explicitly configure for Android-based builds
19
20 #Flag to enable BlueTooth AMP feature
21 CONFIG_PRIMA_WLAN_BTAMP := n
22
23 #Flag to enable Legacy Fast Roaming(LFR)
24 CONFIG_PRIMA_WLAN_LFR := y
25
26 #JB kernel has PMKSA patches, hence enabling this flag
27 CONFIG_PRIMA_WLAN_OKC := y
28
29 # JB kernel has CPU enablement patches, so enable
30 CONFIG_PRIMA_WLAN_11AC_HIGH_TP := y
31
32 #Flag to enable TDLS feature
33 CONFIG_QCOM_TDLS := y
34
35 #Flag to enable Fast Transition (11r) feature
36 CONFIG_QCOM_VOWIFI_11R := y
37
38 #Flag to enable Protected Managment Frames (11w) feature
39 ifneq ($(CONFIG_PRONTO_WLAN),)
40 CONFIG_WLAN_FEATURE_11W := y
41 endif
42
43 #Flag to enable new Linux Regulatory implementation
44 CONFIG_ENABLE_LINUX_REG := y
45
46endif
47
48# To enable CONFIG_QCOM_ESE_UPLOAD, dependent config
49# CONFIG_QCOM_ESE must be enabled.
50CONFIG_QCOM_ESE := n
51CONFIG_QCOM_ESE_UPLOAD := n
52
53# Feature flags which are not (currently) configurable via Kconfig
54
55#Whether to build debug version
56BUILD_DEBUG_VERSION := 1
57
58#Enable this flag to build driver in diag version
59BUILD_DIAG_VERSION := 1
60
61#Do we panic on bug? default is to warn
62PANIC_ON_BUG := 1
63
64#Re-enable wifi on WDI timeout
65RE_ENABLE_WIFI_ON_WDI_TIMEOUT := 0
66
67ifeq ($(CONFIG_CFG80211),y)
68HAVE_CFG80211 := 1
69else
70ifeq ($(CONFIG_CFG80211),m)
71HAVE_CFG80211 := 1
72else
73HAVE_CFG80211 := 0
74endif
75endif
76
77############ BAP ############
78BAP_DIR := CORE/BAP
79BAP_INC_DIR := $(BAP_DIR)/inc
80BAP_SRC_DIR := $(BAP_DIR)/src
81
82BAP_INC := -I$(WLAN_ROOT)/$(BAP_INC_DIR) \
83 -I$(WLAN_ROOT)/$(BAP_SRC_DIR)
84
85BAP_OBJS := $(BAP_SRC_DIR)/bapApiData.o \
86 $(BAP_SRC_DIR)/bapApiDebug.o \
87 $(BAP_SRC_DIR)/bapApiExt.o \
88 $(BAP_SRC_DIR)/bapApiHCBB.o \
89 $(BAP_SRC_DIR)/bapApiInfo.o \
90 $(BAP_SRC_DIR)/bapApiLinkCntl.o \
91 $(BAP_SRC_DIR)/bapApiLinkSupervision.o \
92 $(BAP_SRC_DIR)/bapApiStatus.o \
93 $(BAP_SRC_DIR)/bapApiTimer.o \
94 $(BAP_SRC_DIR)/bapModule.o \
95 $(BAP_SRC_DIR)/bapRsn8021xAuthFsm.o \
96 $(BAP_SRC_DIR)/bapRsn8021xPrf.o \
97 $(BAP_SRC_DIR)/bapRsn8021xSuppRsnFsm.o \
98 $(BAP_SRC_DIR)/bapRsnAsfPacket.o \
99 $(BAP_SRC_DIR)/bapRsnSsmAesKeyWrap.o \
100 $(BAP_SRC_DIR)/bapRsnSsmEapol.o \
101 $(BAP_SRC_DIR)/bapRsnSsmReplayCtr.o \
102 $(BAP_SRC_DIR)/bapRsnTxRx.o \
103 $(BAP_SRC_DIR)/btampFsm.o \
104 $(BAP_SRC_DIR)/btampHCI.o
105
106############ DXE ############
107DXE_DIR := CORE/DXE
108DXE_INC_DIR := $(DXE_DIR)/inc
109DXE_SRC_DIR := $(DXE_DIR)/src
110
111DXE_INC := -I$(WLAN_ROOT)/$(DXE_INC_DIR) \
112 -I$(WLAN_ROOT)/$(DXE_SRC_DIR)
113
114DXE_OBJS = $(DXE_SRC_DIR)/wlan_qct_dxe.o \
115 $(DXE_SRC_DIR)/wlan_qct_dxe_cfg_i.o
116
117############ HDD ############
118HDD_DIR := CORE/HDD
119HDD_INC_DIR := $(HDD_DIR)/inc
120HDD_SRC_DIR := $(HDD_DIR)/src
121
122HDD_INC := -I$(WLAN_ROOT)/$(HDD_INC_DIR) \
123 -I$(WLAN_ROOT)/$(HDD_SRC_DIR)
124
125HDD_OBJS := $(HDD_SRC_DIR)/bap_hdd_main.o \
126 $(HDD_SRC_DIR)/wlan_hdd_assoc.o \
127 $(HDD_SRC_DIR)/wlan_hdd_cfg.o \
128 $(HDD_SRC_DIR)/wlan_hdd_debugfs.o \
129 $(HDD_SRC_DIR)/wlan_hdd_dev_pwr.o \
130 $(HDD_SRC_DIR)/wlan_hdd_dp_utils.o \
131 $(HDD_SRC_DIR)/wlan_hdd_early_suspend.o \
132 $(HDD_SRC_DIR)/wlan_hdd_ftm.o \
133 $(HDD_SRC_DIR)/wlan_hdd_hostapd.o \
134 $(HDD_SRC_DIR)/wlan_hdd_main.o \
135 $(HDD_SRC_DIR)/wlan_hdd_mib.o \
136 $(HDD_SRC_DIR)/wlan_hdd_oemdata.o \
137 $(HDD_SRC_DIR)/wlan_hdd_scan.o \
138 $(HDD_SRC_DIR)/wlan_hdd_softap_tx_rx.o \
139 $(HDD_SRC_DIR)/wlan_hdd_tx_rx.o \
140 $(HDD_SRC_DIR)/wlan_hdd_trace.o \
141 $(HDD_SRC_DIR)/wlan_hdd_wext.o \
142 $(HDD_SRC_DIR)/wlan_hdd_wmm.o \
143 $(HDD_SRC_DIR)/wlan_hdd_wowl.o
144
145ifeq ($(HAVE_CFG80211),1)
146HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_cfg80211.o \
147 $(HDD_SRC_DIR)/wlan_hdd_p2p.o
148endif
149
150ifeq ($(CONFIG_QCOM_TDLS),y)
151HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_tdls.o
152endif
153
154############ MAC ############
155MAC_DIR := CORE/MAC
156MAC_INC_DIR := $(MAC_DIR)/inc
157MAC_SRC_DIR := $(MAC_DIR)/src
158
159MAC_INC := -I$(WLAN_ROOT)/$(MAC_INC_DIR) \
160 -I$(WLAN_ROOT)/$(MAC_SRC_DIR)/dph \
161 -I$(WLAN_ROOT)/$(MAC_SRC_DIR)/include \
162 -I$(WLAN_ROOT)/$(MAC_SRC_DIR)/pe/include \
163 -I$(WLAN_ROOT)/$(MAC_SRC_DIR)/pe/lim
164
165MAC_CFG_OBJS := $(MAC_SRC_DIR)/cfg/cfgApi.o \
166 $(MAC_SRC_DIR)/cfg/cfgDebug.o \
167 $(MAC_SRC_DIR)/cfg/cfgParamName.o \
168 $(MAC_SRC_DIR)/cfg/cfgProcMsg.o \
169 $(MAC_SRC_DIR)/cfg/cfgSendMsg.o
170
171MAC_DPH_OBJS := $(MAC_SRC_DIR)/dph/dphHashTable.o
172
173MAC_LIM_OBJS := $(MAC_SRC_DIR)/pe/lim/limAIDmgmt.o \
174 $(MAC_SRC_DIR)/pe/lim/limAdmitControl.o \
175 $(MAC_SRC_DIR)/pe/lim/limApi.o \
176 $(MAC_SRC_DIR)/pe/lim/limAssocUtils.o \
177 $(MAC_SRC_DIR)/pe/lim/limDebug.o \
178 $(MAC_SRC_DIR)/pe/lim/limFT.o \
179 $(MAC_SRC_DIR)/pe/lim/limIbssPeerMgmt.o \
180 $(MAC_SRC_DIR)/pe/lim/limLinkMonitoringAlgo.o \
181 $(MAC_SRC_DIR)/pe/lim/limLogDump.o \
182 $(MAC_SRC_DIR)/pe/lim/limP2P.o \
183 $(MAC_SRC_DIR)/pe/lim/limProcessActionFrame.o \
184 $(MAC_SRC_DIR)/pe/lim/limProcessAssocReqFrame.o \
185 $(MAC_SRC_DIR)/pe/lim/limProcessAssocRspFrame.o \
186 $(MAC_SRC_DIR)/pe/lim/limProcessAuthFrame.o \
187 $(MAC_SRC_DIR)/pe/lim/limProcessBeaconFrame.o \
188 $(MAC_SRC_DIR)/pe/lim/limProcessCfgUpdates.o \
189 $(MAC_SRC_DIR)/pe/lim/limProcessDeauthFrame.o \
190 $(MAC_SRC_DIR)/pe/lim/limProcessDisassocFrame.o \
191 $(MAC_SRC_DIR)/pe/lim/limProcessLmmMessages.o \
192 $(MAC_SRC_DIR)/pe/lim/limProcessMessageQueue.o \
193 $(MAC_SRC_DIR)/pe/lim/limProcessMlmReqMessages.o \
194 $(MAC_SRC_DIR)/pe/lim/limProcessMlmRspMessages.o \
195 $(MAC_SRC_DIR)/pe/lim/limProcessProbeReqFrame.o \
196 $(MAC_SRC_DIR)/pe/lim/limProcessProbeRspFrame.o \
197 $(MAC_SRC_DIR)/pe/lim/limProcessSmeReqMessages.o \
198 $(MAC_SRC_DIR)/pe/lim/limPropExtsUtils.o \
199 $(MAC_SRC_DIR)/pe/lim/limRoamingAlgo.o \
200 $(MAC_SRC_DIR)/pe/lim/limScanResultUtils.o \
201 $(MAC_SRC_DIR)/pe/lim/limSecurityUtils.o \
202 $(MAC_SRC_DIR)/pe/lim/limSendManagementFrames.o \
203 $(MAC_SRC_DIR)/pe/lim/limSendMessages.o \
204 $(MAC_SRC_DIR)/pe/lim/limSendSmeRspMessages.o \
205 $(MAC_SRC_DIR)/pe/lim/limSerDesUtils.o \
206 $(MAC_SRC_DIR)/pe/lim/limSession.o \
207 $(MAC_SRC_DIR)/pe/lim/limSessionUtils.o \
208 $(MAC_SRC_DIR)/pe/lim/limSmeReqUtils.o \
209 $(MAC_SRC_DIR)/pe/lim/limStaHashApi.o \
210 $(MAC_SRC_DIR)/pe/lim/limTimerUtils.o \
211 $(MAC_SRC_DIR)/pe/lim/limTrace.o \
212 $(MAC_SRC_DIR)/pe/lim/limUtils.o
213
214ifeq ($(CONFIG_QCOM_ESE),y)
215ifneq ($(CONFIG_QCOM_ESE_UPLOAD),y)
216MAC_LIM_OBJS += $(MAC_SRC_DIR)/pe/lim/limProcessEseFrame.o
217endif
218endif
219
220ifeq ($(CONFIG_QCOM_TDLS),y)
221MAC_LIM_OBJS += $(MAC_SRC_DIR)/pe/lim/limProcessTdls.o
222endif
223
224MAC_PMM_OBJS := $(MAC_SRC_DIR)/pe/pmm/pmmAP.o \
225 $(MAC_SRC_DIR)/pe/pmm/pmmApi.o \
226 $(MAC_SRC_DIR)/pe/pmm/pmmDebug.o
227
228MAC_SCH_OBJS := $(MAC_SRC_DIR)/pe/sch/schApi.o \
229 $(MAC_SRC_DIR)/pe/sch/schBeaconGen.o \
230 $(MAC_SRC_DIR)/pe/sch/schBeaconProcess.o \
231 $(MAC_SRC_DIR)/pe/sch/schDebug.o \
232 $(MAC_SRC_DIR)/pe/sch/schMessage.o
233
234MAC_RRM_OBJS := $(MAC_SRC_DIR)/pe/rrm/rrmApi.o
235
236MAC_OBJS := $(MAC_CFG_OBJS) \
237 $(MAC_DPH_OBJS) \
238 $(MAC_LIM_OBJS) \
239 $(MAC_PMM_OBJS) \
240 $(MAC_SCH_OBJS) \
241 $(MAC_RRM_OBJS)
242
243############ SAP ############
244SAP_DIR := CORE/SAP
245SAP_INC_DIR := $(SAP_DIR)/inc
246SAP_SRC_DIR := $(SAP_DIR)/src
247
248SAP_INC := -I$(WLAN_ROOT)/$(SAP_INC_DIR) \
249 -I$(WLAN_ROOT)/$(SAP_SRC_DIR)
250
251SAP_OBJS := $(SAP_SRC_DIR)/sapApiLinkCntl.o \
252 $(SAP_SRC_DIR)/sapChSelect.o \
253 $(SAP_SRC_DIR)/sapFsm.o \
254 $(SAP_SRC_DIR)/sapModule.o
255
256############ SME ############
257SME_DIR := CORE/SME
258SME_INC_DIR := $(SME_DIR)/inc
259SME_SRC_DIR := $(SME_DIR)/src
260
261SME_INC := -I$(WLAN_ROOT)/$(SME_INC_DIR) \
262 -I$(WLAN_ROOT)/$(SME_SRC_DIR)/csr
263
264SME_CCM_OBJS := $(SME_SRC_DIR)/ccm/ccmApi.o \
265 $(SME_SRC_DIR)/ccm/ccmLogDump.o
266
267SME_CSR_OBJS := $(SME_SRC_DIR)/csr/csrApiRoam.o \
268 $(SME_SRC_DIR)/csr/csrApiScan.o \
269 $(SME_SRC_DIR)/csr/csrCmdProcess.o \
270 $(SME_SRC_DIR)/csr/csrLinkList.o \
271 $(SME_SRC_DIR)/csr/csrLogDump.o \
272 $(SME_SRC_DIR)/csr/csrNeighborRoam.o \
273 $(SME_SRC_DIR)/csr/csrUtil.o
274
275ifeq ($(CONFIG_QCOM_ESE),y)
276ifneq ($(CONFIG_QCOM_ESE_UPLOAD),y)
277SME_CSR_OBJS += $(SME_SRC_DIR)/csr/csrEse.o
278endif
279endif
280
281ifeq ($(CONFIG_QCOM_TDLS),y)
282SME_CSR_OBJS += $(SME_SRC_DIR)/csr/csrTdlsProcess.o
283endif
284
285SME_PMC_OBJS := $(SME_SRC_DIR)/pmc/pmcApi.o \
286 $(SME_SRC_DIR)/pmc/pmc.o \
287 $(SME_SRC_DIR)/pmc/pmcLogDump.o
288
289SME_QOS_OBJS := $(SME_SRC_DIR)/QoS/sme_Qos.o
290
291SME_CMN_OBJS := $(SME_SRC_DIR)/sme_common/sme_Api.o \
292 $(SME_SRC_DIR)/sme_common/sme_FTApi.o \
293 $(SME_SRC_DIR)/sme_common/sme_Trace.o
294
295SME_BTC_OBJS := $(SME_SRC_DIR)/btc/btcApi.o
296
297SME_OEM_DATA_OBJS := $(SME_SRC_DIR)/oemData/oemDataApi.o
298
299SME_P2P_OBJS = $(SME_SRC_DIR)/p2p/p2p_Api.o
300
301SME_RRM_OBJS := $(SME_SRC_DIR)/rrm/sme_rrm.o
302
303SME_NAN_OBJS = $(SME_SRC_DIR)/nan/nan_Api.o
304
305
306SME_OBJS := $(SME_BTC_OBJS) \
307 $(SME_CCM_OBJS) \
308 $(SME_CMN_OBJS) \
309 $(SME_CSR_OBJS) \
310 $(SME_OEM_DATA_OBJS) \
311 $(SME_P2P_OBJS) \
312 $(SME_PMC_OBJS) \
313 $(SME_QOS_OBJS) \
314 $(SME_RRM_OBJS) \
315 $(SME_NAN_OBJS)
316
317############ SVC ############
318SVC_DIR := CORE/SVC
319SVC_INC_DIR := $(SVC_DIR)/inc
320SVC_SRC_DIR := $(SVC_DIR)/src
321
322SVC_INC := -I$(WLAN_ROOT)/$(SVC_INC_DIR) \
323 -I$(WLAN_ROOT)/$(SVC_DIR)/external
324
325BTC_SRC_DIR := $(SVC_SRC_DIR)/btc
326BTC_OBJS := $(BTC_SRC_DIR)/wlan_btc_svc.o
327
328NLINK_SRC_DIR := $(SVC_SRC_DIR)/nlink
329NLINK_OBJS := $(NLINK_SRC_DIR)/wlan_nlink_srv.o
330
331PTT_SRC_DIR := $(SVC_SRC_DIR)/ptt
332PTT_OBJS := $(PTT_SRC_DIR)/wlan_ptt_sock_svc.o
333
334WLAN_LOGGING_SRC_DIR := $(SVC_SRC_DIR)/logging
335WLAN_LOGGING_OBJS := $(WLAN_LOGGING_SRC_DIR)/wlan_logging_sock_svc.o
336
337SVC_OBJS := $(BTC_OBJS) \
338 $(NLINK_OBJS) \
339 $(PTT_OBJS) \
340 $(WLAN_LOGGING_OBJS)
341
342############ SYS ############
343SYS_DIR := CORE/SYS
344
345SYS_INC := -I$(WLAN_ROOT)/$(SYS_DIR)/common/inc \
346 -I$(WLAN_ROOT)/$(SYS_DIR)/legacy/src/pal/inc \
347 -I$(WLAN_ROOT)/$(SYS_DIR)/legacy/src/platform/inc \
348 -I$(WLAN_ROOT)/$(SYS_DIR)/legacy/src/system/inc \
349 -I$(WLAN_ROOT)/$(SYS_DIR)/legacy/src/utils/inc
350
351SYS_COMMON_SRC_DIR := $(SYS_DIR)/common/src
352SYS_LEGACY_SRC_DIR := $(SYS_DIR)/legacy/src
353SYS_OBJS := $(SYS_COMMON_SRC_DIR)/wlan_qct_sys.o \
354 $(SYS_LEGACY_SRC_DIR)/pal/src/palApiComm.o \
355 $(SYS_LEGACY_SRC_DIR)/pal/src/palTimer.o \
356 $(SYS_LEGACY_SRC_DIR)/platform/src/VossWrapper.o \
357 $(SYS_LEGACY_SRC_DIR)/system/src/macInitApi.o \
358 $(SYS_LEGACY_SRC_DIR)/system/src/sysEntryFunc.o \
359 $(SYS_LEGACY_SRC_DIR)/utils/src/dot11f.o \
360 $(SYS_LEGACY_SRC_DIR)/utils/src/logApi.o \
361 $(SYS_LEGACY_SRC_DIR)/utils/src/logDump.o \
362 $(SYS_LEGACY_SRC_DIR)/utils/src/macTrace.o \
363 $(SYS_LEGACY_SRC_DIR)/utils/src/parserApi.o \
364 $(SYS_LEGACY_SRC_DIR)/utils/src/utilsApi.o \
365 $(SYS_LEGACY_SRC_DIR)/utils/src/utilsParser.o
366
367############ TL ############
368TL_DIR := CORE/TL
369TL_INC_DIR := $(TL_DIR)/inc
370TL_SRC_DIR := $(TL_DIR)/src
371
372TL_INC := -I$(WLAN_ROOT)/$(TL_INC_DIR) \
373 -I$(WLAN_ROOT)/$(TL_SRC_DIR)
374
375TL_OBJS := $(TL_SRC_DIR)/wlan_qct_tl.o \
376 $(TL_SRC_DIR)/wlan_qct_tl_ba.o \
377 $(TL_SRC_DIR)/wlan_qct_tl_hosupport.o \
378 $(TL_SRC_DIR)/wlan_qct_tl_trace.o
379
380############ VOSS ############
381VOSS_DIR := CORE/VOSS
382VOSS_INC_DIR := $(VOSS_DIR)/inc
383VOSS_SRC_DIR := $(VOSS_DIR)/src
384
385VOSS_INC := -I$(WLAN_ROOT)/$(VOSS_INC_DIR) \
386 -I$(WLAN_ROOT)/$(VOSS_SRC_DIR)
387
388VOSS_OBJS := $(VOSS_SRC_DIR)/vos_api.o \
389 $(VOSS_SRC_DIR)/vos_event.o \
390 $(VOSS_SRC_DIR)/vos_getBin.o \
391 $(VOSS_SRC_DIR)/vos_list.o \
392 $(VOSS_SRC_DIR)/vos_lock.o \
393 $(VOSS_SRC_DIR)/vos_memory.o \
394 $(VOSS_SRC_DIR)/vos_mq.o \
395 $(VOSS_SRC_DIR)/vos_nvitem.o \
396 $(VOSS_SRC_DIR)/vos_packet.o \
397 $(VOSS_SRC_DIR)/vos_sched.o \
398 $(VOSS_SRC_DIR)/vos_threads.o \
399 $(VOSS_SRC_DIR)/vos_timer.o \
400 $(VOSS_SRC_DIR)/vos_trace.o \
401 $(VOSS_SRC_DIR)/vos_types.o \
402 $(VOSS_SRC_DIR)/vos_utils.o \
403 $(VOSS_SRC_DIR)/wlan_nv_parser.o \
404 $(VOSS_SRC_DIR)/wlan_nv_stream_read.o \
405 $(VOSS_SRC_DIR)/wlan_nv_template_builtin.o
406
407ifeq ($(BUILD_DIAG_VERSION),1)
408VOSS_OBJS += $(VOSS_SRC_DIR)/vos_diag.o
409endif
410
411############ WDA ############
412WDA_DIR := CORE/WDA
413WDA_INC_DIR := $(WDA_DIR)/inc
414WDA_SRC_DIR := $(WDA_DIR)/src
415
416WDA_INC := -I$(WLAN_ROOT)/$(WDA_INC_DIR) \
417 -I$(WLAN_ROOT)/$(WDA_INC_DIR)/legacy \
418 -I$(WLAN_ROOT)/$(WDA_SRC_DIR)
419
420WDA_OBJS := $(WDA_SRC_DIR)/wlan_qct_wda.o \
421 $(WDA_SRC_DIR)/wlan_qct_wda_debug.o \
422 $(WDA_SRC_DIR)/wlan_qct_wda_ds.o \
423 $(WDA_SRC_DIR)/wlan_qct_wda_legacy.o \
424 $(WDA_SRC_DIR)/wlan_nv.o
425
426############ WDI ############
427WDI_DIR := CORE/WDI
428
429WDI_CP_INC := -I$(WLAN_ROOT)/$(WDI_DIR)/CP/inc/
430
431WDI_CP_SRC_DIR := $(WDI_DIR)/CP/src
432WDI_CP_OBJS := $(WDI_CP_SRC_DIR)/wlan_qct_wdi.o \
433 $(WDI_CP_SRC_DIR)/wlan_qct_wdi_dp.o \
434 $(WDI_CP_SRC_DIR)/wlan_qct_wdi_sta.o
435
436WDI_DP_INC := -I$(WLAN_ROOT)/$(WDI_DIR)/DP/inc/
437
438WDI_DP_SRC_DIR := $(WDI_DIR)/DP/src
439WDI_DP_OBJS := $(WDI_DP_SRC_DIR)/wlan_qct_wdi_bd.o \
440 $(WDI_DP_SRC_DIR)/wlan_qct_wdi_ds.o
441
442WDI_TRP_INC := -I$(WLAN_ROOT)/$(WDI_DIR)/TRP/CTS/inc/ \
443 -I$(WLAN_ROOT)/$(WDI_DIR)/TRP/DTS/inc/
444
445WDI_TRP_CTS_SRC_DIR := $(WDI_DIR)/TRP/CTS/src
446WDI_TRP_CTS_OBJS := $(WDI_TRP_CTS_SRC_DIR)/wlan_qct_wdi_cts.o
447
448WDI_TRP_DTS_SRC_DIR := $(WDI_DIR)/TRP/DTS/src
449WDI_TRP_DTS_OBJS := $(WDI_TRP_DTS_SRC_DIR)/wlan_qct_wdi_dts.o
450
451WDI_TRP_OBJS := $(WDI_TRP_CTS_OBJS) \
452 $(WDI_TRP_DTS_OBJS)
453
454WDI_WPAL_INC := -I$(WLAN_ROOT)/$(WDI_DIR)/WPAL/inc
455
456WDI_WPAL_SRC_DIR := $(WDI_DIR)/WPAL/src
457WDI_WPAL_OBJS := $(WDI_WPAL_SRC_DIR)/wlan_qct_pal_api.o \
458 $(WDI_WPAL_SRC_DIR)/wlan_qct_pal_device.o \
459 $(WDI_WPAL_SRC_DIR)/wlan_qct_pal_msg.o \
460 $(WDI_WPAL_SRC_DIR)/wlan_qct_pal_packet.o \
461 $(WDI_WPAL_SRC_DIR)/wlan_qct_pal_sync.o \
462 $(WDI_WPAL_SRC_DIR)/wlan_qct_pal_timer.o \
463 $(WDI_WPAL_SRC_DIR)/wlan_qct_pal_trace.o
464
465WDI_INC := $(WDI_CP_INC) \
466 $(WDI_DP_INC) \
467 $(WDI_TRP_INC) \
468 $(WDI_WPAL_INC)
469
470WDI_OBJS := $(WDI_CP_OBJS) \
471 $(WDI_DP_OBJS) \
472 $(WDI_TRP_OBJS) \
473 $(WDI_WPAL_OBJS)
474
475
476RIVA_INC := -I$(WLAN_ROOT)/riva/inc
477
478LINUX_INC := -Iinclude/linux
479
480INCS := $(BAP_INC) \
481 $(DXE_INC) \
482 $(HDD_INC) \
483 $(LINUX_INC) \
484 $(MAC_INC) \
485 $(RIVA_INC) \
486 $(SAP_INC) \
487 $(SME_INC) \
488 $(SVC_INC) \
489 $(SYS_INC) \
490 $(TL_INC) \
491 $(VOSS_INC) \
492 $(WDA_INC) \
493 $(WDI_INC)
494
495OBJS := $(BAP_OBJS) \
496 $(DXE_OBJS) \
497 $(HDD_OBJS) \
498 $(MAC_OBJS) \
499 $(SAP_OBJS) \
500 $(SME_OBJS) \
501 $(SVC_OBJS) \
502 $(SYS_OBJS) \
503 $(TL_OBJS) \
504 $(VOSS_OBJS) \
505 $(WDA_OBJS) \
506 $(WDI_OBJS)
507
508EXTRA_CFLAGS += $(INCS)
509EXTRA_CFLAGS += -fno-pic
510
511CDEFINES := -DANI_BUS_TYPE_PLATFORM=1 \
512 -DANI_LITTLE_BYTE_ENDIAN \
513 -DANI_LITTLE_BIT_ENDIAN \
514 -DQC_WLAN_CHIPSET_PRIMA \
515 -DINTEGRATION_READY \
516 -DDOT11F_LITTLE_ENDIAN_HOST \
517 -DGEN6_ONWARDS \
518 -DANI_COMPILER_TYPE_GCC \
519 -DANI_OS_TYPE_ANDROID=6 \
520 -DANI_LOGDUMP \
521 -DWLAN_PERF \
522 -DPTT_SOCK_SVC_ENABLE \
523 -Wall\
524 -D__linux__ \
525 -DMSM_PLATFORM \
526 -DHAL_SELF_STA_PER_BSS=1 \
527 -DWLAN_FEATURE_VOWIFI_11R \
528 -DWLAN_FEATURE_NEIGHBOR_ROAMING \
529 -DWLAN_FEATURE_NEIGHBOR_ROAMING_DEBUG \
530 -DWLAN_FEATURE_VOWIFI_11R_DEBUG \
531 -DFEATURE_WLAN_WAPI \
532 -DFEATURE_OEM_DATA_SUPPORT\
533 -DSOFTAP_CHANNEL_RANGE \
534 -DWLAN_AP_STA_CONCURRENCY \
535 -DFEATURE_WLAN_SCAN_PNO \
536 -DWLAN_FEATURE_PACKET_FILTERING \
537 -DWLAN_FEATURE_VOWIFI \
538 -DWLAN_FEATURE_11AC \
539 -DWLAN_FEATURE_P2P_DEBUG \
540 -DWLAN_ENABLE_AGEIE_ON_SCAN_RESULTS \
541 -DWLANTL_DEBUG\
542 -DWLAN_NS_OFFLOAD \
543 -DWLAN_ACTIVEMODE_OFFLOAD_FEATURE \
544 -DWLAN_FEATURE_HOLD_RX_WAKELOCK \
545 -DWLAN_SOFTAP_VSTA_FEATURE \
546 -DWLAN_FEATURE_ROAM_SCAN_OFFLOAD \
547 -DWLAN_FEATURE_GTK_OFFLOAD \
548 -DWLAN_WAKEUP_EVENTS \
549 -DWLAN_KD_READY_NOTIFIER \
550 -DWLAN_NL80211_TESTMODE \
551 -DFEATURE_WLAN_BATCH_SCAN \
552 -DFEATURE_WLAN_LPHB \
553 -DFEATURE_WLAN_PAL_TIMER_DISABLE \
554 -DFEATURE_WLAN_PAL_MEM_DISABLE \
555 -DFEATURE_WLAN_CH144 \
556 -DWLAN_BUG_ON_SKB_ERROR \
557 -DWLAN_DXE_LOW_RESOURCE_TIMER \
558 -DWLAN_LOGGING_SOCK_SVC_ENABLE \
559 -DWLAN_FEATURE_LINK_LAYER_STATS \
560 -DWLAN_FEATURE_EXTSCAN
561
562ifneq ($(CONFIG_PRONTO_WLAN),)
563CDEFINES += -DWCN_PRONTO
564CDEFINES += -DWCN_PRONTO_V1
565endif
566
567ifeq ($(BUILD_DEBUG_VERSION),1)
568CDEFINES += -DWLAN_DEBUG \
569 -DTRACE_RECORD \
570 -DLIM_TRACE_RECORD \
571 -DSME_TRACE_RECORD \
572 -DPE_DEBUG_LOGW \
573 -DPE_DEBUG_LOGE \
574 -DDEBUG
575endif
576
577ifeq ($(CONFIG_SLUB_DEBUG_ON),y)
578CDEFINES += -DTIMER_MANAGER
579CDEFINES += -DMEMORY_DEBUG
580endif
581
582ifeq ($(HAVE_CFG80211),1)
583CDEFINES += -DWLAN_FEATURE_P2P
584CDEFINES += -DWLAN_FEATURE_WFD
585ifeq ($(CONFIG_QCOM_VOWIFI_11R),y)
586CDEFINES += -DKERNEL_SUPPORT_11R_CFG80211
587CDEFINES += -DUSE_80211_WMMTSPEC_FOR_RIC
588endif
589endif
590
591ifeq ($(CONFIG_QCOM_ESE),y)
592CDEFINES += -DFEATURE_WLAN_ESE
593ifeq ($(CONFIG_QCOM_ESE_UPLOAD),y)
594CDEFINES += -DFEATURE_WLAN_ESE_UPLOAD
595endif
596endif
597
598#normally, TDLS negative behavior is not needed
599ifeq ($(CONFIG_QCOM_TDLS),y)
600CDEFINES += -DFEATURE_WLAN_TDLS
601CDEFINES += -DCONFIG_TDLS_IMPLICIT
602endif
603
604ifeq ($(CONFIG_PRIMA_WLAN_BTAMP),y)
605CDEFINES += -DWLAN_BTAMP_FEATURE
606endif
607
608ifeq ($(CONFIG_PRIMA_WLAN_LFR),y)
609CDEFINES += -DFEATURE_WLAN_LFR
610endif
611
612ifeq ($(CONFIG_PRIMA_WLAN_OKC),y)
613CDEFINES += -DFEATURE_WLAN_OKC
614endif
615
616ifeq ($(CONFIG_PRIMA_WLAN_11AC_HIGH_TP),y)
617CDEFINES += -DWLAN_FEATURE_11AC_HIGH_TP
618endif
619
620ifeq ($(BUILD_DIAG_VERSION),1)
621CDEFINES += -DFEATURE_WLAN_DIAG_SUPPORT
622CDEFINES += -DFEATURE_WLAN_DIAG_SUPPORT_CSR
623CDEFINES += -DFEATURE_WLAN_DIAG_SUPPORT_LIM
624endif
625
626# enable the MAC Address auto-generation feature
627CDEFINES += -DWLAN_AUTOGEN_MACADDR_FEATURE
628
629ifeq ($(CONFIG_WLAN_FEATURE_11W),y)
630CDEFINES += -DWLAN_FEATURE_11W
631endif
632
633ifeq ($(PANIC_ON_BUG),1)
634CDEFINES += -DPANIC_ON_BUG
635endif
636
637ifeq ($(RE_ENABLE_WIFI_ON_WDI_TIMEOUT),1)
638CDEFINES += -DWDI_RE_ENABLE_WIFI_ON_WDI_TIMEOUT
639endif
640
641ifeq ($(KERNEL_BUILD),1)
642CDEFINES += -DWLAN_OPEN_SOURCE
643endif
644
645ifeq ($(findstring opensource, $(WLAN_ROOT)), opensource)
646CDEFINES += -DWLAN_OPEN_SOURCE
647endif
648
649ifeq ($(CONFIG_ENABLE_LINUX_REG), y)
650CDEFINES += -DCONFIG_ENABLE_LINUX_REG
651endif
652
653CDEFINES += -DFEATURE_WLAN_CH_AVOID
654CDEFINES += -DWLAN_FEATURE_AP_HT40_24G
655
656# Some kernel include files are being moved. Check to see if
657# the old version of the files are present
658
659ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/mach-msm/include/mach/msm_smd.h),)
660CDEFINES += -DEXISTS_MSM_SMD
661endif
662
663ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/mach-msm/include/mach/msm_smsm.h),)
664CDEFINES += -DEXISTS_MSM_SMSM
665endif
666
667# Fix build for GCC 4.7
668EXTRA_CFLAGS += -Wno-maybe-uninitialized -Wno-unused-function
669
670KBUILD_CPPFLAGS += $(CDEFINES)
671
672# Module information used by KBuild framework
673obj-$(CONFIG_PRIMA_WLAN) += $(MODNAME).o
674obj-$(CONFIG_PRONTO_WLAN) += $(MODNAME).o
675$(MODNAME)-y := $(OBJS)