2 * wpa_supplicant - Event notifications
3 * Copyright (c) 2009-2010, Jouni Malinen <j@w1.fi>
5 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
9 #include "utils/includes.h"
11 #include "utils/common.h"
12 #include "common/wpa_ctrl.h"
14 #include "wpa_supplicant_i.h"
15 #include "wps_supplicant.h"
16 #include "binder/binder.h"
17 #include "dbus/dbus_common.h"
18 #include "dbus/dbus_old.h"
19 #include "dbus/dbus_new.h"
20 #include "rsn_supp/wpa.h"
24 #include "p2p_supplicant.h"
28 int wpas_notify_supplicant_initialized(struct wpa_global
*global
)
31 if (global
->params
.dbus_ctrl_interface
) {
32 global
->dbus
= wpas_dbus_init(global
);
33 if (global
->dbus
== NULL
)
36 #endif /* CONFIG_DBUS */
39 global
->binder
= wpas_binder_init(global
);
42 #endif /* CONFIG_BINDER */
48 void wpas_notify_supplicant_deinitialized(struct wpa_global
*global
)
52 wpas_dbus_deinit(global
->dbus
);
53 #endif /* CONFIG_DBUS */
57 wpas_binder_deinit(global
->binder
);
58 #endif /* CONFIG_BINDER */
62 int wpas_notify_iface_added(struct wpa_supplicant
*wpa_s
)
67 if (wpas_dbus_register_iface(wpa_s
))
70 if (wpas_dbus_register_interface(wpa_s
))
77 void wpas_notify_iface_removed(struct wpa_supplicant
*wpa_s
)
82 /* unregister interface in old DBus ctrl iface */
83 wpas_dbus_unregister_iface(wpa_s
);
85 /* unregister interface in new DBus ctrl iface */
86 wpas_dbus_unregister_interface(wpa_s
);
90 void wpas_notify_state_changed(struct wpa_supplicant
*wpa_s
,
91 enum wpa_states new_state
,
92 enum wpa_states old_state
)
97 /* notify the old DBus API */
98 wpa_supplicant_dbus_notify_state_change(wpa_s
, new_state
,
101 /* notify the new DBus API */
102 wpas_dbus_signal_prop_changed(wpa_s
, WPAS_DBUS_PROP_STATE
);
105 if (wpa_s
->fst
&& !is_zero_ether_addr(wpa_s
->bssid
)) {
106 if (new_state
== WPA_COMPLETED
)
107 fst_notify_peer_connected(wpa_s
->fst
, wpa_s
->bssid
);
108 else if (old_state
>= WPA_ASSOCIATED
&&
109 new_state
< WPA_ASSOCIATED
)
110 fst_notify_peer_disconnected(wpa_s
->fst
, wpa_s
->bssid
);
112 #endif /* CONFIG_FST */
114 if (new_state
== WPA_COMPLETED
)
115 wpas_p2p_notif_connected(wpa_s
);
116 else if (old_state
>= WPA_ASSOCIATED
&& new_state
< WPA_ASSOCIATED
)
117 wpas_p2p_notif_disconnected(wpa_s
);
119 sme_state_changed(wpa_s
);
122 wpa_msg_ctrl(wpa_s
, MSG_INFO
, WPA_EVENT_STATE_CHANGE
123 "id=%d state=%d BSSID=" MACSTR
" SSID=%s",
124 wpa_s
->current_ssid
? wpa_s
->current_ssid
->id
: -1,
126 MAC2STR(wpa_s
->bssid
),
127 wpa_s
->current_ssid
&& wpa_s
->current_ssid
->ssid
?
128 wpa_ssid_txt(wpa_s
->current_ssid
->ssid
,
129 wpa_s
->current_ssid
->ssid_len
) : "");
134 void wpas_notify_disconnect_reason(struct wpa_supplicant
*wpa_s
)
139 wpas_dbus_signal_prop_changed(wpa_s
, WPAS_DBUS_PROP_DISCONNECT_REASON
);
143 void wpas_notify_auth_status_code(struct wpa_supplicant
*wpa_s
)
148 wpas_dbus_signal_prop_changed(wpa_s
, WPAS_DBUS_PROP_AUTH_STATUS_CODE
);
152 void wpas_notify_assoc_status_code(struct wpa_supplicant
*wpa_s
)
157 wpas_dbus_signal_prop_changed(wpa_s
, WPAS_DBUS_PROP_ASSOC_STATUS_CODE
);
161 void wpas_notify_roam_time(struct wpa_supplicant
*wpa_s
)
166 wpas_dbus_signal_prop_changed(wpa_s
, WPAS_DBUS_PROP_ROAM_TIME
);
170 void wpas_notify_roam_complete(struct wpa_supplicant
*wpa_s
)
175 wpas_dbus_signal_prop_changed(wpa_s
, WPAS_DBUS_PROP_ROAM_COMPLETE
);
179 void wpas_notify_session_length(struct wpa_supplicant
*wpa_s
)
184 wpas_dbus_signal_prop_changed(wpa_s
, WPAS_DBUS_PROP_SESSION_LENGTH
);
188 void wpas_notify_bss_tm_status(struct wpa_supplicant
*wpa_s
)
193 wpas_dbus_signal_prop_changed(wpa_s
, WPAS_DBUS_PROP_BSS_TM_STATUS
);
197 void wpas_notify_network_changed(struct wpa_supplicant
*wpa_s
)
202 wpas_dbus_signal_prop_changed(wpa_s
, WPAS_DBUS_PROP_CURRENT_NETWORK
);
206 void wpas_notify_ap_scan_changed(struct wpa_supplicant
*wpa_s
)
211 wpas_dbus_signal_prop_changed(wpa_s
, WPAS_DBUS_PROP_AP_SCAN
);
215 void wpas_notify_bssid_changed(struct wpa_supplicant
*wpa_s
)
220 wpas_dbus_signal_prop_changed(wpa_s
, WPAS_DBUS_PROP_CURRENT_BSS
);
224 void wpas_notify_auth_changed(struct wpa_supplicant
*wpa_s
)
229 wpas_dbus_signal_prop_changed(wpa_s
, WPAS_DBUS_PROP_CURRENT_AUTH_MODE
);
233 void wpas_notify_network_enabled_changed(struct wpa_supplicant
*wpa_s
,
234 struct wpa_ssid
*ssid
)
239 wpas_dbus_signal_network_enabled_changed(wpa_s
, ssid
);
243 void wpas_notify_network_selected(struct wpa_supplicant
*wpa_s
,
244 struct wpa_ssid
*ssid
)
249 wpas_dbus_signal_network_selected(wpa_s
, ssid
->id
);
253 void wpas_notify_network_request(struct wpa_supplicant
*wpa_s
,
254 struct wpa_ssid
*ssid
,
255 enum wpa_ctrl_req_type rtype
,
256 const char *default_txt
)
261 wpas_dbus_signal_network_request(wpa_s
, ssid
, rtype
, default_txt
);
265 void wpas_notify_scanning(struct wpa_supplicant
*wpa_s
)
270 /* notify the old DBus API */
271 wpa_supplicant_dbus_notify_scanning(wpa_s
);
273 /* notify the new DBus API */
274 wpas_dbus_signal_prop_changed(wpa_s
, WPAS_DBUS_PROP_SCANNING
);
278 void wpas_notify_scan_done(struct wpa_supplicant
*wpa_s
, int success
)
283 wpas_dbus_signal_scan_done(wpa_s
, success
);
287 void wpas_notify_scan_results(struct wpa_supplicant
*wpa_s
)
292 /* notify the old DBus API */
293 wpa_supplicant_dbus_notify_scan_results(wpa_s
);
295 wpas_wps_notify_scan_results(wpa_s
);
299 void wpas_notify_wps_credential(struct wpa_supplicant
*wpa_s
,
300 const struct wps_credential
*cred
)
306 /* notify the old DBus API */
307 wpa_supplicant_dbus_notify_wps_cred(wpa_s
, cred
);
308 /* notify the new DBus API */
309 wpas_dbus_signal_wps_cred(wpa_s
, cred
);
310 #endif /* CONFIG_WPS */
314 void wpas_notify_wps_event_m2d(struct wpa_supplicant
*wpa_s
,
315 struct wps_event_m2d
*m2d
)
321 wpas_dbus_signal_wps_event_m2d(wpa_s
, m2d
);
322 #endif /* CONFIG_WPS */
326 void wpas_notify_wps_event_fail(struct wpa_supplicant
*wpa_s
,
327 struct wps_event_fail
*fail
)
333 wpas_dbus_signal_wps_event_fail(wpa_s
, fail
);
334 #endif /* CONFIG_WPS */
338 void wpas_notify_wps_event_success(struct wpa_supplicant
*wpa_s
)
344 wpas_dbus_signal_wps_event_success(wpa_s
);
345 #endif /* CONFIG_WPS */
348 void wpas_notify_wps_event_pbc_overlap(struct wpa_supplicant
*wpa_s
)
354 wpas_dbus_signal_wps_event_pbc_overlap(wpa_s
);
355 #endif /* CONFIG_WPS */
359 void wpas_notify_network_added(struct wpa_supplicant
*wpa_s
,
360 struct wpa_ssid
*ssid
)
366 * Networks objects created during any P2P activities should not be
367 * exposed out. They might/will confuse certain non-P2P aware
368 * applications since these network objects won't behave like
371 if (!ssid
->p2p_group
&& wpa_s
->global
->p2p_group_formation
!= wpa_s
)
372 wpas_dbus_register_network(wpa_s
, ssid
);
376 void wpas_notify_persistent_group_added(struct wpa_supplicant
*wpa_s
,
377 struct wpa_ssid
*ssid
)
380 wpas_dbus_register_persistent_group(wpa_s
, ssid
);
381 #endif /* CONFIG_P2P */
385 void wpas_notify_persistent_group_removed(struct wpa_supplicant
*wpa_s
,
386 struct wpa_ssid
*ssid
)
389 wpas_dbus_unregister_persistent_group(wpa_s
, ssid
->id
);
390 #endif /* CONFIG_P2P */
394 void wpas_notify_network_removed(struct wpa_supplicant
*wpa_s
,
395 struct wpa_ssid
*ssid
)
397 if (wpa_s
->next_ssid
== ssid
)
398 wpa_s
->next_ssid
= NULL
;
400 wpa_sm_pmksa_cache_flush(wpa_s
->wpa
, ssid
);
401 if (!ssid
->p2p_group
&& wpa_s
->global
->p2p_group_formation
!= wpa_s
&&
403 wpas_dbus_unregister_network(wpa_s
, ssid
->id
);
404 if (network_is_persistent_group(ssid
))
405 wpas_notify_persistent_group_removed(wpa_s
, ssid
);
407 wpas_p2p_network_removed(wpa_s
, ssid
);
411 void wpas_notify_bss_added(struct wpa_supplicant
*wpa_s
,
412 u8 bssid
[], unsigned int id
)
417 wpas_dbus_register_bss(wpa_s
, bssid
, id
);
418 wpa_msg_ctrl(wpa_s
, MSG_INFO
, WPA_EVENT_BSS_ADDED
"%u " MACSTR
,
423 void wpas_notify_bss_removed(struct wpa_supplicant
*wpa_s
,
424 u8 bssid
[], unsigned int id
)
429 wpas_dbus_unregister_bss(wpa_s
, bssid
, id
);
430 wpa_msg_ctrl(wpa_s
, MSG_INFO
, WPA_EVENT_BSS_REMOVED
"%u " MACSTR
,
435 void wpas_notify_bss_freq_changed(struct wpa_supplicant
*wpa_s
,
441 wpas_dbus_bss_signal_prop_changed(wpa_s
, WPAS_DBUS_BSS_PROP_FREQ
, id
);
445 void wpas_notify_bss_signal_changed(struct wpa_supplicant
*wpa_s
,
451 wpas_dbus_bss_signal_prop_changed(wpa_s
, WPAS_DBUS_BSS_PROP_SIGNAL
,
456 void wpas_notify_bss_privacy_changed(struct wpa_supplicant
*wpa_s
,
462 wpas_dbus_bss_signal_prop_changed(wpa_s
, WPAS_DBUS_BSS_PROP_PRIVACY
,
467 void wpas_notify_bss_mode_changed(struct wpa_supplicant
*wpa_s
,
473 wpas_dbus_bss_signal_prop_changed(wpa_s
, WPAS_DBUS_BSS_PROP_MODE
, id
);
477 void wpas_notify_bss_wpaie_changed(struct wpa_supplicant
*wpa_s
,
483 wpas_dbus_bss_signal_prop_changed(wpa_s
, WPAS_DBUS_BSS_PROP_WPA
, id
);
487 void wpas_notify_bss_rsnie_changed(struct wpa_supplicant
*wpa_s
,
493 wpas_dbus_bss_signal_prop_changed(wpa_s
, WPAS_DBUS_BSS_PROP_RSN
, id
);
497 void wpas_notify_bss_wps_changed(struct wpa_supplicant
*wpa_s
,
504 wpas_dbus_bss_signal_prop_changed(wpa_s
, WPAS_DBUS_BSS_PROP_WPS
, id
);
505 #endif /* CONFIG_WPS */
509 void wpas_notify_bss_ies_changed(struct wpa_supplicant
*wpa_s
,
515 wpas_dbus_bss_signal_prop_changed(wpa_s
, WPAS_DBUS_BSS_PROP_IES
, id
);
519 void wpas_notify_bss_rates_changed(struct wpa_supplicant
*wpa_s
,
525 wpas_dbus_bss_signal_prop_changed(wpa_s
, WPAS_DBUS_BSS_PROP_RATES
, id
);
529 void wpas_notify_bss_seen(struct wpa_supplicant
*wpa_s
, unsigned int id
)
534 wpas_dbus_bss_signal_prop_changed(wpa_s
, WPAS_DBUS_BSS_PROP_AGE
, id
);
538 void wpas_notify_blob_added(struct wpa_supplicant
*wpa_s
, const char *name
)
543 wpas_dbus_signal_blob_added(wpa_s
, name
);
547 void wpas_notify_blob_removed(struct wpa_supplicant
*wpa_s
, const char *name
)
552 wpas_dbus_signal_blob_removed(wpa_s
, name
);
556 void wpas_notify_debug_level_changed(struct wpa_global
*global
)
558 wpas_dbus_signal_debug_level_changed(global
);
562 void wpas_notify_debug_timestamp_changed(struct wpa_global
*global
)
564 wpas_dbus_signal_debug_timestamp_changed(global
);
568 void wpas_notify_debug_show_keys_changed(struct wpa_global
*global
)
570 wpas_dbus_signal_debug_show_keys_changed(global
);
574 void wpas_notify_suspend(struct wpa_global
*global
)
576 struct wpa_supplicant
*wpa_s
;
578 os_get_time(&global
->suspend_time
);
579 wpa_printf(MSG_DEBUG
, "System suspend notification");
580 for (wpa_s
= global
->ifaces
; wpa_s
; wpa_s
= wpa_s
->next
)
581 wpa_drv_suspend(wpa_s
);
585 void wpas_notify_resume(struct wpa_global
*global
)
589 struct wpa_supplicant
*wpa_s
;
591 if (global
->suspend_time
.sec
== 0)
595 slept
= now
.sec
- global
->suspend_time
.sec
;
597 wpa_printf(MSG_DEBUG
, "System resume notification (slept %d seconds)",
600 for (wpa_s
= global
->ifaces
; wpa_s
; wpa_s
= wpa_s
->next
) {
601 wpa_drv_resume(wpa_s
);
602 if (wpa_s
->wpa_state
== WPA_DISCONNECTED
)
603 wpa_supplicant_req_scan(wpa_s
, 0, 100000);
610 void wpas_notify_p2p_find_stopped(struct wpa_supplicant
*wpa_s
)
612 /* Notify P2P find has stopped */
613 wpas_dbus_signal_p2p_find_stopped(wpa_s
);
617 void wpas_notify_p2p_device_found(struct wpa_supplicant
*wpa_s
,
618 const u8
*dev_addr
, int new_device
)
621 /* Create the new peer object */
622 wpas_dbus_register_peer(wpa_s
, dev_addr
);
625 /* Notify a new peer has been detected*/
626 wpas_dbus_signal_peer_device_found(wpa_s
, dev_addr
);
630 void wpas_notify_p2p_device_lost(struct wpa_supplicant
*wpa_s
,
633 wpas_dbus_unregister_peer(wpa_s
, dev_addr
);
635 /* Create signal on interface object*/
636 wpas_dbus_signal_peer_device_lost(wpa_s
, dev_addr
);
640 void wpas_notify_p2p_group_removed(struct wpa_supplicant
*wpa_s
,
641 const struct wpa_ssid
*ssid
,
644 wpas_dbus_signal_p2p_group_removed(wpa_s
, role
);
646 wpas_dbus_unregister_p2p_group(wpa_s
, ssid
);
650 void wpas_notify_p2p_go_neg_req(struct wpa_supplicant
*wpa_s
,
651 const u8
*src
, u16 dev_passwd_id
, u8 go_intent
)
653 wpas_dbus_signal_p2p_go_neg_req(wpa_s
, src
, dev_passwd_id
, go_intent
);
657 void wpas_notify_p2p_go_neg_completed(struct wpa_supplicant
*wpa_s
,
658 struct p2p_go_neg_results
*res
)
660 wpas_dbus_signal_p2p_go_neg_resp(wpa_s
, res
);
664 void wpas_notify_p2p_invitation_result(struct wpa_supplicant
*wpa_s
,
665 int status
, const u8
*bssid
)
667 wpas_dbus_signal_p2p_invitation_result(wpa_s
, status
, bssid
);
671 void wpas_notify_p2p_sd_request(struct wpa_supplicant
*wpa_s
,
672 int freq
, const u8
*sa
, u8 dialog_token
,
673 u16 update_indic
, const u8
*tlvs
,
676 wpas_dbus_signal_p2p_sd_request(wpa_s
, freq
, sa
, dialog_token
,
677 update_indic
, tlvs
, tlvs_len
);
681 void wpas_notify_p2p_sd_response(struct wpa_supplicant
*wpa_s
,
682 const u8
*sa
, u16 update_indic
,
683 const u8
*tlvs
, size_t tlvs_len
)
685 wpas_dbus_signal_p2p_sd_response(wpa_s
, sa
, update_indic
,
691 * wpas_notify_p2p_provision_discovery - Notification of provision discovery
692 * @dev_addr: Who sent the request or responded to our request.
693 * @request: Will be 1 if request, 0 for response.
694 * @status: Valid only in case of response (0 in case of success)
695 * @config_methods: WPS config methods
696 * @generated_pin: PIN to be displayed in case of WPS_CONFIG_DISPLAY method
698 * This can be used to notify:
699 * - Requests or responses
700 * - Various config methods
701 * - Failure condition in case of response
703 void wpas_notify_p2p_provision_discovery(struct wpa_supplicant
*wpa_s
,
704 const u8
*dev_addr
, int request
,
705 enum p2p_prov_disc_status status
,
707 unsigned int generated_pin
)
709 wpas_dbus_signal_p2p_provision_discovery(wpa_s
, dev_addr
, request
,
710 status
, config_methods
,
715 void wpas_notify_p2p_group_started(struct wpa_supplicant
*wpa_s
,
716 struct wpa_ssid
*ssid
, int persistent
,
717 int client
, const u8
*ip
)
719 /* Notify a group has been started */
720 wpas_dbus_register_p2p_group(wpa_s
, ssid
);
722 wpas_dbus_signal_p2p_group_started(wpa_s
, client
, persistent
, ip
);
726 void wpas_notify_p2p_group_formation_failure(struct wpa_supplicant
*wpa_s
,
729 /* Notify a group formation failed */
730 wpas_dbus_signal_p2p_group_formation_failure(wpa_s
, reason
);
734 void wpas_notify_p2p_wps_failed(struct wpa_supplicant
*wpa_s
,
735 struct wps_event_fail
*fail
)
737 wpas_dbus_signal_p2p_wps_failed(wpa_s
, fail
);
741 void wpas_notify_p2p_invitation_received(struct wpa_supplicant
*wpa_s
,
742 const u8
*sa
, const u8
*go_dev_addr
,
743 const u8
*bssid
, int id
, int op_freq
)
745 /* Notify a P2P Invitation Request */
746 wpas_dbus_signal_p2p_invitation_received(wpa_s
, sa
, go_dev_addr
, bssid
,
750 #endif /* CONFIG_P2P */
753 static void wpas_notify_ap_sta_authorized(struct wpa_supplicant
*wpa_s
,
755 const u8
*p2p_dev_addr
)
758 wpas_p2p_notify_ap_sta_authorized(wpa_s
, p2p_dev_addr
);
761 * Create 'peer-joined' signal on group object -- will also
765 wpas_dbus_signal_p2p_peer_joined(wpa_s
, p2p_dev_addr
);
766 #endif /* CONFIG_P2P */
768 /* Register the station */
769 wpas_dbus_register_sta(wpa_s
, sta
);
771 /* Notify listeners a new station has been authorized */
772 wpas_dbus_signal_sta_authorized(wpa_s
, sta
);
776 static void wpas_notify_ap_sta_deauthorized(struct wpa_supplicant
*wpa_s
,
778 const u8
*p2p_dev_addr
)
782 * Create 'peer-disconnected' signal on group object if this
786 wpas_dbus_signal_p2p_peer_disconnected(wpa_s
, p2p_dev_addr
);
787 #endif /* CONFIG_P2P */
789 /* Notify listeners a station has been deauthorized */
790 wpas_dbus_signal_sta_deauthorized(wpa_s
, sta
);
792 /* Unregister the station */
793 wpas_dbus_unregister_sta(wpa_s
, sta
);
797 void wpas_notify_sta_authorized(struct wpa_supplicant
*wpa_s
,
798 const u8
*mac_addr
, int authorized
,
799 const u8
*p2p_dev_addr
)
802 wpas_notify_ap_sta_authorized(wpa_s
, mac_addr
, p2p_dev_addr
);
804 wpas_notify_ap_sta_deauthorized(wpa_s
, mac_addr
, p2p_dev_addr
);
808 void wpas_notify_certification(struct wpa_supplicant
*wpa_s
, int depth
,
809 const char *subject
, const char *altsubject
[],
810 int num_altsubject
, const char *cert_hash
,
811 const struct wpabuf
*cert
)
813 wpa_msg(wpa_s
, MSG_INFO
, WPA_EVENT_EAP_PEER_CERT
814 "depth=%d subject='%s'%s%s",
815 depth
, subject
, cert_hash
? " hash=" : "",
816 cert_hash
? cert_hash
: "");
820 size_t len
= wpabuf_len(cert
) * 2 + 1;
821 cert_hex
= os_malloc(len
);
823 wpa_snprintf_hex(cert_hex
, len
, wpabuf_head(cert
),
825 wpa_msg_ctrl(wpa_s
, MSG_INFO
,
826 WPA_EVENT_EAP_PEER_CERT
827 "depth=%d subject='%s' cert=%s",
828 depth
, subject
, cert_hex
);
836 for (i
= 0; i
< num_altsubject
; i
++)
837 wpa_msg(wpa_s
, MSG_INFO
, WPA_EVENT_EAP_PEER_ALT
838 "depth=%d %s", depth
, altsubject
[i
]);
841 /* notify the old DBus API */
842 wpa_supplicant_dbus_notify_certification(wpa_s
, depth
, subject
,
844 /* notify the new DBus API */
845 wpas_dbus_signal_certification(wpa_s
, depth
, subject
, altsubject
,
846 num_altsubject
, cert_hash
, cert
);
850 void wpas_notify_preq(struct wpa_supplicant
*wpa_s
,
851 const u8
*addr
, const u8
*dst
, const u8
*bssid
,
852 const u8
*ie
, size_t ie_len
, u32 ssi_signal
)
855 wpas_dbus_signal_preq(wpa_s
, addr
, dst
, bssid
, ie
, ie_len
, ssi_signal
);
856 #endif /* CONFIG_AP */
860 void wpas_notify_eap_status(struct wpa_supplicant
*wpa_s
, const char *status
,
861 const char *parameter
)
863 wpas_dbus_signal_eap_status(wpa_s
, status
, parameter
);
864 wpa_msg_ctrl(wpa_s
, MSG_INFO
, WPA_EVENT_EAP_STATUS
865 "status='%s' parameter='%s'",
870 void wpas_notify_eap_error(struct wpa_supplicant
*wpa_s
, int error_code
)
872 wpa_msg(wpa_s
, MSG_ERROR
, WPA_EVENT_EAP_ERROR_CODE
"%d", error_code
);
876 void wpas_notify_network_bssid_set_changed(struct wpa_supplicant
*wpa_s
,
877 struct wpa_ssid
*ssid
)
879 if (wpa_s
->current_ssid
!= ssid
)
882 wpa_dbg(wpa_s
, MSG_DEBUG
,
883 "Network bssid config changed for the current network - within-ESS roaming %s",
884 ssid
->bssid_set
? "disabled" : "enabled");
886 wpa_drv_roaming(wpa_s
, !ssid
->bssid_set
,
887 ssid
->bssid_set
? ssid
->bssid
: NULL
);
891 void wpas_notify_network_type_changed(struct wpa_supplicant
*wpa_s
,
892 struct wpa_ssid
*ssid
)
895 if (ssid
->disabled
== 2) {
896 /* Changed from normal network profile to persistent group */
898 wpas_dbus_unregister_network(wpa_s
, ssid
->id
);
900 ssid
->p2p_persistent_group
= 1;
901 wpas_dbus_register_persistent_group(wpa_s
, ssid
);
903 /* Changed from persistent group to normal network profile */
904 wpas_dbus_unregister_persistent_group(wpa_s
, ssid
->id
);
905 ssid
->p2p_persistent_group
= 0;
906 wpas_dbus_register_network(wpa_s
, ssid
);
908 #endif /* CONFIG_P2P */
914 void wpas_notify_mesh_group_started(struct wpa_supplicant
*wpa_s
,
915 struct wpa_ssid
*ssid
)
920 wpas_dbus_signal_mesh_group_started(wpa_s
, ssid
);
924 void wpas_notify_mesh_group_removed(struct wpa_supplicant
*wpa_s
,
925 const u8
*meshid
, u8 meshid_len
,
931 wpas_dbus_signal_mesh_group_removed(wpa_s
, meshid
, meshid_len
,
936 void wpas_notify_mesh_peer_connected(struct wpa_supplicant
*wpa_s
,
942 wpas_dbus_signal_mesh_peer_connected(wpa_s
, peer_addr
);
946 void wpas_notify_mesh_peer_disconnected(struct wpa_supplicant
*wpa_s
,
947 const u8
*peer_addr
, int reason_code
)
952 wpas_dbus_signal_mesh_peer_disconnected(wpa_s
, peer_addr
, reason_code
);
955 #endif /* CONFIG_MESH */