Commit Graph

98 Commits

Author SHA1 Message Date
Antara Borwankar f3a5016a67 xmm7modem: Fix to set gateway in pdp context
gateway was not being listed in context settings. Fixed teh bug
to show correct gateway address.
2019-09-20 09:54:50 -05:00
Antara Borwankar e794adb0f2 xmm7modem: disabling reporting of intermediate results for CGDATA
Setting <connect_flag> in AT+XDATACHANNEL set command to 0. This will
disable intermediate result reporting of "CONNECT" and "NO CARRIER"
on control channel.

This resolves the issue of getting failure response for offline-modem
since "NO CARRIER" is received as result of AT+CFUN operation instead
of "OK".
2019-06-20 11:21:25 -05:00
Denis Kenzior 74dc62b148 drivers: Silence strncpy use warnings 2019-04-30 11:35:14 -05:00
Denis Kenzior c05cbf147d ifxmodem: Remove unneeded if statement
if (ctx->apn) always evalues to true since it is an array member
2019-04-29 14:00:42 -05:00
Antara Borwankar 413e6ecab0 xmm7modem: handling of IPv6 address for activated context
Handled IPv6 address after activating PDP context.
Received IPv6 address is of format addr + netmask in the same string
in the form of "a1.a2.a3.a4.a5.a6.a7.a8.a9.a10.a11.a12.a13.a14.a15.a16.
m1.m2.m3.m4.m5.m6.m7.m8.m9.m10.m11.m12.m13.m14.m15.m16"
2019-04-29 11:33:58 -05:00
Denis Kenzior 54b8639c0e ifxmodem: Clean up the previous commit slightly
The if statements were over 80 characters and breaking them up made the
code look a bit uglier.  So refactor the if statements to just figure
out the data path 'n' parameter or return an error.  On success, form
the datapath string and return it.

Also bump the buffer size and use snprintf to be safe(r).
2019-03-04 13:34:13 -06:00
Antara Borwankar b51c1a23c0 xmm7modem: data channel setup for xmm7modem
Added the implementation required to setup data channel
in ifxmodem gprs-context driver for xmm7modem vendor
2019-03-04 13:21:34 -06:00
Antara Borwankar 80470869e5 ifxmodem: removing TAP/TUN support check for XMM vendor
skipping TAP/TUN support check from gprs-context probe for
xmm vendor. xmm modem does not require TAP/TUN support. Also
it is not enabled by default in enbedded yocto bsp.
2019-01-15 14:54:52 -06:00
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
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
John Ernberg 2db09e4e3f ifxmodem: Use g_slist_free_full 2016-04-22 15:21:11 -05:00
Denis Kenzior 68df0eb758 ifx: Fix the case of modem-originated call
During STK Set Up Call, we have modem-originated calls that do not go
through the core 'Dial' method.  Make sure the calls are still detected
in this case.
2012-11-28 10:31:15 -06:00
Denis Kenzior 2e51814f32 ifx: Add CSSI and CSSU support 2012-07-12 14:12:55 -05:00
Denis Kenzior 86e64128fa ifxmodem: Remove atom if driver fails to init 2012-03-26 16:50:46 -05: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 25bde3be6b ifxmodem: Remove audio settings mode handling
With the current updated setup, the audio settings mode is no longer
provided. So don't bother even trying to configure it.
2012-02-10 10:04:34 +01:00
Marcel Holtmann b88a621528 ifxmodem: Remove another usage g_utf8_validate 2012-02-10 09:42:54 +01:00
Denis Kenzior 9d666ccce0 ifx: Don't use g_utf8_validate
Emergency Numbers can only be digits, so there's no point to use the
'Hammer of Thor' that is g_utf8_validate when a much simpler function
will do the job just as well.
2012-02-10 00:38:37 -06:00
Denis Kenzior 7e42c5bbb0 ifx: Modify XLEMA behavior
XLEMA reports emergency numbers that are hardcoded (e.g. 112 and 911)
and that are already read from EFecc.  The additional emergency numbers
we are interested in should only come from the NVM or the network NITZ
update.
2012-02-09 22:34:02 -06:00
Marcel Holtmann cfdc96186e ifxmodem: Handle malformed emergency numbers
This might be either a modem firmware bug or the SIM card is provisioned
really badly, but the last entry contains garbage characters.

ofonod[20620]: Voice: < \r\n+XLEMA: 1,9,"112",,1\r\n\r\n+XLEMA: 2,9,"911",,1\r\n\r\n+XLEMA: 3,9,"000",57,1\r\n\r\n+XLEMA: 4,9,"08",49,1\r\n\r\n+XLEMA: 5,9,"112",49,1\r\n\r\n+XLEMA: 6,9,"118",0,1\r\n\r\n+XLEMA: 7,9,"119",0,1\r\n\r\n+XLEMA: 8,9,"911",0,1\r\n\r\n+XLEMA: 9,9,"999\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377",0,1\r\n

Fix this by just validating the string and cutting off once an invalid
character is found.
2012-02-10 02:15:16 +01:00
Denis Kenzior d5bdd1f741 ifx: Add necessary incantations for audio 2012-02-09 08:36:18 -06:00
Marcel Holtmann 4e77afffb3 drivers: Update copyright information 2011-10-10 13:39:48 -07:00
Jeevaka Badrappan c65903bddd ifxmodem: add support for user_confirmation in stk 2011-07-15 11:09:04 -05:00
Denis Kenzior a60c4df143 ifxmodem: Remove unneeded code 2011-06-06 18:06:10 -05:00
Denis Kenzior 1aaa5da906 ifxmodem: Fix minor style issue 2011-06-06 18:04:26 -05:00
Jeevaka Badrappan 377a512375 ifxmodem: emergency number list support 2011-06-06 17:57:58 -05:00
Mika Liljeberg cbda267674 ifxmodem: update to new gprs context interface 2011-03-15 17:11:59 -05:00
Jeevaka Badrappan fdebfa0b21 ifxmodem: fix issue in set rat mode 2011-02-11 11:43:54 -08:00
Jeevaka Badrappan 0930de9319 ifxmodem: add CNAP support 2011-02-11 11:21:12 -06:00
Jeevaka Badrappan 67f41014de ifxmodem: move call creation to xcallstat_notify 2011-02-08 11:52:38 -06:00
Jeevaka Badrappan 09780386d8 ifxmodem: remove colp handling done inside atd_cb 2011-02-07 16:56:53 -06:00
Jeevaka Badrappan 9e944f550c ifxmodem: add handling of XCOLP notification 2011-02-07 16:55:33 -06:00
Jeevaka Badrappan 2037f5515c ifxmodem: fix issue with gatchat usage 2011-02-07 15:40:53 -06:00
Jeevaka Badrappan 021e8836b8 ifxmodem: M16 coding style fix 2011-02-05 07:04:53 -08:00
Jeevaka Badrappan b4c8d107ad ifxmodem: Use defined call_status enum 2011-02-05 05:09:09 -08:00
Jeevaka Badrappan 8453b2680e ifxmodem: fix xtms read and test cmd prefix
with the latest modem firmware, xctms prefix
is returned as per the 3GPP format.
2011-02-04 14:54:31 +01:00
Lucas De Marchi 641a6d98be ifxmodem: use ofono_call initializer 2011-02-01 18:31:36 +01:00
Jeevaka Badrappan 52e46e42ff ifxmodem: remove NULL check 2011-01-29 18:39:37 +01:00
Jeevaka Badrappan 12c3cf6969 voicecall: remove ofono_cug_option 2011-01-26 16:38:15 -06:00
Jeevaka Badrappan d8f7f53096 ifxmodem: change AT command for enabling SATK 2011-01-14 01:18:58 +01:00
Jeevaka Badrappan d0f0e99f47 ifxmodem: add enable/disable ctm support 2011-01-14 01:16:33 +01:00
Jeevaka Badrappan e7367d7ae1 ifxmodem: M15 coding style fix 2011-01-12 08:06:58 -08:00
Denis Kenzior c37f155478 ifx: Take out unused defines 2010-12-16 18:40:18 -06:00