Commit Graph

45 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
Christophe Ronco b3e4837641 atmodem: correctly report lte bearer for huawei modems 2017-09-07 11:41:01 -05:00
Marcel Holtmann 6c936db4ae atmodem: Fix missing break statement for ublox driver 2017-07-11 10:42:59 -07:00
Lukasz Nowak 81a54c5a47 atmodem: telit - re-attach gprs automatically
Telit AT modem firmware (tested with UE910-EUR) generates
+CGREG: 0\r\n\r\n+CGEV: NW DETACH
after a context is de-activated and ppp connection closed.
Then, after a random amount of time (observed from a few seconds
to a few hours), an unsolicited +CGREG: 1 arrives.
Attempt to fix the problem, by sending AT+CGATT=1 once.
This does not re-activate the context, but if a network connection
is still correct, will generate an immediate +CGREG: 1.
2017-03-29 10:01:50 -05:00
Piotr Haber c493491c1a atmodem: add LTE to Telit #PSNT status parser
Network type of 4 in Telit #PSNT command response
denotes LTE network
2017-01-25 10:00:07 -06:00
Vincent Cesson 4edc9fd57f atmodem: Fix CGDCONT result parsing.
CGDCONT result parsing fails if first list contains several ranges. For
example with modem Cinterion PHS8:

 AT+CGDCONT=?
 +CGDCONT: (1-17,101-116),"IP",,,(0),(0-4)

Solution: read first range and jump to second list instead of trying to
close the brackets.
2017-01-13 09:38:43 -06:00
Dragos Tatulea 52b698222c atmodem: gprs: handle automatic context activation
When the event comes, trigger CGCONT? to read the APN for the
activated cid and then call ogono_gprs_cid_activated to handle
the event.
2016-03-18 10:10:09 -05:00
Dragos Tatulea 6970a289c2 atmodem: add support for U-Blox TOBY L2 modems
Besides exceptions below, act like normal U-Blox devices.

gprs-context: don't set auth for TOBY L2. U-Blox Toby L2
doesn't support PAP/CHAP APN auth method.

atmodem: TOBY L2 supports only CMER mode 1. Also chaged original
mode variable to ind, which is a more appropriate name.
mode is what is being set first.
2016-03-16 13:15:08 -05:00
Dragos Tatulea 1290fd1410 atmodem: ublox: EPS now supported by newer ublox
Based on UBX-13002752 R33
2016-03-10 08:26:34 -06:00
Philip Paeps 6df64cd1a9 gprs: add support for u-blox +UREG URCs 2014-06-30 14:03:08 -05:00
August Mayer 4293e4ea63 gprs: data bearer for telit with PSNT
Telit neither supports '+CPSB' nor reports the data bearer through
'+CGREG'. It has its own +PSNT command.
2012-08-16 01:10:56 -05:00
Marcel Holtmann 1f9f161e0b atmodem: Fix issue with AT+CREG=? and AT+CGREG=? handling
Some modems might see an interim +CREG: or +CGREG: notification when
querying the supported modes.

  Aux: > AT+CFUN=1\r
  Aux: < \r\nOK\r\n
  Aux: > AT+CREG=?\r
  Aux: < \r\n+CREG: 2\r\n
  Aux: < \r\n+CREG: (0-2)\r\nOK\r\n
  Unable to initialize Network Registration

To make this work, skip to the first line with an actual range value.
2012-05-24 03:28:50 +02:00
Marcel Holtmann 4e77afffb3 drivers: Update copyright information 2011-10-10 13:39:48 -07:00
Marcel Holtmann 7cabd1075c atmodem: Add Huawei specific GPRS bearer notifications 2011-07-29 13:11:17 +02:00
Jeevaka Badrappan 4258fb5915 atmodem: remove NULL check 2011-01-29 18:39:37 +01:00
Marcel Holtmann 62686f7719 atmodem: Add support for Gobi technology change handling 2011-01-22 13:12:15 +01:00
Marcel Holtmann 63fd483fc9 atmodem: Always listen for bearer notifications 2011-01-20 12:13:17 +01:00
Rémi Denis-Courmont e3f51d7507 atmodem: packet switch bearer support 2011-01-20 12:10:32 +01:00
Jeevaka Badrappan b97676acc3 atmodem: 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 080ff41db9 atmodem: Add support for IFX specific GPRS suspend notification
The Infineon modem informs about GPRS suspend cases. For example when
GPRS is active and a call is made. If the status changes, inform the
core about this change.

This uses GPRS_SUSPENDED_UNKNOWN_CAUSE reason since the modem does not
give a clear reason why GPRS was suspended. With this reason there is
a delay before the status change gets send out as D-Bus signal.
2010-10-29 13:39:27 +02:00
Marcel Holtmann 240e3878ae atmodem: Add Nokia specific quirk for AT+CGEREP handling 2010-08-20 20:57:30 +02:00
Marcel Holtmann 205b3b813a atmodem: Turn a STE GPRS quirk into a MBM and STE quirk 2010-08-20 14:05:18 +02:00
Marcel Holtmann a8d3e7433a atmodem: Remove useless NULL checks before g_free 2010-08-16 22:02:01 +02:00
Denis Kenzior ac524be99f atmodem: Use g_at_chat_clone 2010-08-12 16:40:40 -05:00
Marcel Holtmann 45bf4cf396 Add support for handling CNTI=0 request with Novatel devices 2010-06-06 13:12:37 -07:00
Denis Kenzior 36a8801115 Update atmodem gprs driver to the new API 2010-03-26 23:00:28 -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
Sjur Brændeland 040e799665 Add STE modem support for GPRS and network registration 2010-01-25 20:55:10 +01:00
Jussi Kukkonen ebe8904f39 Add quirk for cid and lac handling for Huawei 2010-01-20 10:09:54 -06:00
Marcel Holtmann 144080e749 Update copyright information 2010-01-01 17:00:10 -08:00
Denis Kenzior fe02d6bc45 Use new at_util_parse_reg in gprs driver 2009-12-09 12:50:22 -06:00
Denis Kenzior 2297bc926d Style: Fix some remaining style issues in atmodem 2009-12-09 02:46:33 -06:00
Denis Kenzior 07bdfc6bce Harden the CGREG parsing function
Sometimes the CGREG query and CGREG unsolicited notification get
intermixed.  Since they have the same prefix, GAtChat clumps them
together.  Make sure the parser skips the unsolicited notification.
2009-12-08 03:43:54 -06:00
Andrzej Zaborowski 3187db9352 Fix +CGEV: parsing 2009-11-10 12:48:08 -06:00
Andrzej Zaborowski 49c2f7b2e7 Fix: Don't bail if CREG/CGREG mode=2 is unsupported 2009-11-10 12:40:21 -06:00
Denis Kenzior bc72cca91b Fix: notify_attached was only used when detached
The standard only specifies that the context might have been detached by
the network / mobile equipment.  Not attached.
2009-10-26 16:55:03 -05:00
Denis Kenzior ffd7c1920a Fix: Some modems report PDP_type in a list 2009-10-23 17:05:57 -05:00
Denis Kenzior 14c116be36 Remove unused code and make compiler happy 2009-10-23 17:05:56 -05:00
Denis Kenzior 69c872f400 Refactor: Initialization code 2009-10-23 17:05:55 -05:00
Denis Kenzior 43256236a0 Add GPRS registration status implementation 2009-10-23 17:05:55 -05:00
Denis Kenzior 8cb2bb7608 Remove unused code 2009-10-23 17:05:55 -05:00
Denis Kenzior 88c0f77a58 Refactor: First round of renaming 2009-10-23 17:05:53 -05:00
Denis Kenzior b2fd75014a Refactor: rename data-connection to gprs
Keep the name specific to GSM, other implementations will probably
require their own interfaces
2009-10-23 17:05:53 -05:00