]> git.ipfire.org Git - thirdparty/hostap.git/blame - wpa_supplicant/notify.c
Export disconnect reason code to dbus
[thirdparty/hostap.git] / wpa_supplicant / notify.c
CommitLineData
8bac466b
JM
1/*
2 * wpa_supplicant - Event notifications
207ef3fb 3 * Copyright (c) 2009-2010, Jouni Malinen <j@w1.fi>
8bac466b 4 *
0f3d578e
JM
5 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
8bac466b
JM
7 */
8
f0d126d3 9#include "utils/includes.h"
8bac466b 10
f0d126d3
JM
11#include "utils/common.h"
12#include "common/wpa_ctrl.h"
8bac466b
JM
13#include "config.h"
14#include "wpa_supplicant_i.h"
15#include "wps_supplicant.h"
8ddef94b 16#include "dbus/dbus_common.h"
bacfd05f 17#include "dbus/dbus_old.h"
6d59e14c 18#include "dbus/dbus_new.h"
d8a790b9 19#include "rsn_supp/wpa.h"
207ef3fb
JM
20#include "driver_i.h"
21#include "scan.h"
72044390 22#include "p2p_supplicant.h"
e29853bb 23#include "sme.h"
8bac466b
JM
24#include "notify.h"
25
dc461de4
WS
26int wpas_notify_supplicant_initialized(struct wpa_global *global)
27{
8ddef94b 28#ifdef CONFIG_DBUS
dc461de4 29 if (global->params.dbus_ctrl_interface) {
8ddef94b
JM
30 global->dbus = wpas_dbus_init(global);
31 if (global->dbus == NULL)
85d3f273 32 return -1;
dc461de4 33 }
8ddef94b 34#endif /* CONFIG_DBUS */
dc461de4
WS
35
36 return 0;
37}
38
39
40void wpas_notify_supplicant_deinitialized(struct wpa_global *global)
41{
8ddef94b
JM
42#ifdef CONFIG_DBUS
43 if (global->dbus)
44 wpas_dbus_deinit(global->dbus);
45#endif /* CONFIG_DBUS */
dc461de4
WS
46}
47
48
49int wpas_notify_iface_added(struct wpa_supplicant *wpa_s)
50{
51 if (wpas_dbus_register_iface(wpa_s))
52 return -1;
53
52bdd880 54 if (wpas_dbus_register_interface(wpa_s))
8fc2fb56
WS
55 return -1;
56
dc461de4
WS
57 return 0;
58}
59
60
dc461de4
WS
61void wpas_notify_iface_removed(struct wpa_supplicant *wpa_s)
62{
63 /* unregister interface in old DBus ctrl iface */
64 wpas_dbus_unregister_iface(wpa_s);
8fc2fb56
WS
65
66 /* unregister interface in new DBus ctrl iface */
52bdd880 67 wpas_dbus_unregister_interface(wpa_s);
dc461de4
WS
68}
69
8bac466b
JM
70
71void wpas_notify_state_changed(struct wpa_supplicant *wpa_s,
71934751
JM
72 enum wpa_states new_state,
73 enum wpa_states old_state)
8bac466b
JM
74{
75 /* notify the old DBus API */
76 wpa_supplicant_dbus_notify_state_change(wpa_s, new_state,
77 old_state);
8fc2fb56
WS
78
79 /* notify the new DBus API */
27f43d8d 80 wpas_dbus_signal_prop_changed(wpa_s, WPAS_DBUS_PROP_STATE);
72044390
JM
81
82#ifdef CONFIG_P2P
83 if (new_state == WPA_COMPLETED)
84 wpas_p2p_notif_connected(wpa_s);
dbe7aa22 85 else if (old_state >= WPA_ASSOCIATED && new_state < WPA_ASSOCIATED)
72044390
JM
86 wpas_p2p_notif_disconnected(wpa_s);
87#endif /* CONFIG_P2P */
e29853bb
BG
88
89 sme_state_changed(wpa_s);
4e2ead7a
DS
90
91#ifdef ANDROID
92 wpa_msg_ctrl(wpa_s, MSG_INFO, WPA_EVENT_STATE_CHANGE
93 "id=%d state=%d BSSID=" MACSTR,
94 wpa_s->current_ssid ? wpa_s->current_ssid->id : -1,
95 new_state, MAC2STR(wpa_s->pending_bssid));
96#endif /* ANDROID */
8bac466b
JM
97}
98
99
0bb1e425
GM
100void wpas_notify_disconnect_reason(struct wpa_supplicant *wpa_s)
101{
102 wpas_dbus_signal_prop_changed(wpa_s, WPAS_DBUS_PROP_DISCONNECT_REASON);
103}
104
105
8bac466b
JM
106void wpas_notify_network_changed(struct wpa_supplicant *wpa_s)
107{
52bdd880 108 wpas_dbus_signal_prop_changed(wpa_s, WPAS_DBUS_PROP_CURRENT_NETWORK);
8bac466b
JM
109}
110
111
112void wpas_notify_ap_scan_changed(struct wpa_supplicant *wpa_s)
113{
52bdd880 114 wpas_dbus_signal_prop_changed(wpa_s, WPAS_DBUS_PROP_AP_SCAN);
8bac466b
JM
115}
116
117
118void wpas_notify_bssid_changed(struct wpa_supplicant *wpa_s)
119{
52bdd880 120 wpas_dbus_signal_prop_changed(wpa_s, WPAS_DBUS_PROP_CURRENT_BSS);
8bac466b
JM
121}
122
123
5bbf9f10
PS
124void wpas_notify_auth_changed(struct wpa_supplicant *wpa_s)
125{
126 wpas_dbus_signal_prop_changed(wpa_s, WPAS_DBUS_PROP_CURRENT_AUTH_MODE);
127}
128
129
8bac466b
JM
130void wpas_notify_network_enabled_changed(struct wpa_supplicant *wpa_s,
131 struct wpa_ssid *ssid)
132{
52bdd880 133 wpas_dbus_signal_network_enabled_changed(wpa_s, ssid);
8bac466b
JM
134}
135
136
137void wpas_notify_network_selected(struct wpa_supplicant *wpa_s,
138 struct wpa_ssid *ssid)
139{
52bdd880 140 wpas_dbus_signal_network_selected(wpa_s, ssid->id);
8bac466b
JM
141}
142
143
a9022616
DW
144void wpas_notify_network_request(struct wpa_supplicant *wpa_s,
145 struct wpa_ssid *ssid,
146 enum wpa_ctrl_req_type rtype,
147 const char *default_txt)
148{
149 wpas_dbus_signal_network_request(wpa_s, ssid, rtype, default_txt);
150}
151
152
8bac466b
JM
153void wpas_notify_scanning(struct wpa_supplicant *wpa_s)
154{
155 /* notify the old DBus API */
156 wpa_supplicant_dbus_notify_scanning(wpa_s);
27f43d8d 157
8fc2fb56 158 /* notify the new DBus API */
52bdd880 159 wpas_dbus_signal_prop_changed(wpa_s, WPAS_DBUS_PROP_SCANNING);
8bac466b
JM
160}
161
162
163void wpas_notify_scan_done(struct wpa_supplicant *wpa_s, int success)
164{
52bdd880 165 wpas_dbus_signal_scan_done(wpa_s, success);
8bac466b
JM
166}
167
168
169void wpas_notify_scan_results(struct wpa_supplicant *wpa_s)
170{
171 /* notify the old DBus API */
172 wpa_supplicant_dbus_notify_scan_results(wpa_s);
173
174 wpas_wps_notify_scan_results(wpa_s);
175}
176
177
178void wpas_notify_wps_credential(struct wpa_supplicant *wpa_s,
179 const struct wps_credential *cred)
180{
b99b8e15 181#ifdef CONFIG_WPS
8bac466b
JM
182 /* notify the old DBus API */
183 wpa_supplicant_dbus_notify_wps_cred(wpa_s, cred);
8fc2fb56 184 /* notify the new DBus API */
52bdd880 185 wpas_dbus_signal_wps_cred(wpa_s, cred);
b99b8e15 186#endif /* CONFIG_WPS */
8bac466b
JM
187}
188
189
190void wpas_notify_wps_event_m2d(struct wpa_supplicant *wpa_s,
191 struct wps_event_m2d *m2d)
192{
b99b8e15 193#ifdef CONFIG_WPS
52bdd880 194 wpas_dbus_signal_wps_event_m2d(wpa_s, m2d);
b99b8e15 195#endif /* CONFIG_WPS */
8bac466b
JM
196}
197
198
199void wpas_notify_wps_event_fail(struct wpa_supplicant *wpa_s,
200 struct wps_event_fail *fail)
201{
b99b8e15 202#ifdef CONFIG_WPS
52bdd880 203 wpas_dbus_signal_wps_event_fail(wpa_s, fail);
b99b8e15 204#endif /* CONFIG_WPS */
8bac466b
JM
205}
206
207
208void wpas_notify_wps_event_success(struct wpa_supplicant *wpa_s)
209{
b99b8e15 210#ifdef CONFIG_WPS
52bdd880 211 wpas_dbus_signal_wps_event_success(wpa_s);
b99b8e15 212#endif /* CONFIG_WPS */
8bac466b
JM
213}
214
215
216void wpas_notify_network_added(struct wpa_supplicant *wpa_s,
217 struct wpa_ssid *ssid)
218{
c2762e41
JS
219 /*
220 * Networks objects created during any P2P activities should not be
221 * exposed out. They might/will confuse certain non-P2P aware
222 * applications since these network objects won't behave like
223 * regular ones.
224 */
225 if (wpa_s->global->p2p_group_formation != wpa_s)
226 wpas_dbus_register_network(wpa_s, ssid);
227}
228
229
230void wpas_notify_persistent_group_added(struct wpa_supplicant *wpa_s,
231 struct wpa_ssid *ssid)
232{
7a2b53b4 233#ifdef CONFIG_P2P
c2762e41 234 wpas_dbus_register_persistent_group(wpa_s, ssid);
7a2b53b4 235#endif /* CONFIG_P2P */
8bac466b
JM
236}
237
238
28550706
JS
239void wpas_notify_persistent_group_removed(struct wpa_supplicant *wpa_s,
240 struct wpa_ssid *ssid)
241{
7a2b53b4 242#ifdef CONFIG_P2P
28550706 243 wpas_dbus_unregister_persistent_group(wpa_s, ssid->id);
7a2b53b4 244#endif /* CONFIG_P2P */
28550706
JS
245}
246
247
8bac466b
JM
248void wpas_notify_network_removed(struct wpa_supplicant *wpa_s,
249 struct wpa_ssid *ssid)
250{
8c0d3b4f
JM
251 if (wpa_s->wpa)
252 wpa_sm_pmksa_cache_flush(wpa_s->wpa, ssid);
c2762e41
JS
253 if (wpa_s->global->p2p_group_formation != wpa_s)
254 wpas_dbus_unregister_network(wpa_s, ssid->id);
502618f7
JM
255#ifdef CONFIG_P2P
256 wpas_p2p_network_removed(wpa_s, ssid);
257#endif /* CONFIG_P2P */
8bac466b
JM
258}
259
260
71f6e1f6 261void wpas_notify_bss_added(struct wpa_supplicant *wpa_s,
f0d126d3 262 u8 bssid[], unsigned int id)
71f6e1f6 263{
52bdd880 264 wpas_dbus_register_bss(wpa_s, bssid, id);
f0d126d3
JM
265 wpa_msg_ctrl(wpa_s, MSG_INFO, WPA_EVENT_BSS_ADDED "%u " MACSTR,
266 id, MAC2STR(bssid));
71f6e1f6
WS
267}
268
269
270void wpas_notify_bss_removed(struct wpa_supplicant *wpa_s,
f0d126d3 271 u8 bssid[], unsigned int id)
71f6e1f6 272{
52bdd880 273 wpas_dbus_unregister_bss(wpa_s, bssid, id);
f0d126d3
JM
274 wpa_msg_ctrl(wpa_s, MSG_INFO, WPA_EVENT_BSS_REMOVED "%u " MACSTR,
275 id, MAC2STR(bssid));
71f6e1f6
WS
276}
277
278
158c6c74
WS
279void wpas_notify_bss_freq_changed(struct wpa_supplicant *wpa_s,
280 unsigned int id)
281{
282 wpas_dbus_bss_signal_prop_changed(wpa_s, WPAS_DBUS_BSS_PROP_FREQ, id);
283}
284
285
286void wpas_notify_bss_signal_changed(struct wpa_supplicant *wpa_s,
287 unsigned int id)
288{
289 wpas_dbus_bss_signal_prop_changed(wpa_s, WPAS_DBUS_BSS_PROP_SIGNAL,
290 id);
291}
292
293
294void wpas_notify_bss_privacy_changed(struct wpa_supplicant *wpa_s,
295 unsigned int id)
296{
297 wpas_dbus_bss_signal_prop_changed(wpa_s, WPAS_DBUS_BSS_PROP_PRIVACY,
298 id);
299}
300
301
302void wpas_notify_bss_mode_changed(struct wpa_supplicant *wpa_s,
303 unsigned int id)
304{
305 wpas_dbus_bss_signal_prop_changed(wpa_s, WPAS_DBUS_BSS_PROP_MODE, id);
306}
307
308
309void wpas_notify_bss_wpaie_changed(struct wpa_supplicant *wpa_s,
310 unsigned int id)
311{
7899e2f4 312 wpas_dbus_bss_signal_prop_changed(wpa_s, WPAS_DBUS_BSS_PROP_WPA, id);
158c6c74
WS
313}
314
315
316void wpas_notify_bss_rsnie_changed(struct wpa_supplicant *wpa_s,
317 unsigned int id)
318{
7899e2f4 319 wpas_dbus_bss_signal_prop_changed(wpa_s, WPAS_DBUS_BSS_PROP_RSN, id);
158c6c74
WS
320}
321
322
323void wpas_notify_bss_wps_changed(struct wpa_supplicant *wpa_s,
7899e2f4
WS
324 unsigned int id)
325{
326}
327
328
329void wpas_notify_bss_ies_changed(struct wpa_supplicant *wpa_s,
158c6c74
WS
330 unsigned int id)
331{
7899e2f4 332 wpas_dbus_bss_signal_prop_changed(wpa_s, WPAS_DBUS_BSS_PROP_IES, id);
158c6c74
WS
333}
334
335
336void wpas_notify_bss_rates_changed(struct wpa_supplicant *wpa_s,
337 unsigned int id)
338{
339 wpas_dbus_bss_signal_prop_changed(wpa_s, WPAS_DBUS_BSS_PROP_RATES, id);
340}
341
342
8bac466b
JM
343void wpas_notify_blob_added(struct wpa_supplicant *wpa_s, const char *name)
344{
52bdd880 345 wpas_dbus_signal_blob_added(wpa_s, name);
8bac466b
JM
346}
347
348
349void wpas_notify_blob_removed(struct wpa_supplicant *wpa_s, const char *name)
350{
52bdd880 351 wpas_dbus_signal_blob_removed(wpa_s, name);
8bac466b
JM
352}
353
354
db9133ac 355void wpas_notify_debug_level_changed(struct wpa_global *global)
8bac466b 356{
52bdd880 357 wpas_dbus_signal_debug_level_changed(global);
db9133ac
WS
358}
359
360
361void wpas_notify_debug_timestamp_changed(struct wpa_global *global)
362{
52bdd880 363 wpas_dbus_signal_debug_timestamp_changed(global);
db9133ac
WS
364}
365
366
367void wpas_notify_debug_show_keys_changed(struct wpa_global *global)
368{
52bdd880 369 wpas_dbus_signal_debug_show_keys_changed(global);
8bac466b 370}
207ef3fb
JM
371
372
373void wpas_notify_suspend(struct wpa_global *global)
374{
375 struct wpa_supplicant *wpa_s;
376
377 os_get_time(&global->suspend_time);
378 wpa_printf(MSG_DEBUG, "System suspend notification");
379 for (wpa_s = global->ifaces; wpa_s; wpa_s = wpa_s->next)
380 wpa_drv_suspend(wpa_s);
381}
382
383
384void wpas_notify_resume(struct wpa_global *global)
385{
386 struct os_time now;
387 int slept;
388 struct wpa_supplicant *wpa_s;
389
390 if (global->suspend_time.sec == 0)
391 slept = -1;
392 else {
393 os_get_time(&now);
394 slept = now.sec - global->suspend_time.sec;
395 }
396 wpa_printf(MSG_DEBUG, "System resume notification (slept %d seconds)",
397 slept);
398
399 for (wpa_s = global->ifaces; wpa_s; wpa_s = wpa_s->next) {
400 wpa_drv_resume(wpa_s);
401 if (wpa_s->wpa_state == WPA_DISCONNECTED)
402 wpa_supplicant_req_scan(wpa_s, 0, 100000);
403 }
404}
d642d2d2
JB
405
406
407#ifdef CONFIG_P2P
56eeb8f2 408
d642d2d2
JB
409void wpas_notify_p2p_device_found(struct wpa_supplicant *wpa_s,
410 const u8 *dev_addr, int new_device)
411{
9abafccc
JB
412 if (new_device) {
413 /* Create the new peer object */
414 wpas_dbus_register_peer(wpa_s, dev_addr);
415 }
416
417 /* Notify a new peer has been detected*/
418 wpas_dbus_signal_peer_device_found(wpa_s, dev_addr);
d642d2d2 419}
56eeb8f2
JB
420
421
422void wpas_notify_p2p_device_lost(struct wpa_supplicant *wpa_s,
423 const u8 *dev_addr)
424{
9abafccc
JB
425 wpas_dbus_unregister_peer(wpa_s, dev_addr);
426
427 /* Create signal on interface object*/
428 wpas_dbus_signal_peer_device_lost(wpa_s, dev_addr);
56eeb8f2
JB
429}
430
408af93e
JB
431
432void wpas_notify_p2p_group_removed(struct wpa_supplicant *wpa_s,
433 const struct wpa_ssid *ssid,
434 const char *role)
435{
9abafccc
JB
436 wpas_dbus_unregister_p2p_group(wpa_s, ssid);
437
438 wpas_dbus_signal_p2p_group_removed(wpa_s, role);
408af93e
JB
439}
440
32d1bce0
KRK
441
442void wpas_notify_p2p_go_neg_req(struct wpa_supplicant *wpa_s,
443 const u8 *src, u16 dev_passwd_id)
444{
9abafccc 445 wpas_dbus_signal_p2p_go_neg_req(wpa_s, src, dev_passwd_id);
32d1bce0
KRK
446}
447
c2641bf7 448
e5a359cf
RC
449void wpas_notify_p2p_go_neg_completed(struct wpa_supplicant *wpa_s,
450 struct p2p_go_neg_results *res)
c2641bf7 451{
e5a359cf 452 wpas_dbus_signal_p2p_go_neg_resp(wpa_s, res);
c2641bf7
JS
453}
454
5ccdf84f
JMB
455
456void wpas_notify_p2p_invitation_result(struct wpa_supplicant *wpa_s,
457 int status, const u8 *bssid)
458{
9abafccc 459 wpas_dbus_signal_p2p_invitation_result(wpa_s, status, bssid);
5ccdf84f
JMB
460}
461
e1653cac
KRK
462
463void wpas_notify_p2p_sd_request(struct wpa_supplicant *wpa_s,
464 int freq, const u8 *sa, u8 dialog_token,
465 u16 update_indic, const u8 *tlvs,
466 size_t tlvs_len)
467{
9abafccc
JB
468 wpas_dbus_signal_p2p_sd_request(wpa_s, freq, sa, dialog_token,
469 update_indic, tlvs, tlvs_len);
e1653cac
KRK
470}
471
43a26f60
KRK
472
473void wpas_notify_p2p_sd_response(struct wpa_supplicant *wpa_s,
474 const u8 *sa, u16 update_indic,
475 const u8 *tlvs, size_t tlvs_len)
476{
9abafccc
JB
477 wpas_dbus_signal_p2p_sd_response(wpa_s, sa, update_indic,
478 tlvs, tlvs_len);
43a26f60
KRK
479}
480
dd8a7e05
JB
481
482/**
483 * wpas_notify_p2p_provision_discovery - Notification of provision discovery
484 * @dev_addr: Who sent the request or responded to our request.
485 * @request: Will be 1 if request, 0 for response.
486 * @status: Valid only in case of response (0 in case of success)
487 * @config_methods: WPS config methods
488 * @generated_pin: PIN to be displayed in case of WPS_CONFIG_DISPLAY method
489 *
490 * This can be used to notify:
491 * - Requests or responses
492 * - Various config methods
493 * - Failure condition in case of response
494 */
495void wpas_notify_p2p_provision_discovery(struct wpa_supplicant *wpa_s,
496 const u8 *dev_addr, int request,
497 enum p2p_prov_disc_status status,
498 u16 config_methods,
499 unsigned int generated_pin)
500{
9abafccc
JB
501 wpas_dbus_signal_p2p_provision_discovery(wpa_s, dev_addr, request,
502 status, config_methods,
503 generated_pin);
dd8a7e05 504}
4b6baa2f
JMB
505
506
507void wpas_notify_p2p_group_started(struct wpa_supplicant *wpa_s,
508 struct wpa_ssid *ssid, int network_id,
509 int client)
510{
9abafccc
JB
511 /* Notify a group has been started */
512 wpas_dbus_register_p2p_group(wpa_s, ssid);
513
514 wpas_dbus_signal_p2p_group_started(wpa_s, ssid, client, network_id);
4b6baa2f 515}
3734552f
JS
516
517
518void wpas_notify_p2p_wps_failed(struct wpa_supplicant *wpa_s,
519 struct wps_event_fail *fail)
520{
521 wpas_dbus_signal_p2p_wps_failed(wpa_s, fail);
522}
523
d642d2d2 524#endif /* CONFIG_P2P */
d8a43924
JB
525
526
527static void wpas_notify_ap_sta_authorized(struct wpa_supplicant *wpa_s,
fbdcfd57
JM
528 const u8 *sta,
529 const u8 *p2p_dev_addr)
d8a43924 530{
692cb226 531#ifdef CONFIG_P2P
fbdcfd57
JM
532 wpas_p2p_notify_ap_sta_authorized(wpa_s, p2p_dev_addr);
533
9abafccc
JB
534 /*
535 * Register a group member object corresponding to this peer and
536 * emit a PeerJoined signal. This will check if it really is a
537 * P2P group.
538 */
539 wpas_dbus_register_p2p_groupmember(wpa_s, sta);
540
541 /*
542 * Create 'peer-joined' signal on group object -- will also
543 * check P2P itself.
544 */
545 wpas_dbus_signal_p2p_peer_joined(wpa_s, sta);
692cb226 546#endif /* CONFIG_P2P */
d8a43924
JB
547}
548
549
550static void wpas_notify_ap_sta_deauthorized(struct wpa_supplicant *wpa_s,
551 const u8 *sta)
552{
692cb226 553#ifdef CONFIG_P2P
9abafccc
JB
554 /*
555 * Unregister a group member object corresponding to this peer
556 * if this is a P2P group.
557 */
558 wpas_dbus_unregister_p2p_groupmember(wpa_s, sta);
559
560 /*
561 * Create 'peer-disconnected' signal on group object if this
562 * is a P2P group.
563 */
564 wpas_dbus_signal_p2p_peer_disconnected(wpa_s, sta);
692cb226 565#endif /* CONFIG_P2P */
d8a43924
JB
566}
567
568
569void wpas_notify_sta_authorized(struct wpa_supplicant *wpa_s,
fbdcfd57
JM
570 const u8 *mac_addr, int authorized,
571 const u8 *p2p_dev_addr)
d8a43924
JB
572{
573 if (authorized)
fbdcfd57 574 wpas_notify_ap_sta_authorized(wpa_s, mac_addr, p2p_dev_addr);
d8a43924
JB
575 else
576 wpas_notify_ap_sta_deauthorized(wpa_s, mac_addr);
577}
ade74830
MC
578
579
580void wpas_notify_certification(struct wpa_supplicant *wpa_s, int depth,
581 const char *subject, const char *cert_hash,
582 const struct wpabuf *cert)
583{
4f525d8e
JM
584 wpa_msg(wpa_s, MSG_INFO, WPA_EVENT_EAP_PEER_CERT
585 "depth=%d subject='%s'%s%s",
586 depth, subject,
587 cert_hash ? " hash=" : "",
588 cert_hash ? cert_hash : "");
589
590 if (cert) {
591 char *cert_hex;
592 size_t len = wpabuf_len(cert) * 2 + 1;
593 cert_hex = os_malloc(len);
594 if (cert_hex) {
595 wpa_snprintf_hex(cert_hex, len, wpabuf_head(cert),
596 wpabuf_len(cert));
597 wpa_msg_ctrl(wpa_s, MSG_INFO,
598 WPA_EVENT_EAP_PEER_CERT
599 "depth=%d subject='%s' cert=%s",
600 depth, subject, cert_hex);
601 os_free(cert_hex);
602 }
603 }
604
ade74830
MC
605 /* notify the old DBus API */
606 wpa_supplicant_dbus_notify_certification(wpa_s, depth, subject,
607 cert_hash, cert);
608 /* notify the new DBus API */
609 wpas_dbus_signal_certification(wpa_s, depth, subject, cert_hash, cert);
610}
2d43d37f
JB
611
612
613void wpas_notify_preq(struct wpa_supplicant *wpa_s,
614 const u8 *addr, const u8 *dst, const u8 *bssid,
615 const u8 *ie, size_t ie_len, u32 ssi_signal)
616{
617#ifdef CONFIG_AP
618 wpas_dbus_signal_preq(wpa_s, addr, dst, bssid, ie, ie_len, ssi_signal);
619#endif /* CONFIG_AP */
620}
dd7fec1f
PS
621
622
623void wpas_notify_eap_status(struct wpa_supplicant *wpa_s, const char *status,
624 const char *parameter)
625{
626 wpas_dbus_signal_eap_status(wpa_s, status, parameter);
627}