From b41278c423cb81547c65da46057912ad9372715d Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Fri, 31 May 2013 09:56:30 +0200 Subject: [PATCH] iface-modem: allow changing capabilities in every state Same as done with the firmware switching, we allow capabilities changing even if the modem is in FAILED state, e.g. to switch from 3GPP to 3GPP2 mode. --- src/mm-iface-modem.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c index a94c799a..c4b808c2 100644 --- a/src/mm-iface-modem.c +++ b/src/mm-iface-modem.c @@ -4370,6 +4370,14 @@ interface_initialization_step (InitializationContext *ctx) } case INITIALIZATION_STEP_LAST: + /* Setting capabilities allowed also in FAILED state. Just imagine a + * 3GPP+3GPP2 modem in 3GPP-only mode without SIM, we should allow + * changing caps to 3GPP2, which doesn't require SIM */ + g_signal_connect (ctx->skeleton, + "handle-set-current-capabilities", + G_CALLBACK (handle_set_current_capabilities), + ctx->self); + if (ctx->fatal_error) { g_simple_async_result_take_error (ctx->result, ctx->fatal_error); ctx->fatal_error = NULL; @@ -4408,10 +4416,6 @@ interface_initialization_step (InitializationContext *ctx) "handle-factory-reset", G_CALLBACK (handle_factory_reset), ctx->self); - g_signal_connect (ctx->skeleton, - "handle-set-current-capabilities", - G_CALLBACK (handle_set_current_capabilities), - ctx->self); g_signal_connect (ctx->skeleton, "handle-set-current-bands", G_CALLBACK (handle_set_current_bands),