From 6a8fbf917a220416913a5e64a40bd4d26c6448f5 Mon Sep 17 00:00:00 2001 From: Aleksander Morgado Date: Mon, 2 Mar 2015 14:37:25 +0100 Subject: iface-modem: don't artificially forbid power updates when in OFF state If for any reason the modem is in OFF state and still can talk to the modem, allow running the remaining transition requests to LOW or ON. This can happen for example for modems that use CFUN:0, i.e. which can still go online with CFUN=1. https://bugs.freedesktop.org/show_bug.cgi?id=89368 --- src/mm-iface-modem.c | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'src/mm-iface-modem.c') diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c index 7c31f9a9..0ed204c5 100644 --- a/src/mm-iface-modem.c +++ b/src/mm-iface-modem.c @@ -3265,22 +3265,6 @@ set_power_state (SetPowerStateContext *ctx) return; } - /* Don't allow trying to recover from a power off */ - if (ctx->previous_real_power_state == MM_MODEM_POWER_STATE_OFF) { - g_simple_async_result_set_error (ctx->result, - MM_CORE_ERROR, - MM_CORE_ERROR_WRONG_STATE, - "Cannot recover from a power off"); - set_power_state_context_complete_and_free (ctx); - return; - } - - /* Supported transitions: - * UNKNOWN|LOW --> ON - * ON --> LOW - * ON|LOW --> OFF - */ - /* Fully powering off the modem? */ if (ctx->power_state == MM_MODEM_POWER_STATE_OFF) { /* Error if unsupported */ -- cgit v1.2.3-70-g09d2