From 52488d2e2abe1ea826409c90e9955b2d5f90c6d0 Mon Sep 17 00:00:00 2001 From: Bhushan Shah Date: Thu, 11 Mar 2021 13:08:21 +0530 Subject: [PATCH] suspend: if we are using ofono, mark modem as resumed immediately --- src/suspend.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/suspend.c b/src/suspend.c index 256636e..b82ca7e 100644 --- a/src/suspend.c +++ b/src/suspend.c @@ -170,11 +170,14 @@ static void signal_cb(GDBusProxy *proxy, g_message("system is resuming"); take_inhibitor(manager, FALSE); modem_resume_pre(manager); - if (manager->mm_modem) { + if (manager->mm_modem || manager->modem_iface == MODEM_IFACE_OFONO) { /* * On some systems ModemManager doesn't handle suspend/resume, so * we still have a valid/managed modem when resuming. In this case, * do the whole resume sequence immediately. + * + * If modem is managed by ofono, we also do resume sequence immediately + * as ofono handles resuming from sleep itself. */ manager->modem_state = EG25_STATE_CONFIGURED; modem_resume_post(manager);