3 @@ -14,6 +14,7 @@ CFLAGS += -I../src/utils
4 # CFLAGS += -DUSE_KERNEL_HEADERS -I/usr/src/linux/include
7 +-include $(if $(MULTICALL), ../wpa_supplicant/.config)
10 ifdef CONFIG_NATIVE_WINDOWS
11 @@ -159,10 +160,14 @@ ifdef CONFIG_IEEE80211N
12 CFLAGS += -DCONFIG_IEEE80211N
16 +CFLAGS += -DNO_SUPPLICANT
19 include ../src/drivers/drivers.mak
20 -OBJS += $(DRV_AP_OBJS)
21 -CFLAGS += $(DRV_AP_CFLAGS)
22 -LDFLAGS += $(DRV_AP_LDFLAGS)
23 +OBJS += $(sort $(DRV_AP_OBJS) $(if $(MULTICALL),$(DRV_WPA_OBJS)))
24 +CFLAGS += $(DRV_AP_CFLAGS) $(if $(MULTICALL),$(DRV_WPA_CFLAGS))
25 +LDFLAGS += $(DRV_AP_LDFLAGS) $(if $(MULTICALL),$(DRV_WPA_LDFLAGS))
26 LIBS += $(DRV_AP_LIBS)
28 ifdef CONFIG_L2_PACKET
29 @@ -775,6 +780,12 @@ install: all
31 BCHECK=../src/drivers/build.hostapd
33 +hostapd_multi.a: $(BCHECK) $(OBJS)
34 + $(Q)$(CC) -c -o hostapd_multi.o -Dmain=hostapd_main $(CFLAGS) main.c
37 + @$(AR) cr $@ hostapd_multi.o $(OBJS)
39 hostapd: $(BCHECK) $(OBJS)
40 $(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS)
42 @@ -813,6 +824,12 @@ HOBJS += ../src/crypto/aes-internal.o
43 HOBJS += ../src/crypto/aes-internal-enc.o
47 + @echo -n $(CFLAGS) " "
50 + @echo -n $(LDFLAGS) $(LIBS) $(EXTRALIBS) " "
52 nt_password_hash: $(NOBJS)
53 $(CC) $(LDFLAGS) -o nt_password_hash $(NOBJS) $(LIBS_n)
55 --- a/wpa_supplicant/Makefile
56 +++ b/wpa_supplicant/Makefile
57 @@ -53,6 +53,7 @@ OBJS_c = wpa_cli.o ../src/common/wpa_ctr
58 OBJS_c += ../src/utils/wpa_debug.o
61 +-include $(if $(MULTICALL),../hostapd/.config)
64 ifdef CONFIG_NATIVE_WINDOWS
65 @@ -627,6 +628,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS
66 CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS
67 LIBS += -ldl -rdynamic
71 + OBJS += ../src/eap_common/eap_common.o
76 @@ -635,9 +640,11 @@ NEED_EAP_COMMON=y
77 NEED_RSN_AUTHENTICATOR=y
81 CFLAGS += -DCONFIG_NO_RADIUS
82 CFLAGS += -DCONFIG_NO_ACCOUNTING
83 CFLAGS += -DCONFIG_NO_VLAN
85 OBJS += ../src/ap/hostapd.o
86 OBJS += ../src/ap/wpa_auth_glue.o
87 OBJS += ../src/ap/utils.o
88 @@ -681,10 +688,18 @@ CFLAGS += -DEAP_SERVER_WSC
89 OBJS += ../src/ap/wps_hostapd.o
90 OBJS += ../src/eap_server/eap_server_wsc.o
94 + OBJS += ../src/eap_server/eap_server.o
95 + OBJS += ../src/eap_server/eap_server_identity.o
96 + OBJS += ../src/eap_server/eap_server_methods.o
100 ifdef NEED_RSN_AUTHENTICATOR
102 CFLAGS += -DCONFIG_NO_RADIUS
105 OBJS += ../src/ap/wpa_auth.o
106 OBJS += ../src/ap/wpa_auth_ie.o
107 @@ -1334,6 +1349,12 @@ BCHECK=../src/drivers/build.wpa_supplica
108 wpa_priv: $(BCHECK) $(OBJS_priv)
109 $(LDO) $(LDFLAGS) -o wpa_priv $(OBJS_priv) $(LIBS)
111 +wpa_supplicant_multi.a: .config $(BCHECK) $(OBJS) $(EXTRA_progs)
112 + $(Q)$(CC) -c -o wpa_supplicant_multi.o -Dmain=wpa_supplicant_main $(CFLAGS) main.c
115 + @$(AR) cr $@ wpa_supplicant_multi.o $(OBJS)
117 wpa_supplicant: .config $(BCHECK) $(OBJS) $(EXTRA_progs)
118 $(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS)
120 @@ -1393,6 +1414,12 @@ endif
121 $(Q)$(CC) -c -o $@ $(CFLAGS) $<
125 + @echo -n $(CFLAGS) " "
128 + @echo -n $(LDFLAGS) $(LIBS) $(EXTRALIBS) " "
130 wpa_supplicant.exe: wpa_supplicant
133 --- a/src/drivers/driver.h
134 +++ b/src/drivers/driver.h
135 @@ -3103,8 +3103,8 @@ union wpa_event_data {
136 * Driver wrapper code should call this function whenever an event is received
139 -void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
140 - union wpa_event_data *data);
141 +extern void (*wpa_supplicant_event)(void *ctx, enum wpa_event_type event,
142 + union wpa_event_data *data);
146 --- a/src/ap/drv_callbacks.c
147 +++ b/src/ap/drv_callbacks.c
148 @@ -443,8 +443,8 @@ static void hostapd_event_eapol_rx(struc
152 -void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
153 - union wpa_event_data *data)
154 +void hostapd_wpa_event(void *ctx, enum wpa_event_type event,
155 + union wpa_event_data *data)
157 struct hostapd_data *hapd = ctx;
159 @@ -526,5 +526,6 @@ void wpa_supplicant_event(void *ctx, enu
167 --- a/wpa_supplicant/wpa_priv.c
168 +++ b/wpa_supplicant/wpa_priv.c
169 @@ -825,8 +825,8 @@ static void wpa_priv_send_ft_response(st
173 -void wpa_supplicant_event(void *ctx, wpa_event_type event,
174 - union wpa_event_data *data)
175 +static void supplicant_event(void *ctx, wpa_event_type event,
176 + union wpa_event_data *data)
178 struct wpa_priv_interface *iface = ctx;
180 @@ -968,6 +968,7 @@ int main(int argc, char *argv[])
181 if (os_program_init())
184 + wpa_supplicant_event = supplicant_event;
185 wpa_priv_fd_workaround();
188 --- a/wpa_supplicant/events.c
189 +++ b/wpa_supplicant/events.c
190 @@ -1679,8 +1679,8 @@ static void wpa_supplicant_event_unprot_
194 -void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
195 - union wpa_event_data *data)
196 +void supplicant_event(void *ctx, enum wpa_event_type event,
197 + union wpa_event_data *data)
199 struct wpa_supplicant *wpa_s = ctx;
201 --- a/wpa_supplicant/wpa_supplicant.c
202 +++ b/wpa_supplicant/wpa_supplicant.c
203 @@ -2332,6 +2332,9 @@ struct wpa_supplicant * wpa_supplicant_g
207 +extern void supplicant_event(void *ctx, enum wpa_event_type event,
208 + union wpa_event_data *data);
212 * wpa_supplicant_init - Initialize %wpa_supplicant
213 @@ -2350,6 +2353,7 @@ struct wpa_global * wpa_supplicant_init(
217 + wpa_supplicant_event = supplicant_event;
218 wpa_debug_open_file(params->wpa_debug_file_path);
219 if (params->wpa_debug_syslog)
220 wpa_debug_open_syslog();
223 @@ -479,6 +479,9 @@ static void usage(void)
227 +void hostapd_wpa_event(void *ctx, enum wpa_event_type event,
228 + union wpa_event_data *data);
231 int main(int argc, char *argv[])
233 @@ -490,6 +493,7 @@ int main(int argc, char *argv[])
234 if (os_program_init())
237 + wpa_supplicant_event = hostapd_wpa_event;
239 c = getopt(argc, argv, "BdhKP:tv");
241 --- a/src/drivers/drivers.c
242 +++ b/src/drivers/drivers.c
246 #include "includes.h"
250 +void (*wpa_supplicant_event)(void *ctx, enum wpa_event_type event,
251 + union wpa_event_data *data);
253 #ifdef CONFIG_DRIVER_WEXT
254 extern struct wpa_driver_ops wpa_driver_wext_ops; /* driver_wext.c */