Commit Graph

5661 Commits

Author SHA1 Message Date
Ben Chan
55c3e162b1 broadband-modem-qmi: port modem_load_unlock_required to use GTask 2017-10-20 17:20:24 +02:00
Ben Chan
2ba17be8b6 broadband-modem-qmi: port modem_create_bearer to use GTask 2017-10-20 17:20:24 +02:00
Ben Chan
2aaac123ac broadband-modem-qmi: port messaging_load_supported_storages to use GTask 2017-10-20 17:20:24 +02:00
Ben Chan
bf9e5cdfeb broadband-modem-qmi: port messaging_check_support to use GTask 2017-10-20 17:20:24 +02:00
Ben Chan
30dfe3055e broadband-modem-qmi: port signal_check_support to use GTask 2017-10-20 17:20:24 +02:00
Ben Chan
e9ee49d583 broadband-modem-qmi: port oma_check_support to use GTask 2017-10-20 17:20:24 +02:00
Ben Chan
3e91956d0c broadband-modem-qmi: port location_load_capabilities to use GTask 2017-10-20 17:20:23 +02:00
Ben Chan
d99398b055 broadband-modem-qmi: port enable_location_gathering to use GTask 2017-10-20 17:20:23 +02:00
Ben Chan
07d922e250 broadband-modem-qmi: port firmware_load_list to use GTask 2017-10-20 17:20:23 +02:00
Ben Chan
af2f87d2f2 broadband-modem-qmi: port firmware_load_current to use GTask 2017-10-20 17:20:23 +02:00
Ben Chan
02fadb6e91 broadband-modem-qmi: port enabling_started to use GTask 2017-10-20 17:20:23 +02:00
Ben Chan
b412ddc8b9 broadband-modem-qmi: port initialization_started to use GTask 2017-10-20 17:20:23 +02:00
Ben Chan
a20686c24c via: port modem_cdma_{setup,cleanup}_unsolicited_events to use GTask 2017-10-20 09:44:56 +02:00
Ben Chan
47cdad55a8 anydata: port get_detailed_registration_state to use GTask 2017-10-20 09:44:56 +02:00
Aleksander Morgado
689dad9f6e base-bearer: fix reporting tx/rx stats
The numbers were actually swapped!
2017-10-19 11:43:50 +02:00
Aleksander Morgado
25007741c8 mmcli,sim: force sync operation for the info action 2017-10-18 23:05:18 +02:00
Aleksander Morgado
fc40c059fa broadband-modem-mbim: plug memleak when querying previous unlock retries
==15673== 240 (40 direct, 200 indirect) bytes in 1 blocks are definitely lost in loss record 4,341 of 4,535
    ==15673==    at 0x647F014: g_type_create_instance (in /usr/lib/libgobject-2.0.so.0.5200.3)
    ==15673==    by 0x6460027: ??? (in /usr/lib/libgobject-2.0.so.0.5200.3)
    ==15673==    by 0x6461A54: g_object_newv (in /usr/lib/libgobject-2.0.so.0.5200.3)
    ==15673==    by 0x6462213: g_object_new (in /usr/lib/libgobject-2.0.so.0.5200.3)
    ==15673==    by 0x4E97C33: mm_unlock_retries_new (mm-unlock-retries.c:217)
    ==15673==    by 0x4E97A6F: mm_unlock_retries_new_from_dictionary (mm-unlock-retries.c:171)
    ==15673==    by 0x170B09: mm_iface_modem_get_unlock_retries (mm-iface-modem.c:2942)
    ==15673==    by 0x1DB0A4: pin_query_unlock_retries_ready (mm-broadband-modem-mbim.c:782)
    ==15673==    by 0x613AD52: ??? (in /usr/lib/libgio-2.0.so.0.5200.3)
    ==15673==    by 0x613B775: ??? (in /usr/lib/libgio-2.0.so.0.5200.3)
    ==15673==    by 0x57D525D: transaction_task_complete_and_free (mbim-device.c:246)
    ==15673==    by 0x57D6086: process_message (mbim-device.c:666)
2017-10-08 10:27:12 +02:00
Aleksander Morgado
58e6f652a1 base-modem: plug memleaks when building port lists
The mm_base_modem_find_ports() method builds a list of full
references, so we need to unref them in the peek() methods.

    ==10047== 14,959 (24 direct, 14,935 indirect) bytes in 1 blocks are definitely lost in loss record 5,470 of 5,473
    ==10047==    at 0x4C2CE5F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==10047==    by 0x66E3028: g_malloc (in /usr/lib/libglib-2.0.so.0.5200.3)
    ==10047==    by 0x66FAB25: g_slice_alloc (in /usr/lib/libglib-2.0.so.0.5200.3)
    ==10047==    by 0x66D9A33: g_list_append (in /usr/lib/libglib-2.0.so.0.5200.3)
    ==10047==    by 0x15F6A7: mm_base_modem_find_ports (mm-base-modem.c:845)
    ==10047==    by 0x15E9F3: mm_base_modem_peek_port_qmi_for_data (mm-base-modem.c:579)
    ==10047==    by 0x15E8FC: mm_base_modem_get_port_qmi_for_data (mm-base-modem.c:555)
    ==10047==    by 0x1BB99F: _connect (mm-bearer-qmi.c:1391)
    ==10047==    by 0x1540B4: mm_base_bearer_connect (mm-base-bearer.c:841)
    ==10047==    by 0x181F4F: connection_step (mm-iface-modem-simple.c:597)
    ==10047==    by 0x181321: create_bearer_ready (mm-iface-modem-simple.c:258)
    ==10047==    by 0x612FD52: ??? (in /usr/lib/libgio-2.0.so.0.5200.3)
2017-10-07 14:10:12 +02:00
Aleksander Morgado
882f6b04d6 cinterion: port modem_create_bearer to GTask 2017-10-07 14:10:12 +02:00
Aleksander Morgado
e9f56ddf15 cinterion: port after_sim_unlock to GTask 2017-10-07 13:58:55 +02:00
Aleksander Morgado
b1948f83a5 cinterion: port load_unlock_retries_context to GTask 2017-10-07 13:40:30 +02:00
Aleksander Morgado
e1b2b88e68 cinterion: port setup_flow_control to GTask 2017-10-07 13:40:30 +02:00
Aleksander Morgado
926e0176fb cinterion: port set_current_bands to GTask 2017-10-07 13:40:30 +02:00
Aleksander Morgado
ea58d35947 cinterion: port load_current_bands to GTask 2017-10-07 13:40:30 +02:00
Aleksander Morgado
c1e17b9cad cinterion: port load_supported_bands to GTask 2017-10-07 13:40:30 +02:00
Aleksander Morgado
7f2520a83d cinterion: port register_in_network to GTask 2017-10-07 13:40:30 +02:00
Aleksander Morgado
f9e2ebf3a0 cinterion: port modem_power_off to GTask 2017-10-07 13:40:30 +02:00
Aleksander Morgado
00aa9cd09b cinterion: port modem_power_down to GTask 2017-10-07 13:40:30 +02:00
Aleksander Morgado
73f748f7ac cinterion: port messaging_check_support to GTask 2017-10-07 13:40:30 +02:00
Aleksander Morgado
d09f9adafe cinterion: port messaging_enable_unsolicited_events to GTask 2017-10-07 13:40:30 +02:00
Aleksander Morgado
7e478e408d cinterion: port plugin custom_init to GTask 2017-10-07 13:40:30 +02:00
Ben Chan
6e68f4052b nokia: port load_access_technologies to use GTask 2017-10-07 10:56:33 +02:00
Ben Chan
d4abf79e99 nokia: port enabling_modem_init to use GTask 2017-10-07 10:56:33 +02:00
Aleksander Morgado
74d8a69b4e iridium: simplify a bit the saved_error logic in connect
Note that saved_error will be freed along with the context, unless
it's set to NULL.
2017-10-07 10:55:16 +02:00
Ben Chan
3c2b974bbd iridium: port connect to use GTask 2017-10-07 10:41:20 +02:00
Ben Chan
d0bbc43fa7 iridium: port load_operator_{code,name} to use GTask 2017-10-07 10:41:20 +02:00
Ben Chan
2768df24b4 iridium: port setup_flow_control to use GTask 2017-10-07 10:41:20 +02:00
Ben Chan
aee8bcc748 iridium: port load_supported_modes to use GTask 2017-10-07 10:41:20 +02:00
Ben Chan
164ce73847 iridium: port create_bearer to use GTask 2017-10-07 10:41:20 +02:00
Ben Chan
7dc46481c5 pantech: port modem_after_sim_unlock to use GTask 2017-10-07 10:39:47 +02:00
Ben Chan
f8a375b1fa broadband-modem-mbim: use device manufacturer information when available
MBIM modems can be supported by the 'generic' plugin. Instead of
treating the plugin name (i.e. Generic) as the manufacturer, it's more
useful to use the manufacturer information reported by the underlying
USB device if that is available.
2017-10-07 10:05:40 +02:00
Ben Chan
3a0d658b5d kerneldevice: add method to retrieve manufacturer information
A USB device may report its manufacturer through the Manufacturer String
Descriptor. That information can sometimes be useful, e.g. MBIM doesn't
define a standard command to query the manufacturer. This patch adds a
method to MMKernelDevice to retrieve the manufacturer information from
the underlying physical device, which can later be used by
MMBroadbandModemMbim to report the manufacturer of a MBIM modem.
2017-10-07 10:05:40 +02:00
Ben Chan
bee3f063b4 anydata: remove unused 'port' field in DetailedRegistrationStateContext
The 'port' field in DetailedRegistrationStateContext is initialized to
NULL but never updated or used.

When detailed_registration_state_context_complete_and_free() calls
g_object_unref() on the NULL 'port' field, an assertion is raised.
2017-10-07 10:02:35 +02:00
Ben Chan
1e47692573 simtech: fix memory leak 2017-10-07 10:01:44 +02:00
Ben Chan
25f37fd613 wavecom: fix memory leak 2017-10-07 10:01:29 +02:00
Ben Chan
6967cbfd55 linktop: port set_current_modes to use GTask 2017-10-06 11:06:49 +02:00
Ben Chan
1e75e7e3d9 linktop: port load_supported_modes to use GTask 2017-10-06 11:06:49 +02:00
Aleksander Morgado
efaa780de2 port-qmi: don't allow client allocation if port is closed
The internal QmiDevice will be gone when the port is closed, so we
cannot really do anything.

This avoid an issue happening when the modem goes away in the middle
of the client allocation logic performed by MMBroadbandModemQmi:

    ModemManager[24820]: <debug> [1507279407.225777] Couldn't allocate client for service 'wms': Couldn't create client for service 'wms': CID allocation failed in the CTL client: Transaction timed out
    ModemManager[24820]: qmi_device_allocate_client: assertion 'QMI_IS_DEVICE (self)' failed
    ==24820==
    ==24820== Process terminating with default action of signal 5 (SIGTRAP): dumping core
    ==24820==    at 0x66E3411: ??? (in /usr/lib/libglib-2.0.so.0.5200.3)
    ==24820==    by 0x66E46FA: g_logv (in /usr/lib/libglib-2.0.so.0.5200.3)
    ==24820==    by 0x66E484E: g_log (in /usr/lib/libglib-2.0.so.0.5200.3)
    ==24820==    by 0x538E259: qmi_device_allocate_client (qmi-device.c:1008)
    ==24820==    by 0x1F5690: mm_port_qmi_allocate_client (mm-port-qmi.c:157)
    ==24820==    by 0x1D20BA: allocate_next_client (mm-broadband-modem-qmi.c:11319)
    ==24820==    by 0x1D2027: qmi_port_allocate_client_ready (mm-broadband-modem-qmi.c:11306)
    ==24820==    by 0x612FD52: ??? (in /usr/lib/libgio-2.0.so.0.5200.3)
    ==24820==    by 0x6130775: ??? (in /usr/lib/libgio-2.0.so.0.5200.3)
    ==24820==    by 0x1F54E8: allocate_client_ready (mm-port-qmi.c:113)
    ==24820==    by 0x612FD52: ??? (in /usr/lib/libgio-2.0.so.0.5200.3)
    ==24820==    by 0x6130775: ??? (in /usr/lib/libgio-2.0.so.0.5200.3)
2017-10-06 10:51:01 +02:00
Ben Chan
fd2bfb7e85 novatel-lte: implement load_unlock_retries
This patch implements load_unlock_retries() for the Novatel LTE modem by
using the AT$NWPINR? command to query the number of retries left for
entering PIN1 or PIN2.

Ported from the original patch by Arman Uguray <armansito@chromium.org>:
https://chromium-review.googlesource.com/c/58118
2017-10-06 10:05:28 +02:00
Aleksander Morgado
01ba79b70b simtech: port 3gpp_{setup|cleanup}_unsolicited_messages to GTask 2017-10-06 10:02:13 +02:00