summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniele Palmas <dnlplm@gmail.com>2016-10-25 14:50:05 +0200
committerAleksander Morgado <aleksander@aleksander.es>2016-10-25 15:52:27 +0200
commit9583ec98fd0d8ec53e5cdf048461166ea329b4ce (patch)
treee42d23b9e432f676ea966caf48193c76b6cda836
parent2c5af4f0bcd150b950462b2640dcd78dcbb522d6 (diff)
downloadModemManager-9583ec98fd0d8ec53e5cdf048461166ea329b4ce.tar.gz
broadband-modem-qmi: add QMI_PROTOCOL_ERROR_NOT_SUPPORTED case for pin status checking
Telit LE922A does not like the legacy way for checking pin status, but instead of returning QMI_PROTOCOL_ERROR_INVALID_QMI_COMMAND, it returns QMI_PROTOCOL_ERROR_NOT_SUPPORTED, making the modem not to be fully initialized. This patch adds QMI_PROTOCOL_ERROR_NOT_SUPPORTED as another error for which the new pin checking status way is tried.
-rw-r--r--src/mm-broadband-modem-qmi.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mm-broadband-modem-qmi.c b/src/mm-broadband-modem-qmi.c
index 1a137911b..44c346a64 100644
--- a/src/mm-broadband-modem-qmi.c
+++ b/src/mm-broadband-modem-qmi.c
@@ -1740,7 +1740,10 @@ dms_uim_get_pin_status_ready (QmiClientDms *client,
/* We get InvalidQmiCommand on newer devices which don't like the legacy way */
if (g_error_matches (error,
QMI_PROTOCOL_ERROR,
- QMI_PROTOCOL_ERROR_INVALID_QMI_COMMAND)) {
+ QMI_PROTOCOL_ERROR_INVALID_QMI_COMMAND) ||
+ g_error_matches (error,
+ QMI_PROTOCOL_ERROR,
+ QMI_PROTOCOL_ERROR_NOT_SUPPORTED)) {
g_error_free (error);
qmi_message_dms_uim_get_pin_status_output_unref (output);
/* Flag that the command is unsupported, and try with the new way */