broadband-modem-mbim: VZ20M returns ERROR_PIN_REQUIRED in PIN query response

VID/PID: 258d:e000

Instead of returning success and the PIN type + PIN status + Remaining attempts,
this modem returns a plain ERROR_PIN_REQUIRED error, so try to handle that...
This commit is contained in:
Aleksander Morgado
2014-07-11 11:51:38 +02:00
parent 6062462dcb
commit e5920efe09

View File

@@ -553,7 +553,15 @@ pin_query_ready (MbimDevice *device,
g_simple_async_result_set_op_res_gpointer (ctx->result, g_simple_async_result_set_op_res_gpointer (ctx->result,
GUINT_TO_POINTER (unlock_required), GUINT_TO_POINTER (unlock_required),
NULL); NULL);
} else }
/* VZ20M reports an error when SIM-PIN is required... */
else if (g_error_matches (error, MBIM_STATUS_ERROR, MBIM_STATUS_ERROR_PIN_REQUIRED)) {
g_error_free (error);
g_simple_async_result_set_op_res_gpointer (ctx->result,
GUINT_TO_POINTER (MBIM_PIN_TYPE_PIN1),
NULL);
}
else
g_simple_async_result_take_error (ctx->result, error); g_simple_async_result_take_error (ctx->result, error);
if (response) if (response)