From c72d976e467e467f91c6ca81cadf2936e1eb9204 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Fri, 11 Jan 2013 07:32:20 -0600 Subject: [PATCH] wifi: fix supplicant interface state handling for is_available() is_available() appears not to have been updated when supplicant interface states were consolidated between the manager and the interface objects long ago. Soon after that, the supplicant itself added some states. The wifi device is available to activate whenever the supplicant is READY or in one of it's operational modes, ie up until COMPLETED. Any other state means the supplicant is not ready. --- src/nm-device-wifi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nm-device-wifi.c b/src/nm-device-wifi.c index 9101f4d55..eb5ac1aa4 100644 --- a/src/nm-device-wifi.c +++ b/src/nm-device-wifi.c @@ -1388,7 +1388,8 @@ is_available (NMDevice *dev) } state = nm_supplicant_interface_get_state (sup_iface); - if (state != NM_SUPPLICANT_INTERFACE_STATE_READY) { + if ( state < NM_SUPPLICANT_INTERFACE_STATE_READY + || state > NM_SUPPLICANT_INTERFACE_STATE_COMPLETED) { nm_log_dbg (LOGD_WIFI, "(%s): not available because supplicant interface not ready", nm_device_get_iface (dev)); return FALSE;