forked from rdkcentral/hostap-patches
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0001-OneWifi-related-hostap-patch-for-2.10-based-hostap.patch
6501 lines (6153 loc) · 214 KB
/
0001-OneWifi-related-hostap-patch-for-2.10-based-hostap.patch
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
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
From 2645583da7fd3fd1b8bc72bead7c87bbfbebcb9d Mon Sep 17 00:00:00 2001
From: Amarnath Hullur Subramanyam <[email protected]>
Date: Tue, 29 Oct 2024 15:17:45 -0700
Subject: [PATCH] OneWifi related hostap patch for 2.10 based hostap.
This patch consolidates all the required hostap changes on top
of 2.10 version hostap. The base hostap checkout point is
9d07b9447e76059a2ddef2a879c57d0934634188 on which this patch can
be applied.
---
Makefile.am | 19 +
hostapd/Makefile | 7 +
hostapd/Makefile.am | 72 +++
hostapd/config_file.c | 64 ++-
hostapd/ctrl_iface.c | 70 ++-
hostapd/defconfig | 9 +
hostapd/hostapd_cli.c | 63 +++
hostapd/main.c | 29 +-
hs20/.DS_Store | 0
src/.DS_Store | 0
src/Makefile.am | 385 +++++++++++++++
src/ap/accounting.c | 3 +
src/ap/ap_config.c | 6 +-
src/ap/ap_config.h | 36 +-
src/ap/ap_drv_ops.c | 55 +++
src/ap/ap_drv_ops.h | 21 +-
src/ap/beacon.c | 79 ++-
src/ap/ctrl_iface_ap.c | 23 +-
src/ap/ctrl_iface_ap.h | 5 +-
src/ap/dfs.c | 19 +-
src/ap/dfs.h | 11 +
src/ap/drv_callbacks.c | 22 +-
src/ap/gas_serv.c | 15 +-
src/ap/greylist.c | 766 +++++++++++++++++++++++++++++
src/ap/greylist.h | 25 +
src/ap/hostapd.c | 82 ++-
src/ap/hostapd.h | 22 +-
src/ap/ieee802_11.c | 134 ++++-
src/ap/ieee802_11.h | 5 +
src/ap/ieee802_11_he.c | 11 +
src/ap/ieee802_11_ht.c | 23 +
src/ap/ieee802_11_vht.c | 3 +-
src/ap/ieee802_1x.c | 142 +++++-
src/ap/ieee802_1x.h | 3 +
src/ap/sta_info.c | 24 +
src/ap/sta_info.h | 5 +
src/ap/utils.c | 4 +
src/ap/wpa_auth.c | 51 +-
src/ap/wpa_auth.h | 7 +-
src/ap/wpa_auth_glue.c | 116 +++++
src/ap/wpa_auth_ie.c | 33 +-
src/ap/wps_hostapd.c | 253 +++++++++-
src/ap/wps_hostapd.h | 7 +
src/common/hw_features_common.c | 4 +-
src/common/ieee802_11_common.c | 17 +-
src/common/ieee802_11_defs.h | 4 +-
src/common/wpa_common.c | 4 +
src/common/wpa_common.h | 3 +
src/common/wpa_ctrl.c | 40 ++
src/crypto/crypto_openssl.c | 4 +-
src/crypto/random.c | 34 +-
src/crypto/tls_openssl.c | 4 +
src/drivers/driver.h | 42 +-
src/drivers/driver_common.c | 9 +
src/drivers/driver_nl80211.c | 147 +++++-
src/drivers/driver_nl80211.h | 4 +
src/drivers/driver_nl80211_event.c | 79 ++-
src/drivers/linux_ioctl.c | 119 +++++
src/drivers/netlink.c | 23 +
src/drivers/netlink.h | 4 +
src/drivers/priv_netlink.h | 18 +
src/eapol_auth/eapol_auth_sm.c | 11 +
src/eapol_auth/eapol_auth_sm.h | 3 +
src/radius/radius.c | 33 +-
src/radius/radius.h | 21 +
src/radius/radius_das.c | 35 +-
src/utils/crc32.c | 2 +-
src/utils/crc32.h | 5 +-
src/utils/eloop.c | 105 ++++
src/utils/eloop.h | 6 +
src/utils/wpa_debug.c | 58 ++-
src/wps/http_server.c | 5 +
src/wps/wps.h | 20 +-
src/wps/wps_attr_parse.c | 10 +
src/wps/wps_attr_parse.h | 3 +
src/wps/wps_common.c | 27 +
src/wps/wps_defs.h | 10 +-
src/wps/wps_i.h | 7 +
src/wps/wps_registrar.c | 57 ++-
src/wps/wps_upnp.c | 111 ++++-
src/wps/wps_upnp.h | 3 +
src/wps/wps_upnp_ap.c | 5 +-
src/wps/wps_upnp_i.h | 3 +
src/wps/wps_validate.c | 24 +-
tests/.DS_Store | 0
wpa_supplicant/.DS_Store | 0
wpadebug/.DS_Store | 0
87 files changed, 3725 insertions(+), 127 deletions(-)
create mode 100644 Makefile.am
create mode 100644 hostapd/Makefile.am
create mode 100644 hs20/.DS_Store
create mode 100644 src/.DS_Store
create mode 100644 src/Makefile.am
create mode 100644 src/ap/greylist.c
create mode 100644 src/ap/greylist.h
create mode 100644 tests/.DS_Store
create mode 100644 wpa_supplicant/.DS_Store
create mode 100644 wpadebug/.DS_Store
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 000000000..ba13639dd
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,19 @@
+##########################################################################
+# If not stated otherwise in this file or this component's LICENSE
+# file the following copyright and licenses apply:
+#
+# Copyright 2015 RDK Management
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##########################################################################
+SUBDIRS = src hostapd
\ No newline at end of file
diff --git a/hostapd/Makefile b/hostapd/Makefile
index 3325937ff..fc4a455a0 100644
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -276,6 +276,10 @@ CFLAGS += -DCONFIG_OCV
OBJS += ../src/common/ocv.o
endif
+ifdef CONFIG_DRIVER_BRCM
+CFLAGS += -DCONFIG_DRIVER_BRCM
+endif
+
ifdef CONFIG_IEEE80211R
CFLAGS += -DCONFIG_IEEE80211R -DCONFIG_IEEE80211R_AP
OBJS += ../src/ap/wpa_auth_ft.o
@@ -522,6 +526,9 @@ NEED_AES_UNWRAP=y
endif
ifdef CONFIG_WPS
+ifdef CONFIG_DRIVER_BRCM_MAP
+CFLAGS += -DCONFIG_DRIVER_BRCM_MAP
+endif
CFLAGS += -DCONFIG_WPS -DEAP_SERVER_WSC
OBJS += ../src/utils/uuid.o
OBJS += ../src/ap/wps_hostapd.o
diff --git a/hostapd/Makefile.am b/hostapd/Makefile.am
new file mode 100644
index 000000000..0c46a1eb8
--- /dev/null
+++ b/hostapd/Makefile.am
@@ -0,0 +1,72 @@
+##########################################################################
+# If not stated otherwise in this file or this component's LICENSE
+# file the following copyright and licenses apply:
+#
+# Copyright 2015 RDK Management
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##########################################################################
+AM_CFLAGS = -D_ANSC_LINUX
+AM_CFLAGS += -D_ANSC_USER
+AM_CFLAGS += -D_ANSC_LITTLE_ENDIAN_
+AM_CPPFLAGS = -Wall -Werror
+
+#include ../src/drivers/drivers.mak
+
+##### CLEAR VARS
+
+DRV_CFLAGS =
+DRV_WPA_CFLAGS =
+DRV_AP_CFLAGS =
+DRV_OBJS =
+DRV_WPA_OBJS =
+DRV_AP_OBJS =
+DRV_LIBS =
+DRV_WPA_LIBS =
+DRV_AP_LIBS =
+
+##### COMMON DRIVERS
+
+
+
+
+
+#include ../src/drivers/drivers.mak
+
+AM_LDFLAGS = -lpthread
+AM_LDFLAGS += -lz
+hardware_platform = i686-linux-gnu
+
+AM_CFLAGS += -DCONFIG_CTRL_IFACE
+AM_CFLAGS += -DCONFIG_CTRL_IFACE_UNIX
+AM_CFLAGS += -DCONFIG_FST
+AM_CFLAGS += -DCONFIG_IEEE80211W
+AM_CFLAGS += -DCONFIG_WPS
+AM_CFLAGS += -DCONFIG_WPS_NFC
+#bin_PROGRAMS = hostapd_cli
+
+hostapd_cli_CPPFLAGS = -I$(top_srcdir)/source/hostap-2.10/src -I$(top_srcdir)/source/hostap-2.10/src/utils/ -I$(top_srcdir)/source/hostap-2.10/src/ap -I$(top_srcdir)/source/hostap-2.10/src/common
+
+hostapd_cli_SOURCES = hostapd_cli.c
+
+hostapd_cli_SOURCES += ../src/common/wpa_ctrl.c
+hostapd_cli_SOURCES += ../src/utils/os_unix.c
+hostapd_cli_SOURCES += ../src/utils/eloop.c
+hostapd_cli_SOURCES += ../src/utils/common.c
+hostapd_cli_SOURCES += ../src/utils/wpa_debug.c
+hostapd_cli_SOURCES += ../src/utils/edit_simple.c
+#hostapd_cli_SOURCES += ../src/utils/trace.c
+
+hostapd_cli_SOURCES += ../src/common/cli.c
+
+#hostapd_cli_LDFLAGS = -lrt -ldl
\ No newline at end of file
diff --git a/hostapd/config_file.c b/hostapd/config_file.c
index 8a86ce08b..f616e3daa 100644
--- a/hostapd/config_file.c
+++ b/hostapd/config_file.c
@@ -612,22 +612,30 @@ hostapd_config_read_radius_addr(struct hostapd_radius_server **server,
static int hostapd_parse_das_client(struct hostapd_bss_config *bss, char *val)
{
char *secret;
-
+ /* RADIUS greylist allows das secret to be null for open ssid */
+#ifndef FEATURE_SUPPORT_RADIUSGREYLIST
secret = os_strchr(val, ' ');
if (secret == NULL)
return -1;
-
+#else /* FEATURE_SUPPORT_RADIUSGREYLIST */
+ if (secret)
+#endif /* FEATURE_SUPPORT_RADIUSGREYLIST */
*secret++ = '\0';
if (hostapd_parse_ip_addr(val, &bss->radius_das_client_addr))
return -1;
+#ifdef FEATURE_SUPPORT_RADIUSGREYLIST
+ if (secret) {
+#endif /* FEATURE_SUPPORT_RADIUSGREYLIST */
os_free(bss->radius_das_shared_secret);
bss->radius_das_shared_secret = (u8 *) os_strdup(secret);
if (bss->radius_das_shared_secret == NULL)
return -1;
bss->radius_das_shared_secret_len = os_strlen(secret);
-
+#ifdef FEATURE_SUPPORT_RADIUSGREYLIST
+ }
+#endif /* FEATURE_SUPPORT_RADIUSGREYLIST */
return 0;
}
#endif /* CONFIG_NO_RADIUS */
@@ -2415,6 +2423,7 @@ static int hostapd_config_fill(struct hostapd_config *conf,
} else if (os_strcmp(buf, "skip_inactivity_poll") == 0) {
bss->skip_inactivity_poll = atoi(pos);
} else if (os_strcmp(buf, "country_code") == 0) {
+#ifndef CONFIG_DRIVER_BRCM
if (pos[0] < 'A' || pos[0] > 'Z' ||
pos[1] < 'A' || pos[1] > 'Z') {
wpa_printf(MSG_ERROR,
@@ -2422,6 +2431,7 @@ static int hostapd_config_fill(struct hostapd_config *conf,
line, pos);
return 1;
}
+#endif /* CONFIG_DRIVER_BRCM */
os_memcpy(conf->country, pos, 2);
} else if (os_strcmp(buf, "country3") == 0) {
conf->country[2] = strtol(pos, NULL, 16);
@@ -2431,6 +2441,12 @@ static int hostapd_config_fill(struct hostapd_config *conf,
conf->ieee80211h = atoi(pos);
} else if (os_strcmp(buf, "ieee8021x") == 0) {
bss->ieee802_1x = atoi(pos);
+#ifdef FEATURE_SUPPORT_RADIUSGREYLIST
+ } else if (os_strcmp(buf, "rdk_greylist") == 0) {
+ bss->rdk_greylist = atoi(pos);
+ } else if (os_strcmp(buf, "ap_vlan") == 0) {
+ bss->ap_vlan = atoi(pos);
+#endif /* FEATURE_SUPPORT_RADIUSGREYLIST */
} else if (os_strcmp(buf, "eapol_version") == 0) {
int eapol_version = atoi(pos);
#ifdef CONFIG_MACSEC
@@ -3605,6 +3621,8 @@ static int hostapd_config_fill(struct hostapd_config *conf,
}
} else if (os_strcmp(buf, "he_6ghz_reg_pwr_type") == 0) {
conf->he_6ghz_reg_pwr_type = atoi(pos);
+ } else if (os_strcmp(buf, "reg_def_cli_eirp") == 0) {
+ conf->reg_def_cli_eirp = atoi(pos);
} else if (os_strcmp(buf, "he_oper_chwidth") == 0) {
conf->he_oper_chwidth = atoi(pos);
} else if (os_strcmp(buf, "he_oper_centr_freq_seg0_idx") == 0) {
@@ -4539,6 +4557,42 @@ static int hostapd_config_fill(struct hostapd_config *conf,
conf->rssi_ignore_probe_request = atoi(pos);
} else if (os_strcmp(buf, "pbss") == 0) {
bss->pbss = atoi(pos);
+#ifdef CONFIG_DRIVER_BRCM_MAP
+ } else if (os_strcmp(buf, "map") == 0) {
+ bss->map = atoi(pos);
+ } else if (os_strcmp(buf, "map_bh_ssid") == 0) {
+ size_t bh_ssid_len = os_strlen(pos);
+ if (bh_ssid_len < 1 || bh_ssid_len > SSID_MAX_LEN) {
+ wpa_printf(MSG_ERROR,
+ "Line %d: Invalid invalid map backhaul ssid '%s'", line, pos);
+ return 1;
+ }
+ bss->map_bh_ssid_len = bh_ssid_len;
+ os_memcpy(bss->map_bh_ssid, pos, bh_ssid_len);
+ } else if (os_strcmp(buf, "map_bh_auth") == 0) {
+ bss->map_bh_auth = atoi(pos);
+ } else if (os_strcmp(buf, "map_bh_encr") == 0) {
+ bss->map_bh_encr = atoi(pos);
+ } else if (os_strcmp(buf, "map_bh_psk") == 0) {
+ size_t bh_psk_len = os_strlen(pos);
+ if (bh_psk_len < 8 || bh_psk_len > PMK_LEN_MAX) {
+ wpa_printf(MSG_ERROR,
+ "Line %d: Invalid invalid map backhaul psk '%s'", line, pos);
+ return 1;
+ }
+ bss->map_bh_psk_len = bh_psk_len;
+ os_memcpy(bss->map_bh_psk, pos, bh_psk_len);
+ } else if (os_strcmp(buf, "ft_rrb_lo_sock") == 0) {
+ int val = atoi(pos);
+
+ if (val < 0 || val > 1) {
+ wpa_printf(MSG_ERROR,
+ "Line %d: Invalid ft_rrb_lo_sock value",
+ line);
+ return 1;
+ }
+ conf->ft_rrb_lo_sock = val;
+#endif /* CONFIG_DRIVER_BRCM_MAP */
} else if (os_strcmp(buf, "transition_disable") == 0) {
bss->transition_disable = strtol(pos, NULL, 16);
#ifdef CONFIG_AIRTIME_POLICY
@@ -4701,6 +4755,10 @@ static int hostapd_config_fill(struct hostapd_config *conf,
return 1;
} else if (os_strcmp(buf, "rnr") == 0) {
bss->rnr = atoi(pos);
+#ifdef CONFIG_DRIVER_BRCM
+ } else if (os_strcmp(buf, "spp_amsdu") == 0) {
+ bss->spp_amsdu = atoi(pos);
+#endif /* CONFIG_DRIVER_BRCM */
#ifdef CONFIG_IEEE80211BE
} else if (os_strcmp(buf, "ieee80211be") == 0) {
conf->ieee80211be = atoi(pos);
diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c
index d479006c7..50d189c6c 100644
--- a/hostapd/ctrl_iface.c
+++ b/hostapd/ctrl_iface.c
@@ -67,7 +67,9 @@
#include "fst/fst_ctrl_iface.h"
#include "config_file.h"
#include "ctrl_iface.h"
-
+#ifdef FEATURE_SUPPORT_RADIUSGREYLIST
+#include "ap/greylist.h"
+#endif /* FEATURE_SUPPORT_RADIUSGREYLIST */
#define HOSTAPD_CLI_DUP_VALUE_MAX_LEN 256
@@ -443,6 +445,42 @@ static int hostapd_ctrl_iface_nfc_report_handover(struct hostapd_data *hapd,
#endif /* CONFIG_WPS_NFC */
+#ifdef CONFIG_DRIVER_BRCM_MAP
+static int hostapd_ctrl_iface_wps_map_bh_creds(struct hostapd_data *hapd, char *txt,
+ char *buf, size_t buflen)
+{
+ char *pos;
+ char *ssid, *auth = NULL, *encr = NULL, *key = NULL;
+ int ret = -1;
+
+ if (!hapd->wps)
+ return -1;
+
+ ssid = txt;
+ pos = os_strchr(txt, ' ');
+ if (!pos)
+ return -1;
+ *pos++ = '\0';
+
+ auth = pos;
+ pos = os_strchr(pos, ' ');
+ if (pos) {
+ *pos++ = '\0';
+ encr = pos;
+ pos = os_strchr(pos, ' ');
+ if (pos) {
+ *pos++ = '\0';
+ key = pos;
+ }
+ }
+
+ if (hostapd_wps_config_map_bh(hapd, ssid, auth, encr, key) < 0) {
+ return os_snprintf(buf, buflen, "FAILED\n");
+ }
+
+ return os_snprintf(buf, buflen, "OK\n");
+}
+#endif /* CONFIG_DRIVER_BRCM_MAP */
static int hostapd_ctrl_iface_wps_ap_pin(struct hostapd_data *hapd, char *txt,
char *buf, size_t buflen)
@@ -3145,6 +3183,17 @@ static int hostapd_ctrl_iface_get_capability(struct hostapd_data *hapd,
return -1;
}
+#ifdef FEATURE_SUPPORT_RADIUSGREYLIST
+static int hostapd_ctrl_add_to_greylist(struct hostapd_data *hapd,
+ const char *txtaddr)
+{
+ if (greylist_add(hapd, txtaddr, false) < 0) {
+ wpa_printf(MSG_ERROR, "Adding %s to greylist failed", txtaddr);
+ return -1;
+ }
+ return 0;
+}
+#endif /* FEATURE_SUPPORT_RADIUSGREYLIST */
#ifdef ANDROID
static int hostapd_ctrl_iface_driver_cmd(struct hostapd_data *hapd, char *cmd,
@@ -3288,6 +3337,11 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
} else if (os_strncmp(buf, "WPS_GET_STATUS", 13) == 0) {
reply_len = hostapd_ctrl_iface_wps_get_status(hapd, reply,
reply_size);
+#ifdef CONFIG_DRIVER_BRCM_MAP
+ } else if (os_strncmp(buf, "WPS_MAPBH_CONFIG ", 17) == 0) {
+ reply_len = hostapd_ctrl_iface_wps_map_bh_creds(hapd, buf + 17,
+ reply, reply_size);
+#endif /* CONFIG_DRIVER_BRCM_MAP */
#ifdef CONFIG_WPS_NFC
} else if (os_strncmp(buf, "WPS_NFC_TAG_READ ", 17) == 0) {
if (hostapd_ctrl_iface_wps_nfc_tag_read(hapd, buf + 17))
@@ -3680,6 +3734,20 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,
} else if (os_strncmp(buf, "GET_CAPABILITY ", 15) == 0) {
reply_len = hostapd_ctrl_iface_get_capability(
hapd, buf + 15, reply, reply_size);
+#ifdef CONFIG_DRIVER_BRCM
+ } else if (os_strncmp(buf, "START_BSS", 9) == 0) {
+ if (hostapd_ctrl_iface_start_bss(hapd))
+ reply_len = -1;
+ } else if (os_strncmp(buf, "STOP_BSS", 8) == 0) {
+ if (hostapd_ctrl_iface_stop_bss(hapd))
+ reply_len = -1;
+#endif /* CONFIG_DRIVER_BRCM */
+#ifdef FEATURE_SUPPORT_RADIUSGREYLIST
+ } else if (os_strncmp(buf, "ADD_TO_GREYLIST ", 16) == 0) {
+ if (hostapd_ctrl_add_to_greylist(hapd,
+ buf + 16))
+ reply_len = -1;
+#endif /* FEATURE_SUPPORT_RADIUSGREYLIST */
#ifdef CONFIG_PASN
} else if (os_strcmp(buf, "PTKSA_CACHE_LIST") == 0) {
reply_len = ptksa_cache_list(hapd->ptksa, reply, reply_size);
diff --git a/hostapd/defconfig b/hostapd/defconfig
index a9eab4d9c..f1453395f 100644
--- a/hostapd/defconfig
+++ b/hostapd/defconfig
@@ -30,6 +30,15 @@ CONFIG_DRIVER_NL80211=y
# Use libnl v2.0 (or 3.0) libraries.
#CONFIG_LIBNL20=y
+ifneq ($(STB),1)
+CFLAGS += -I$(LIBNL_DIR)/install/include/libnl3
+LIBS += -L$(LIBNL_DIR)/install/lib
+else
+LIBS += -lm
+CFLAGS += -I$(LIBNL_DIR)/include/libnl3
+LIBS += -L$(LIBNL_DIR)/lib/static
+endif # STB
+
# Use libnl 3.2 libraries (if this is selected, CONFIG_LIBNL20 is ignored)
CONFIG_LIBNL32=y
diff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c
index 60396f3da..8b4e1982a 100644
--- a/hostapd/hostapd_cli.c
+++ b/hostapd/hostapd_cli.c
@@ -644,6 +644,30 @@ static int hostapd_cli_cmd_wps_config(struct wpa_ctrl *ctrl, int argc,
ssid_hex, argv[1]);
return wpa_ctrl_command(ctrl, buf);
}
+#ifdef CONFIG_DRIVER_BRCM_MAP
+static int hostapd_cli_cmd_wps_mapbh_config(struct wpa_ctrl *ctrl, int argc,
+ char *argv[])
+{
+ char buf[256];
+
+ if (argc < 1) {
+ printf("Invalid 'wps_mapbh_config' command - at least two arguments "
+ "are required.\n");
+ return -1;
+ }
+
+ if (argc > 3)
+ snprintf(buf, sizeof(buf), "WPS_MAPBH_CONFIG %s %s %s %s",
+ argv[0], argv[1], argv[2], argv[3]);
+ else if (argc > 2)
+ snprintf(buf, sizeof(buf), "WPS_MAPBH_CONFIG %s %s %s",
+ argv[0], argv[1], argv[2]);
+ else
+ snprintf(buf, sizeof(buf), "WPS_MAPBH_CONFIG %s %s",
+ argv[0], argv[1]);
+ return wpa_ctrl_command(ctrl, buf);
+}
+#endif /* CONFIG_DRIVER_BRCM_MAP */
#endif /* CONFIG_WPS */
@@ -1540,6 +1564,20 @@ static int hostapd_cli_cmd_reload_wpa_psk(struct wpa_ctrl *ctrl, int argc,
return wpa_ctrl_command(ctrl, "RELOAD_WPA_PSK");
}
+#ifdef FEATURE_SUPPORT_RADIUSGREYLIST
+static int hostapd_cli_add_to_greylist(struct wpa_ctrl *ctrl, int argc,
+ char *argv[])
+{
+ char buf[64];
+ if (argc != 1) {
+ printf("Invalid 'add_to_greylist' command - exactly one argument, STA "
+ "address, is required.\n");
+ return -1;
+ }
+ snprintf(buf, sizeof(buf), "ADD_TO_GREYLIST %s", argv[0]);
+ return wpa_ctrl_command(ctrl, buf);
+}
+#endif /* FEATURE_SUPPORT_RADIUSGREYLIST */
#ifdef ANDROID
static int hostapd_cli_cmd_driver(struct wpa_ctrl *ctrl, int argc, char *argv[])
@@ -1548,6 +1586,17 @@ static int hostapd_cli_cmd_driver(struct wpa_ctrl *ctrl, int argc, char *argv[])
}
#endif /* ANDROID */
+#ifdef CONFIG_DRIVER_BRCM
+static int hostapd_cli_cmd_start_bss(struct wpa_ctrl *ctrl, int argc, char *argv[])
+{
+ return wpa_ctrl_command(ctrl, "START_BSS");
+}
+
+static int hostapd_cli_cmd_stop_bss(struct wpa_ctrl *ctrl, int argc, char *argv[])
+{
+ return wpa_ctrl_command(ctrl, "STOP_BSS");
+}
+#endif /* CONFIG_DRIVER_BRCM */
struct hostapd_cli_cmd {
const char *cmd;
@@ -1610,6 +1659,10 @@ static const struct hostapd_cli_cmd hostapd_cli_commands[] = {
"<SSID> <auth> <encr> <key> = configure AP" },
{ "wps_get_status", hostapd_cli_cmd_wps_get_status, NULL,
"= show current WPS status" },
+#ifdef CONFIG_DRIVER_BRCM_MAP
+ { "wps_mapbh_config", hostapd_cli_cmd_wps_mapbh_config, NULL,
+ "<SSID> <auth> <encr> <key> = update multiap backhaul config" },
+#endif /* CONFIG_DRIVER_BRCM_MAP */
#endif /* CONFIG_WPS */
{ "disassoc_imminent", hostapd_cli_cmd_disassoc_imminent, NULL,
"= send Disassociation Imminent notification" },
@@ -1740,10 +1793,20 @@ static const struct hostapd_cli_cmd hostapd_cli_commands[] = {
"<addr> [req_mode=] <measurement request hexdump> = send a Beacon report request to a station" },
{ "reload_wpa_psk", hostapd_cli_cmd_reload_wpa_psk, NULL,
"= reload wpa_psk_file only" },
+#ifdef FEATURE_SUPPORT_RADIUSGREYLIST
+ { "add_to_greylist", hostapd_cli_add_to_greylist, NULL,
+ "<addr> = add a station to greylist" },
+#endif /* FEATURE_SUPPORT_RADIUSGREYLIST */
#ifdef ANDROID
{ "driver", hostapd_cli_cmd_driver, NULL,
"<driver sub command> [<hex formatted data>] = send driver command data" },
#endif /* ANDROID */
+#ifdef CONFIG_DRIVER_BRCM
+ { "start_bss", hostapd_cli_cmd_start_bss, NULL,
+ "= start beaconing on BSS (BSS up)" },
+ { "stop_bss", hostapd_cli_cmd_stop_bss, NULL,
+ "= stop beaconing on BSS (BSS down)" },
+#endif /* CONFIG_DRIVER_BRCM */
{ NULL, NULL, NULL, NULL }
};
diff --git a/hostapd/main.c b/hostapd/main.c
index 4503d24ae..e1867b8eb 100644
--- a/hostapd/main.c
+++ b/hostapd/main.c
@@ -31,15 +31,22 @@
#include "config_file.h"
#include "eap_register.h"
#include "ctrl_iface.h"
-
+#ifdef FEATURE_SUPPORT_RADIUSGREYLIST
+#include "ap/greylist.h"
+#endif /* FEATURE_SUPPORT_RADIUSGREYLIST */
+#if defined(CONFIG_DRIVER_BRCM) && defined(BCM_CEVENT)
+#include "ce_shared.h"
+#include "security_ipc.h"
+#endif /* CONFIG_DRIVER_BRCM && BCM_CEVENT */
struct hapd_global {
void **drv_priv;
size_t drv_count;
};
+#if 0
static struct hapd_global global;
-
+#endif
#ifndef CONFIG_NO_HOSTAPD_LOGGER
static void hostapd_logger_cb(void *ctx, const u8 *addr, unsigned int module,
@@ -150,7 +157,7 @@ static void hostapd_logger_cb(void *ctx, const u8 *addr, unsigned int module,
/**
* hostapd_driver_init - Preparate driver interface
*/
-static int hostapd_driver_init(struct hostapd_iface *iface)
+int hostapd_driver_init(struct hostapd_iface *iface)
{
struct wpa_init_params params;
size_t i;
@@ -254,7 +261,7 @@ static int hostapd_driver_init(struct hostapd_iface *iface)
* or more BSSes sharing the same radio) and allocate memory for the BSS
* interfaces. No actual driver operations are started.
*/
-static struct hostapd_iface *
+struct hostapd_iface *
hostapd_interface_init(struct hapd_interfaces *interfaces, const char *if_name,
const char *config_fname, int debug)
{
@@ -332,7 +339,7 @@ static void handle_dump_state(int sig, void *signal_ctx)
#endif /* CONFIG_NATIVE_WINDOWS */
-static int hostapd_global_init(struct hapd_interfaces *interfaces,
+int hostapd_global_init(struct hapd_interfaces *interfaces,
const char *entropy_file)
{
int i;
@@ -378,7 +385,7 @@ static int hostapd_global_init(struct hapd_interfaces *interfaces,
}
-static void hostapd_global_deinit(const char *pid_file, int eloop_initialized)
+void hostapd_global_deinit(const char *pid_file, int eloop_initialized)
{
int i;
@@ -409,7 +416,7 @@ static void hostapd_global_deinit(const char *pid_file, int eloop_initialized)
}
-static int hostapd_global_run(struct hapd_interfaces *ifaces, int daemonize,
+int hostapd_global_run(struct hapd_interfaces *ifaces, int daemonize,
const char *pid_file)
{
#ifdef EAP_SERVER_TNC
@@ -617,7 +624,7 @@ static int gen_uuid(const char *txt_addr)
#define HOSTAPD_CLEANUP_INTERVAL 10
#endif /* HOSTAPD_CLEANUP_INTERVAL */
-static int hostapd_periodic_call(struct hostapd_iface *iface, void *ctx)
+int hostapd_periodic_call(struct hostapd_iface *iface, void *ctx)
{
hostapd_periodic_iface(iface);
return 0;
@@ -625,7 +632,7 @@ static int hostapd_periodic_call(struct hostapd_iface *iface, void *ctx)
/* Periodic cleanup tasks */
-static void hostapd_periodic(void *eloop_ctx, void *timeout_ctx)
+void hostapd_periodic(void *eloop_ctx, void *timeout_ctx)
{
struct hapd_interfaces *interfaces = eloop_ctx;
@@ -889,6 +896,10 @@ int main(int argc, char *argv[])
hostapd_global_ctrl_iface_init(&interfaces);
+#ifdef FEATURE_SUPPORT_RADIUSGREYLIST
+ greylist_load(&interfaces);
+#endif /* FEATURE_SUPPORT_RADIUSGREYLIST */
+
if (hostapd_global_run(&interfaces, daemonize, pid_file)) {
wpa_printf(MSG_ERROR, "Failed to start eloop");
goto out;
diff --git a/hs20/.DS_Store b/hs20/.DS_Store
new file mode 100644
index 000000000..e69de29bb
diff --git a/src/.DS_Store b/src/.DS_Store
new file mode 100644
index 000000000..e69de29bb
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 000000000..0044634df
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,385 @@
+##########################################################################
+# If not stated otherwise in this file or this component's LICENSE
+# file the following copyright and licenses apply:
+#
+# Copyright 2015 RDK Management
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+##########################################################################
+AM_CFLAGS = -D_ANSC_LINUX
+AM_CFLAGS += -D_ANSC_USER
+if CCSP_ARCH_ARM
+AM_CFLAGS += -D_ANSC_LITTLE_ENDIAN_
+endif
+
+if CCSP_ARCH_ATOM
+AM_CFLAGS += -D_ANSC_LITTLE_ENDIAN_
+endif
+
+if CCSP_ARCH_PC
+AM_CFLAGS += -D_ANSC_LITTLE_ENDIAN_
+endif
+AM_CFLAGS += -DEAP_PWD
+AM_CPPFLAGS = -Wall -Werror
+ACLOCAL_AMFLAGS = -I m4
+hardware_platform = i686-linux-gnu
+
+lib_LTLIBRARIES = libhostap.la
+
+libhostap_la_CPPFLAGS = -I$(top_srcdir)/source/hostap-2.10/src -I$(top_srcdir)/source/hostap-2.10/src/utils/ -I$(top_srcdir)/source/hostap-2.10/src/ap
+libhostap_la_CPPFLAGS += -I$(top_srcdir)/libnl/include
+libhostap_la_CPPFLAGS += -I$(top_srcdir)/openssl/usr/include/
+
+libhostap_la_SOURCES = ap/wpa_auth_glue.c
+libhostap_la_SOURCES += ap/wpa_auth.c
+libhostap_la_SOURCES += ap/wpa_auth_ie.c
+libhostap_la_SOURCES += ap/wpa_auth_ft.c
+libhostap_la_SOURCES += ap/ap_drv_ops.c
+libhostap_la_SOURCES += ap/pmksa_cache_auth.c
+libhostap_la_SOURCES += ap/tkip_countermeasures.c
+libhostap_la_SOURCES += ap/ieee802_11.c
+libhostap_la_SOURCES += ap/ieee802_11_he.c
+libhostap_la_SOURCES += ap/ieee802_11_ht.c
+libhostap_la_SOURCES += ap/ieee802_11_vht.c
+libhostap_la_SOURCES += ap/ieee802_11_shared.c
+libhostap_la_SOURCES += ap/beacon.c
+libhostap_la_SOURCES += ap/dfs.c
+libhostap_la_SOURCES += ap/sta_info.c
+libhostap_la_SOURCES += ap/ieee802_1x.c
+libhostap_la_SOURCES += ap/accounting.c
+libhostap_la_SOURCES += ap/utils.c
+libhostap_la_SOURCES += ap/ap_config.c
+libhostap_la_SOURCES += ap/ieee802_11_auth.c
+libhostap_la_SOURCES += ap/hw_features.c
+libhostap_la_SOURCES += ap/wmm.c
+libhostap_la_SOURCES += ap/hostapd.c
+libhostap_la_SOURCES += ap/wps_hostapd.c
+libhostap_la_SOURCES += ap/rrm.c
+libhostap_la_SOURCES += ap/eap_user_db.c
+libhostap_la_SOURCES += ap/neighbor_db.c
+libhostap_la_SOURCES += ap/ap_mlme.c
+libhostap_la_SOURCES += ap/ap_list.c
+libhostap_la_SOURCES += ap/authsrv.c
+libhostap_la_SOURCES += ap/bss_load.c
+libhostap_la_SOURCES += ap/vlan_init.c
+libhostap_la_SOURCES += ap/vlan.c
+libhostap_la_SOURCES += ap/vlan_ifconfig.c
+libhostap_la_SOURCES += ap/drv_callbacks.c
+libhostap_la_SOURCES += ap/eth_p_oui.c
+libhostap_la_SOURCES += ap/ctrl_iface_ap.c
+libhostap_la_SOURCES += ap/greylist.c
+libhostap_la_SOURCES += ap/wnm_ap.c
+
+libhostap_la_SOURCES += radius/radius.c
+libhostap_la_SOURCES += radius/radius_client.c
+libhostap_la_SOURCES += radius/radius_das.c
+
+#libhostap_la_SOURCES += eap_register.c
+libhostap_la_SOURCES += eap_common/eap_common.c
+libhostap_la_SOURCES += eap_common/eap_peap_common.c
+libhostap_la_SOURCES += eap_common/eap_psk_common.c
+libhostap_la_SOURCES += eap_common/eap_pax_common.c
+libhostap_la_SOURCES += eap_common/eap_sake_common.c
+libhostap_la_SOURCES += eap_common/eap_gpsk_common.c
+libhostap_la_SOURCES += eap_common/chap.c
+libhostap_la_SOURCES += eap_common/eap_pwd_common.c
+#libhostap_la_SOURCES += eap_common/eap_sim_common.c
+#libhostap_la_SOURCES += eap_common/eap_fast_common.c
+libhostap_la_SOURCES += eap_common/eap_ikev2_common.c
+libhostap_la_SOURCES += eap_common/ikev2_common.c
+libhostap_la_SOURCES += eap_common/eap_wsc_common.c
+#libhostap_la_SOURCES += eap_common/eap_teap_common.c
+
+libhostap_la_SOURCES += eap_peer/eap_tls.c
+libhostap_la_SOURCES += eap_peer/eap_peap.c
+libhostap_la_SOURCES += eap_peer/eap_ttls.c
+libhostap_la_SOURCES += eap_peer/eap_md5.c
+libhostap_la_SOURCES += eap_peer/eap_mschapv2.c
+libhostap_la_SOURCES += eap_peer/mschapv2.c
+libhostap_la_SOURCES += eap_peer/eap_otp.c
+libhostap_la_SOURCES += eap_peer/eap_gtc.c
+libhostap_la_SOURCES += eap_peer/eap_leap.c
+libhostap_la_SOURCES += eap_peer/eap_psk.c
+libhostap_la_SOURCES += eap_peer/eap_pax.c
+libhostap_la_SOURCES += eap_peer/eap_sake.c
+libhostap_la_SOURCES += eap_peer/eap_gpsk.c
+libhostap_la_SOURCES += eap_peer/eap.c
+libhostap_la_SOURCES += eap_peer/eap_methods.c
+libhostap_la_SOURCES += eap_peer/eap_tls_common.c
+libhostap_la_SOURCES += eap_peer/eap_pwd.c
+libhostap_la_SOURCES += eap_server/eap_server_tls.c
+libhostap_la_SOURCES += eap_server/eap_server_peap.c
+#libhostap_la_SOURCES += eap_server/eap_server_ttls.c
+libhostap_la_SOURCES += eap_server/eap_server_md5.c
+#libhostap_la_SOURCES += eap_server/eap_server_mschapv2.c
+libhostap_la_SOURCES += eap_server/eap_server_gtc.c
+libhostap_la_SOURCES += eap_server/eap_server_psk.c
+libhostap_la_SOURCES += eap_server/eap_server_pax.c
+libhostap_la_SOURCES += eap_server/eap_server_sake.c
+libhostap_la_SOURCES += eap_server/eap_server_gpsk.c
+libhostap_la_SOURCES += eap_server/eap_server.c
+libhostap_la_SOURCES += eap_server/eap_server_identity.c
+libhostap_la_SOURCES += eap_server/eap_server_methods.c
+libhostap_la_SOURCES += eap_server/eap_server_tls_common.c
+libhostap_la_SOURCES += eap_server/eap_server_pwd.c
+libhostap_la_SOURCES += eap_server/eap_server_tnc.c
+libhostap_la_SOURCES += eap_server/tncs.c
+libhostap_la_SOURCES += eap_server/eap_server_ikev2.c
+libhostap_la_SOURCES += eap_server/eap_server_wsc.c
+#libhostap_la_SOURCES += eap_server/eap_server_teap.c
+#libhostap_la_SOURCES += eap_server/eap_server_fast.c
+#libhostap_la_SOURCES += eap_server/eap_server_aka.c
+#libhostap_la_SOURCES += eap_server/eap_server_sim.c
+#libhostap_la_SOURCES += eap_server/eap_sim_db.c
+libhostap_la_SOURCES += eap_server/ikev2.c
+libhostap_la_SOURCES += eapol_supp/eapol_supp_sm.c
+libhostap_la_SOURCES += rsn_supp/wpa.c
+libhostap_la_SOURCES += rsn_supp/wpa_ie.c
+libhostap_la_SOURCES += rsn_supp/wpa_ft.c
+libhostap_la_SOURCES += rsn_supp/pmksa_cache.c
+libhostap_la_SOURCES += rsn_supp/preauth.c
+
+libhostap_la_SOURCES += common/wpa_common.c
+libhostap_la_SOURCES += common/wpa_ctrl.c
+libhostap_la_SOURCES += common/wpa_helpers.c
+libhostap_la_SOURCES += common/ieee802_11_common.c
+libhostap_la_SOURCES += common/hw_features_common.c
+libhostap_la_SOURCES += common/ctrl_iface_common.c
+libhostap_la_SOURCES += common/sae.c
+libhostap_la_SOURCES += common/dragonfly.c
+
+libhostap_la_SOURCES += utils/wpa_debug.c
+libhostap_la_SOURCES += utils/eloop.c
+libhostap_la_SOURCES += utils/os_unix.c
+libhostap_la_SOURCES += utils/common.c
+libhostap_la_SOURCES += utils/wpabuf.c
+libhostap_la_SOURCES += utils/ip_addr.c
+libhostap_la_SOURCES += utils/uuid.c
+libhostap_la_SOURCES += utils/base64.c
+libhostap_la_SOURCES += utils/crc32.c
+
+libhostap_la_SOURCES += crypto/random.c
+#libhostap_la_SOURCES += crypto/md5.c
+#libhostap_la_SOURCES += crypto/md5-internal.c
+#libhostap_la_SOURCES += crypto/sha1.c
+libhostap_la_SOURCES += crypto/sha256-kdf.c
+#libhostap_la_SOURCES += crypto/sha1-internal.c
+#libhostap_la_SOURCES += crypto/sha1-pbkdf2.c
+libhostap_la_SOURCES += crypto/sha1-prf.c
+#libhostap_la_SOURCES += crypto/aes-cbc.c
+#libhostap_la_SOURCES += crypto/aes-ccm.c
+libhostap_la_SOURCES += crypto/aes-ctr.c
+libhostap_la_SOURCES += crypto/aes-eax.c
+libhostap_la_SOURCES += crypto/aes-encblock.c
+#libhostap_la_SOURCES += crypto/aes-gcm.c
+#libhostap_la_SOURCES += crypto/aes-internal.c
+#libhostap_la_SOURCES += crypto/aes-internal-dec.c
+#libhostap_la_SOURCES += crypto/aes-internal-enc.c
+libhostap_la_SOURCES += crypto/aes-omac1.c
+libhostap_la_SOURCES += crypto/aes-siv.c
+#libhostap_la_SOURCES += crypto/aes-wrap.c
+#libhostap_la_SOURCES += crypto/aes-unwrap.c
+#libhostap_la_SOURCES += crypto/rc4.c
+libhostap_la_SOURCES += crypto/tls_none.c
+#libhostap_la_SOURCES += crypto/tls_internal.c
+libhostap_la_SOURCES += crypto/ms_funcs.c
+libhostap_la_SOURCES += crypto/dh_groups.c
+#libhostap_la_SOURCES += crypto/des-internal.c
+#libhostap_la_SOURCES += crypto/dh_group5.c
+#libhostap_la_SOURCES += crypto/md4-internal.c
+#libhostap_la_SOURCES += crypto/milenage.c
+libhostap_la_SOURCES += crypto/sha1-tlsprf.c
+#libhostap_la_SOURCES += crypto/sha1-tprf.c
+#libhostap_la_SOURCES += crypto/sha256.c
+libhostap_la_SOURCES += crypto/sha256-prf.c
+libhostap_la_SOURCES += crypto/sha256-tlsprf.c
+#libhostap_la_SOURCES += crypto/sha256-internal.c
+#libhostap_la_SOURCES += crypto/crypto_internal.c
+#libhostap_la_SOURCES += crypto/crypto_internal-cipher.c
+#libhostap_la_SOURCES += crypto/crypto_internal-modexp.c
+#libhostap_la_SOURCES += crypto/crypto_internal-rsa.c
+#libhostap_la_SOURCES += crypto/sha384.c
+libhostap_la_SOURCES += crypto/sha384-prf.c
+libhostap_la_SOURCES += crypto/sha384-kdf.c
+#libhostap_la_SOURCES += crypto/sha384-internal.c
+#libhostap_la_SOURCES += crypto/sha512-internal.c
+libhostap_la_SOURCES += crypto/sha512-kdf.c
+libhostap_la_SOURCES += crypto/sha512-prf.c
+#libhostap_la_SOURCES += crypto/fips_prf_internal.c
+#libhostap_la_SOURCES += crypto/tls_openssl.c
+libhostap_la_SOURCES += crypto/crypto_openssl.c
+
+#libhostap_la_SOURCES += crypto/dh_group5.c
+#libhostap_la_SOURCES += crypto/dh_groups.c
+#libhostap_la_SOURCES += crypto/sha256-prf.c
+#libhostap_la_SOURCES += crypto/sha256.c
+#libhostap_la_SOURCES += crypto/sha256-internal.c
+#libhostap_la_SOURCES += crypto/crypto_internal-modexp.c
+#libhostap_la_SOURCES += tls/bignum.c
+
+libhostap_la_SOURCES += eapol_auth/eapol_auth_sm.c
+libhostap_la_SOURCES += eapol_auth/eapol_auth_dump.c
+
+libhostap_la_SOURCES += l2_packet/l2_packet_linux.c
+libhostap_la_SOURCES += drivers/netlink.c
+libhostap_la_SOURCES += drivers/drivers.c #Added for hostapd.c support, will be removed later once only needed API(s) used
+libhostap_la_SOURCES += drivers/driver_common.c #event_to_string API, will be removed later once only needed API(s) used
+
+#AM_CFLAGS += -DCONFIG_DRIVER_NL80211
+libhostap_la_SOURCES += drivers/driver_nl80211.c
+libhostap_la_SOURCES += drivers/driver_nl80211_android.c
+libhostap_la_SOURCES += drivers/driver_nl80211_capa.c
+libhostap_la_SOURCES += drivers/driver_nl80211_event.c
+libhostap_la_SOURCES += drivers/driver_nl80211_monitor.c
+libhostap_la_SOURCES += drivers/driver_nl80211_scan.c
+libhostap_la_SOURCES += drivers/linux_ioctl.c
+libhostap_la_SOURCES += drivers/rfkill.c
+libhostap_la_SOURCES += drivers/driver_hostap.c
+libhostap_la_SOURCES += utils/radiotap.c
+libhostap_la_SOURCES += ap/acs.c
+
+libhostap_la_SOURCES += wps/wps.c
+libhostap_la_SOURCES += wps/wps_attr_build.c
+libhostap_la_SOURCES += wps/wps_registrar.c
+libhostap_la_SOURCES += wps/wps_dev_attr.c
+libhostap_la_SOURCES += wps/wps_common.c
+libhostap_la_SOURCES += wps/wps_enrollee.c
+libhostap_la_SOURCES += wps/wps_attr_parse.c
+libhostap_la_SOURCES += wps/wps_attr_process.c
+
+libhostap_la_SOURCES += tls/asn1.c
+#libhostap_la_SOURCES += tls/bignum.c
+#libhostap_la_SOURCES += tls/pkcs1.c
+#libhostap_la_SOURCES += tls/pkcs5.c
+#libhostap_la_SOURCES += tls/pkcs8.c
+#libhostap_la_SOURCES += tls/rsa.c
+#libhostap_la_SOURCES += tls/tlsv1_client.c
+#libhostap_la_SOURCES += tls/tlsv1_client_read.c
+#libhostap_la_SOURCES += tls/tlsv1_client_write.c
+#libhostap_la_SOURCES += tls/tlsv1_common.c
+#libhostap_la_SOURCES += tls/tlsv1_cred.c
+#libhostap_la_SOURCES += tls/tlsv1_record.c
+#libhostap_la_SOURCES += tls/tlsv1_server.c
+#libhostap_la_SOURCES += tls/tlsv1_server_read.c
+#libhostap_la_SOURCES += tls/tlsv1_server_write.c
+#libhostap_la_SOURCES += tls/tlsv1_client_ocsp.c
+#libhostap_la_SOURCES += tls/x509v3.c
+
+AM_CFLAGS += -DCONFIG_HS20
+AM_CFLAGS += -DCONFIG_INTERWORKING
+libhostap_la_SOURCES += ap/hs20.c
+libhostap_la_SOURCES += ap/gas_serv.c