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 @@ -168,10 +169,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 @@ -799,6 +804,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 $(Q)$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS)
42 @@ -837,6 +848,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 $(Q)$(CC) $(LDFLAGS) -o nt_password_hash $(NOBJS) $(LIBS_n)
55 --- a/wpa_supplicant/Makefile
56 +++ b/wpa_supplicant/Makefile
57 @@ -14,6 +14,7 @@ CFLAGS += -I../src
58 CFLAGS += -I../src/utils
61 +-include $(if $(MULTICALL),../hostapd/.config)
63 ALL=wpa_supplicant wpa_cli
65 @@ -663,6 +664,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 @@ -671,9 +676,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 @@ -718,10 +725,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 @@ -1397,6 +1412,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv)
108 $(Q)$(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 $(Q)$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS)
120 @@ -1460,6 +1481,12 @@ eap_ikev2.so: ../src/eap_peer/eap_ikev2.
121 %.service: %.service.in
122 sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@
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 @@ -3452,8 +3452,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 @@ -467,8 +467,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 --- a/wpa_supplicant/wpa_priv.c
160 +++ b/wpa_supplicant/wpa_priv.c
161 @@ -825,8 +825,8 @@ static void wpa_priv_send_ft_response(st
165 -void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
166 - union wpa_event_data *data)
167 +static void supplicant_event(void *ctx, enum wpa_event_type event,
168 + union wpa_event_data *data)
170 struct wpa_priv_interface *iface = ctx;
172 @@ -968,6 +968,7 @@ int main(int argc, char *argv[])
173 if (os_program_init())
176 + wpa_supplicant_event = supplicant_event;
177 wpa_priv_fd_workaround();
180 --- a/wpa_supplicant/events.c
181 +++ b/wpa_supplicant/events.c
182 @@ -1936,8 +1936,8 @@ static void wnm_action_rx(struct wpa_sup
186 -void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
187 - union wpa_event_data *data)
188 +void supplicant_event(void *ctx, enum wpa_event_type event,
189 + union wpa_event_data *data)
191 struct wpa_supplicant *wpa_s = ctx;
193 --- a/wpa_supplicant/wpa_supplicant.c
194 +++ b/wpa_supplicant/wpa_supplicant.c
195 @@ -2412,6 +2412,9 @@ static void wpa_supplicant_deinit_iface(
196 wpa_drv_deinit(wpa_s);
199 +extern void supplicant_event(void *ctx, enum wpa_event_type event,
200 + union wpa_event_data *data);
204 * wpa_supplicant_add_iface - Add a new network interface
205 @@ -2602,6 +2605,7 @@ struct wpa_global * wpa_supplicant_init(
206 wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb);
207 #endif /* CONFIG_NO_WPA_MSG */
209 + wpa_supplicant_event = supplicant_event;
210 wpa_debug_open_file(params->wpa_debug_file_path);
211 if (params->wpa_debug_syslog)
212 wpa_debug_open_syslog();
215 @@ -556,6 +556,9 @@ static const char * hostapd_msg_ifname_c
219 +void hostapd_wpa_event(void *ctx, enum wpa_event_type event,
220 + union wpa_event_data *data);
223 int main(int argc, char *argv[])
225 @@ -569,6 +572,7 @@ int main(int argc, char *argv[])
226 if (os_program_init())
229 + wpa_supplicant_event = hostapd_wpa_event;
231 c = getopt(argc, argv, "Bde:f:hKP:tv");
233 --- a/src/drivers/drivers.c
234 +++ b/src/drivers/drivers.c
238 #include "includes.h"
242 +void (*wpa_supplicant_event)(void *ctx, enum wpa_event_type event,
243 + union wpa_event_data *data);
245 #ifdef CONFIG_DRIVER_WEXT
246 extern struct wpa_driver_ops wpa_driver_wext_ops; /* driver_wext.c */