commit 19e5cc9b0d1b03b0414b6951a38504edf24ba517
parent 002fc2d6322c76924a1e6ab1c1021fccf1e36915
Author: Andrew Zaborowski <andrew.zaborowski@intel.com>
Date: Fri, 18 Jun 2021 09:33:22 +0200
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.
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git 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)