aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichal Mazur <mkm@semihalf.com>2021-04-20 11:31:23 +0200
committerAleksander Morgado <aleksander@aleksander.es>2021-05-22 23:56:22 +0000
commit83e7600a67d1c5952d0fada07ebe70dfef3492f6 (patch)
treef17032b24ad22f9cd3f6423c9dfa12a16d814618 /src
parentd76c5c9bcd7b94b89f26a434235dd25297f5159b (diff)
broadband-modem: allow 3GPP initialization before fallback
To enable call to disable-facility-lock in LOCKED state, 3gpp interface needs to be initialized before going to fallback step.
Diffstat (limited to 'src')
-rw-r--r--src/mm-broadband-modem.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c
index 0e7b29b8..e747e335 100644
--- a/src/mm-broadband-modem.c
+++ b/src/mm-broadband-modem.c
@@ -11941,6 +11941,7 @@ typedef enum {
INITIALIZE_STEP_SETUP_SIMPLE_STATUS,
INITIALIZE_STEP_IFACE_MODEM,
INITIALIZE_STEP_IFACE_3GPP,
+ INITIALIZE_STEP_JUMP_TO_LIMITED,
INITIALIZE_STEP_IFACE_3GPP_PROFILE_MANAGER,
INITIALIZE_STEP_IFACE_3GPP_USSD,
INITIALIZE_STEP_IFACE_CDMA,
@@ -12068,17 +12069,6 @@ iface_modem_initialize_ready (MMBroadbandModem *self,
mm_iface_modem_bind_simple_status (MM_IFACE_MODEM (self),
self->priv->modem_simple_status);
- /* If we find ourselves in a LOCKED state, we shouldn't keep on
- * the initialization sequence. Instead, we will re-initialize once
- * we are unlocked. */
- if (ctx->self->priv->modem_state == MM_MODEM_STATE_LOCKED) {
- /* Jump to the fallback step when locked, we will allow some additional
- * interfaces even in locked state. */
- ctx->step = INITIALIZE_STEP_FALLBACK_LIMITED;
- initialize_step (task);
- return;
- }
-
/* Go on to next step */
ctx->step++;
initialize_step (task);
@@ -12204,6 +12194,17 @@ initialize_step (GTask *task)
ctx->step++;
/* fall through */
+ case INITIALIZE_STEP_JUMP_TO_LIMITED:
+ if (ctx->self->priv->modem_state == MM_MODEM_STATE_LOCKED) {
+ /* Jump to the fallback step when locked, we will allow some additional
+ * interfaces even in locked state. */
+ ctx->step = INITIALIZE_STEP_FALLBACK_LIMITED;
+ initialize_step (task);
+ return;
+ }
+ ctx->step++;
+ /* fall through */
+
case INITIALIZE_STEP_IFACE_3GPP_PROFILE_MANAGER:
if (mm_iface_modem_is_3gpp (MM_IFACE_MODEM (ctx->self))) {
/* Initialize the 3GPP Profile Manager interface */