aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2017-02-28 11:13:04 +0100
committerAleksander Morgado <aleksander@aleksander.es>2017-02-28 11:13:04 +0100
commit21f315f6d554b93e4f098cfd0e94c484a8a0c5dc (patch)
tree31ae9a767e3b6716e5b167e39f1ced82b48e2614
parent40e6fa48c4d43069ced8cd9bc7206d3554b6e72a (diff)
broadband-modem-qmi: FCC auth if InvalidTransition when going online
https://bugs.freedesktop.org/show_bug.cgi?id=100001
-rw-r--r--src/mm-broadband-modem-qmi.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/mm-broadband-modem-qmi.c b/src/mm-broadband-modem-qmi.c
index 44c346a6..280f98fb 100644
--- a/src/mm-broadband-modem-qmi.c
+++ b/src/mm-broadband-modem-qmi.c
@@ -3061,13 +3061,21 @@ dms_set_operating_mode_ready (QmiClientDms *client,
if (!qmi_message_dms_set_operating_mode_output_get_result (output, &error)) {
QmiDmsOperatingMode mode;
- /* Some new devices, like the Dell DW5770, will return an internal error when
- * trying to bring the power mode to online. We can avoid this by sending the
- * magic "DMS Set FCC Auth" message before trying. */
+ /*
+ * Some new devices, like the Dell DW5770, will return an internal error when
+ * trying to bring the power mode to online.
+ *
+ * Other devices, like some rebranded EM7455 modules, will return a "invalid
+ * transition" instead when trying to bring the power mode to online.
+ *
+ * We can avoid this by sending the magic "DMS Set FCC Auth" message before
+ * retrying.
+ */
if (ctx->step == SET_OPERATING_MODE_STEP_FIRST &&
qmi_message_dms_set_operating_mode_input_get_mode (ctx->input, &mode, NULL) &&
mode == QMI_DMS_OPERATING_MODE_ONLINE &&
- g_error_matches (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_INTERNAL)) {
+ (g_error_matches (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_INTERNAL) ||
+ g_error_matches (error, QMI_PROTOCOL_ERROR, QMI_PROTOCOL_ERROR_INVALID_TRANSITION))) {
g_error_free (error);
/* Go on to FCC auth */
ctx->step++;