blob: d04c9042bab301d81fe75fb7c18ab7f1ccbd9ecd [file] [log] [blame]
Jeff Johnson2c24a3b2012-12-10 12:28:11 -08001# 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
Jeff Johnson91a420a2012-12-16 11:16:18 -080013 WLAN_ROOT := drivers/staging/prima
Jeff Johnson2c24a3b2012-12-10 12:28:11 -080014endif
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
Jeff Johnson2c24a3b2012-12-10 12:28:11 -080020 #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
Kiran Venkatappad52a3c72012-12-27 17:25:33 -080031
32 #Flag to enable TDLS feature
33 CONFIG_QCOM_TDLS := y
Jeff Johnson2c24a3b2012-12-10 12:28:11 -080034endif
35
36# Feature flags which are not (currently) configurable via Kconfig
37
Jeff Johnson25abf4d2012-12-01 12:42:42 -080038#Whether to build debug version
39BUILD_DEBUG_VERSION := 1
40
41#Enable this flag to build driver in diag version
42BUILD_DIAG_VERSION := 0
Jeff Johnson25abf4d2012-12-01 12:42:42 -080043
44#Do we panic on bug? default is to warn
45PANIC_ON_BUG := 0
46
47#Re-enable wifi on WDI timeout
48RE_ENABLE_WIFI_ON_WDI_TIMEOUT := 0
49
Jeff Johnson25abf4d2012-12-01 12:42:42 -080050
51ifeq ($(CONFIG_CFG80211),y)
52HAVE_CFG80211 := 1
53else
54ifeq ($(CONFIG_CFG80211),m)
55HAVE_CFG80211 := 1
56EXTRA_CFLAGS += -DCONFIG_CFG80211=1
57else
58HAVE_CFG80211 := 0
59endif
60endif
61
Jeff Johnson2c24a3b2012-12-10 12:28:11 -080062############ BAP ############
63BAP_DIR := CORE/BAP
64BAP_INC_DIR := $(BAP_DIR)/inc
65BAP_SRC_DIR := $(BAP_DIR)/src
66
Jeff Johnson91a420a2012-12-16 11:16:18 -080067BAP_INC := -I$(WLAN_ROOT)/$(BAP_INC_DIR) \
68 -I$(WLAN_ROOT)/$(BAP_SRC_DIR)
Jeff Johnson2c24a3b2012-12-10 12:28:11 -080069
70BAP_OBJS := $(BAP_SRC_DIR)/bapApiData.o \
71 $(BAP_SRC_DIR)/bapApiDebug.o \
72 $(BAP_SRC_DIR)/bapApiExt.o \
73 $(BAP_SRC_DIR)/bapApiHCBB.o \
74 $(BAP_SRC_DIR)/bapApiInfo.o \
75 $(BAP_SRC_DIR)/bapApiLinkCntl.o \
76 $(BAP_SRC_DIR)/bapApiLinkSupervision.o \
77 $(BAP_SRC_DIR)/bapApiStatus.o \
78 $(BAP_SRC_DIR)/bapApiTimer.o \
79 $(BAP_SRC_DIR)/bapModule.o \
80 $(BAP_SRC_DIR)/bapRsn8021xAuthFsm.o \
81 $(BAP_SRC_DIR)/bapRsn8021xPrf.o \
82 $(BAP_SRC_DIR)/bapRsn8021xSuppRsnFsm.o \
83 $(BAP_SRC_DIR)/bapRsnAsfPacket.o \
84 $(BAP_SRC_DIR)/bapRsnSsmAesKeyWrap.o \
85 $(BAP_SRC_DIR)/bapRsnSsmEapol.o \
86 $(BAP_SRC_DIR)/bapRsnSsmReplayCtr.o \
87 $(BAP_SRC_DIR)/bapRsnTxRx.o \
88 $(BAP_SRC_DIR)/btampFsm.o \
89 $(BAP_SRC_DIR)/btampHCI.o
90
91############ DXE ############
92DXE_DIR := CORE/DXE
93DXE_INC_DIR := $(DXE_DIR)/inc
94DXE_SRC_DIR := $(DXE_DIR)/src
95
Jeff Johnson91a420a2012-12-16 11:16:18 -080096DXE_INC := -I$(WLAN_ROOT)/$(DXE_INC_DIR) \
97 -I$(WLAN_ROOT)/$(DXE_SRC_DIR)
Jeff Johnson2c24a3b2012-12-10 12:28:11 -080098
99DXE_OBJS = $(DXE_SRC_DIR)/wlan_qct_dxe.o \
100 $(DXE_SRC_DIR)/wlan_qct_dxe_cfg_i.o
101
102############ HDD ############
103HDD_DIR := CORE/HDD
104HDD_INC_DIR := $(HDD_DIR)/inc
105HDD_SRC_DIR := $(HDD_DIR)/src
106
Jeff Johnson91a420a2012-12-16 11:16:18 -0800107HDD_INC := -I$(WLAN_ROOT)/$(HDD_INC_DIR) \
108 -I$(WLAN_ROOT)/$(HDD_SRC_DIR)
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800109
110HDD_OBJS := $(HDD_SRC_DIR)/bap_hdd_main.o \
111 $(HDD_SRC_DIR)/wlan_hdd_assoc.o \
112 $(HDD_SRC_DIR)/wlan_hdd_cfg.o \
113 $(HDD_SRC_DIR)/wlan_hdd_dev_pwr.o \
114 $(HDD_SRC_DIR)/wlan_hdd_dp_utils.o \
115 $(HDD_SRC_DIR)/wlan_hdd_early_suspend.o \
116 $(HDD_SRC_DIR)/wlan_hdd_ftm.o \
117 $(HDD_SRC_DIR)/wlan_hdd_hostapd.o \
118 $(HDD_SRC_DIR)/wlan_hdd_oemdata.o \
119 $(HDD_SRC_DIR)/wlan_hdd_main.o \
120 $(HDD_SRC_DIR)/wlan_hdd_mib.o \
121 $(HDD_SRC_DIR)/wlan_hdd_scan.o \
122 $(HDD_SRC_DIR)/wlan_hdd_softap_tx_rx.o \
123 $(HDD_SRC_DIR)/wlan_hdd_tx_rx.o \
124 $(HDD_SRC_DIR)/wlan_hdd_wext.o \
125 $(HDD_SRC_DIR)/wlan_hdd_wmm.o \
126 $(HDD_SRC_DIR)/wlan_hdd_wowl.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800127
128ifeq ($(HAVE_CFG80211),1)
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800129HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_cfg80211.o \
130 $(HDD_SRC_DIR)/wlan_hdd_p2p.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800131endif
132
133ifeq ($(CONFIG_QCOM_TDLS),y)
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800134HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_tdls.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800135endif
136
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800137############ MAC ############
138MAC_DIR := CORE/MAC
139MAC_INC_DIR := $(MAC_DIR)/inc
140MAC_SRC_DIR := $(MAC_DIR)/src
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800141
Jeff Johnson91a420a2012-12-16 11:16:18 -0800142MAC_INC := -I$(WLAN_ROOT)/$(MAC_INC_DIR) \
143 -I$(WLAN_ROOT)/$(MAC_SRC_DIR)/dph \
144 -I$(WLAN_ROOT)/$(MAC_SRC_DIR)/include \
145 -I$(WLAN_ROOT)/$(MAC_SRC_DIR)/pe/include \
146 -I$(WLAN_ROOT)/$(MAC_SRC_DIR)/pe/lim
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800147
148MAC_CFG_OBJS := $(MAC_SRC_DIR)/cfg/cfgApi.o \
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800149 $(MAC_SRC_DIR)/cfg/cfgDebug.o \
150 $(MAC_SRC_DIR)/cfg/cfgParamName.o \
151 $(MAC_SRC_DIR)/cfg/cfgProcMsg.o \
152 $(MAC_SRC_DIR)/cfg/cfgSendMsg.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800153
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800154MAC_DPH_OBJS := $(MAC_SRC_DIR)/dph/dphHashTable.o
155
156MAC_LIM_OBJS := $(MAC_SRC_DIR)/pe/lim/limAIDmgmt.o \
157 $(MAC_SRC_DIR)/pe/lim/limAdmitControl.o \
158 $(MAC_SRC_DIR)/pe/lim/limApi.o \
159 $(MAC_SRC_DIR)/pe/lim/limAssocUtils.o \
160 $(MAC_SRC_DIR)/pe/lim/limDebug.o \
161 $(MAC_SRC_DIR)/pe/lim/limFT.o \
162 $(MAC_SRC_DIR)/pe/lim/limIbssPeerMgmt.o \
163 $(MAC_SRC_DIR)/pe/lim/limLinkMonitoringAlgo.o \
164 $(MAC_SRC_DIR)/pe/lim/limLogDump.o \
165 $(MAC_SRC_DIR)/pe/lim/limP2P.o \
166 $(MAC_SRC_DIR)/pe/lim/limProcessActionFrame.o \
167 $(MAC_SRC_DIR)/pe/lim/limProcessAssocReqFrame.o \
168 $(MAC_SRC_DIR)/pe/lim/limProcessAssocRspFrame.o \
169 $(MAC_SRC_DIR)/pe/lim/limProcessAuthFrame.o \
170 $(MAC_SRC_DIR)/pe/lim/limProcessBeaconFrame.o \
171 $(MAC_SRC_DIR)/pe/lim/limProcessCfgUpdates.o \
172 $(MAC_SRC_DIR)/pe/lim/limProcessDeauthFrame.o \
173 $(MAC_SRC_DIR)/pe/lim/limProcessDisassocFrame.o \
174 $(MAC_SRC_DIR)/pe/lim/limProcessLmmMessages.o \
175 $(MAC_SRC_DIR)/pe/lim/limProcessMessageQueue.o \
176 $(MAC_SRC_DIR)/pe/lim/limProcessMlmReqMessages.o \
177 $(MAC_SRC_DIR)/pe/lim/limProcessMlmRspMessages.o \
178 $(MAC_SRC_DIR)/pe/lim/limProcessProbeReqFrame.o \
179 $(MAC_SRC_DIR)/pe/lim/limProcessProbeRspFrame.o \
180 $(MAC_SRC_DIR)/pe/lim/limProcessSmeReqMessages.o \
181 $(MAC_SRC_DIR)/pe/lim/limPropExtsUtils.o \
182 $(MAC_SRC_DIR)/pe/lim/limRoamingAlgo.o \
183 $(MAC_SRC_DIR)/pe/lim/limScanResultUtils.o \
184 $(MAC_SRC_DIR)/pe/lim/limSecurityUtils.o \
185 $(MAC_SRC_DIR)/pe/lim/limSendManagementFrames.o \
186 $(MAC_SRC_DIR)/pe/lim/limSendMessages.o \
187 $(MAC_SRC_DIR)/pe/lim/limSendSmeRspMessages.o \
188 $(MAC_SRC_DIR)/pe/lim/limSerDesUtils.o \
189 $(MAC_SRC_DIR)/pe/lim/limSession.o \
190 $(MAC_SRC_DIR)/pe/lim/limSessionUtils.o \
191 $(MAC_SRC_DIR)/pe/lim/limSmeReqUtils.o \
192 $(MAC_SRC_DIR)/pe/lim/limStaHashApi.o \
193 $(MAC_SRC_DIR)/pe/lim/limTimerUtils.o \
194 $(MAC_SRC_DIR)/pe/lim/limTrace.o \
195 $(MAC_SRC_DIR)/pe/lim/limUtils.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800196
197ifeq ($(CONFIG_QCOM_CCX),y)
198MAC_LIM_OBJS += $(MAC_SRC_DIR)/pe/lim/limProcessCcxFrame.o
199endif
200
201ifeq ($(CONFIG_QCOM_TDLS),y)
202MAC_LIM_OBJS += $(MAC_SRC_DIR)/pe/lim/limProcessTdls.o
203endif
204
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800205MAC_PMM_OBJS := $(MAC_SRC_DIR)/pe/pmm/pmmAP.o \
206 $(MAC_SRC_DIR)/pe/pmm/pmmApi.o \
207 $(MAC_SRC_DIR)/pe/pmm/pmmDebug.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800208
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800209MAC_SCH_OBJS := $(MAC_SRC_DIR)/pe/sch/schApi.o \
210 $(MAC_SRC_DIR)/pe/sch/schBeaconGen.o \
211 $(MAC_SRC_DIR)/pe/sch/schBeaconProcess.o \
212 $(MAC_SRC_DIR)/pe/sch/schDebug.o \
213 $(MAC_SRC_DIR)/pe/sch/schMessage.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800214
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800215MAC_RRM_OBJS := $(MAC_SRC_DIR)/pe/rrm/rrmApi.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800216
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800217MAC_OBJS := $(MAC_CFG_OBJS) \
218 $(MAC_DPH_OBJS) \
219 $(MAC_LIM_OBJS) \
220 $(MAC_PMM_OBJS) \
221 $(MAC_SCH_OBJS) \
222 $(MAC_RRM_OBJS)
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800223
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800224############ SAP ############
225SAP_DIR := CORE/SAP
226SAP_INC_DIR := $(SAP_DIR)/inc
227SAP_SRC_DIR := $(SAP_DIR)/src
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800228
Jeff Johnson91a420a2012-12-16 11:16:18 -0800229SAP_INC := -I$(WLAN_ROOT)/$(SAP_INC_DIR) \
230 -I$(WLAN_ROOT)/$(SAP_SRC_DIR)
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800231
232SAP_OBJS := $(SAP_SRC_DIR)/sapApiLinkCntl.o \
233 $(SAP_SRC_DIR)/sapChSelect.o \
234 $(SAP_SRC_DIR)/sapFsm.o \
235 $(SAP_SRC_DIR)/sapModule.o
236
237############ SME ############
238SME_DIR := CORE/SME
239SME_INC_DIR := $(SME_DIR)/inc
240SME_SRC_DIR := $(SME_DIR)/src
241
Jeff Johnson91a420a2012-12-16 11:16:18 -0800242SME_INC := -I$(WLAN_ROOT)/$(SME_INC_DIR) \
243 -I$(WLAN_ROOT)/$(SME_SRC_DIR)/csr
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800244
245SME_CCM_OBJS := $(SME_SRC_DIR)/ccm/ccmApi.o \
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800246 $(SME_SRC_DIR)/ccm/ccmLogDump.o
247
248SME_CSR_OBJS := $(SME_SRC_DIR)/csr/csrApiRoam.o \
249 $(SME_SRC_DIR)/csr/csrApiScan.o \
250 $(SME_SRC_DIR)/csr/csrCmdProcess.o \
251 $(SME_SRC_DIR)/csr/csrLinkList.o \
252 $(SME_SRC_DIR)/csr/csrLogDump.o \
253 $(SME_SRC_DIR)/csr/csrNeighborRoam.o \
254 $(SME_SRC_DIR)/csr/csrUtil.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800255
256ifeq ($(CONFIG_QCOM_CCX),y)
Jeff Johnson91a420a2012-12-16 11:16:18 -0800257SME_CSR_OBJS += $(SME_SRC_DIR)/csr/csrCcx.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800258endif
259
260ifeq ($(CONFIG_QCOM_TDLS),y)
261SME_CSR_OBJS += $(SME_SRC_DIR)/csr/csrTdlsProcess.o
262endif
263
264SME_PMC_OBJS := $(SME_SRC_DIR)/pmc/pmcApi.o \
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800265 $(SME_SRC_DIR)/pmc/pmc.o \
266 $(SME_SRC_DIR)/pmc/pmcLogDump.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800267
268SME_QOS_OBJS := $(SME_SRC_DIR)/QoS/sme_Qos.o
269
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800270SME_CMN_OBJS := $(SME_SRC_DIR)/sme_common/sme_Api.o \
271 $(SME_SRC_DIR)/sme_common/sme_FTApi.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800272
273SME_BTC_OBJS := $(SME_SRC_DIR)/btc/btcApi.o
274
275SME_OEM_DATA_OBJS := $(SME_SRC_DIR)/oemData/oemDataApi.o
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800276
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800277SME_P2P_OBJS = $(SME_SRC_DIR)/p2p/p2p_Api.o
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800278
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800279SME_RRM_OBJS := $(SME_SRC_DIR)/rrm/sme_rrm.o
280
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800281SME_OBJS := $(SME_BTC_OBJS) \
282 $(SME_CCM_OBJS) \
283 $(SME_CMN_OBJS) \
284 $(SME_CSR_OBJS) \
285 $(SME_OEM_DATA_OBJS) \
286 $(SME_P2P_OBJS) \
287 $(SME_PMC_OBJS) \
288 $(SME_QOS_OBJS) \
289 $(SME_RRM_OBJS)
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800290
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800291############ SVC ############
292SVC_DIR := CORE/SVC
293SVC_INC_DIR := $(SVC_DIR)/inc
294SVC_SRC_DIR := $(SVC_DIR)/src
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800295
Jeff Johnson91a420a2012-12-16 11:16:18 -0800296SVC_INC := -I$(WLAN_ROOT)/$(SVC_INC_DIR) \
297 -I$(WLAN_ROOT)/$(SVC_DIR)/external
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800298
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800299BTC_SRC_DIR := $(SVC_SRC_DIR)/btc
300BTC_OBJS := $(BTC_SRC_DIR)/wlan_btc_svc.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800301
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800302NLINK_SRC_DIR := $(SVC_SRC_DIR)/nlink
303NLINK_OBJS := $(NLINK_SRC_DIR)/wlan_nlink_srv.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800304
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800305PTT_SRC_DIR := $(SVC_SRC_DIR)/ptt
306PTT_OBJS := $(PTT_SRC_DIR)/wlan_ptt_sock_svc.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800307
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800308SVC_OBJS := $(BTC_OBJS) \
309 $(NLINK_OBJS) \
310 $(PTT_OBJS)
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800311
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800312############ SYS ############
313SYS_DIR := CORE/SYS
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800314
Jeff Johnson91a420a2012-12-16 11:16:18 -0800315SYS_INC := -I$(WLAN_ROOT)/$(SYS_DIR)/common/inc \
316 -I$(WLAN_ROOT)/$(SYS_DIR)/legacy/src/pal/inc \
317 -I$(WLAN_ROOT)/$(SYS_DIR)/legacy/src/platform/inc \
318 -I$(WLAN_ROOT)/$(SYS_DIR)/legacy/src/system/inc \
319 -I$(WLAN_ROOT)/$(SYS_DIR)/legacy/src/utils/inc
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800320
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800321SYS_COMMON_SRC_DIR := $(SYS_DIR)/common/src
322SYS_LEGACY_SRC_DIR := $(SYS_DIR)/legacy/src
323SYS_OBJS := $(SYS_COMMON_SRC_DIR)/wlan_qct_sys.o \
324 $(SYS_LEGACY_SRC_DIR)/pal/src/palApiComm.o \
325 $(SYS_LEGACY_SRC_DIR)/pal/src/palTimer.o \
326 $(SYS_LEGACY_SRC_DIR)/platform/src/VossWrapper.o \
327 $(SYS_LEGACY_SRC_DIR)/system/src/macInitApi.o \
328 $(SYS_LEGACY_SRC_DIR)/system/src/sysEntryFunc.o \
329 $(SYS_LEGACY_SRC_DIR)/system/src/sysWinStartup.o \
330 $(SYS_LEGACY_SRC_DIR)/utils/src/dot11f.o \
331 $(SYS_LEGACY_SRC_DIR)/utils/src/logApi.o \
332 $(SYS_LEGACY_SRC_DIR)/utils/src/logDump.o \
333 $(SYS_LEGACY_SRC_DIR)/utils/src/macTrace.o \
334 $(SYS_LEGACY_SRC_DIR)/utils/src/parserApi.o \
335 $(SYS_LEGACY_SRC_DIR)/utils/src/utilsApi.o \
336 $(SYS_LEGACY_SRC_DIR)/utils/src/utilsParser.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800337
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800338ifeq ($(CONFIG_QCOM_CCX),y)
339SYS_OBJS += $(SYS_LEGACY_SRC_DIR)/utils/src/limCcxparserApi.o
340endif
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800341
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800342############ TL ############
343TL_DIR := CORE/TL
344TL_INC_DIR := $(TL_DIR)/inc
345TL_SRC_DIR := $(TL_DIR)/src
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800346
Jeff Johnson91a420a2012-12-16 11:16:18 -0800347TL_INC := -I$(WLAN_ROOT)/$(TL_INC_DIR) \
348 -I$(WLAN_ROOT)/$(TL_SRC_DIR)
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800349
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800350TL_OBJS := $(TL_SRC_DIR)/wlan_qct_tl.o \
351 $(TL_SRC_DIR)/wlan_qct_tl_ba.o \
352 $(TL_SRC_DIR)/wlan_qct_tl_hosupport.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800353
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800354############ VOSS ############
355VOSS_DIR := CORE/VOSS
356VOSS_INC_DIR := $(VOSS_DIR)/inc
357VOSS_SRC_DIR := $(VOSS_DIR)/src
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800358
Jeff Johnson91a420a2012-12-16 11:16:18 -0800359VOSS_INC := -I$(WLAN_ROOT)/$(VOSS_INC_DIR) \
360 -I$(WLAN_ROOT)/$(VOSS_SRC_DIR)
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800361
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800362VOSS_OBJS := $(VOSS_SRC_DIR)/vos_api.o \
363 $(VOSS_SRC_DIR)/vos_event.o \
364 $(VOSS_SRC_DIR)/vos_getBin.o \
365 $(VOSS_SRC_DIR)/vos_list.o \
366 $(VOSS_SRC_DIR)/vos_lock.o \
367 $(VOSS_SRC_DIR)/vos_memory.o \
368 $(VOSS_SRC_DIR)/vos_mq.o \
369 $(VOSS_SRC_DIR)/vos_nvitem.o \
370 $(VOSS_SRC_DIR)/vos_packet.o \
371 $(VOSS_SRC_DIR)/vos_power.o \
372 $(VOSS_SRC_DIR)/vos_sched.o \
373 $(VOSS_SRC_DIR)/vos_threads.o \
374 $(VOSS_SRC_DIR)/vos_timer.o \
375 $(VOSS_SRC_DIR)/vos_trace.o \
376 $(VOSS_SRC_DIR)/vos_types.o \
377 $(VOSS_SRC_DIR)/vos_utils.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800378
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800379ifeq ($(BUILD_DIAG_VERSION),1)
380VOSS_OBJS += $(VOSS_SRC_DIR)/vos_diag.o
381endif
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800382
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800383############ WDA ############
384WDA_DIR := CORE/WDA
385WDA_INC_DIR := $(WDA_DIR)/inc
386WDA_SRC_DIR := $(WDA_DIR)/src
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800387
Jeff Johnson91a420a2012-12-16 11:16:18 -0800388WDA_INC := -I$(WLAN_ROOT)/$(WDA_INC_DIR) \
389 -I$(WLAN_ROOT)/$(WDA_INC_DIR)/legacy \
390 -I$(WLAN_ROOT)/$(WDA_SRC_DIR)
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800391
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800392WDA_OBJS := $(WDA_SRC_DIR)/wlan_qct_wda.o \
393 $(WDA_SRC_DIR)/wlan_qct_wda_debug.o \
394 $(WDA_SRC_DIR)/wlan_qct_wda_ds.o \
395 $(WDA_SRC_DIR)/wlan_qct_wda_legacy.o \
396 $(WDA_SRC_DIR)/wlan_nv.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800397
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800398############ WDI ############
399WDI_DIR := CORE/WDI
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800400
Jeff Johnson91a420a2012-12-16 11:16:18 -0800401WDI_CP_INC := -I$(WLAN_ROOT)/$(WDI_DIR)/CP/inc/
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800402
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800403WDI_CP_SRC_DIR := $(WDI_DIR)/CP/src
404WDI_CP_OBJS := $(WDI_CP_SRC_DIR)/wlan_qct_wdi.o \
405 $(WDI_CP_SRC_DIR)/wlan_qct_wdi_dp.o \
406 $(WDI_CP_SRC_DIR)/wlan_qct_wdi_sta.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800407
Jeff Johnson91a420a2012-12-16 11:16:18 -0800408WDI_DP_INC := -I$(WLAN_ROOT)/$(WDI_DIR)/DP/inc/
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800409
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800410WDI_DP_SRC_DIR := $(WDI_DIR)/DP/src
411WDI_DP_OBJS := $(WDI_DP_SRC_DIR)/wlan_qct_wdi_bd.o \
412 $(WDI_DP_SRC_DIR)/wlan_qct_wdi_ds.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800413
Jeff Johnson91a420a2012-12-16 11:16:18 -0800414WDI_TRP_INC := -I$(WLAN_ROOT)/$(WDI_DIR)/TRP/CTS/inc/ \
415 -I$(WLAN_ROOT)/$(WDI_DIR)/TRP/DTS/inc/
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800416
417WDI_TRP_CTS_SRC_DIR := $(WDI_DIR)/TRP/CTS/src
Jeff Johnson91a420a2012-12-16 11:16:18 -0800418WDI_TRP_CTS_OBJS := $(WDI_TRP_CTS_SRC_DIR)/wlan_qct_wdi_cts.o
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800419
420WDI_TRP_DTS_SRC_DIR := $(WDI_DIR)/TRP/DTS/src
Jeff Johnson91a420a2012-12-16 11:16:18 -0800421WDI_TRP_DTS_OBJS := $(WDI_TRP_DTS_SRC_DIR)/wlan_qct_wdi_dts.o
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800422
423WDI_TRP_OBJS := $(WDI_TRP_CTS_OBJS) \
424 $(WDI_TRP_DTS_OBJS)
425
Jeff Johnson91a420a2012-12-16 11:16:18 -0800426WDI_WPAL_INC := -I$(WLAN_ROOT)/$(WDI_DIR)/WPAL/inc
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800427
428WDI_WPAL_SRC_DIR := $(WDI_DIR)/WPAL/src
429WDI_WPAL_OBJS := $(WDI_WPAL_SRC_DIR)/wlan_qct_pal_api.o \
430 $(WDI_WPAL_SRC_DIR)/wlan_qct_pal_device.o \
431 $(WDI_WPAL_SRC_DIR)/wlan_qct_pal_msg.o \
432 $(WDI_WPAL_SRC_DIR)/wlan_qct_pal_packet.o \
433 $(WDI_WPAL_SRC_DIR)/wlan_qct_pal_sync.o \
434 $(WDI_WPAL_SRC_DIR)/wlan_qct_pal_timer.o \
435 $(WDI_WPAL_SRC_DIR)/wlan_qct_pal_trace.o
436
437WDI_INC := $(WDI_CP_INC) \
438 $(WDI_DP_INC) \
439 $(WDI_TRP_INC) \
440 $(WDI_WPAL_INC)
441
442WDI_OBJS := $(WDI_CP_OBJS) \
443 $(WDI_DP_OBJS) \
444 $(WDI_TRP_OBJS) \
445 $(WDI_WPAL_OBJS)
446
447
Jeff Johnson91a420a2012-12-16 11:16:18 -0800448RIVA_INC := -I$(WLAN_ROOT)/riva/inc
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800449
450LINUX_INC := -Iinclude/linux
451
452INCS := $(BAP_INC) \
453 $(DXE_INC) \
454 $(HDD_INC) \
455 $(LINUX_INC) \
456 $(MAC_INC) \
457 $(RIVA_INC) \
458 $(SAP_INC) \
459 $(SME_INC) \
460 $(SVC_INC) \
461 $(SYS_INC) \
462 $(TL_INC) \
463 $(VOSS_INC) \
464 $(WDA_INC) \
465 $(WDI_INC)
466
467OBJS := $(BAP_OBJS) \
468 $(DXE_OBJS) \
469 $(HDD_OBJS) \
470 $(MAC_OBJS) \
471 $(SAP_OBJS) \
472 $(SME_OBJS) \
473 $(SVC_OBJS) \
474 $(SYS_OBJS) \
475 $(TL_OBJS) \
476 $(VOSS_OBJS) \
477 $(WDA_OBJS) \
478 $(WDI_OBJS)
479
480EXTRA_CFLAGS += $(INCS)
481
482CDEFINES := -DANI_PRODUCT_TYPE_CLIENT=1 \
483 -DANI_BUS_TYPE_PLATFORM=1 \
484 -DANI_LITTLE_BYTE_ENDIAN \
485 -DANI_LITTLE_BIT_ENDIAN \
486 -DWLAN_STA=1 \
487 -DAP=2 \
488 -DWNI_POLARIS_FW_PRODUCT=1 \
489 -DQC_WLAN_CHIPSET_PRIMA \
490 -DINTEGRATION_READY \
491 -DVOSS_ENABLED \
492 -DDOT11F_LITTLE_ENDIAN_HOST \
493 -DGEN6_ONWARDS \
494 -DANI_COMPILER_TYPE_GCC \
495 -DANI_OS_TYPE_ANDROID=6 \
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800496 -DADVANCED=3 \
497 -DWNI_POLARIS_FW_PACKAGE=9 \
498 -DANI_LOGDUMP \
499 -DWLAN_PERF \
500 -DUSE_LOCKED_QUEUE \
501 -DPTT_SOCK_SVC_ENABLE \
502 -DFEATURE_WLAN_UAPSD_FW_TRG_FRAMES \
503 -DWLAN_SOFTAP_FEATURE \
504 -Wall\
505 -D__linux__ \
506 -DMSM_PLATFORM \
507 -DFEATURE_WLAN_INTEGRATED_SOC \
508 -DHAL_SELF_STA_PER_BSS=1 \
509 -DANI_MANF_DIAG \
510 -DWLAN_FEATURE_VOWIFI_11R \
511 -DWLAN_FEATURE_NEIGHBOR_ROAMING \
512 -DWLAN_FEATURE_NEIGHBOR_ROAMING_DEBUG \
513 -DWLAN_FEATURE_VOWIFI_11R_DEBUG \
514 -DFEATURE_WLAN_WAPI \
515 -DFEATURE_OEM_DATA_SUPPORT\
516 -DSOFTAP_CHANNEL_RANGE \
517 -DWLAN_AP_STA_CONCURRENCY \
518 -DFEATURE_WLAN_SCAN_PNO \
519 -DWLAN_FEATURE_PACKET_FILTERING \
520 -DWLAN_FEATURE_VOWIFI \
521 -DWLAN_FEATURE_11AC \
522 -DWLAN_FEATURE_P2P_DEBUG \
Yathish9f22e662012-12-10 14:21:35 -0800523 -DWLAN_ENABLE_AGEIE_ON_SCAN_RESULTS \
524 -DWLAN_ACTIVEMODE_OFFLOAD_FEATURE
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800525
Jeff Johnson91a420a2012-12-16 11:16:18 -0800526ifneq ($(CONFIG_PRONTO_WLAN),)
527CDEFINES += -DWCN_PRONTO
528CDEFINES += -DWCN_PRONTO_V1
529endif
530
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800531# there are still pieces of code which are conditional upon these
532# need to investigate all of them to see which should also be
533# conditional upon QC_WLAN_CHIPSET_PRIMA
534CDEFINES += -DANI_CHIPSET_VOLANS
535
536ifeq ($(BUILD_DEBUG_VERSION),1)
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800537CDEFINES += -DWLAN_DEBUG \
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800538 -DTRACE_RECORD \
539 -DPE_DEBUG_LOGW \
540 -DPE_DEBUG_LOGE \
541 -DDEBUG
542endif
543
544ifeq ($(CONFIG_SLUB_DEBUG_ON),y)
545CDEFINES += -DTIMER_MANAGER
546CDEFINES += -DMEMORY_DEBUG
547endif
548
549ifeq ($(HAVE_CFG80211),1)
550CDEFINES += -DWLAN_FEATURE_P2P
551CDEFINES += -DWLAN_FEATURE_WFD
552endif
553
554ifeq ($(CONFIG_QCOM_CCX),y)
555CDEFINES += -DFEATURE_WLAN_CCX
556endif
557
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800558#normally, TDLS negative behavior is not needed
559ifeq ($(CONFIG_QCOM_TDLS),y)
560CDEFINES += -DFEATURE_WLAN_TDLS
561#CDEFINES += -DFEATURE_WLAN_TDLS_NEGATIVE
562#Code under FEATURE_WLAN_TDLS_INTERNAL is ported from volans, This code
563#is not tested only verifed that it compiles. This is not required for
564#supplicant based implementation
565#CDEFINES += -DFEATURE_WLAN_TDLS_INTERNAL
566endif
567
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800568ifeq ($(CONFIG_PRIMA_WLAN_BTAMP),y)
569CDEFINES += -DWLAN_BTAMP_FEATURE
570endif
571
572ifeq ($(CONFIG_PRIMA_WLAN_LFR),y)
573CDEFINES += -DFEATURE_WLAN_LFR
574endif
575
576ifeq ($(CONFIG_PRIMA_WLAN_OKC),y)
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800577CDEFINES += -DFEATURE_WLAN_OKC
578endif
579
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800580ifeq ($(CONFIG_PRIMA_WLAN_11AC_HIGH_TP),y)
581CDEFINES += -DWLAN_FEATURE_11AC_HIGH_TP
582endif
583
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800584ifeq ($(BUILD_DIAG_VERSION),1)
585CDEFINES += -DFEATURE_WLAN_DIAG_SUPPORT
586CDEFINES += -DFEATURE_WLAN_DIAG_SUPPORT_CSR
587CDEFINES += -DFEATURE_WLAN_DIAG_SUPPORT_LIM
588endif
589
590# enable the MAC Address auto-generation feature
591CDEFINES += -DWLAN_AUTOGEN_MACADDR_FEATURE
592
593ifneq (, $(filter msm8960, $(BOARD_PLATFORM)))
594EXTRA_CFLAGS += -march=armv7-a
595CDEFINES += -DMSM_PLATFORM_8960
596endif
597
598ifneq (, $(filter msm8660, $(BOARD_PLATFORM)))
599EXTRA_CFLAGS += -march=armv7-a
600CDEFINES += -DMSM_PLATFORM_8660
601endif
602
603ifneq (, $(filter msm7630_surf msm7630_fusion, $(BOARD_PLATFORM)))
604EXTRA_CFLAGS += -march=armv7-a
605CDEFINES += -DMSM_PLATFORM_7x30
606endif
607
608ifneq (, $(filter msm7627_surf, $(BOARD_PLATFORM)))
609EXTRA_CFLAGS += -march=armv6
610CDEFINES += -DMSM_PLATFORM_7x27
611endif
612
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800613ifeq ($(PANIC_ON_BUG),1)
614CDEFINES += -DPANIC_ON_BUG
615endif
616
617ifeq ($(RE_ENABLE_WIFI_ON_WDI_TIMEOUT),1)
618CDEFINES += -DWDI_RE_ENABLE_WIFI_ON_WDI_TIMEOUT
619endif
620
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800621ifeq ($(KERNEL_BUILD),1)
622CDEFINES += -DWLAN_OPEN_SOURCE
623endif
624
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800625KBUILD_CPPFLAGS += $(CDEFINES)
626
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800627# Module information used by KBuild framework
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800628obj-$(CONFIG_PRIMA_WLAN) += $(MODNAME).o
Jeff Johnson91a420a2012-12-16 11:16:18 -0800629obj-$(CONFIG_PRONTO_WLAN) += $(MODNAME).o
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800630$(MODNAME)-y := $(OBJS)