Commit Graph

9 Commits

Author SHA1 Message Date
Jonas Bonn 3beeff758d treewide: Remove superfluous use of _GNU_SOURCE
There are a large number of files in the tree that define _GNU_SOURCE
despite not actually using features hidden behind this flag.  This patch
removes all these definitions in one fell swoop...
2018-10-17 10:01:57 -05:00
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
Dragos Tatulea eeaabafdee ubloxmodem: tweak to work on different firmware
The U-Blox documentation specifies the following:
* get interface ip and dns from +CGDCONTRDP
* get gw ip and netmask from +UIPADDR

However, different firmware versions have different befaviour:

* On newer firmware, +UIPADDR returns error. But it's possible to configure
gateway ip == ipterface ip (read from CGDCONTRDP).

* On older firmware, we can actually use the commands specified in the
docs.

This patch runs +CGDCONTRDP, configures everything and then tries to run
+UIPADDR. In that works, reconfigures gw ip and netmask.
2016-11-16 11:49:38 -06:00
Dragos Tatulea c43e44b154 ubloxmodem: fix memory leak in gprs_context_remove 2016-11-14 11:27:39 -06:00
Denis Kenzior 7bd7a541d0 ubloxmodem: Remove unneeded #include 2016-03-18 10:13:53 -05:00
Dragos Tatulea 0af7ded845 ubloxmodem: support automatic ctx activation
... by imlementing read_settings.
2016-03-18 10:13:04 -05:00
Dragos Tatulea 6504e7090e ubloxmodem: support authentication
If username and password specified, issue an UAUTHREQ
command with the configured authentication method, selected cid
and credentials.
2016-03-17 11:24:42 -05:00
Dragos Tatulea e4d3df016e ubloxmodem: add Toby L2 gprs context driver
For now the driver works only with bridged mode for 2G/3G.

Once it activates the context it reads the ip, netmask,
gw, dns and sets them in the context settings.
2016-03-17 10:59:00 -05:00