From 19e5cc9b0d1b03b0414b6951a38504edf24ba517 Mon Sep 17 00:00:00 2001 From: Andrew Zaborowski Date: Fri, 18 Jun 2021 09:33:22 +0200 Subject: [PATCH] station: Remove diagnostics interface reliably If the idea is that the interface should only be present when connected then don't do this in the DISCONNECTING state as there are various possible transitions from CONNECTED or ROAMING directly to DISCONNECTED. --- src/station.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/station.c b/src/station.c index 6876cd41..0b0cc59c 100644 --- a/src/station.c +++ b/src/station.c @@ -1211,9 +1211,6 @@ static void station_enter_state(struct station *station, periodic_scan_stop(station); break; case STATION_STATE_DISCONNECTING: - l_dbus_object_remove_interface(dbus_get_bus(), - netdev_get_path(station->netdev), - IWD_STATION_DIAGNOSTIC_INTERFACE); break; case STATION_STATE_ROAMING: break; @@ -1317,6 +1314,8 @@ static void station_reset_connection_state(struct station *station) IWD_STATION_INTERFACE, "ConnectedNetwork"); l_dbus_property_changed(dbus, network_get_path(network), IWD_NETWORK_INTERFACE, "Connected"); + l_dbus_object_remove_interface(dbus, netdev_get_path(station->netdev), + IWD_STATION_DIAGNOSTIC_INTERFACE); } static void station_disassociated(struct station *station)