Commit Graph

8834 Commits

Author SHA1 Message Date
Denis Kenzior 74dc62b148 drivers: Silence strncpy use warnings 2019-04-30 11:35:14 -05:00
Denis Kenzior 614ffb0761 sim-auth: Use memcpy instead of strncpy
The code is not really copying strings but 2 or 3 character sof the MNC.
Make this clearer.
2019-04-30 11:09:52 -05:00
Denis Kenzior d3625f8e6f message-waiting: Fix logic error 2019-04-29 19:38:12 -05:00
Denis Kenzior ca9d5b73ab gprs: Remove unneeded if conditions
ctx->message_center and ctx->message_proxy are arrays and thus
always evaluate as true
2019-04-29 19:30:22 -05:00
Denis Kenzior c56bd74cb1 gprs: Fix invalid string comparison
The default context created when provisioning fails is simply a context
with an empty APN
2019-04-29 19:27:29 -05:00
Denis Kenzior 91253a1ade gprs: Remove unneeded if statement
if (ctx->message_proxy) always resolves to TRUE
2019-04-29 19:25:57 -05:00
Denis Kenzior 87932a536f stk: Fix potential buffer overrun 2019-04-29 19:24:19 -05:00
Denis Kenzior bdda846134 phonebook: fix invalid sprintf sequence 2019-04-29 19:16:07 -05:00
Denis Kenzior a63988a33f stkutil: Call va_end on failure 2019-04-29 14:34:00 -05:00
Denis Kenzior 713655a1ae gatchat: Remove unneeded if 2019-04-29 14:29:21 -05:00
Denis Kenzior 999494624b siri: Dereference after validating !NULL 2019-04-29 14:27:54 -05:00
Denis Kenzior 1c940839bb handsfree: Dereference after validating !NULL 2019-04-29 14:26:43 -05:00
Denis Kenzior 4fddd1a6ea sim: Dereference only after validating !NULL 2019-04-29 14:24:48 -05:00
Denis Kenzior fbd9974998 qmimodem: Fix potential memory leak
In case strlen(ICCID) > 20, we simply return without freeing the ICCID
value first.
2019-04-29 14:20:25 -05:00
Denis Kenzior 4a93c329b9 log: Fix potential buffer overflow
We pass in the maximum size of the buffer to the read system call.  On
the astronomically unlikely chance that we indeed read the full buffer
full of data, the subsequent assignment will overflow it.  Fix this by
passing sizeof(buf) - 1 to the read system call instead.
2019-04-29 14:16:17 -05:00
Denis Kenzior b126407632 mbmmodem: Remove unneeded if 2019-04-29 14:11:22 -05:00
Denis Kenzior 4bb6e09661 phoneseim: Remove unneeded if 2019-04-29 14:09:56 -05:00
Denis Kenzior 9da5779a90 stemodem: Remove unneeded if 2019-04-29 14:09:11 -05:00
Denis Kenzior 0b2de27727 telit: Remove unneeded if 2019-04-29 14:07:59 -05:00
Denis Kenzior ea6cd4e7fd huawei: Remove unneeded if statement 2019-04-29 14:06:58 -05:00
Denis Kenzior c13411da6f icera: Remove unneeded if statement 2019-04-29 14:06:27 -05:00
Denis Kenzior cdcb576692 hsomodem: Remove unneeded if statement 2019-04-29 14:06:19 -05:00
Denis Kenzior eef1f73cb3 swmodem: Remove unneeded if statement 2019-04-29 14:01:41 -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
Denis Kenzior 88f2ae3869 atmodem: Remove unneeded if statement
if (ctx->apn) is always true since apn is an array variable
2019-04-29 13:59:36 -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
Alexander Couzens 64df5344c5 qmi: netmon: fix crashs on get_rssi_cb when BER or RSSI are empty
The message can be emitted without the fields being present. In this case ber or rssi are 0
resulting in a null pointer deref.
2019-04-28 10:13:51 -05:00
Alexander Couzens d604052cef gprs: netreg_status_changed: output the status as human readable string 2019-04-28 10:13:51 -05:00
Alexander Couzens 13181d1a01 network: debug log the network time on update 2019-04-28 10:13:07 -05:00
Alexander Couzens c508574f68 network/ofono_netreg_status_notify: debug log the lac and ci 2019-04-28 10:13:07 -05:00
Denis Kenzior 79565d33d8 AUTHORS: Mention Pau's contributions 2019-04-26 12:21:53 -05:00
Denis Kenzior 47beb6b378 AUTHORS: Mention Alexander's contributions 2019-04-26 12:20:45 -05:00
Denis Kenzior dd4c444393 AUTHORS: Mention Tom's contributions 2019-04-16 11:52:56 -05:00
Tom Nguyen 0ddb7c6e2f qmimodem: return all serial numbers
Some modems, eg. Quectel EC25E, return the ESN, IMEI, and MEID even
though they support only one network type in a region. Current serial
number query gives precedence to the ESN if it exists, and does not
consider the IMEI and MEID.

Add a check of the supported radio interfaces in deciding which
serial number to return. If radio interfaces are 3GPP based, then
return the IMEI, else return the ESN. If neither exist, return MEID
if available, else fail.
2019-04-16 11:51:37 -05:00
Richard Röjfors 05aaab72ae gprs: Always store RoamingAllowed as a boolean.
In one instance it was stored as boolean and another as int.
Since its always parsed as a boolean and it is a boolean,
always store it as boolean.
2019-04-16 11:46:00 -05:00
Marcel Holtmann fe9d22374e Release 1.29 2019-04-12 22:13:00 +02:00
Richard Röjfors 64df539a27 ublox: gprs-context: Fix router mode IP settings.
The ublox modems always run DHCP when in router mode.
Unfortunately the code overwrote the IP settings with
static IP settings while activating.

Now we respect the networking_mode regardless if
we read settings during activation or read settings
phase.
2019-04-04 09:55:04 -05:00
Richard Röjfors b9fdba531f gprs: Fix allocation of context id read from settings
This fix is similar to the one in the following commit,
but fixes allocation for context ids after ap's are
read from settings.

commit c3fdf6a7c5
Author: Denis Kenzior <denkenz@gmail.com>
Date:   Thu Jan 3 17:17:21 2019 -0600

    gprs: Fix allocation of context id
2019-04-02 10:41:16 -05:00
Antara Borwankar 05484bdb73 xmm7modem: Changes in plugin for DSSA functionality
Changed the sim driver vendor for xmm7modem from
OFONO_VENDOR_IFX to OFONO_VENDOR_XMM to handle DSSA functionality.
2019-04-02 10:36:23 -05:00
Antara Borwankar c76b68d4bf xmm7modem: handling of dual sim single active feature
Handled DSSA use case for xmm7modem. Added driver function
to switch between available card slots for SIM.

Only one SIM will be active at a given time. On calling this
function the active SIM will be removed and the card slot made
inactive and SIM in the other card slot will be made active.

Use case is similar to a SIM swap/change where one SIM is replaced
another SIM in the same slot.
2019-04-02 10:34:11 -05:00
Antara Borwankar d10a2490b1 sim: added error handling in set slot callback
Adding the handling of error when the driver returns
CME ERROR:4.

This error will be returned for non xmm vendor modems
using ifxmodem driver for sim.
2019-04-02 10:27:07 -05:00
Richard Röjfors 2004d26cdc ublox: Correct the USBCONF reply prefix
According to the u-blox AT Commands Manual and my tests
the response prefix of AT+UUSBCONF is "+UUSBCONF:", including
a colon. The colon was missing in the code, causing next step
to parse a number to fail, since a colon is not a number.
2019-04-01 09:56:40 -05:00
Richard Röjfors 4d64235f27 ublox: Do not leave vendor_family unset
In a recent patch vendor family was only set if the device
did not support USBCONF, but that resulted in drivers
being registered the "generic" vendor. That caused
for instance netreg to use incorrect cmer mode and fail
on TOBY-L210.
2019-04-01 09:52:59 -05:00
Denis Kenzior c5cb6f7a3c sim: Initialize card_slot_count and active_card_slot
Initialize both to 1 so that SimManager does not erroneously show
ActiveCardSlot as 0 for drivers that do not (yet) setup these values.
2019-03-28 21:08:02 -05:00
Denis Kenzior ab4e5d0852 sim: Emit PropertyChanged for ActiveCardSlot changes 2019-03-28 21:08:02 -05:00
Antara Borwankar 693396da22 sim: handling of dual sim single active feature
Added implementation for handling CardSlotCount and ActiveCardSlot
properties for DSSA use case.
2019-03-28 21:08:02 -05:00
Antara Borwankar a7a2d09d10 sim: Added set function for CardSlotCount and ActiveCardSlot
Adding set function definition for CardSlotCount and ActiveCardSlot
properties.
2019-03-28 21:08:02 -05:00
Antara Borwankar f143f1f838 doc: Added new properties to SimManager for DSSA
Adding two new properties to sim manager interface to handle
dual SIM single active use case.

CardSlotCount [readonly]
Contains the count of number of SIM card slots available.

ActiveCardSlot [readwrite]
Contains the index of the currently active SIM card slot
for dual SIM single active mode.
2019-03-28 21:07:41 -05:00
Jonas Bonn 9cba079221 ublox: do not set bridge mode for TOBY L2
Trying to set the networking mode to "bridge" mode in the plugin is bogus
because the setting does not apply until after the device has been
reset.  Instead, the current setting should be queried.

If a user wants to set the modem networking mode, the setting should be
made outside of ofono.

The gprs-context driver has already been adjusted to query the
networking mode and to set things up accordingly.
2019-03-14 20:34:32 -05:00
Jonas Bonn a55e797ba2 ublox: gprs-context: query networking mode for TOBY L2
The TOBY L2 may run in either "bridge" mode or "router" mode.  For this
model, query the configured mode so that the appropriate settings are
communicated when the context is activated.
2019-03-14 20:34:32 -05:00