diff options
author | Dan Williams <dcbw@redhat.com> | 2013-04-18 12:19:46 -0500 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2013-04-18 12:22:28 -0500 |
commit | 92035fdf1c39c9e1bf8b7d419d913e85bc8e1a44 (patch) | |
tree | 4cfcd399b04fc298355b4ccfb9629f642554b377 | |
parent | 7d668eb407eccf89cbbfeb96bbb553ade5b47c92 (diff) | |
download | ModemManager-92035fdf1c39c9e1bf8b7d419d913e85bc8e1a44.tar.gz |
iface-modem: skip modem_after_sim_unlock() for CDMA-only devices
We don't support SIM/RUIM on CDMA devices (yet), so for now it makes
no sense to run the after-sim-unlock step on CDMA-only devices where
a SIM won't be present.
Unfortunately we don't know at this point whether there is a SIM
or not, so if the modem is a multi-mode device (implying it has a SIM
slot) and its plugin implements the modem_after_sim_unlock() hook,
the hook will still be executed and might cause an unecessary delay
when a SIM is not inserted.
-rw-r--r-- | src/mm-iface-modem.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c index 66ecdf9a2..703de0279 100644 --- a/src/mm-iface-modem.c +++ b/src/mm-iface-modem.c @@ -2705,10 +2705,12 @@ update_lock_info_context_step (UpdateLockInfoContext *ctx) case UPDATE_LOCK_INFO_CONTEXT_STEP_AFTER_UNLOCK: /* If we get that no lock is required, run the after SIM unlock step - * in order to wait for the SIM to get ready */ - if (ctx->lock == MM_MODEM_LOCK_NONE || - ctx->lock == MM_MODEM_LOCK_SIM_PIN2 || - ctx->lock == MM_MODEM_LOCK_SIM_PUK2) { + * in order to wait for the SIM to get ready. Skip waiting on + * CDMA-only modems where we don't support a SIM. */ + if (!mm_iface_modem_is_cdma_only (ctx->self) && + (ctx->lock == MM_MODEM_LOCK_NONE || + ctx->lock == MM_MODEM_LOCK_SIM_PIN2 || + ctx->lock == MM_MODEM_LOCK_SIM_PUK2)) { if (MM_IFACE_MODEM_GET_INTERFACE (ctx->self)->modem_after_sim_unlock != NULL && MM_IFACE_MODEM_GET_INTERFACE (ctx->self)->modem_after_sim_unlock_finish != NULL) { mm_dbg ("SIM is ready, running after SIM unlock step..."); |