summaryrefslogtreecommitdiff
path: root/src/devices/wwan/nm-device-modem.c
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2019-03-16 15:00:31 +0100
committerLubomir Rintel <lkundrak@v3.sk>2019-03-18 17:33:41 +0100
commit32e0bf1421263b07a1dde74d9281253cc1ea49ab (patch)
tree3f59b186f05b1826eff2d185240b6e8c7ae667b5 /src/devices/wwan/nm-device-modem.c
parentd66a1ace23c5a9fcedefb2b36f328da4972c5d9e (diff)
downloadNetworkManager-32e0bf1421263b07a1dde74d9281253cc1ea49ab.tar.gz
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 2e8f43e379c61d79b6dd1b27ee1d9cb950447ad5.
Diffstat (limited to 'src/devices/wwan/nm-device-modem.c')
-rw-r--r--src/devices/wwan/nm-device-modem.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/devices/wwan/nm-device-modem.c b/src/devices/wwan/nm-device-modem.c
index 876f75d7e5..1e31628080 100644
--- a/src/devices/wwan/nm-device-modem.c
+++ b/src/devices/wwan/nm-device-modem.c
@@ -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;