diff options
author | Pavan Holla <pholla@chromium.org> | 2020-11-23 17:52:17 +0000 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2020-11-26 08:53:14 +0000 |
commit | 38f6704fa1d6f602be84bcbf016b3386ac82c426 (patch) | |
tree | b124b872fa77b0427c9cf9596a16aa08d69205fc /src/mm-iface-modem.c | |
parent | 92c86e2b1bcdaab991d89bdd8f670b248c246bae (diff) |
base-sim: Reprobe modem if lock status cannot be read after sending puk
If the lock status cannot be read during a puk unblock attempt, reprobe
the modem. It is likely that the SIM was permanently blocked if the lock
status cannot be read.
Diffstat (limited to 'src/mm-iface-modem.c')
-rw-r--r-- | src/mm-iface-modem.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c index 0ddc0a29..5bb9dd2c 100644 --- a/src/mm-iface-modem.c +++ b/src/mm-iface-modem.c @@ -1076,7 +1076,7 @@ set_primary_sim_slot_ready (MMIfaceModem *self, /* Notify about the SIM swap, which will disable and reprobe the device. * There is no need to update the PrimarySimSlot property, as this value will be * reloaded automatically during the reprobe. */ - mm_base_modem_process_sim_switch (MM_BASE_MODEM (self)); + mm_base_modem_process_sim_event (MM_BASE_MODEM (self)); } mm_gdbus_modem_complete_set_primary_sim_slot (ctx->skeleton, ctx->invocation); @@ -3314,6 +3314,8 @@ set_lock_status (MMIfaceModem *self, old_lock = mm_gdbus_modem_get_unlock_required (skeleton); mm_gdbus_modem_set_unlock_required (skeleton, lock); + if (lock == MM_MODEM_LOCK_UNKNOWN) + mm_gdbus_modem_set_unlock_retries (skeleton, 0); /* We don't care about SIM-PIN2/SIM-PUK2 since the device is * operational without it. */ @@ -3639,6 +3641,7 @@ update_lock_info_context_step (GTask *task) case UPDATE_LOCK_INFO_CONTEXT_STEP_LAST: if (ctx->saved_error) { + set_lock_status (self, ctx->skeleton, MM_MODEM_LOCK_UNKNOWN); /* Return saved error */ g_task_return_error (task, ctx->saved_error); ctx->saved_error = NULL; |