From 27bc2cb22a6bdd3dc0c1ad2a67464939dcf53049 Mon Sep 17 00:00:00 2001 From: Benjamin Berg Date: Tue, 19 Feb 2019 12:57:59 +0100 Subject: [PATCH] device: Ensure P2P device is unavailable without wpa_supplicant Put the device into UNAVAILABLE state when the corresponding WPA supplicant management interface is unset. This is important to explicitly clear any pending state changes that are not permissible when there is no management interface. --- src/devices/wifi/nm-device-wifi-p2p.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/devices/wifi/nm-device-wifi-p2p.c b/src/devices/wifi/nm-device-wifi-p2p.c index a6259273ea..97a5beac02 100644 --- a/src/devices/wifi/nm-device-wifi-p2p.c +++ b/src/devices/wifi/nm-device-wifi-p2p.c @@ -945,6 +945,10 @@ supplicant_interfaces_release (NMDeviceWifiP2P *self, gboolean set_is_waiting) supplicant_group_interface_release (self); + nm_device_state_changed (NM_DEVICE (self), + NM_DEVICE_STATE_UNAVAILABLE, + NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED); + if (set_is_waiting) _set_is_waiting_for_supplicant (self, TRUE); }