Add DBus state change notification for AuthMode property
Signed-off-by: Paul Stewart <pstew@google.com>
This commit is contained in:
parent
ba6f267f64
commit
5bbf9f1086
5 changed files with 19 additions and 1 deletions
|
@ -695,6 +695,11 @@ void wpas_dbus_signal_prop_changed(struct wpa_supplicant *wpa_s,
|
||||||
getter = (WPADBusPropertyAccessor) wpas_dbus_getter_bsss;
|
getter = (WPADBusPropertyAccessor) wpas_dbus_getter_bsss;
|
||||||
prop = "BSSs";
|
prop = "BSSs";
|
||||||
break;
|
break;
|
||||||
|
case WPAS_DBUS_PROP_CURRENT_AUTH_MODE:
|
||||||
|
getter = (WPADBusPropertyAccessor)
|
||||||
|
wpas_dbus_getter_current_auth_mode;
|
||||||
|
prop = "CurrentAuthMode";
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
wpa_printf(MSG_ERROR, "dbus: %s: Unknown Property value %d",
|
wpa_printf(MSG_ERROR, "dbus: %s: Unknown Property value %d",
|
||||||
__func__, property);
|
__func__, property);
|
||||||
|
|
|
@ -30,6 +30,7 @@ enum wpas_dbus_prop {
|
||||||
WPAS_DBUS_PROP_STATE,
|
WPAS_DBUS_PROP_STATE,
|
||||||
WPAS_DBUS_PROP_CURRENT_BSS,
|
WPAS_DBUS_PROP_CURRENT_BSS,
|
||||||
WPAS_DBUS_PROP_CURRENT_NETWORK,
|
WPAS_DBUS_PROP_CURRENT_NETWORK,
|
||||||
|
WPAS_DBUS_PROP_CURRENT_AUTH_MODE,
|
||||||
WPAS_DBUS_PROP_BSSS,
|
WPAS_DBUS_PROP_BSSS,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -120,6 +120,12 @@ void wpas_notify_bssid_changed(struct wpa_supplicant *wpa_s)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void wpas_notify_auth_changed(struct wpa_supplicant *wpa_s)
|
||||||
|
{
|
||||||
|
wpas_dbus_signal_prop_changed(wpa_s, WPAS_DBUS_PROP_CURRENT_AUTH_MODE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void wpas_notify_network_enabled_changed(struct wpa_supplicant *wpa_s,
|
void wpas_notify_network_enabled_changed(struct wpa_supplicant *wpa_s,
|
||||||
struct wpa_ssid *ssid)
|
struct wpa_ssid *ssid)
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,6 +29,7 @@ void wpas_notify_state_changed(struct wpa_supplicant *wpa_s,
|
||||||
void wpas_notify_network_changed(struct wpa_supplicant *wpa_s);
|
void wpas_notify_network_changed(struct wpa_supplicant *wpa_s);
|
||||||
void wpas_notify_ap_scan_changed(struct wpa_supplicant *wpa_s);
|
void wpas_notify_ap_scan_changed(struct wpa_supplicant *wpa_s);
|
||||||
void wpas_notify_bssid_changed(struct wpa_supplicant *wpa_s);
|
void wpas_notify_bssid_changed(struct wpa_supplicant *wpa_s);
|
||||||
|
void wpas_notify_auth_changed(struct wpa_supplicant *wpa_s);
|
||||||
void wpas_notify_network_enabled_changed(struct wpa_supplicant *wpa_s,
|
void wpas_notify_network_enabled_changed(struct wpa_supplicant *wpa_s,
|
||||||
struct wpa_ssid *ssid);
|
struct wpa_ssid *ssid);
|
||||||
void wpas_notify_network_selected(struct wpa_supplicant *wpa_s,
|
void wpas_notify_network_selected(struct wpa_supplicant *wpa_s,
|
||||||
|
|
|
@ -572,8 +572,13 @@ void wpa_supplicant_set_state(struct wpa_supplicant *wpa_s,
|
||||||
}
|
}
|
||||||
wpa_s->wpa_state = state;
|
wpa_s->wpa_state = state;
|
||||||
|
|
||||||
if (wpa_s->wpa_state != old_state)
|
if (wpa_s->wpa_state != old_state) {
|
||||||
wpas_notify_state_changed(wpa_s, wpa_s->wpa_state, old_state);
|
wpas_notify_state_changed(wpa_s, wpa_s->wpa_state, old_state);
|
||||||
|
|
||||||
|
if (wpa_s->wpa_state == WPA_COMPLETED ||
|
||||||
|
old_state == WPA_COMPLETED)
|
||||||
|
wpas_notify_auth_changed(wpa_s);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue