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_new.h"
19 #include "rsn_supp/wpa.h"
21 #include "crypto/tls.h"
24 #include "p2p_supplicant.h"
28 int wpas_notify_supplicant_initialized(struct wpa_global
*global
)
30 #ifdef CONFIG_CTRL_IFACE_DBUS_NEW
31 if (global
->params
.dbus_ctrl_interface
) {
32 global
->dbus
= wpas_dbus_init(global
);
33 if (global
->dbus
== NULL
)
36 #endif /* CONFIG_CTRL_IFACE_DBUS_NEW */
39 global
->binder
= wpas_binder_init(global
);
42 #endif /* CONFIG_BINDER */
48 void wpas_notify_supplicant_deinitialized(struct wpa_global
*global
)
50 #ifdef CONFIG_CTRL_IFACE_DBUS_NEW
52 wpas_dbus_deinit(global
->dbus
);
53 #endif /* CONFIG_CTRL_IFACE_DBUS_NEW */
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_interface(wpa_s
))
74 void wpas_notify_iface_removed(struct wpa_supplicant
*wpa_s
)
79 /* unregister interface in new DBus ctrl iface */
80 wpas_dbus_unregister_interface(wpa_s
);
84 void wpas_notify_state_changed(struct wpa_supplicant
*wpa_s
,
85 enum wpa_states new_state
,
86 enum wpa_states old_state
)
91 /* notify the new DBus API */
92 wpas_dbus_signal_prop_changed(wpa_s
, WPAS_DBUS_PROP_STATE
);
95 if (wpa_s
->fst
&& !is_zero_ether_addr(wpa_s
->bssid
)) {
96 if (new_state
== WPA_COMPLETED
)
97 fst_notify_peer_connected(wpa_s
->fst
, wpa_s
->bssid
);
98 else if (old_state
>= WPA_ASSOCIATED
&&
99 new_state
< WPA_ASSOCIATED
)
100 fst_notify_peer_disconnected(wpa_s
->fst
, wpa_s
->bssid
);
102 #endif /* CONFIG_FST */
104 if (new_state
== WPA_COMPLETED
)
105 wpas_p2p_notif_connected(wpa_s
);
106 else if (old_state
>= WPA_ASSOCIATED
&& new_state
< WPA_ASSOCIATED
)
107 wpas_p2p_notif_disconnected(wpa_s
);
109 sme_state_changed(wpa_s
);
112 wpa_msg_ctrl(wpa_s
, MSG_INFO
, WPA_EVENT_STATE_CHANGE
113 "id=%d state=%d BSSID=" MACSTR
" SSID=%s",
114 wpa_s
->current_ssid
? wpa_s
->current_ssid
->id
: -1,
116 MAC2STR(wpa_s
->bssid
),
117 wpa_s
->current_ssid
&& wpa_s
->current_ssid
->ssid
?
118 wpa_ssid_txt(wpa_s
->current_ssid
->ssid
,
119 wpa_s
->current_ssid
->ssid_len
) : "");
124 void wpas_notify_disconnect_reason(struct wpa_supplicant
*wpa_s
)
129 wpas_dbus_signal_prop_changed(wpa_s
, WPAS_DBUS_PROP_DISCONNECT_REASON
);
133 void wpas_notify_auth_status_code(struct wpa_supplicant
*wpa_s
)
138 wpas_dbus_signal_prop_changed(wpa_s
, WPAS_DBUS_PROP_AUTH_STATUS_CODE
);
142 void wpas_notify_assoc_status_code(struct wpa_supplicant
*wpa_s
)
147 wpas_dbus_signal_prop_changed(wpa_s
, WPAS_DBUS_PROP_ASSOC_STATUS_CODE
);
151 void wpas_notify_roam_time(struct wpa_supplicant
*wpa_s
)
156 wpas_dbus_signal_prop_changed(wpa_s
, WPAS_DBUS_PROP_ROAM_TIME
);
160 void wpas_notify_roam_complete(struct wpa_supplicant
*wpa_s
)
165 wpas_dbus_signal_prop_changed(wpa_s
, WPAS_DBUS_PROP_ROAM_COMPLETE
);
169 void wpas_notify_session_length(struct wpa_supplicant
*wpa_s
)
174 wpas_dbus_signal_prop_changed(wpa_s
, WPAS_DBUS_PROP_SESSION_LENGTH
);
178 void wpas_notify_bss_tm_status(struct wpa_supplicant
*wpa_s
)
183 wpas_dbus_signal_prop_changed(wpa_s
, WPAS_DBUS_PROP_BSS_TM_STATUS
);
187 void wpas_notify_network_changed(struct wpa_supplicant
*wpa_s
)
192 wpas_dbus_signal_prop_changed(wpa_s
, WPAS_DBUS_PROP_CURRENT_NETWORK
);
196 void wpas_notify_ap_scan_changed(struct wpa_supplicant
*wpa_s
)
201 wpas_dbus_signal_prop_changed(wpa_s
, WPAS_DBUS_PROP_AP_SCAN
);
205 void wpas_notify_bssid_changed(struct wpa_supplicant
*wpa_s
)
210 wpas_dbus_signal_prop_changed(wpa_s
, WPAS_DBUS_PROP_CURRENT_BSS
);
214 void wpas_notify_auth_changed(struct wpa_supplicant
*wpa_s
)
219 wpas_dbus_signal_prop_changed(wpa_s
, WPAS_DBUS_PROP_CURRENT_AUTH_MODE
);
223 void wpas_notify_network_enabled_changed(struct wpa_supplicant
*wpa_s
,
224 struct wpa_ssid
*ssid
)
229 wpas_dbus_signal_network_enabled_changed(wpa_s
, ssid
);
233 void wpas_notify_network_selected(struct wpa_supplicant
*wpa_s
,
234 struct wpa_ssid
*ssid
)
239 wpas_dbus_signal_network_selected(wpa_s
, ssid
->id
);
243 void wpas_notify_network_request(struct wpa_supplicant
*wpa_s
,
244 struct wpa_ssid
*ssid
,
245 enum wpa_ctrl_req_type rtype
,
246 const char *default_txt
)
251 wpas_dbus_signal_network_request(wpa_s
, ssid
, rtype
, default_txt
);
255 void wpas_notify_scanning(struct wpa_supplicant
*wpa_s
)
260 /* notify the new DBus API */
261 wpas_dbus_signal_prop_changed(wpa_s
, WPAS_DBUS_PROP_SCANNING
);
265 void wpas_notify_scan_done(struct wpa_supplicant
*wpa_s
, int success
)
270 wpas_dbus_signal_scan_done(wpa_s
, success
);
274 void wpas_notify_scan_results(struct wpa_supplicant
*wpa_s
)
279 wpas_wps_notify_scan_results(wpa_s
);
283 void wpas_notify_wps_credential(struct wpa_supplicant
*wpa_s
,
284 const struct wps_credential
*cred
)
290 /* notify the new DBus API */
291 wpas_dbus_signal_wps_cred(wpa_s
, cred
);
292 #endif /* CONFIG_WPS */
296 void wpas_notify_wps_event_m2d(struct wpa_supplicant
*wpa_s
,
297 struct wps_event_m2d
*m2d
)
303 wpas_dbus_signal_wps_event_m2d(wpa_s
, m2d
);
304 #endif /* CONFIG_WPS */
308 void wpas_notify_wps_event_fail(struct wpa_supplicant
*wpa_s
,
309 struct wps_event_fail
*fail
)
315 wpas_dbus_signal_wps_event_fail(wpa_s
, fail
);
316 #endif /* CONFIG_WPS */
320 void wpas_notify_wps_event_success(struct wpa_supplicant
*wpa_s
)
326 wpas_dbus_signal_wps_event_success(wpa_s
);
327 #endif /* CONFIG_WPS */
330 void wpas_notify_wps_event_pbc_overlap(struct wpa_supplicant
*wpa_s
)
336 wpas_dbus_signal_wps_event_pbc_overlap(wpa_s
);
337 #endif /* CONFIG_WPS */
341 void wpas_notify_network_added(struct wpa_supplicant
*wpa_s
,
342 struct wpa_ssid
*ssid
)
348 * Networks objects created during any P2P activities should not be
349 * exposed out. They might/will confuse certain non-P2P aware
350 * applications since these network objects won't behave like
353 if (!ssid
->p2p_group
&& wpa_s
->global
->p2p_group_formation
!= wpa_s
)
354 wpas_dbus_register_network(wpa_s
, ssid
);
358 void wpas_notify_persistent_group_added(struct wpa_supplicant
*wpa_s
,
359 struct wpa_ssid
*ssid
)
362 wpas_dbus_register_persistent_group(wpa_s
, ssid
);
363 #endif /* CONFIG_P2P */
367 void wpas_notify_persistent_group_removed(struct wpa_supplicant
*wpa_s
,
368 struct wpa_ssid
*ssid
)
371 wpas_dbus_unregister_persistent_group(wpa_s
, ssid
->id
);
372 #endif /* CONFIG_P2P */
376 void wpas_notify_network_removed(struct wpa_supplicant
*wpa_s
,
377 struct wpa_ssid
*ssid
)
379 if (wpa_s
->next_ssid
== ssid
)
380 wpa_s
->next_ssid
= NULL
;
382 wpa_sm_pmksa_cache_flush(wpa_s
->wpa
, ssid
);
383 if (!ssid
->p2p_group
&& wpa_s
->global
->p2p_group_formation
!= wpa_s
&&
385 wpas_dbus_unregister_network(wpa_s
, ssid
->id
);
386 if (network_is_persistent_group(ssid
))
387 wpas_notify_persistent_group_removed(wpa_s
, ssid
);
389 wpas_p2p_network_removed(wpa_s
, ssid
);
393 void wpas_notify_bss_added(struct wpa_supplicant
*wpa_s
,
394 u8 bssid
[], unsigned int id
)
399 wpas_dbus_register_bss(wpa_s
, bssid
, id
);
400 wpa_msg_ctrl(wpa_s
, MSG_INFO
, WPA_EVENT_BSS_ADDED
"%u " MACSTR
,
405 void wpas_notify_bss_removed(struct wpa_supplicant
*wpa_s
,
406 u8 bssid
[], unsigned int id
)
411 wpas_dbus_unregister_bss(wpa_s
, bssid
, id
);
412 wpa_msg_ctrl(wpa_s
, MSG_INFO
, WPA_EVENT_BSS_REMOVED
"%u " MACSTR
,
417 void wpas_notify_bss_freq_changed(struct wpa_supplicant
*wpa_s
,
423 wpas_dbus_bss_signal_prop_changed(wpa_s
, WPAS_DBUS_BSS_PROP_FREQ
, id
);
427 void wpas_notify_bss_signal_changed(struct wpa_supplicant
*wpa_s
,
433 wpas_dbus_bss_signal_prop_changed(wpa_s
, WPAS_DBUS_BSS_PROP_SIGNAL
,
438 void wpas_notify_bss_privacy_changed(struct wpa_supplicant
*wpa_s
,
444 wpas_dbus_bss_signal_prop_changed(wpa_s
, WPAS_DBUS_BSS_PROP_PRIVACY
,
449 void wpas_notify_bss_mode_changed(struct wpa_supplicant
*wpa_s
,
455 wpas_dbus_bss_signal_prop_changed(wpa_s
, WPAS_DBUS_BSS_PROP_MODE
, id
);
459 void wpas_notify_bss_wpaie_changed(struct wpa_supplicant
*wpa_s
,
465 wpas_dbus_bss_signal_prop_changed(wpa_s
, WPAS_DBUS_BSS_PROP_WPA
, id
);
469 void wpas_notify_bss_rsnie_changed(struct wpa_supplicant
*wpa_s
,
475 wpas_dbus_bss_signal_prop_changed(wpa_s
, WPAS_DBUS_BSS_PROP_RSN
, id
);
479 void wpas_notify_bss_wps_changed(struct wpa_supplicant
*wpa_s
,
486 wpas_dbus_bss_signal_prop_changed(wpa_s
, WPAS_DBUS_BSS_PROP_WPS
, id
);
487 #endif /* CONFIG_WPS */
491 void wpas_notify_bss_ies_changed(struct wpa_supplicant
*wpa_s
,
497 wpas_dbus_bss_signal_prop_changed(wpa_s
, WPAS_DBUS_BSS_PROP_IES
, id
);
501 void wpas_notify_bss_rates_changed(struct wpa_supplicant
*wpa_s
,
507 wpas_dbus_bss_signal_prop_changed(wpa_s
, WPAS_DBUS_BSS_PROP_RATES
, id
);
511 void wpas_notify_bss_seen(struct wpa_supplicant
*wpa_s
, unsigned int id
)
516 wpas_dbus_bss_signal_prop_changed(wpa_s
, WPAS_DBUS_BSS_PROP_AGE
, id
);
520 void wpas_notify_blob_added(struct wpa_supplicant
*wpa_s
, const char *name
)
525 wpas_dbus_signal_blob_added(wpa_s
, name
);
529 void wpas_notify_blob_removed(struct wpa_supplicant
*wpa_s
, const char *name
)
534 wpas_dbus_signal_blob_removed(wpa_s
, name
);
538 void wpas_notify_debug_level_changed(struct wpa_global
*global
)
540 wpas_dbus_signal_debug_level_changed(global
);
544 void wpas_notify_debug_timestamp_changed(struct wpa_global
*global
)
546 wpas_dbus_signal_debug_timestamp_changed(global
);
550 void wpas_notify_debug_show_keys_changed(struct wpa_global
*global
)
552 wpas_dbus_signal_debug_show_keys_changed(global
);
556 void wpas_notify_suspend(struct wpa_global
*global
)
558 struct wpa_supplicant
*wpa_s
;
560 os_get_time(&global
->suspend_time
);
561 wpa_printf(MSG_DEBUG
, "System suspend notification");
562 for (wpa_s
= global
->ifaces
; wpa_s
; wpa_s
= wpa_s
->next
)
563 wpa_drv_suspend(wpa_s
);
567 void wpas_notify_resume(struct wpa_global
*global
)
571 struct wpa_supplicant
*wpa_s
;
573 if (global
->suspend_time
.sec
== 0)
577 slept
= now
.sec
- global
->suspend_time
.sec
;
579 wpa_printf(MSG_DEBUG
, "System resume notification (slept %d seconds)",
582 for (wpa_s
= global
->ifaces
; wpa_s
; wpa_s
= wpa_s
->next
) {
583 wpa_drv_resume(wpa_s
);
584 if (wpa_s
->wpa_state
== WPA_DISCONNECTED
)
585 wpa_supplicant_req_scan(wpa_s
, 0, 100000);
592 void wpas_notify_p2p_find_stopped(struct wpa_supplicant
*wpa_s
)
594 /* Notify P2P find has stopped */
595 wpas_dbus_signal_p2p_find_stopped(wpa_s
);
599 void wpas_notify_p2p_device_found(struct wpa_supplicant
*wpa_s
,
600 const u8
*dev_addr
, int new_device
)
603 /* Create the new peer object */
604 wpas_dbus_register_peer(wpa_s
, dev_addr
);
607 /* Notify a new peer has been detected*/
608 wpas_dbus_signal_peer_device_found(wpa_s
, dev_addr
);
612 void wpas_notify_p2p_device_lost(struct wpa_supplicant
*wpa_s
,
615 wpas_dbus_unregister_peer(wpa_s
, dev_addr
);
617 /* Create signal on interface object*/
618 wpas_dbus_signal_peer_device_lost(wpa_s
, dev_addr
);
622 void wpas_notify_p2p_group_removed(struct wpa_supplicant
*wpa_s
,
623 const struct wpa_ssid
*ssid
,
626 wpas_dbus_signal_p2p_group_removed(wpa_s
, role
);
628 wpas_dbus_unregister_p2p_group(wpa_s
, ssid
);
632 void wpas_notify_p2p_go_neg_req(struct wpa_supplicant
*wpa_s
,
633 const u8
*src
, u16 dev_passwd_id
, u8 go_intent
)
635 wpas_dbus_signal_p2p_go_neg_req(wpa_s
, src
, dev_passwd_id
, go_intent
);
639 void wpas_notify_p2p_go_neg_completed(struct wpa_supplicant
*wpa_s
,
640 struct p2p_go_neg_results
*res
)
642 wpas_dbus_signal_p2p_go_neg_resp(wpa_s
, res
);
646 void wpas_notify_p2p_invitation_result(struct wpa_supplicant
*wpa_s
,
647 int status
, const u8
*bssid
)
649 wpas_dbus_signal_p2p_invitation_result(wpa_s
, status
, bssid
);
653 void wpas_notify_p2p_sd_request(struct wpa_supplicant
*wpa_s
,
654 int freq
, const u8
*sa
, u8 dialog_token
,
655 u16 update_indic
, const u8
*tlvs
,
658 wpas_dbus_signal_p2p_sd_request(wpa_s
, freq
, sa
, dialog_token
,
659 update_indic
, tlvs
, tlvs_len
);
663 void wpas_notify_p2p_sd_response(struct wpa_supplicant
*wpa_s
,
664 const u8
*sa
, u16 update_indic
,
665 const u8
*tlvs
, size_t tlvs_len
)
667 wpas_dbus_signal_p2p_sd_response(wpa_s
, sa
, update_indic
,
673 * wpas_notify_p2p_provision_discovery - Notification of provision discovery
674 * @dev_addr: Who sent the request or responded to our request.
675 * @request: Will be 1 if request, 0 for response.
676 * @status: Valid only in case of response (0 in case of success)
677 * @config_methods: WPS config methods
678 * @generated_pin: PIN to be displayed in case of WPS_CONFIG_DISPLAY method
680 * This can be used to notify:
681 * - Requests or responses
682 * - Various config methods
683 * - Failure condition in case of response
685 void wpas_notify_p2p_provision_discovery(struct wpa_supplicant
*wpa_s
,
686 const u8
*dev_addr
, int request
,
687 enum p2p_prov_disc_status status
,
689 unsigned int generated_pin
)
691 wpas_dbus_signal_p2p_provision_discovery(wpa_s
, dev_addr
, request
,
692 status
, config_methods
,
697 void wpas_notify_p2p_group_started(struct wpa_supplicant
*wpa_s
,
698 struct wpa_ssid
*ssid
, int persistent
,
699 int client
, const u8
*ip
)
701 /* Notify a group has been started */
702 wpas_dbus_register_p2p_group(wpa_s
, ssid
);
704 wpas_dbus_signal_p2p_group_started(wpa_s
, client
, persistent
, ip
);
708 void wpas_notify_p2p_group_formation_failure(struct wpa_supplicant
*wpa_s
,
711 /* Notify a group formation failed */
712 wpas_dbus_signal_p2p_group_formation_failure(wpa_s
, reason
);
716 void wpas_notify_p2p_wps_failed(struct wpa_supplicant
*wpa_s
,
717 struct wps_event_fail
*fail
)
719 wpas_dbus_signal_p2p_wps_failed(wpa_s
, fail
);
723 void wpas_notify_p2p_invitation_received(struct wpa_supplicant
*wpa_s
,
724 const u8
*sa
, const u8
*go_dev_addr
,
725 const u8
*bssid
, int id
, int op_freq
)
727 /* Notify a P2P Invitation Request */
728 wpas_dbus_signal_p2p_invitation_received(wpa_s
, sa
, go_dev_addr
, bssid
,
732 #endif /* CONFIG_P2P */
735 static void wpas_notify_ap_sta_authorized(struct wpa_supplicant
*wpa_s
,
737 const u8
*p2p_dev_addr
)
740 wpas_p2p_notify_ap_sta_authorized(wpa_s
, p2p_dev_addr
);
743 * Create 'peer-joined' signal on group object -- will also
747 wpas_dbus_signal_p2p_peer_joined(wpa_s
, p2p_dev_addr
);
748 #endif /* CONFIG_P2P */
750 /* Register the station */
751 wpas_dbus_register_sta(wpa_s
, sta
);
753 /* Notify listeners a new station has been authorized */
754 wpas_dbus_signal_sta_authorized(wpa_s
, sta
);
758 static void wpas_notify_ap_sta_deauthorized(struct wpa_supplicant
*wpa_s
,
760 const u8
*p2p_dev_addr
)
764 * Create 'peer-disconnected' signal on group object if this
768 wpas_dbus_signal_p2p_peer_disconnected(wpa_s
, p2p_dev_addr
);
769 #endif /* CONFIG_P2P */
771 /* Notify listeners a station has been deauthorized */
772 wpas_dbus_signal_sta_deauthorized(wpa_s
, sta
);
774 /* Unregister the station */
775 wpas_dbus_unregister_sta(wpa_s
, sta
);
779 void wpas_notify_sta_authorized(struct wpa_supplicant
*wpa_s
,
780 const u8
*mac_addr
, int authorized
,
781 const u8
*p2p_dev_addr
)
784 wpas_notify_ap_sta_authorized(wpa_s
, mac_addr
, p2p_dev_addr
);
786 wpas_notify_ap_sta_deauthorized(wpa_s
, mac_addr
, p2p_dev_addr
);
790 void wpas_notify_certification(struct wpa_supplicant
*wpa_s
,
791 struct tls_cert_data
*cert
,
792 const char *cert_hash
)
796 wpa_msg(wpa_s
, MSG_INFO
, WPA_EVENT_EAP_PEER_CERT
797 "depth=%d subject='%s'%s%s%s%s",
798 cert
->depth
, cert
->subject
, cert_hash
? " hash=" : "",
799 cert_hash
? cert_hash
: "",
800 cert
->tod
== 2 ? " tod=2" : "",
801 cert
->tod
== 1 ? " tod=1" : "");
805 size_t len
= wpabuf_len(cert
->cert
) * 2 + 1;
806 cert_hex
= os_malloc(len
);
808 wpa_snprintf_hex(cert_hex
, len
, wpabuf_head(cert
->cert
),
809 wpabuf_len(cert
->cert
));
810 wpa_msg_ctrl(wpa_s
, MSG_INFO
,
811 WPA_EVENT_EAP_PEER_CERT
812 "depth=%d subject='%s' cert=%s",
813 cert
->depth
, cert
->subject
, cert_hex
);
818 for (i
= 0; i
< cert
->num_altsubject
; i
++)
819 wpa_msg(wpa_s
, MSG_INFO
, WPA_EVENT_EAP_PEER_ALT
820 "depth=%d %s", cert
->depth
, cert
->altsubject
[i
]);
822 /* notify the new DBus API */
823 wpas_dbus_signal_certification(wpa_s
, cert
->depth
, cert
->subject
,
824 cert
->altsubject
, cert
->num_altsubject
,
825 cert_hash
, cert
->cert
);
829 void wpas_notify_preq(struct wpa_supplicant
*wpa_s
,
830 const u8
*addr
, const u8
*dst
, const u8
*bssid
,
831 const u8
*ie
, size_t ie_len
, u32 ssi_signal
)
834 wpas_dbus_signal_preq(wpa_s
, addr
, dst
, bssid
, ie
, ie_len
, ssi_signal
);
835 #endif /* CONFIG_AP */
839 void wpas_notify_eap_status(struct wpa_supplicant
*wpa_s
, const char *status
,
840 const char *parameter
)
842 wpas_dbus_signal_eap_status(wpa_s
, status
, parameter
);
843 wpa_msg_ctrl(wpa_s
, MSG_INFO
, WPA_EVENT_EAP_STATUS
844 "status='%s' parameter='%s'",
849 void wpas_notify_eap_error(struct wpa_supplicant
*wpa_s
, int error_code
)
851 wpa_msg(wpa_s
, MSG_ERROR
, WPA_EVENT_EAP_ERROR_CODE
"%d", error_code
);
855 void wpas_notify_network_bssid_set_changed(struct wpa_supplicant
*wpa_s
,
856 struct wpa_ssid
*ssid
)
858 if (wpa_s
->current_ssid
!= ssid
)
861 wpa_dbg(wpa_s
, MSG_DEBUG
,
862 "Network bssid config changed for the current network - within-ESS roaming %s",
863 ssid
->bssid_set
? "disabled" : "enabled");
865 wpa_drv_roaming(wpa_s
, !ssid
->bssid_set
,
866 ssid
->bssid_set
? ssid
->bssid
: NULL
);
870 void wpas_notify_network_type_changed(struct wpa_supplicant
*wpa_s
,
871 struct wpa_ssid
*ssid
)
874 if (ssid
->disabled
== 2) {
875 /* Changed from normal network profile to persistent group */
877 wpas_dbus_unregister_network(wpa_s
, ssid
->id
);
879 ssid
->p2p_persistent_group
= 1;
880 wpas_dbus_register_persistent_group(wpa_s
, ssid
);
882 /* Changed from persistent group to normal network profile */
883 wpas_dbus_unregister_persistent_group(wpa_s
, ssid
->id
);
884 ssid
->p2p_persistent_group
= 0;
885 wpas_dbus_register_network(wpa_s
, ssid
);
887 #endif /* CONFIG_P2P */
893 void wpas_notify_mesh_group_started(struct wpa_supplicant
*wpa_s
,
894 struct wpa_ssid
*ssid
)
899 wpas_dbus_signal_mesh_group_started(wpa_s
, ssid
);
903 void wpas_notify_mesh_group_removed(struct wpa_supplicant
*wpa_s
,
904 const u8
*meshid
, u8 meshid_len
,
910 wpas_dbus_signal_mesh_group_removed(wpa_s
, meshid
, meshid_len
,
915 void wpas_notify_mesh_peer_connected(struct wpa_supplicant
*wpa_s
,
921 wpas_dbus_signal_mesh_peer_connected(wpa_s
, peer_addr
);
925 void wpas_notify_mesh_peer_disconnected(struct wpa_supplicant
*wpa_s
,
926 const u8
*peer_addr
, u16 reason_code
)
931 wpas_dbus_signal_mesh_peer_disconnected(wpa_s
, peer_addr
, reason_code
);
934 #endif /* CONFIG_MESH */