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 @@ -157,10 +158,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 @@ -738,6 +743,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 @@ -776,6 +787,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 @@ -52,6 +52,7 @@ OBJS_p += ../src/utils/wpabuf.o
58 OBJS_c = wpa_cli.o ../src/common/wpa_ctrl.o
61 +-include $(if $(MULTICALL),../hostapd/.config)
64 ifdef CONFIG_NATIVE_WINDOWS
65 @@ -579,6 +580,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 @@ -631,6 +636,12 @@ CFLAGS += -DEAP_SERVER_WSC
77 OBJS += ../src/ap/wps_hostapd.o
78 OBJS += ../src/eap_server/eap_wsc.o
82 + OBJS += ../src/eap_server/eap.o
83 + OBJS += ../src/eap_server/eap_identity.o
84 + OBJS += ../src/eap_server/eap_methods.o
88 ifdef NEED_RSN_AUTHENTICATOR
89 @@ -1260,6 +1271,12 @@ BCHECK=../src/drivers/build.wpa_supplica
90 wpa_priv: $(BCHECK) $(OBJS_priv)
91 $(LDO) $(LDFLAGS) -o wpa_priv $(OBJS_priv) $(LIBS)
93 +wpa_supplicant_multi.a: .config $(BCHECK) $(OBJS) $(EXTRA_progs)
94 + $(Q)$(CC) -c -o wpa_supplicant_multi.o -Dmain=wpa_supplicant_main $(CFLAGS) main.c
97 + @$(AR) cr $@ wpa_supplicant_multi.o $(OBJS)
99 wpa_supplicant: .config $(BCHECK) $(OBJS) $(EXTRA_progs)
100 $(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS)
102 @@ -1319,6 +1336,12 @@ endif
103 $(Q)$(CC) -c -o $@ $(CFLAGS) $<
107 + @echo -n $(CFLAGS) " "
110 + @echo -n $(LDFLAGS) $(LIBS) $(EXTRALIBS) " "
112 wpa_supplicant.exe: wpa_supplicant
115 --- a/src/drivers/driver.h
116 +++ b/src/drivers/driver.h
117 @@ -2384,8 +2384,8 @@ union wpa_event_data {
118 * Driver wrapper code should call this function whenever an event is received
121 -void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
122 - union wpa_event_data *data);
123 +extern void (*wpa_supplicant_event)(void *ctx, enum wpa_event_type event,
124 + union wpa_event_data *data);
128 --- a/src/ap/drv_callbacks.c
129 +++ b/src/ap/drv_callbacks.c
130 @@ -337,8 +337,8 @@ static void hostapd_event_eapol_rx(struc
134 -void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
135 - union wpa_event_data *data)
136 +void hostapd_wpa_event(void *ctx, enum wpa_event_type event,
137 + union wpa_event_data *data)
139 struct hostapd_data *hapd = ctx;
141 @@ -415,5 +415,6 @@ void wpa_supplicant_event(void *ctx, enu
149 --- a/wpa_supplicant/wpa_priv.c
150 +++ b/wpa_supplicant/wpa_priv.c
151 @@ -825,8 +825,8 @@ static void wpa_priv_send_ft_response(st
155 -void wpa_supplicant_event(void *ctx, wpa_event_type event,
156 - union wpa_event_data *data)
157 +static void supplicant_event(void *ctx, wpa_event_type event,
158 + union wpa_event_data *data)
160 struct wpa_priv_interface *iface = ctx;
162 @@ -968,6 +968,7 @@ int main(int argc, char *argv[])
163 if (os_program_init())
166 + wpa_supplicant_event = supplicant_event;
167 wpa_priv_fd_workaround();
170 --- a/wpa_supplicant/events.c
171 +++ b/wpa_supplicant/events.c
172 @@ -1425,8 +1425,8 @@ static void wpa_supplicant_event_ibss_rs
173 #endif /* CONFIG_IBSS_RSN */
176 -void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
177 - union wpa_event_data *data)
178 +void supplicant_event(void *ctx, enum wpa_event_type event,
179 + union wpa_event_data *data)
181 struct wpa_supplicant *wpa_s = ctx;
183 --- a/wpa_supplicant/wpa_supplicant.c
184 +++ b/wpa_supplicant/wpa_supplicant.c
185 @@ -2215,6 +2215,9 @@ struct wpa_supplicant * wpa_supplicant_g
189 +extern void supplicant_event(void *ctx, enum wpa_event_type event,
190 + union wpa_event_data *data);
194 * wpa_supplicant_init - Initialize %wpa_supplicant
195 @@ -2233,6 +2236,7 @@ struct wpa_global * wpa_supplicant_init(
199 + wpa_supplicant_event = supplicant_event;
200 wpa_debug_open_file(params->wpa_debug_file_path);
201 if (params->wpa_debug_syslog)
202 wpa_debug_open_syslog();
205 @@ -478,6 +478,9 @@ static void usage(void)
209 +void hostapd_wpa_event(void *ctx, enum wpa_event_type event,
210 + union wpa_event_data *data);
213 int main(int argc, char *argv[])
215 @@ -489,6 +492,7 @@ int main(int argc, char *argv[])
216 if (os_program_init())
219 + wpa_supplicant_event = hostapd_wpa_event;
221 c = getopt(argc, argv, "BdhKP:tv");
223 --- a/src/drivers/drivers.c
224 +++ b/src/drivers/drivers.c
228 #include "includes.h"
232 +void (*wpa_supplicant_event)(void *ctx, enum wpa_event_type event,
233 + union wpa_event_data *data);
235 #ifdef CONFIG_DRIVER_WEXT
236 extern struct wpa_driver_ops wpa_driver_wext_ops; /* driver_wext.c */