Commit Graph

16 Commits

Author SHA1 Message Date
Denis Kenzior 76dc7e4acd atmodem: Shutdown ppp cleanly on remove
There is a race condition from udev / kernel when a USB dongle is
removed.  Sometimes all ports are removed first (and the io channels for
those ports are signaled as hupped) while other times the udev remove
event fires first.

If the latter happens, then gprs_context remove is called with a
potentially live ppp object.  This patch shuts it down cleanly.
2010-06-11 09:20:05 -05:00
Denis Kenzior c3dddcb5b3 atmodem: Always unref ppp when context is down 2010-06-11 09:20:05 -05:00
Marcel Holtmann 24fd3e2f15 The default PPP netmask should be 255.255.255.255 2010-06-03 00:00:42 -07:00
Kalle Valo 125c7c392f atmodem: fix crash during context deactivation
Ofono either crashed or busy looped with my Huawei E1552 3G modem when I
tried to deactivate GPRS context. The reason was that gcd->chat was
unreferenced already in setup_ppp() but the chat was still accessed
later in at_gprs_deactivate_primary().

To fix the problem, change the logic instead to suspend chat session
for PPP and resume when PPP has disconnected. Now it doesn't crash
anymore.

Deactivation still doesn't work properly with Huawei E1552, and most
probably with other Huawei modems, because the modem hangs up the chat
line after PPP deactivation. This needs to be fixed separately. The
workaround is to reboot the modem, for example physically unplug and plug
it in again.
2010-05-26 12:34:07 -05:00
Kalle Valo bf7243eda4 atmodem: refactor context deactivation
The old way of using CGACT is no longer needed.  It is enough
that we shutdown PPP. Recommended by Denis.
2010-05-26 12:32:03 -05:00
Denis Kenzior 5343272bc1 atmodem: Port gprs-context to new PPP api 2010-04-30 15:32:54 -05:00
Denis Kenzior b5f81f4012 Fix: For now calling g_at_chat_unref is fine
Same as g_at_chat_shutdown in this case
2010-04-28 17:27:33 -05:00
Denis Kenzior 389eb70dc8 Initial implementation of the PPP gprs context 2010-03-31 18:49:39 -05:00
Denis Kenzior c98b951fe6 Refactor: Remove atutil dump_response
No longer needed now that we have nice AT command tracing using
OFONO_AT_DEBUG=1
2010-02-08 12:28:23 -06:00
Denis Kenzior 1721f81fe9 Fix: Use snprintf instead of sprintf in atmodem 2010-02-05 11:59:24 -06:00
Marcel Holtmann 144080e749 Update copyright information 2010-01-01 17:00:10 -08:00
Denis Kenzior 55572b6e69 Style: Use unsigned int instead of unsigned 2009-12-01 12:42:23 -06:00
Denis Kenzior 38ae7bd9aa Update the AT modem driver to the new API 2009-11-17 18:54:46 -06:00
Denis Kenzior 3408fc5094 Register for CGEV indications in gprs context 2009-10-23 17:05:56 -05:00
Denis Kenzior 14c116be36 Remove unused code and make compiler happy 2009-10-23 17:05:56 -05:00
Denis Kenzior d6161ddb61 Add basic atmodem gprs context implementation 2009-10-23 17:05:56 -05:00