Some Huawei modems are trying to keep PPP session with the network alive even if the
network is lost.
Thus oFono PPP session with the modem is never ended. Currently when network is lost,
oFono will release the active contexts into the core however the context is still active
at driver level. If the connection with the network is established again and we try to
enable a data call, we have a crash.
This issue is very tricky there might be multiple solutions, here is one I discussed with
A new driver entry is added to release context into the driver in shutting down the PPP
session between oFono and the modem.
Then ofono_context_deactivated() is called to signal the context is inactive at driver
In the case we lost the network and we are reattaching to the network but the PPP session
had no time to be released, there is a mechanism to wait for the previous context to be
released and then signal modem is reattached to the network. ConnMan can do again a data
Guillaume Zajac (3):
gprs-context: Add new driver entry
gprs-context: Add new driver entry definition
gprs: Release context in driver and core when network is lost
drivers/atmodem/gprs-context.c | 11 +++++
include/gprs-context.h | 2 +
src/gprs.c | 84 ++++++++++++++++++++++++++++++----------
3 files changed, 76 insertions(+), 21 deletions(-)