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.
This commit is contained in:
Dan Williams
2013-01-11 07:32:20 -06:00
parent 1d6e68dc31
commit c72d976e46

View File

@@ -1388,7 +1388,8 @@ is_available (NMDevice *dev)
} }
state = nm_supplicant_interface_get_state (sup_iface); 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_log_dbg (LOGD_WIFI, "(%s): not available because supplicant interface not ready",
nm_device_get_iface (dev)); nm_device_get_iface (dev));
return FALSE; return FALSE;