diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2015-03-02 14:37:25 +0100 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2015-03-02 14:38:02 +0100 |
commit | 6a8fbf917a220416913a5e64a40bd4d26c6448f5 (patch) | |
tree | a133c100ccf5f735fc1c7e1f218832c37825b889 /src/mm-iface-modem.c | |
parent | 28d4bb932cfdbf7a4320382d17312b3d1f2d1be0 (diff) |
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
Diffstat (limited to 'src/mm-iface-modem.c')
-rw-r--r-- | src/mm-iface-modem.c | 16 |
1 files changed, 0 insertions, 16 deletions
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 */ |