diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2015-06-05 17:42:18 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2015-06-05 22:45:53 +0200 |
commit | 0ac7feb79720715a4a4f91e5e3f6c0775a092e0e (patch) | |
tree | 114feaadaf65524ca45d44362023f7578970f942 | |
parent | d5fb4284e13b534b57660282cf80c33bf981929e (diff) |
broadband-modem-qmi: retry unlock checks on 'UimUninitialized' errors
The Pantech UML290 takes a horribly great time to initialize the SIM, and
therefore we may even be losing the 3GPP capabilities as the SIM is not
detected during the initial checks:
load_unlock_required_ready(): Couldn't check if unlock required: 'SIM failure: QMI protocol error (37): 'UimUninitialized''
current_capabilities_internal_load_unlock_required_ready(): Multimode device without SIM, no 3GPP capabilities
To avoid this, let 'UimUninitialized' be a retriable error.
-rw-r--r-- | src/mm-broadband-modem-qmi.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/mm-broadband-modem-qmi.c b/src/mm-broadband-modem-qmi.c index f158fdf3..962a2d73 100644 --- a/src/mm-broadband-modem-qmi.c +++ b/src/mm-broadband-modem-qmi.c @@ -1444,22 +1444,13 @@ dms_uim_get_pin_status_ready (QmiClientDms *client, g_prefix_error (&error, "QMI operation failed: "); g_simple_async_result_take_error (simple, error); } else if (!qmi_message_dms_uim_get_pin_status_output_get_result (output, &error)) { - /* Fatal, so that we mark the modem unusable.*/ + /* Internal and uim-uninitialized errors are retry-able before being fatal */ if (g_error_matches (error, QMI_PROTOCOL_ERROR, + QMI_PROTOCOL_ERROR_INTERNAL) || + g_error_matches (error, + QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_UIM_UNINITIALIZED)) { - /* This error won't force a pin check retry */ - g_simple_async_result_set_error (simple, - MM_MOBILE_EQUIPMENT_ERROR, - MM_MOBILE_EQUIPMENT_ERROR_SIM_FAILURE, - "SIM failure: %s", - error->message); - g_error_free (error); - } - /* Internal errors are retry-able before being fatal */ - else if (g_error_matches (error, - QMI_PROTOCOL_ERROR, - QMI_PROTOCOL_ERROR_INTERNAL)) { g_simple_async_result_set_error (simple, MM_CORE_ERROR, MM_CORE_ERROR_RETRY, |