Commit Graph

22 Commits

Author SHA1 Message Date
Jonas Bonn 67701b1c40 drivers: constify vtables
The driver vtables are read-only structures.  This patch declares them as
'const' allowing the compiler to (optionally) put them in the RELRO
section.  RELRO pages may be marked as read-only by the linker after
the relocations have been done ensuring that they aren't inadvertently
or maliciously altered at runtime.
2018-10-17 09:56:27 -05:00
Giacinto Cifelli bd6f807849 drivers: support for auth NONE
Added the explicit support for auth NONE.
It needs to be added in all drivers/*/gprs-context.c atoms.

This method is already supported by all atoms that support
authentication (ie, all but Sierra' swmodem driver).

The behavior is left unchanged in case of inconsistent parameters:
if username is empty, then fallback to auth NONE.
2018-10-09 12:35:44 -05:00
Anirudh Gargi 4b44fb3910 gprs: fix seg fault in case of NULL callback
In case of AT callback if callback handler is NULL, check for null
before calling the success macro.

Logs:
ofonod[32496]: src/network.c:current_operator_callback() 0x157ad60, (nil)
ofonod[32496]: src/gprs.c:netreg_status_changed() 0
ofonod[32496]: src/gprs.c:gprs_netreg_update() attach: 0, driver_attached: 1
ofonod[32496]: src/gprs.c:ofono_gprs_detached_notify() /xmm7xxx_0
ofonod[32496]: drivers/ifxmodem/gprs-context.c:ifx_gprs_detach_shutdown()
ofonod[32496]: drivers/ifxmodem/gprs-context.c:ifx_gprs_deactivate_primary() cid 0
ofonod[32496]: src/gprs.c:ofono_gprs_detached_notify() /xmm7xxx_0
ofonod[32496]: src/gprs.c:gprs_attach_callback() /xmm7xxx_0 error = 0
ofonod[32496]: drivers/ifxmodem/gprs-context.c:deactivate_cb() ok 0
ofonod[32496]: Aborting (signal 11) [./../src/ofonod]
ofonod[32496]: ++++++++ backtrace ++++++++
ofonod[32496]: +++++++++++++++++++++++++++
2018-10-01 14:46:35 -05:00
Denis Kenzior 9405c9733c ifxmodem: Fix minor style issues 2017-09-13 10:28:56 -05:00
Ankit Navik ffbf6159e0 ifxmodem: support automatic context activation
Add support for automatic context activation by adding read_settings.
It also adds detach_shutdown to make sure context is cleaned up when
network registration is lost.
2017-09-13 10:27:32 -05:00
Matthijs Kooijman 8d690efa83 at/cdma/ifxmodem: Use /dev/net/tun to check for TUN support
Previously, these drivers would check /sys/devices/virtual/misc/tun to
see if TUN is supported, and bail out otherwise. However, the tun module
can sometimes be autoloaded by opening the /dev/net/tun file. In this
case the /dev file already exists, but the /sys file only gets created
after the modul is loaded.

Additionally, the ppp code does not use the /sys file, but only the
/dev file, so checking for the existence of the latter seems a better
indicator of expected success.
2017-08-22 23:24:59 -05:00
Marcel Holtmann 9cdcf72994 ifxmodem: Fix GPRS activation command string buffer size 2017-07-11 10:43:59 -07:00
Marcel Holtmann e5c966ce53 ifxmodem: Add support for dynamic DNS for IPv6 and dual mode contexts 2012-02-10 12:02:42 +01:00
Marcel Holtmann 5c5eff0b5b ifxmodem: Add support for IPv6 and dual mode contexts 2012-02-10 11:45:34 +01:00
Marcel Holtmann 4e77afffb3 drivers: Update copyright information 2011-10-10 13:39:48 -07:00
Mika Liljeberg cbda267674 ifxmodem: update to new gprs context interface 2011-03-15 17:11:59 -05:00
Jeevaka Badrappan e7367d7ae1 ifxmodem: M15 coding style fix 2011-01-12 08:06:58 -08:00
Lucas De Marchi b82a7f8511 drivers: explicitly compare pointers to NULL
This patch was generated by the following semantic patch
(http://coccinelle.lip6.fr/)

// <smpl>
@fix disable is_null,isnt_null1@
expression *E;
@@

- !E
+ E == NULL
// </smpl>
2010-11-29 11:37:09 -06:00
Marcel Holtmann 9eb88496ac ifxmodem: Add full set of GPRS context debug statements 2010-10-27 01:31:54 +02:00
Marcel Holtmann 21a7e11e7f ifxmodem: Add some more GPRS context debug statements 2010-10-27 01:25:56 +02:00
Marcel Holtmann 21a6a00646 ifxmodem: Add support GPRS contexts with username and password 2010-10-26 22:50:00 +02:00
Marcel Holtmann 3477a9c9e9 ifxmodem: Fix GPRS disconnect handling from network side 2010-10-26 14:43:49 +02:00
Marcel Holtmann 125519ccbb ifxmodem: Fix handling of AT+XDNS with multiple contexts 2010-10-25 22:51:09 +02:00
Marcel Holtmann df2d0dc805 ifxmodem: Use g_try_new0 when checking for the result 2010-10-22 00:21:06 +02:00
Marcel Holtmann f0175ba3fc ifxmodem: Fix compiler warnings in GPRS context driver 2010-10-21 23:54:53 +02:00
Marcel Holtmann 655f1b74d3 ifxmodem: Add support for Infineon GPRS context setup with M-RAW_IP
This patch adds support for setting up a GPRS context and then switching
it into M-RAW_IP mode. The handling of the M-RAW_IP data stream is not
yet implemented.
2010-10-21 21:50:52 +02:00
Marcel Holtmann 9bdc2b0a43 ifxmodem: Add skeleton for Infineon specific GPRS context driver 2010-10-21 19:44:28 +02:00