Commit Graph

8483 Commits

Author SHA1 Message Date
Christophe Ronco ef3ebe5840 huawei: use VENDOR_HUAWEI quirk on gprs context creation 2018-07-25 14:11:58 -05:00
Christophe Ronco 527e6b1f86 atmodem: Add gprs-context quirk for HUAWEI vendor
When ofono dies while connected using PPP, modem AT channel is not put
back to command mode (tested with HUAWEI modems E3372 and MS2372).
If ofono is restarted, it won't be able to connect as it gets no answer
to AT commands on this AT channel.
This patch adds a quirk to immediately send escape sequence on modem
channel when gprs-context atom is removed.
2018-07-25 14:11:45 -05:00
Slava Monich 376af6c85c plugin: Don't unload external plugins too early
Plugins may reference data structures allocated by each other.
They all need to be deinitialized first, only then it should be
safe to unload the libraries.
2018-07-23 19:57:56 -05:00
Slava Monich 3c10ae7fb3 modem: Implement ofono_modem_get_voicecall 2018-07-02 10:34:25 -05:00
Slava Monich 94e3275d9c include: Add ofono_modem_get_voicecall 2018-07-02 10:34:25 -05:00
Slava Monich 0caaf32117 dbus: Add D-Bus mapping for OFONO_ERROR_TYPE_ERRNO 2018-06-28 11:35:10 -05:00
Slava Monich c87e6c20a4 emulator: Handle OFONO_ERROR_TYPE_ERRNO in switch 2018-06-28 11:35:10 -05:00
Slava Monich 7af423dbb7 include: Add OFONO_ERROR_TYPE_ERRNO 2018-06-28 11:35:10 -05:00
Slava Monich c35fb6b1a3 dbus: Make cme_errors_mapping static const 2018-06-28 10:52:39 -05:00
Slava Monich c292d771b7 voicecall: Implement ofono_voicecall_get_modem 2018-06-25 10:26:26 -05:00
Slava Monich 1cff977b67 include: Add ofono_voicecall_get_modem 2018-06-25 10:26:20 -05:00
Denis Kenzior 08796aa391 udevng: Fix SIM900 detection 2018-06-19 12:37:15 -05:00
Denis Kenzior d0ab273615 mbim: Remove useless debug 2018-06-19 12:37:15 -05:00
Marcel Holtmann 2c3668f87d Release 1.24 2018-06-14 23:20:40 +02:00
Marcel Holtmann 4cd1608320 gatchat: Use pragma to mask unknown pragma diagnostic options
gatchat/gatmux.c:33:32: error: unknown option after ‘#pragma GCC diagnostic’ kind [-Werror=pragmas]
 #pragma GCC diagnostic ignored "-Wcast-function-type"
                                ^~~~~~~~~~~~~~~~~~~~~~
2018-06-14 21:47:41 +02:00
Marcel Holtmann 77398ff772 rilmodem: Use pragma to mask restrict buffer warnings
In file included from drivers/rilmodem/network-registration.c:40:
drivers/rilmodem/network-registration.c: In function ‘ril_cops_list_cb’:
./gril/gril.h:98:11: error: passing argument 1 to restrict-qualified parameter aliases with argument 3 [-Werror=restrict]
   sprintf(print_buf, x);  \
           ^~~~~~~~~
drivers/rilmodem/network-registration.c:583:3: note: in expansion of macro ‘g_ril_append_print_buf’
   g_ril_append_print_buf(nd->ril, "%s [lalpha=%s, salpha=%s, "
   ^~~~~~~~~~~~~~~~~~~~~~
./gril/gril.h:98:11: error: passing argument 1 to restrict-qualified parameter aliases with argument 3 [-Werror=restrict]
   sprintf(print_buf, x);  \
           ^~~~~~~~~
drivers/rilmodem/network-registration.c:593:2: note: in expansion of macro ‘g_ril_append_print_buf’
  g_ril_append_print_buf(nd->ril, "%s}", print_buf);
  ^~~~~~~~~~~~~~~~~~~~~~

In file included from drivers/rilmodem/call-forwarding.c:41:
drivers/rilmodem/call-forwarding.c: In function ‘ril_query_call_fwd_cb’:
./gril/gril.h:98:11: error: passing argument 1 to restrict-qualified parameter aliases with argument 3 [-Werror=restrict]
   sprintf(print_buf, x);  \
           ^~~~~~~~~
drivers/rilmodem/call-forwarding.c:114:3: note: in expansion of macro ‘g_ril_append_print_buf’
   g_ril_append_print_buf(fd->ril, "%s [%d,%d,%d,%s,%d]",
   ^~~~~~~~~~~~~~~~~~~~~~
./gril/gril.h:98:11: error: passing argument 1 to restrict-qualified parameter aliases with argument 3 [-Werror=restrict]
   sprintf(print_buf, x);  \
           ^~~~~~~~~
drivers/rilmodem/call-forwarding.c:124:2: note: in expansion of macro ‘g_ril_append_print_buf’
  g_ril_append_print_buf(fd->ril, "%s}", print_buf);
  ^~~~~~~~~~~~~~~~~~~~~~
2018-06-14 15:19:16 +02:00
Marcel Holtmann 07fc4a8506 gatchat: Use pragma to mask GFunc casting warning
gatchat/gatmux.c: In function ‘watch_dispatch’:
gatchat/gatmux.c:454:17: error: cast between incompatible function types from ‘GSourceFunc’ {aka ‘int (*)(void *)’} to ‘gboolean (*)(GIOChannel *, GIOCondition,  void *)’ {aka ‘int (*)(struct _GIOChannel *, enum <anonymous>,  void *)’} [-Werror=cast-function-type]
  GIOFunc func = (GIOFunc) callback;
                 ^
2018-06-14 15:19:16 +02:00
Antara Borwankar 1fe34da0af atmodem: Support ETWS & CMAS on XMM series modems 2018-06-13 11:58:45 -05:00
Denis Kenzior d715486525 sim: Fix not updating sim pin state
In case we try to enter the PIN/PUK and fail to enter a correct code,
the PIN/PUK retries are not rechecked as they should be.

Reported by: Florent Beillonnet <florent.beillonnet@gmail.com>
2018-06-05 12:56:05 -05:00
Slava Monich ecc3f1bf73 ussd: Cancel pending requests when unregistering
And reset state to idle before unregistering the D-Bus interface.
This may occur e.g. when we receive REFRESH from STK.
2018-05-23 10:23:25 -05:00
Denis Kenzior ff85d63149 AUTHORS: Mention Florent's contributions 2018-05-23 09:04:09 -05:00
Florent Beillonnet 46896014ee atmodem: Fix at_pin_send_puk userdata use
It seems that the function at_pin_send_puk should have been changed
along with at_pin_send, because it's also refering to the
at_pin_send_cb callback

See this commit : ba9f126716
2018-05-23 09:02:16 -05:00
Denis Kenzior b42bc11d85 gemalto: Whitespace fixes 2018-05-23 09:02:08 -05:00
Denis Kenzior 495ff1ff45 AUTHORS: Mention Varun's contributions 2018-05-23 08:56:17 -05:00
Varun Gargi 0ee376ccab udevng: remove vendor ID to make it generic for intel modem 2018-05-23 08:55:39 -05:00
James Prestwood 34ff57e083 plugins: fixed crash in udevng
The return value from ofono_modem_register was not being checked. If this fails
the modem object is not setup and causes a crash. This was specifically seen
when using the mbim driver without having configured with mbim support.

Now the modem object gets destroyed properly if the modem registration fails.
2018-05-22 15:39:42 -05:00
Bob Ham 1a8960564e sim7100: Specify vendor ID while creating voicecall driver
This enables the atmodem voicecall driver to handle SIMCom quirks like
not setting AT+COLP=1.
2018-05-14 11:11:18 -05:00
Bob Ham 1ebae47777 atmodem: Don't set AT+COLP=1 on SIMCom modems
On the SIMCom SIM7100E, setting AT+COLP=1 causes there to be no
response at all from "ATD...;" commands until the call is answered.
The results in oFono stalling rather than creating a new VoiceCall
object.

We fix this by adding SIMCOM to the list of vendors for whom we set
AT+COLP=0 rather than AT+COLP=1.
2018-05-14 11:11:14 -05:00
James Prestwood 19e8d21a7e simutil: fix bug when parsing AID type 2018-05-03 17:43:31 -05:00
Denis Kenzior 37fd1a631d AUTHORS: Mention Bob's contributions 2018-04-30 11:18:06 -05:00
Bob Ham 1d63b1d35f plugins: Add support for SIM7100E by SIMCom
Add support for the SIM7100E modem.  We add a new "sim7100" plugin
because there's no other AT-based modem that has support for both GPRS
and voice calls.
2018-04-30 11:17:47 -05:00
Slava Monich 3cb55b65cb modem: Implement ofono_modem_get_gprs 2018-04-27 11:13:23 -05:00
Slava Monich fa670ad295 include: Add ofono_modem_get_gprs 2018-04-27 11:13:19 -05:00
Denis Kenzior 3a1b47aafb unit: Fix gcc warning
In file included from unit/test-mbim.c:28:0:
unit/test-mbim.c: In function ‘parse_device_caps’:
unit/test-mbim.c:332:9: error: suggest parentheses around assignment used as truth value [-Werror=parentheses]
  assert(cellular_class = 1);
2018-04-24 11:51:51 -05:00
Slava Monich 0f171dac45 ussd: Don't ignore data from TERMINATED response
Typically responses to USSD requests are coming with status
zero (NOTIFY) but some are coming with status 2 (TERMINATED).
If those contain data, the data should be presented to the user.
2018-04-23 13:49:36 -05:00
Mark van der Putten ac96c726f2 gemalto: signal sim initialized
Modem type PLS8-E, firmware 03.017
2018-04-23 13:46:44 -05:00
Christophe Ronco beed2aee9e qmi: report SIM not inserted when unable to get PIN type 2018-04-19 10:29:40 -05:00
Christophe Ronco 8af406a45d qmi: report failure or retry in case of invalid pin type
QMI_UIM_GET_CARD_STATUS is retried in more error cases
when trying to get password type.
In case of failure, driver report an error instead of
OFONO_SIM_PASSWORD_INVALID. This avoids a crash.
2018-04-19 10:27:32 -05:00
Christophe Ronco bfa0ac979e qmi: use right slot and application during SIM detection
Use right slot and application to get card status, PIN status and PIN
retries. Without this patch, SIMs where selected application and slot
numbers are different are not detected.
2018-04-19 10:24:50 -05:00
Jonas Bonn 88d9b1a32d qmi: make services always shared 2018-04-04 10:03:13 -05:00
Jonas Bonn c0527a211c gobi: Update to the new version_list changes 2018-04-04 09:59:53 -05:00
Jonas Bonn 6485522c91 qmi: make version_list private 2018-04-04 09:59:44 -05:00
Jonas Bonn 76471964e2 qmi: assume version_list is up to date
The way things are currently coded, the gobi plugin calls
qmi_device_discover and does nothing else until it succeeds.  As such,
we can safely assume that the version_list is set up when we go to
create a service.
2018-04-04 09:56:22 -05:00
Jonas Bonn 81180147cf qmi: drop header output parameter from request_alloc
The only thing this output parameter is being used for now is for
getting the transaction ID.  Return the TID directly from
__submit_requesta and drop the 'head' parameter altogether.
2018-04-04 09:55:56 -05:00
Jonas Bonn a357565377 qmi: request_alloc has no meaningful failure path
The only way request_alloc can fail is if one of the memory allocation
routines fail to allocate memory.  However, Linux memory allocation
doesn't really fail in this manner; memory can be overcommited and the
out-of-memory reaper will take care of re-establishing the balance when
excess memory is actually accessed.

Given this, request_alloc will never return anything other than success
and the failure paths will never be exercised.
2018-04-04 09:55:21 -05:00
Jonas Bonn 093bdda7be qmi: unify common request header setup
The service and control requests differ slightly in their headers, but
this difference is minor enough that we can handle it directly in the
request submission routine.  This patch unifies the header setup for the
two request types.
2018-04-04 09:55:13 -05:00
Jonas Bonn 4ef8814215 qmi: remove headroom parameter from req_alloc
The headroom can be established from the service type, so it's redundant
to pass it as a parameter.
2018-03-29 09:54:39 -05:00
Jonas Bonn 4846c26948 qmi: remove unused fields of service_send_data
After setting up the request structure, qmi_service_send makes no
further use of the 'param' and 'service' fields of the service_send_data
structure.  This patch removes those fields and frees 'param'
immediately after the request has been allocated and the parameter data
thereby copied into the send buffer.
2018-03-29 09:52:22 -05:00
Denis Kenzior 8b8a760644 simfs: Fix crash in sim_fs_op_free
If an operation is in progress and an operation is canceled, we don't
actually destroy it, but simply clear out the callback.  In the case of
a context being destroyed, the operation is left on the simfs op_q with
a dangling pointer to the already freed context.  So the current logic
in sim_fs_op_free tries to access invalid memory.

Fix this by performing the watch operations in sim_fs_end_current
instead and setting the context pointer appropriately.
2018-03-29 09:46:22 -05:00
Bassem Boubaker db9b292f92 gemalto: Clarify supported modem family name
Some gemalto modem family share almost the same base except some very
specific AT command and some hardware changes like ALSx and PXSx family
2018-03-19 12:11:12 -05:00