Skip to content

Commit

Permalink
[ril] Tweaked power state confirmation logic. JB#49471
Browse files Browse the repository at this point in the history
Changed ril_radio_confirm_power_on() to send RADIO_POWER request even if
we think that modem is powered on. Some RILs change power state without
letting us know and that's what this function is for - to make sure that
power is on when we think that it's on.
  • Loading branch information
monich committed Mar 28, 2020
1 parent 80924d5 commit ec00abd
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion ofono/drivers/ril/ril_radio.c
Expand Up @@ -241,7 +241,19 @@ static void ril_radio_power_request(struct ril_radio *self, gboolean on,
void ril_radio_confirm_power_on(struct ril_radio *self)
{
if (G_LIKELY(self) && ril_radio_power_should_be_on(self)) {
ril_radio_power_request(self, TRUE, TRUE);
struct ril_radio_priv *priv = self->priv;

if (priv->pending_id) {
if (!priv->next_state) {
/* Wait for the pending request to complete */
priv->next_state_valid = TRUE;
priv->next_state = TRUE;
DBG_(self, "on (queued)");
}
} else {
DBG_(self, "on");
ril_radio_submit_power_request(self, TRUE);
}
}
}

Expand Down

0 comments on commit ec00abd

Please sign in to comment.