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 @@ -200,10 +201,14 @@ ifdef CONFIG_IEEE80211AC
12 CFLAGS += -DCONFIG_IEEE80211AC
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 @@ -890,6 +895,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 @@ -928,6 +939,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 BINALL=wpa_supplicant wpa_cli
65 @@ -727,6 +728,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 @@ -735,9 +740,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 @@ -799,10 +806,18 @@ endif
90 OBJS += ../src/ap/hs20.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 @@ -1551,6 +1566,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv)
109 $(OBJS_c) $(OBJS_t) $(OBJS_t2) $(OBJS) $(BCHECK) $(EXTRA_progs): .config
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: $(BCHECK) $(OBJS) $(EXTRA_progs)
118 $(Q)$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS)
120 @@ -1625,6 +1646,12 @@ eap_eke.so: ../src/eap_peer/eap_eke.c ..
121 %@.service: %.service.arg.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 @@ -4079,8 +4079,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 @@ -844,8 +844,8 @@ static void hostapd_event_dfs_nop_finish
149 #endif /* NEED_AP_MLME */
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;
158 #ifndef CONFIG_NO_STDOUT_DEBUG
159 --- a/wpa_supplicant/wpa_priv.c
160 +++ b/wpa_supplicant/wpa_priv.c
161 @@ -817,8 +817,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 @@ -960,6 +960,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 @@ -2710,8 +2710,8 @@ static void wpa_supplicant_update_channe
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 @@ -3138,6 +3138,9 @@ static void wpa_supplicant_deinit_iface(
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 @@ -3329,6 +3332,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 @@ -511,6 +511,9 @@ static int hostapd_get_ctrl_iface_group(
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 @@ -541,6 +544,7 @@ int main(int argc, char *argv[])
226 interfaces.global_iface_name = NULL;
227 interfaces.global_ctrl_sock = -1;
229 + wpa_supplicant_event = hostapd_wpa_event;
231 c = getopt(argc, argv, "b:Bde:f:hKP:Ttvg:G:");
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 */