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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user