aboutsummaryrefslogtreecommitdiff
path: root/src/mm-iface-modem.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mm-iface-modem.c')
-rw-r--r--src/mm-iface-modem.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mm-iface-modem.c b/src/mm-iface-modem.c
index 19eb2847..3806661c 100644
--- a/src/mm-iface-modem.c
+++ b/src/mm-iface-modem.c
@@ -2163,14 +2163,15 @@ handle_set_power_state_auth_ready (MMBaseModem *self,
MM_IFACE_MODEM_STATE, &modem_state,
NULL);
- /* Going into LOW or ON only allowed in disabled state */
+ /* Going into LOW or ON only allowed in disabled and failed states */
if ((ctx->power_state == MM_MODEM_POWER_STATE_LOW ||
ctx->power_state == MM_MODEM_POWER_STATE_ON) &&
+ modem_state != MM_MODEM_STATE_FAILED &&
modem_state != MM_MODEM_STATE_DISABLED) {
g_dbus_method_invocation_return_error (ctx->invocation,
MM_CORE_ERROR,
MM_CORE_ERROR_WRONG_STATE,
- "Cannot set power state: not in disabled state");
+ "Cannot set power state: not in disabled or failed state");
handle_set_power_state_context_free (ctx);
return;
}