path: root/wpa_supplicant/notify.c
diff options
authorAndrej Shadura <andrew.shadura@collabora.co.uk>2018-10-07 12:31:51 (GMT)
committerJouni Malinen <j@w1.fi>2018-12-23 15:25:11 (GMT)
commitc3f23ad6c75642d241ade9cdb2b526289df2da65 (patch)
tree35be6be765ede060b02418cf48a530c8277fbcd5 /wpa_supplicant/notify.c
parentf5f4c11aa1a5de7401dfe94e39255104a17aad3d (diff)
dbus: Expose connected stations on D-Bus
Make it possible to list connected stations in AP mode over D-Bus, along with some of their properties: rx/tx packets, bytes, capabilities, etc. Signed-off-by: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com> Rebased by Julian Andres Klode <juliank@ubuntu.com> and updated to use the new getter API. Further modified by Andrej Shadura to not error out when not in AP mode and to send separate StationAdded/StationRemoved signals instead of changing signatures of existing StaAuthorized/StaDeauthorized signals. Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
Diffstat (limited to 'wpa_supplicant/notify.c')
1 files changed, 6 insertions, 0 deletions
diff --git a/wpa_supplicant/notify.c b/wpa_supplicant/notify.c
index 83df04f..75f762d 100644
--- a/wpa_supplicant/notify.c
+++ b/wpa_supplicant/notify.c
@@ -720,6 +720,9 @@ static void wpas_notify_ap_sta_authorized(struct wpa_supplicant *wpa_s,
wpas_dbus_signal_p2p_peer_joined(wpa_s, p2p_dev_addr);
#endif /* CONFIG_P2P */
+ /* Register the station */
+ wpas_dbus_register_sta(wpa_s, sta);
/* Notify listeners a new station has been authorized */
wpas_dbus_signal_sta_authorized(wpa_s, sta);
@@ -740,6 +743,9 @@ static void wpas_notify_ap_sta_deauthorized(struct wpa_supplicant *wpa_s,
/* Notify listeners a station has been deauthorized */
wpas_dbus_signal_sta_deauthorized(wpa_s, sta);
+ /* Unregister the station */
+ wpas_dbus_unregister_sta(wpa_s, sta);