Commit 32e0bf14 authored by Lubomir Rintel's avatar Lubomir Rintel 🥕

Revert "wwan/device-modem: don't enter available state until registered"

This is wrong -- we may want to start activating before device is
registered if it the SIM needs unlocking with a PIN code that's included
in the connection.

This reverts commit 2e8f43e3.
parent d66a1ace
......@@ -473,6 +473,11 @@ check_connection_available (NMDevice *device,
}
state = nm_modem_get_state (priv->modem);
if (state <= NM_MODEM_STATE_INITIALIZING) {
nm_utils_error_set_literal (error, NM_UTILS_ERROR_CONNECTION_AVAILABLE_TEMPORARY,
"modem not initialized");
return FALSE;
}
if (state == NM_MODEM_STATE_LOCKED) {
if (!nm_connection_get_setting_gsm (connection)) {
......@@ -482,12 +487,6 @@ check_connection_available (NMDevice *device,
}
}
if (state < NM_MODEM_STATE_REGISTERED) {
nm_utils_error_set_literal (error, NM_UTILS_ERROR_CONNECTION_AVAILABLE_TEMPORARY,
"modem not registered");
return FALSE;
}
return TRUE;
}
......@@ -659,7 +658,7 @@ is_available (NMDevice *device, NMDeviceCheckDevAvailableFlags flags)
g_assert (priv->modem);
modem_state = nm_modem_get_state (priv->modem);
if (modem_state < NM_MODEM_STATE_REGISTERED)
if (modem_state <= NM_MODEM_STATE_INITIALIZING)
return FALSE;
return TRUE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment