device: Recheck P2P availability after setting a supplicant interface

The newly set interface may already be in a READY state. In that case,
the device should progress into the DISCONNECTED state rather than
remaining in the UNAVAILABLE state.
This commit is contained in:
Benjamin Berg 2019-02-19 14:53:48 +01:00
parent 3e079e87a5
commit 3a2aa5632d

View file

@ -1137,6 +1137,10 @@ nm_device_wifi_p2p_set_mgmt_iface (NMDeviceWifiP2P *self,
G_CALLBACK (supplicant_iface_group_started_cb),
self);
nm_device_queue_recheck_available (NM_DEVICE (self),
NM_DEVICE_STATE_REASON_SUPPLICANT_AVAILABLE,
NM_DEVICE_STATE_REASON_SUPPLICANT_FAILED);
done:
_set_is_waiting_for_supplicant (self,
!priv->mgmt_iface