diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-broadband-bearer.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/mm-broadband-bearer.c b/src/mm-broadband-bearer.c index 0758f013..5dd34f62 100644 --- a/src/mm-broadband-bearer.c +++ b/src/mm-broadband-bearer.c @@ -1460,6 +1460,9 @@ data_flash_cdma_ready (MMPortSerial *data, g_error_free (error); } + /* Run init port sequence in the data port */ + mm_port_serial_at_run_init_sequence (MM_PORT_SERIAL_AT (data)); + g_task_return_boolean (task, TRUE); g_object_unref (task); } @@ -1472,6 +1475,8 @@ data_reopen_cdma_ready (MMPortSerial *data, DetailedDisconnectContext *ctx; GError *error = NULL; + g_object_set (data, MM_PORT_SERIAL_AT_INIT_SEQUENCE_ENABLED, TRUE, NULL); + if (!mm_port_serial_reopen_finish (data, res, &error)) { /* Fatal */ g_task_return_error (task, error); @@ -1512,6 +1517,10 @@ disconnect_cdma (MMBroadbandBearer *self, task = g_task_new (self, NULL, callback, user_data); g_task_set_task_data (task, ctx, (GDestroyNotify)detailed_disconnect_context_free); + /* We don't want to run init sequence right away during the reopen, as we're + * going to flash afterwards. */ + g_object_set (data, MM_PORT_SERIAL_AT_INIT_SEQUENCE_ENABLED, FALSE, NULL); + /* Fully reopen the port before flashing */ mm_dbg ("Reopening data port (%s)...", mm_port_get_device (MM_PORT (ctx->data))); mm_port_serial_reopen (MM_PORT_SERIAL (ctx->data), @@ -1593,6 +1602,9 @@ data_flash_3gpp_ready (MMPortSerial *data, g_error_free (error); } + /* Run init port sequence in the data port */ + mm_port_serial_at_run_init_sequence (MM_PORT_SERIAL_AT (data)); + /* Don't bother doing the CGACT again if it was already done on the * primary or secondary port */ if (ctx->cgact_sent) { @@ -1631,6 +1643,8 @@ data_reopen_3gpp_ready (MMPortSerial *data, DetailedDisconnectContext *ctx; GError *error = NULL; + g_object_set (data, MM_PORT_SERIAL_AT_INIT_SEQUENCE_ENABLED, TRUE, NULL); + if (!mm_port_serial_reopen_finish (data, res, &error)) { /* Fatal */ g_task_return_error (task, error); @@ -1656,6 +1670,10 @@ data_reopen_3gpp (GTask *task) ctx = g_task_get_task_data (task); + /* We don't want to run init sequence right away during the reopen, as we're + * going to flash afterwards. */ + g_object_set (ctx->data, MM_PORT_SERIAL_AT_INIT_SEQUENCE_ENABLED, FALSE, NULL); + /* Fully reopen the port before flashing */ mm_dbg ("Reopening data port (%s)...", mm_port_get_device (MM_PORT (ctx->data))); mm_port_serial_reopen (MM_PORT_SERIAL (ctx->data), |