blob: f2e6740c5d5b02f55af1037ea7e53f6fe141afd1 [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
Amar Singhalfddc28c2013-09-05 13:03:40 -070016ifeq ($(KERNEL_BUILD), 0)
Jeff Johnson2c24a3b2012-12-10 12:28:11 -080017 # 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
Gopichand Nakkalad7d13652013-02-15 01:48:00 +053034
35 #Flag to enable Fast Transition (11r) feature
Gopichand Nakkalafebb97e2013-04-18 19:25:48 +053036 CONFIG_QCOM_VOWIFI_11R := y
Gopichand Nakkalad7d13652013-02-15 01:48:00 +053037
Chet Lanctot6802b302013-04-04 16:50:46 -070038 #Flag to enable Protected Managment Frames (11w) feature
39 ifneq ($(CONFIG_PRONTO_WLAN),)
40 CONFIG_WLAN_FEATURE_11W := y
41 endif
42
Amar Singhalfddc28c2013-09-05 13:03:40 -070043 #Flag to enable new Linux Regulatory implementation
44 CONFIG_ENABLE_LINUX_REG := y
45
Jeff Johnson2c24a3b2012-12-10 12:28:11 -080046endif
47
Srinivas Girigowda5cecb202013-10-08 09:13:25 -070048# To enable CCX upload, dependent config
49# CONFIG_QCOM_CCX must be enabled.
50CONFIG_QCOM_CCX_UPLOAD := n
51
Jeff Johnson2c24a3b2012-12-10 12:28:11 -080052# Feature flags which are not (currently) configurable via Kconfig
53
Jeff Johnson25abf4d2012-12-01 12:42:42 -080054#Whether to build debug version
55BUILD_DEBUG_VERSION := 1
56
57#Enable this flag to build driver in diag version
Bansidhar Gopalacharia4e08982013-05-10 15:25:23 -070058BUILD_DIAG_VERSION := 1
Jeff Johnson25abf4d2012-12-01 12:42:42 -080059
60#Do we panic on bug? default is to warn
Sameer Thalappil451ebb92013-06-28 15:49:58 -070061PANIC_ON_BUG := 1
Jeff Johnson25abf4d2012-12-01 12:42:42 -080062
63#Re-enable wifi on WDI timeout
64RE_ENABLE_WIFI_ON_WDI_TIMEOUT := 0
65
Jeff Johnson25abf4d2012-12-01 12:42:42 -080066
67ifeq ($(CONFIG_CFG80211),y)
68HAVE_CFG80211 := 1
69else
70ifeq ($(CONFIG_CFG80211),m)
71HAVE_CFG80211 := 1
Jeff Johnson25abf4d2012-12-01 12:42:42 -080072else
73HAVE_CFG80211 := 0
74endif
75endif
76
Jeff Johnson2c24a3b2012-12-10 12:28:11 -080077############ BAP ############
78BAP_DIR := CORE/BAP
79BAP_INC_DIR := $(BAP_DIR)/inc
80BAP_SRC_DIR := $(BAP_DIR)/src
81
Jeff Johnson91a420a2012-12-16 11:16:18 -080082BAP_INC := -I$(WLAN_ROOT)/$(BAP_INC_DIR) \
83 -I$(WLAN_ROOT)/$(BAP_SRC_DIR)
Jeff Johnson2c24a3b2012-12-10 12:28:11 -080084
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
Jeff Johnson91a420a2012-12-16 11:16:18 -0800111DXE_INC := -I$(WLAN_ROOT)/$(DXE_INC_DIR) \
112 -I$(WLAN_ROOT)/$(DXE_SRC_DIR)
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800113
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
Jeff Johnson91a420a2012-12-16 11:16:18 -0800122HDD_INC := -I$(WLAN_ROOT)/$(HDD_INC_DIR) \
123 -I$(WLAN_ROOT)/$(HDD_SRC_DIR)
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800124
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 \
Yue Ma0d4891e2013-08-06 17:01:45 -0700128 $(HDD_SRC_DIR)/wlan_hdd_debugfs.o \
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800129 $(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 \
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800134 $(HDD_SRC_DIR)/wlan_hdd_main.o \
135 $(HDD_SRC_DIR)/wlan_hdd_mib.o \
Yue Ma0d4891e2013-08-06 17:01:45 -0700136 $(HDD_SRC_DIR)/wlan_hdd_oemdata.o \
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800137 $(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_wext.o \
141 $(HDD_SRC_DIR)/wlan_hdd_wmm.o \
142 $(HDD_SRC_DIR)/wlan_hdd_wowl.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800143
144ifeq ($(HAVE_CFG80211),1)
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800145HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_cfg80211.o \
146 $(HDD_SRC_DIR)/wlan_hdd_p2p.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800147endif
148
149ifeq ($(CONFIG_QCOM_TDLS),y)
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800150HDD_OBJS += $(HDD_SRC_DIR)/wlan_hdd_tdls.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800151endif
152
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800153############ MAC ############
154MAC_DIR := CORE/MAC
155MAC_INC_DIR := $(MAC_DIR)/inc
156MAC_SRC_DIR := $(MAC_DIR)/src
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800157
Jeff Johnson91a420a2012-12-16 11:16:18 -0800158MAC_INC := -I$(WLAN_ROOT)/$(MAC_INC_DIR) \
159 -I$(WLAN_ROOT)/$(MAC_SRC_DIR)/dph \
160 -I$(WLAN_ROOT)/$(MAC_SRC_DIR)/include \
161 -I$(WLAN_ROOT)/$(MAC_SRC_DIR)/pe/include \
162 -I$(WLAN_ROOT)/$(MAC_SRC_DIR)/pe/lim
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800163
164MAC_CFG_OBJS := $(MAC_SRC_DIR)/cfg/cfgApi.o \
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800165 $(MAC_SRC_DIR)/cfg/cfgDebug.o \
166 $(MAC_SRC_DIR)/cfg/cfgParamName.o \
167 $(MAC_SRC_DIR)/cfg/cfgProcMsg.o \
168 $(MAC_SRC_DIR)/cfg/cfgSendMsg.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800169
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800170MAC_DPH_OBJS := $(MAC_SRC_DIR)/dph/dphHashTable.o
171
172MAC_LIM_OBJS := $(MAC_SRC_DIR)/pe/lim/limAIDmgmt.o \
173 $(MAC_SRC_DIR)/pe/lim/limAdmitControl.o \
174 $(MAC_SRC_DIR)/pe/lim/limApi.o \
175 $(MAC_SRC_DIR)/pe/lim/limAssocUtils.o \
176 $(MAC_SRC_DIR)/pe/lim/limDebug.o \
177 $(MAC_SRC_DIR)/pe/lim/limFT.o \
178 $(MAC_SRC_DIR)/pe/lim/limIbssPeerMgmt.o \
179 $(MAC_SRC_DIR)/pe/lim/limLinkMonitoringAlgo.o \
180 $(MAC_SRC_DIR)/pe/lim/limLogDump.o \
181 $(MAC_SRC_DIR)/pe/lim/limP2P.o \
182 $(MAC_SRC_DIR)/pe/lim/limProcessActionFrame.o \
183 $(MAC_SRC_DIR)/pe/lim/limProcessAssocReqFrame.o \
184 $(MAC_SRC_DIR)/pe/lim/limProcessAssocRspFrame.o \
185 $(MAC_SRC_DIR)/pe/lim/limProcessAuthFrame.o \
186 $(MAC_SRC_DIR)/pe/lim/limProcessBeaconFrame.o \
187 $(MAC_SRC_DIR)/pe/lim/limProcessCfgUpdates.o \
188 $(MAC_SRC_DIR)/pe/lim/limProcessDeauthFrame.o \
189 $(MAC_SRC_DIR)/pe/lim/limProcessDisassocFrame.o \
190 $(MAC_SRC_DIR)/pe/lim/limProcessLmmMessages.o \
191 $(MAC_SRC_DIR)/pe/lim/limProcessMessageQueue.o \
192 $(MAC_SRC_DIR)/pe/lim/limProcessMlmReqMessages.o \
193 $(MAC_SRC_DIR)/pe/lim/limProcessMlmRspMessages.o \
194 $(MAC_SRC_DIR)/pe/lim/limProcessProbeReqFrame.o \
195 $(MAC_SRC_DIR)/pe/lim/limProcessProbeRspFrame.o \
196 $(MAC_SRC_DIR)/pe/lim/limProcessSmeReqMessages.o \
197 $(MAC_SRC_DIR)/pe/lim/limPropExtsUtils.o \
198 $(MAC_SRC_DIR)/pe/lim/limRoamingAlgo.o \
199 $(MAC_SRC_DIR)/pe/lim/limScanResultUtils.o \
200 $(MAC_SRC_DIR)/pe/lim/limSecurityUtils.o \
201 $(MAC_SRC_DIR)/pe/lim/limSendManagementFrames.o \
202 $(MAC_SRC_DIR)/pe/lim/limSendMessages.o \
203 $(MAC_SRC_DIR)/pe/lim/limSendSmeRspMessages.o \
204 $(MAC_SRC_DIR)/pe/lim/limSerDesUtils.o \
205 $(MAC_SRC_DIR)/pe/lim/limSession.o \
206 $(MAC_SRC_DIR)/pe/lim/limSessionUtils.o \
207 $(MAC_SRC_DIR)/pe/lim/limSmeReqUtils.o \
208 $(MAC_SRC_DIR)/pe/lim/limStaHashApi.o \
209 $(MAC_SRC_DIR)/pe/lim/limTimerUtils.o \
210 $(MAC_SRC_DIR)/pe/lim/limTrace.o \
211 $(MAC_SRC_DIR)/pe/lim/limUtils.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800212
213ifeq ($(CONFIG_QCOM_CCX),y)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700214ifneq ($(CONFIG_QCOM_CCX_UPLOAD),y)
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800215MAC_LIM_OBJS += $(MAC_SRC_DIR)/pe/lim/limProcessCcxFrame.o
216endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700217endif
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800218
219ifeq ($(CONFIG_QCOM_TDLS),y)
220MAC_LIM_OBJS += $(MAC_SRC_DIR)/pe/lim/limProcessTdls.o
221endif
222
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800223MAC_PMM_OBJS := $(MAC_SRC_DIR)/pe/pmm/pmmAP.o \
224 $(MAC_SRC_DIR)/pe/pmm/pmmApi.o \
225 $(MAC_SRC_DIR)/pe/pmm/pmmDebug.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800226
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800227MAC_SCH_OBJS := $(MAC_SRC_DIR)/pe/sch/schApi.o \
228 $(MAC_SRC_DIR)/pe/sch/schBeaconGen.o \
229 $(MAC_SRC_DIR)/pe/sch/schBeaconProcess.o \
230 $(MAC_SRC_DIR)/pe/sch/schDebug.o \
231 $(MAC_SRC_DIR)/pe/sch/schMessage.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800232
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800233MAC_RRM_OBJS := $(MAC_SRC_DIR)/pe/rrm/rrmApi.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800234
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800235MAC_OBJS := $(MAC_CFG_OBJS) \
236 $(MAC_DPH_OBJS) \
237 $(MAC_LIM_OBJS) \
238 $(MAC_PMM_OBJS) \
239 $(MAC_SCH_OBJS) \
240 $(MAC_RRM_OBJS)
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800241
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800242############ SAP ############
243SAP_DIR := CORE/SAP
244SAP_INC_DIR := $(SAP_DIR)/inc
245SAP_SRC_DIR := $(SAP_DIR)/src
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800246
Jeff Johnson91a420a2012-12-16 11:16:18 -0800247SAP_INC := -I$(WLAN_ROOT)/$(SAP_INC_DIR) \
248 -I$(WLAN_ROOT)/$(SAP_SRC_DIR)
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800249
250SAP_OBJS := $(SAP_SRC_DIR)/sapApiLinkCntl.o \
251 $(SAP_SRC_DIR)/sapChSelect.o \
252 $(SAP_SRC_DIR)/sapFsm.o \
253 $(SAP_SRC_DIR)/sapModule.o
254
255############ SME ############
256SME_DIR := CORE/SME
257SME_INC_DIR := $(SME_DIR)/inc
258SME_SRC_DIR := $(SME_DIR)/src
259
Jeff Johnson91a420a2012-12-16 11:16:18 -0800260SME_INC := -I$(WLAN_ROOT)/$(SME_INC_DIR) \
261 -I$(WLAN_ROOT)/$(SME_SRC_DIR)/csr
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800262
263SME_CCM_OBJS := $(SME_SRC_DIR)/ccm/ccmApi.o \
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800264 $(SME_SRC_DIR)/ccm/ccmLogDump.o
265
266SME_CSR_OBJS := $(SME_SRC_DIR)/csr/csrApiRoam.o \
267 $(SME_SRC_DIR)/csr/csrApiScan.o \
268 $(SME_SRC_DIR)/csr/csrCmdProcess.o \
269 $(SME_SRC_DIR)/csr/csrLinkList.o \
270 $(SME_SRC_DIR)/csr/csrLogDump.o \
271 $(SME_SRC_DIR)/csr/csrNeighborRoam.o \
272 $(SME_SRC_DIR)/csr/csrUtil.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800273
274ifeq ($(CONFIG_QCOM_CCX),y)
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700275ifneq ($(CONFIG_QCOM_CCX_UPLOAD),y)
Jeff Johnson91a420a2012-12-16 11:16:18 -0800276SME_CSR_OBJS += $(SME_SRC_DIR)/csr/csrCcx.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800277endif
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700278endif
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800279
280ifeq ($(CONFIG_QCOM_TDLS),y)
281SME_CSR_OBJS += $(SME_SRC_DIR)/csr/csrTdlsProcess.o
282endif
283
284SME_PMC_OBJS := $(SME_SRC_DIR)/pmc/pmcApi.o \
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800285 $(SME_SRC_DIR)/pmc/pmc.o \
286 $(SME_SRC_DIR)/pmc/pmcLogDump.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800287
288SME_QOS_OBJS := $(SME_SRC_DIR)/QoS/sme_Qos.o
289
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800290SME_CMN_OBJS := $(SME_SRC_DIR)/sme_common/sme_Api.o \
Leela Venkata Kiran Kumar Reddy Chirala7367c202013-04-10 22:39:51 -0700291 $(SME_SRC_DIR)/sme_common/sme_FTApi.o \
292 $(SME_SRC_DIR)/sme_common/sme_Trace.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800293
294SME_BTC_OBJS := $(SME_SRC_DIR)/btc/btcApi.o
295
296SME_OEM_DATA_OBJS := $(SME_SRC_DIR)/oemData/oemDataApi.o
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800297
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800298SME_P2P_OBJS = $(SME_SRC_DIR)/p2p/p2p_Api.o
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800299
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800300SME_RRM_OBJS := $(SME_SRC_DIR)/rrm/sme_rrm.o
301
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800302SME_OBJS := $(SME_BTC_OBJS) \
303 $(SME_CCM_OBJS) \
304 $(SME_CMN_OBJS) \
305 $(SME_CSR_OBJS) \
306 $(SME_OEM_DATA_OBJS) \
307 $(SME_P2P_OBJS) \
308 $(SME_PMC_OBJS) \
309 $(SME_QOS_OBJS) \
310 $(SME_RRM_OBJS)
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800311
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800312############ SVC ############
313SVC_DIR := CORE/SVC
314SVC_INC_DIR := $(SVC_DIR)/inc
315SVC_SRC_DIR := $(SVC_DIR)/src
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800316
Jeff Johnson91a420a2012-12-16 11:16:18 -0800317SVC_INC := -I$(WLAN_ROOT)/$(SVC_INC_DIR) \
318 -I$(WLAN_ROOT)/$(SVC_DIR)/external
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800319
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800320BTC_SRC_DIR := $(SVC_SRC_DIR)/btc
321BTC_OBJS := $(BTC_SRC_DIR)/wlan_btc_svc.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800322
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800323NLINK_SRC_DIR := $(SVC_SRC_DIR)/nlink
324NLINK_OBJS := $(NLINK_SRC_DIR)/wlan_nlink_srv.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800325
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800326PTT_SRC_DIR := $(SVC_SRC_DIR)/ptt
327PTT_OBJS := $(PTT_SRC_DIR)/wlan_ptt_sock_svc.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800328
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800329SVC_OBJS := $(BTC_OBJS) \
330 $(NLINK_OBJS) \
331 $(PTT_OBJS)
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800332
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800333############ SYS ############
334SYS_DIR := CORE/SYS
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800335
Jeff Johnson91a420a2012-12-16 11:16:18 -0800336SYS_INC := -I$(WLAN_ROOT)/$(SYS_DIR)/common/inc \
337 -I$(WLAN_ROOT)/$(SYS_DIR)/legacy/src/pal/inc \
338 -I$(WLAN_ROOT)/$(SYS_DIR)/legacy/src/platform/inc \
339 -I$(WLAN_ROOT)/$(SYS_DIR)/legacy/src/system/inc \
340 -I$(WLAN_ROOT)/$(SYS_DIR)/legacy/src/utils/inc
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800341
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800342SYS_COMMON_SRC_DIR := $(SYS_DIR)/common/src
343SYS_LEGACY_SRC_DIR := $(SYS_DIR)/legacy/src
344SYS_OBJS := $(SYS_COMMON_SRC_DIR)/wlan_qct_sys.o \
345 $(SYS_LEGACY_SRC_DIR)/pal/src/palApiComm.o \
346 $(SYS_LEGACY_SRC_DIR)/pal/src/palTimer.o \
347 $(SYS_LEGACY_SRC_DIR)/platform/src/VossWrapper.o \
348 $(SYS_LEGACY_SRC_DIR)/system/src/macInitApi.o \
349 $(SYS_LEGACY_SRC_DIR)/system/src/sysEntryFunc.o \
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800350 $(SYS_LEGACY_SRC_DIR)/utils/src/dot11f.o \
351 $(SYS_LEGACY_SRC_DIR)/utils/src/logApi.o \
352 $(SYS_LEGACY_SRC_DIR)/utils/src/logDump.o \
353 $(SYS_LEGACY_SRC_DIR)/utils/src/macTrace.o \
354 $(SYS_LEGACY_SRC_DIR)/utils/src/parserApi.o \
355 $(SYS_LEGACY_SRC_DIR)/utils/src/utilsApi.o \
356 $(SYS_LEGACY_SRC_DIR)/utils/src/utilsParser.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800357
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800358############ TL ############
359TL_DIR := CORE/TL
360TL_INC_DIR := $(TL_DIR)/inc
361TL_SRC_DIR := $(TL_DIR)/src
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800362
Jeff Johnson91a420a2012-12-16 11:16:18 -0800363TL_INC := -I$(WLAN_ROOT)/$(TL_INC_DIR) \
364 -I$(WLAN_ROOT)/$(TL_SRC_DIR)
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800365
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800366TL_OBJS := $(TL_SRC_DIR)/wlan_qct_tl.o \
367 $(TL_SRC_DIR)/wlan_qct_tl_ba.o \
368 $(TL_SRC_DIR)/wlan_qct_tl_hosupport.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800369
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800370############ VOSS ############
371VOSS_DIR := CORE/VOSS
372VOSS_INC_DIR := $(VOSS_DIR)/inc
373VOSS_SRC_DIR := $(VOSS_DIR)/src
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800374
Jeff Johnson91a420a2012-12-16 11:16:18 -0800375VOSS_INC := -I$(WLAN_ROOT)/$(VOSS_INC_DIR) \
376 -I$(WLAN_ROOT)/$(VOSS_SRC_DIR)
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800377
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800378VOSS_OBJS := $(VOSS_SRC_DIR)/vos_api.o \
379 $(VOSS_SRC_DIR)/vos_event.o \
380 $(VOSS_SRC_DIR)/vos_getBin.o \
381 $(VOSS_SRC_DIR)/vos_list.o \
382 $(VOSS_SRC_DIR)/vos_lock.o \
383 $(VOSS_SRC_DIR)/vos_memory.o \
384 $(VOSS_SRC_DIR)/vos_mq.o \
385 $(VOSS_SRC_DIR)/vos_nvitem.o \
386 $(VOSS_SRC_DIR)/vos_packet.o \
387 $(VOSS_SRC_DIR)/vos_power.o \
388 $(VOSS_SRC_DIR)/vos_sched.o \
389 $(VOSS_SRC_DIR)/vos_threads.o \
390 $(VOSS_SRC_DIR)/vos_timer.o \
391 $(VOSS_SRC_DIR)/vos_trace.o \
392 $(VOSS_SRC_DIR)/vos_types.o \
Prasanna Kumarf6c94ae2013-04-11 20:05:21 -0700393 $(VOSS_SRC_DIR)/vos_utils.o \
394 $(VOSS_SRC_DIR)/wlan_nv_parser.o \
395 $(VOSS_SRC_DIR)/wlan_nv_stream_read.o \
396 $(VOSS_SRC_DIR)/wlan_nv_template_builtin.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800397
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800398ifeq ($(BUILD_DIAG_VERSION),1)
399VOSS_OBJS += $(VOSS_SRC_DIR)/vos_diag.o
400endif
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800401
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800402############ WDA ############
403WDA_DIR := CORE/WDA
404WDA_INC_DIR := $(WDA_DIR)/inc
405WDA_SRC_DIR := $(WDA_DIR)/src
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800406
Jeff Johnson91a420a2012-12-16 11:16:18 -0800407WDA_INC := -I$(WLAN_ROOT)/$(WDA_INC_DIR) \
408 -I$(WLAN_ROOT)/$(WDA_INC_DIR)/legacy \
409 -I$(WLAN_ROOT)/$(WDA_SRC_DIR)
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800410
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800411WDA_OBJS := $(WDA_SRC_DIR)/wlan_qct_wda.o \
412 $(WDA_SRC_DIR)/wlan_qct_wda_debug.o \
413 $(WDA_SRC_DIR)/wlan_qct_wda_ds.o \
414 $(WDA_SRC_DIR)/wlan_qct_wda_legacy.o \
415 $(WDA_SRC_DIR)/wlan_nv.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800416
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800417############ WDI ############
418WDI_DIR := CORE/WDI
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800419
Jeff Johnson91a420a2012-12-16 11:16:18 -0800420WDI_CP_INC := -I$(WLAN_ROOT)/$(WDI_DIR)/CP/inc/
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800421
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800422WDI_CP_SRC_DIR := $(WDI_DIR)/CP/src
423WDI_CP_OBJS := $(WDI_CP_SRC_DIR)/wlan_qct_wdi.o \
424 $(WDI_CP_SRC_DIR)/wlan_qct_wdi_dp.o \
425 $(WDI_CP_SRC_DIR)/wlan_qct_wdi_sta.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800426
Jeff Johnson91a420a2012-12-16 11:16:18 -0800427WDI_DP_INC := -I$(WLAN_ROOT)/$(WDI_DIR)/DP/inc/
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800428
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800429WDI_DP_SRC_DIR := $(WDI_DIR)/DP/src
430WDI_DP_OBJS := $(WDI_DP_SRC_DIR)/wlan_qct_wdi_bd.o \
431 $(WDI_DP_SRC_DIR)/wlan_qct_wdi_ds.o
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800432
Jeff Johnson91a420a2012-12-16 11:16:18 -0800433WDI_TRP_INC := -I$(WLAN_ROOT)/$(WDI_DIR)/TRP/CTS/inc/ \
434 -I$(WLAN_ROOT)/$(WDI_DIR)/TRP/DTS/inc/
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800435
436WDI_TRP_CTS_SRC_DIR := $(WDI_DIR)/TRP/CTS/src
Jeff Johnson91a420a2012-12-16 11:16:18 -0800437WDI_TRP_CTS_OBJS := $(WDI_TRP_CTS_SRC_DIR)/wlan_qct_wdi_cts.o
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800438
439WDI_TRP_DTS_SRC_DIR := $(WDI_DIR)/TRP/DTS/src
Jeff Johnson91a420a2012-12-16 11:16:18 -0800440WDI_TRP_DTS_OBJS := $(WDI_TRP_DTS_SRC_DIR)/wlan_qct_wdi_dts.o
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800441
442WDI_TRP_OBJS := $(WDI_TRP_CTS_OBJS) \
443 $(WDI_TRP_DTS_OBJS)
444
Jeff Johnson91a420a2012-12-16 11:16:18 -0800445WDI_WPAL_INC := -I$(WLAN_ROOT)/$(WDI_DIR)/WPAL/inc
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800446
447WDI_WPAL_SRC_DIR := $(WDI_DIR)/WPAL/src
448WDI_WPAL_OBJS := $(WDI_WPAL_SRC_DIR)/wlan_qct_pal_api.o \
449 $(WDI_WPAL_SRC_DIR)/wlan_qct_pal_device.o \
450 $(WDI_WPAL_SRC_DIR)/wlan_qct_pal_msg.o \
451 $(WDI_WPAL_SRC_DIR)/wlan_qct_pal_packet.o \
452 $(WDI_WPAL_SRC_DIR)/wlan_qct_pal_sync.o \
453 $(WDI_WPAL_SRC_DIR)/wlan_qct_pal_timer.o \
454 $(WDI_WPAL_SRC_DIR)/wlan_qct_pal_trace.o
455
456WDI_INC := $(WDI_CP_INC) \
457 $(WDI_DP_INC) \
458 $(WDI_TRP_INC) \
459 $(WDI_WPAL_INC)
460
461WDI_OBJS := $(WDI_CP_OBJS) \
462 $(WDI_DP_OBJS) \
463 $(WDI_TRP_OBJS) \
464 $(WDI_WPAL_OBJS)
465
466
Jeff Johnson91a420a2012-12-16 11:16:18 -0800467RIVA_INC := -I$(WLAN_ROOT)/riva/inc
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800468
469LINUX_INC := -Iinclude/linux
470
471INCS := $(BAP_INC) \
472 $(DXE_INC) \
473 $(HDD_INC) \
474 $(LINUX_INC) \
475 $(MAC_INC) \
476 $(RIVA_INC) \
477 $(SAP_INC) \
478 $(SME_INC) \
479 $(SVC_INC) \
480 $(SYS_INC) \
481 $(TL_INC) \
482 $(VOSS_INC) \
483 $(WDA_INC) \
484 $(WDI_INC)
485
486OBJS := $(BAP_OBJS) \
487 $(DXE_OBJS) \
488 $(HDD_OBJS) \
489 $(MAC_OBJS) \
490 $(SAP_OBJS) \
491 $(SME_OBJS) \
492 $(SVC_OBJS) \
493 $(SYS_OBJS) \
494 $(TL_OBJS) \
495 $(VOSS_OBJS) \
496 $(WDA_OBJS) \
497 $(WDI_OBJS)
498
499EXTRA_CFLAGS += $(INCS)
500
Jeff Johnsoncfc48eb2013-03-06 09:50:58 -0800501CDEFINES := -DANI_BUS_TYPE_PLATFORM=1 \
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800502 -DANI_LITTLE_BYTE_ENDIAN \
503 -DANI_LITTLE_BIT_ENDIAN \
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800504 -DQC_WLAN_CHIPSET_PRIMA \
505 -DINTEGRATION_READY \
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800506 -DDOT11F_LITTLE_ENDIAN_HOST \
507 -DGEN6_ONWARDS \
508 -DANI_COMPILER_TYPE_GCC \
509 -DANI_OS_TYPE_ANDROID=6 \
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800510 -DANI_LOGDUMP \
511 -DWLAN_PERF \
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800512 -DPTT_SOCK_SVC_ENABLE \
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800513 -Wall\
514 -D__linux__ \
515 -DMSM_PLATFORM \
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800516 -DHAL_SELF_STA_PER_BSS=1 \
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800517 -DWLAN_FEATURE_VOWIFI_11R \
518 -DWLAN_FEATURE_NEIGHBOR_ROAMING \
519 -DWLAN_FEATURE_NEIGHBOR_ROAMING_DEBUG \
520 -DWLAN_FEATURE_VOWIFI_11R_DEBUG \
521 -DFEATURE_WLAN_WAPI \
522 -DFEATURE_OEM_DATA_SUPPORT\
523 -DSOFTAP_CHANNEL_RANGE \
524 -DWLAN_AP_STA_CONCURRENCY \
525 -DFEATURE_WLAN_SCAN_PNO \
526 -DWLAN_FEATURE_PACKET_FILTERING \
527 -DWLAN_FEATURE_VOWIFI \
528 -DWLAN_FEATURE_11AC \
529 -DWLAN_FEATURE_P2P_DEBUG \
Yathish9f22e662012-12-10 14:21:35 -0800530 -DWLAN_ENABLE_AGEIE_ON_SCAN_RESULTS \
Ravi Kumar Vaishnavb7652402013-01-18 19:05:15 -0800531 -DWLANTL_DEBUG\
Madan Mohan Koyyalamudi54c671e2013-07-25 11:54:26 +0530532 -DWLAN_NS_OFFLOAD \
Gopichand Nakkala7fcc6de2012-12-21 07:38:04 -0800533 -DWLAN_ACTIVEMODE_OFFLOAD_FEATURE \
Kumar Anandaca924e2013-07-22 14:35:34 -0700534 -DWLAN_FEATURE_HOLD_RX_WAKELOCK \
Varun Reddy Yeturud0a3f252013-04-15 21:58:13 -0700535 -DWLAN_SOFTAP_VSTA_FEATURE \
Kumar Anandaca924e2013-07-22 14:35:34 -0700536 -DWLAN_FEATURE_ROAM_SCAN_OFFLOAD \
537 -DWLAN_FEATURE_GTK_OFFLOAD \
Leo Chang0882b352013-08-19 16:20:13 -0700538 -DWLAN_WAKEUP_EVENTS \
Leo Chang397deb72013-08-22 11:33:16 -0700539 -DWLAN_KD_READY_NOTIFIER \
Leo Changd9df8aa2013-09-26 13:32:26 -0700540 -DWLAN_NL80211_TESTMODE \
Rajeev79dbe4c2013-10-05 11:03:42 +0530541 -DFEATURE_WLAN_BATCH_SCAN \
Hema Aparna Medicharla830d59a2013-11-16 21:41:34 +0530542 -DFEATURE_WLAN_LPHB \
Kiet Lamcb76f1b2013-12-01 02:21:14 +0530543 -DFEATURE_WLAN_PAL_TIMER_DISABLE \
Leo Chang80de3c22013-11-26 10:52:12 -0800544 -DFEATURE_WLAN_PAL_MEM_DISABLE \
545 -DFEATURE_WLAN_CH144
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800546
Jeff Johnson91a420a2012-12-16 11:16:18 -0800547ifneq ($(CONFIG_PRONTO_WLAN),)
548CDEFINES += -DWCN_PRONTO
549CDEFINES += -DWCN_PRONTO_V1
550endif
551
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800552ifeq ($(BUILD_DEBUG_VERSION),1)
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800553CDEFINES += -DWLAN_DEBUG \
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800554 -DTRACE_RECORD \
Leela V Kiran Kumar Reddy Chiralac3b9d382013-01-31 20:49:53 -0800555 -DLIM_TRACE_RECORD \
Leela Venkata Kiran Kumar Reddy Chirala7367c202013-04-10 22:39:51 -0700556 -DSME_TRACE_RECORD \
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800557 -DPE_DEBUG_LOGW \
558 -DPE_DEBUG_LOGE \
559 -DDEBUG
560endif
561
562ifeq ($(CONFIG_SLUB_DEBUG_ON),y)
563CDEFINES += -DTIMER_MANAGER
564CDEFINES += -DMEMORY_DEBUG
565endif
566
567ifeq ($(HAVE_CFG80211),1)
568CDEFINES += -DWLAN_FEATURE_P2P
569CDEFINES += -DWLAN_FEATURE_WFD
Gopichand Nakkalafebb97e2013-04-18 19:25:48 +0530570ifeq ($(CONFIG_QCOM_VOWIFI_11R),y)
571CDEFINES += -DKERNEL_SUPPORT_11R_CFG80211
572CDEFINES += -DUSE_80211_WMMTSPEC_FOR_RIC
573endif
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800574endif
575
576ifeq ($(CONFIG_QCOM_CCX),y)
577CDEFINES += -DFEATURE_WLAN_CCX
Srinivas Girigowda5cecb202013-10-08 09:13:25 -0700578ifeq ($(CONFIG_QCOM_CCX_UPLOAD),y)
579CDEFINES += -DFEATURE_WLAN_CCX_UPLOAD
580endif
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800581endif
582
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800583#normally, TDLS negative behavior is not needed
584ifeq ($(CONFIG_QCOM_TDLS),y)
585CDEFINES += -DFEATURE_WLAN_TDLS
Gopichand Nakkala29d00192013-06-20 19:03:52 +0530586ifeq ($(BUILD_DEBUG_VERSION),1)
Jeff Johnson22141432013-02-21 17:07:33 -0800587CDEFINES += -DWLAN_FEATURE_TDLS_DEBUG
Gopichand Nakkala29d00192013-06-20 19:03:52 +0530588endif
Chilam NG571c65a2013-01-19 12:27:36 +0530589CDEFINES += -DCONFIG_TDLS_IMPLICIT
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800590#CDEFINES += -DFEATURE_WLAN_TDLS_NEGATIVE
591#Code under FEATURE_WLAN_TDLS_INTERNAL is ported from volans, This code
592#is not tested only verifed that it compiles. This is not required for
593#supplicant based implementation
594#CDEFINES += -DFEATURE_WLAN_TDLS_INTERNAL
595endif
596
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800597ifeq ($(CONFIG_PRIMA_WLAN_BTAMP),y)
598CDEFINES += -DWLAN_BTAMP_FEATURE
599endif
600
601ifeq ($(CONFIG_PRIMA_WLAN_LFR),y)
602CDEFINES += -DFEATURE_WLAN_LFR
603endif
604
605ifeq ($(CONFIG_PRIMA_WLAN_OKC),y)
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800606CDEFINES += -DFEATURE_WLAN_OKC
607endif
608
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800609ifeq ($(CONFIG_PRIMA_WLAN_11AC_HIGH_TP),y)
610CDEFINES += -DWLAN_FEATURE_11AC_HIGH_TP
611endif
612
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800613ifeq ($(BUILD_DIAG_VERSION),1)
614CDEFINES += -DFEATURE_WLAN_DIAG_SUPPORT
615CDEFINES += -DFEATURE_WLAN_DIAG_SUPPORT_CSR
616CDEFINES += -DFEATURE_WLAN_DIAG_SUPPORT_LIM
617endif
618
619# enable the MAC Address auto-generation feature
620CDEFINES += -DWLAN_AUTOGEN_MACADDR_FEATURE
621
Chet Lanctot6802b302013-04-04 16:50:46 -0700622ifeq ($(CONFIG_WLAN_FEATURE_11W),y)
623CDEFINES += -DWLAN_FEATURE_11W
624endif
625
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800626ifeq ($(PANIC_ON_BUG),1)
627CDEFINES += -DPANIC_ON_BUG
628endif
629
630ifeq ($(RE_ENABLE_WIFI_ON_WDI_TIMEOUT),1)
631CDEFINES += -DWDI_RE_ENABLE_WIFI_ON_WDI_TIMEOUT
632endif
633
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800634ifeq ($(KERNEL_BUILD),1)
635CDEFINES += -DWLAN_OPEN_SOURCE
636endif
637
Amar Singhala663bb32013-02-14 13:48:43 -0800638ifeq ($(findstring opensource, $(WLAN_ROOT)), opensource)
639CDEFINES += -DWLAN_OPEN_SOURCE
640endif
641
Amar Singhalfddc28c2013-09-05 13:03:40 -0700642ifeq ($(CONFIG_ENABLE_LINUX_REG), y)
643CDEFINES += -DCONFIG_ENABLE_LINUX_REG
644endif
645
Jeff Johnson51019dc2013-02-21 16:44:09 -0800646# Fix build for GCC 4.7
647EXTRA_CFLAGS += -Wno-maybe-uninitialized -Wno-unused-function
648
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800649KBUILD_CPPFLAGS += $(CDEFINES)
650
Jeff Johnson25abf4d2012-12-01 12:42:42 -0800651# Module information used by KBuild framework
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800652obj-$(CONFIG_PRIMA_WLAN) += $(MODNAME).o
Jeff Johnson91a420a2012-12-16 11:16:18 -0800653obj-$(CONFIG_PRONTO_WLAN) += $(MODNAME).o
Jeff Johnson2c24a3b2012-12-10 12:28:11 -0800654$(MODNAME)-y := $(OBJS)