mirror of git://git.sysmocom.de/ofono
atmodem: Add gprs-context quirk for HUAWEI vendor
When ofono dies while connected using PPP, modem AT channel is not put back to command mode (tested with HUAWEI modems E3372 and MS2372). If ofono is restarted, it won't be able to connect as it gets no answer to AT commands on this AT channel. This patch adds a quirk to immediately send escape sequence on modem channel when gprs-context atom is removed.
This commit is contained in:
parent
376af6c85c
commit
527e6b1f86
|
@ -461,10 +461,19 @@ static int at_gprs_context_probe(struct ofono_gprs_context *gc,
|
|||
static void at_gprs_context_remove(struct ofono_gprs_context *gc)
|
||||
{
|
||||
struct gprs_context_data *gcd = ofono_gprs_context_get_data(gc);
|
||||
GAtIO *io;
|
||||
|
||||
DBG("");
|
||||
|
||||
if (gcd->state != STATE_IDLE && gcd->ppp) {
|
||||
if ((gcd->vendor == OFONO_VENDOR_HUAWEI) && gcd->chat) {
|
||||
/* immediately send escape sequence */
|
||||
io = g_at_chat_get_io(gcd->chat);
|
||||
|
||||
if (io)
|
||||
g_at_io_write(io, "+++", 3);
|
||||
}
|
||||
|
||||
g_at_ppp_unref(gcd->ppp);
|
||||
g_at_chat_resume(gcd->chat);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue