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