aboutsummaryrefslogtreecommitdiff
path: root/src/mm-iface-modem.c
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2011-11-25 15:01:41 +0100
committerAleksander Morgado <aleksander@lanedo.com>2012-03-15 14:14:27 +0100
commit0adbd8edadbf3c0a07df59c362977e015481cedb (patch)
treeae5af9413161fc706089b740fc35f6c5779e3ba2 /src/mm-iface-modem.c
parentb948c93e598ffc42e4c0a34f856b42944719e916 (diff)
iface-modem: send power-up commands during enable
Diffstat (limited to 'src/mm-iface-modem.c')
-rw-r--r--src/mm-iface-modem.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c
index 1eca5bcb..4c58a35c 100644
--- a/src/mm-iface-modem.c
+++ b/src/mm-iface-modem.c
@@ -754,6 +754,7 @@ typedef enum {
ENABLING_STEP_OPEN_PORT,
ENABLING_STEP_FLASH_PORT,
ENABLING_STEP_MODEM_INIT,
+ ENABLING_STEP_MODEM_POWER_UP,
ENABLING_STEP_LAST
} EnablingStep;
@@ -852,6 +853,7 @@ mm_iface_modem_enable_finish (MMIfaceModem *self,
}
VOID_REPLY_READY_FN (modem_init);
+VOID_REPLY_READY_FN (modem_power_up);
static void
interface_enabling_flash_done (MMSerialPort *port,
@@ -914,6 +916,18 @@ interface_enabling_step (EnablingContext *ctx)
/* Fall down to next step */
ctx->step++;
+ case ENABLING_STEP_MODEM_POWER_UP:
+ if (MM_IFACE_MODEM_GET_INTERFACE (ctx->self)->modem_power_up &&
+ MM_IFACE_MODEM_GET_INTERFACE (ctx->self)->modem_power_up_finish) {
+ MM_IFACE_MODEM_GET_INTERFACE (ctx->self)->modem_power_up (
+ ctx->self,
+ (GAsyncReadyCallback)modem_power_up_ready,
+ ctx);
+ return;
+ }
+ /* Fall down to next step */
+ ctx->step++;
+
case ENABLING_STEP_LAST:
/* We are done without errors! */
g_simple_async_result_set_op_res_gboolean (ctx->result, TRUE);