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
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user