summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* cinterion: add support thales PCIE vid(0x1269) in the cinterion.Fanice.luo2022-09-081-2/+2
| | | | For SDX55 and SDX65 can identify the corrrect plugin(cinterion), and the plugin is updated to support the wwan subsystem.
* modem-helpers-mbim: add new MBIM PIN typesAleksander Morgado2022-09-071-3/+6
|
* build: require libmbim 1.27.9 for the MBIM UICC file read supportAleksander Morgado2022-09-072-2/+2
|
* modem-helpers-ublox: rework +UIPADDR response parserAleksander Morgado2022-09-051-41/+24
| | | | | We setup all output variables with g_autofree and then use g_steal_pointer() to return the needed ones.
* modem-helpers: rework the +CGEV indication parserAleksander Morgado2022-09-051-21/+15
| | | | | We setup all output variables with g_autofree and then use g_steal_pointer() to return the needed ones.
* modem-helpers-cinterion: rework CNMI test response parserAleksander Morgado2022-09-051-15/+10
| | | | | We setup all output variables with g_autoptr() and then use g_steal_pointer() to return the needed ones.
* modem-helpers: rework +CGCONTRDP response parserAleksander Morgado2022-09-051-56/+31
| | | | | We setup all output variables with g_autofree and then use g_steal_pointer() to return the needed ones.
* core: port GRegex/GMatchInfo to use autoptr()Aleksander Morgado2022-09-0533-1267/+849
| | | | | | | | | | | | | | | | | | | | | | The behavior of GRegex changed in 2.73.2 once it was ported from pcre1 to pcre2. In some cases it was made more strict, which is fine, in other cases it exposed some change in how it behaves on certain matches that is not extremely clear whether it's ok or not. See https://gitlab.gnome.org/GNOME/glib/-/issues/2729 See https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/601 See https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/621 Either way, one thing that was assumed was that initializing all GRegex/GMatchInfo variables to NULL and making sure they're NULL before they're initialized by glib (especially the GMatchInfo) was a good and safer approach. So, whenever possible, g_autoptr() is used to cleanup the allocated GMatchInfo/GRegex variables, and otherwise, g_clear_pointer() is used to ensure that no free/unref is attempted unless the given variable is not NULL, and also so that the variable is reseted to NULL after being disposed.
* mm-broadband-modem-qmi: fix updating access technology and locationAkash Aggarwal2022-09-051-0/+11
| | | | | | | Access technology and location properties are updated if modem is in registered state. Cache and update them when processing DSD system status indication.
* plugins,telit: add missing 4G BND HEX format modem modelsCarlo Lobrano2022-09-051-1/+9
| | | | | | | | | Currently, supported band AT query #BND=? is failing with LM9x0 because it expects BND 4G decimal format instead than hexadecimal. Adding also LN920 and FN980 for completeness. They do not fail right now because they have also "4g band extended" which format is always hexadecimal.
* test-modem-helpers: add EOL to strings matched with G_REGEX_NEWLINE_CRLFAleksander Morgado2022-09-021-5/+5
| | | | | | | | | | | Looks like pcre2 (used since glib 2.73.2) requires EOLs to match if G_REGEX_NEWLINE_CRLF is explicitly used. The tests are updated accordingly, because the modem responses will anyway have the EOLs as well. See https://gitlab.gnome.org/GNOME/glib/-/issues/2729#note_1544130 Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/601
* serial-parsers: fix invalid EXZ error parserAleksander Morgado2022-09-011-1/+1
| | | | | | | | | Passed undetected when glib2 was using pcre1, it triggers an error now with pcre2. See https://gitlab.gnome.org/GNOME/glib/-/issues/2729#note_1542038 Reported and fix suggested by: Marco Trevisan (Treviño) <mail@3v1n0.net>
* mm-iface-modem-3gpp: fix packet service state updationAkash Aggarwal2022-08-261-5/+9
| | | | | | | | | | Modem could be in 'registered' state if CS is 'attached', but packet service state might be 'detached'. Check if packet service state needs to be updated in update_registration_state(), even if registration state is same. Fixes: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/618
* sim-qmi: rework Read Transparent processing to use g_autoptr()Aleksander Morgado2022-08-251-15/+9
|
* sim-qmi: fix leak of the GArray containing the GIDAleksander Morgado2022-08-251-2/+2
| | | | Fixes 3238ccdbb29e86acd2b3e5c0e45bee84f9da94b4
* mm-log: hiding personal info while logging for QMI modemAkash Aggarwal2022-08-252-1/+3
|
* base-modem: fix double GError free during quick syncAleksander Morgado2022-08-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ==10719== Invalid free() / delete / delete[] / realloc() ==10719== at 0x4897D88: free (vg_replace_malloc.c:872) ==10719== by 0x52F091B: g_free (gmem.c:220) ==10719== by 0x530C36B: g_slice_free1 (gslice.c:1185) ==10719== by 0x52D632B: g_error_free (gerror.c:872) ==10719== by 0x192DBF: UnknownInlinedFun (glib-autocleanups.h:54) ==10719== by 0x192DBF: UnknownInlinedFun (glib-autocleanups.h:54) ==10719== by 0x192DBF: sync_ready (mm-base-modem.c:671) ==10719== by 0x50A82CB: g_task_return_now (gtask.c:1232) ==10719== by 0x50A854B: UnknownInlinedFun (gtask.c:1301) ==10719== by 0x50A854B: g_task_return (gtask.c:1258) ==10719== by 0x50AAA4F: g_task_return_new_error (gtask.c:1944) ==10719== by 0x1F44E3: iface_modem_sync_ready (mm-broadband-modem.c:12205) ==10719== by 0x50A82CB: g_task_return_now (gtask.c:1232) ==10719== by 0x50A854B: UnknownInlinedFun (gtask.c:1301) ==10719== by 0x50A854B: g_task_return (gtask.c:1258) ==10719== by 0x1AB86B: interface_syncing_step.lto_priv.0 (mm-iface-modem.c:4644) ==10719== Address 0x910bf30 is 0 bytes inside a block of size 16 free'd ==10719== at 0x4897D88: free (vg_replace_malloc.c:872) ==10719== by 0x52F091B: g_free (gmem.c:220) ==10719== by 0x530C36B: g_slice_free1 (gslice.c:1185) ==10719== by 0x52D632B: g_error_free (gerror.c:872) ==10719== by 0x17565F: UnknownInlinedFun (glib-autocleanups.h:54) ==10719== by 0x17565F: UnknownInlinedFun (glib-autocleanups.h:54) ==10719== by 0x17565F: base_modem_sync_ready (mm-base-manager.c:737) ==10719== by 0x50A82CB: g_task_return_now (gtask.c:1232) ==10719== by 0x50A854B: UnknownInlinedFun (gtask.c:1301) ==10719== by 0x50A854B: g_task_return (gtask.c:1258) ==10719== by 0x192DAB: sync_ready (mm-base-modem.c:674) ==10719== by 0x50A82CB: g_task_return_now (gtask.c:1232) ==10719== by 0x50A854B: UnknownInlinedFun (gtask.c:1301) ==10719== by 0x50A854B: g_task_return (gtask.c:1258) ==10719== by 0x50AAA4F: g_task_return_new_error (gtask.c:1944) ==10719== by 0x1F44E3: iface_modem_sync_ready (mm-broadband-modem.c:12205) ==10719== Block was alloc'd at ==10719== at 0x48952CC: malloc (vg_replace_malloc.c:381) ==10719== by 0x52F3EF3: g_malloc (gmem.c:127) ==10719== by 0x530CD27: g_slice_alloc (gslice.c:1074) ==10719== by 0x530D2B7: g_slice_alloc0 (gslice.c:1100) ==10719== by 0x52D5E7B: g_error_allocate (gerror.c:710) ==10719== by 0x52D690F: UnknownInlinedFun (gerror.c:724) ==10719== by 0x52D690F: g_error_new_valist (gerror.c:766) ==10719== by 0x50AAA43: g_task_return_new_error (gtask.c:1941) ==10719== by 0x1F44E3: iface_modem_sync_ready (mm-broadband-modem.c:12205) ==10719== by 0x50A82CB: g_task_return_now (gtask.c:1232) ==10719== by 0x50A854B: UnknownInlinedFun (gtask.c:1301) ==10719== by 0x50A854B: g_task_return (gtask.c:1258) ==10719== by 0x1AB86B: interface_syncing_step.lto_priv.0 (mm-iface-modem.c:4644) ==10719== by 0x1AB9A3: UnknownInlinedFun (mm-iface-modem.c:4543) ==10719== by 0x1AB9A3: interface_syncing_step.lto_priv.0 (mm-iface-modem.c:4639)
* mtk: fix task completion when loading supported modesAleksander Morgado2022-08-251-13/+10
|
* icera: fix double free on %%IPSYS=? response processingAleksander Morgado2022-08-251-1/+0
|
* broadband-modem-mbim: fix crash on register indication parsing failureAleksander Morgado2022-08-191-1/+1
| | | | Found during code review.
* cli,output: plug leak of OutputItemListItem itemsAleksander Morgado2022-08-191-0/+1
|
* mm-shared-qmi: Fix current modesAkash Aggarwal2022-08-201-0/+27
| | | | | | Modem reports 2G+3G+4G+5G current modes, while 2G is not supported. Consider device capabilities in deciding current modes.
* libmm-glib,sms: simplify 'data' property retrieval logicAleksander Morgado2022-08-191-24/+7
|
* sim-qmi: implement loading GID1 and GID2Aleksander Morgado2022-08-191-0/+85
|
* sim-qmi: define common SIM file paths for MF and ADFAleksander Morgado2022-08-191-8/+7
|
* base-sim: add steps to load GID1 and GID2 during initAleksander Morgado2022-08-192-0/+86
|
* cli,sim: print GID1 and GID2 fields if availableAleksander Morgado2022-08-193-1/+16
|
* cli,sms: minor alignment fixAleksander Morgado2022-08-191-1/+1
|
* libmm-glib,sim: add support to get GID1 and GID2 fieldsAleksander Morgado2022-08-193-0/+125
|
* libmm-glib,sim: add missing separators in source codeAleksander Morgado2022-08-191-0/+8
|
* api,introspection: add Gid1 and Gid2 properties in SIM interfaceAleksander Morgado2022-08-192-0/+28
|
* mm-bearer-qmi: allocate separate WDS client for each endpointStephan Gerhold2022-08-182-11/+14
| | | | | | | | | Multiplexing currently does not work correctly for BAM-DMUX because ModemManager reuses the same WDS client for all data points. A second bearer can be created but it effectively disables the first one. Fix this similar to the existing checks for the mux-id by including the endpoint type and number in the QMI client flags.
* broadband-modem-qmi: choose endpoint number based on data portStephan Gerhold2022-08-186-40/+61
| | | | | | | | | | | | | | | | | | | | | | | At the moment the endpoint type/number is chosen based on the QMI control port. The assumption is that multiplexing is implemented using an additional protocol layer (e.g. QMAP) or that each network interface has its own QMI control port. This is not necessarily the case for BAM-DMUX. To use the built-in multiplexing the WDS client must be bound to the correct data port. This works already for older firmware versions using "Bind Data Port" (SIO port numbers), but not for newer ones using "Bind Mux Data Port" (endpoint type/interface numbers). Make it work for newer firmware versions as well by choosing the endpoint type/number based on the data port similar to the existing implementation for SIO port numbers. Note: The correct endpoint interface number is currently only used for the steps in mm-bearer-qmi. Ideally more refactoring should be done in mm-port-qmi to call WDA Set Data Format for each of the endpoints. In practice it usually works fine without because the data format is set correctly by default.
* broadband-modem-qmi: add missing error check for MHIStephan Gerhold2022-08-181-1/+14
| | | | | | | | Now that peek_port_qmi_for_data_mhi() is a separate function it becomes obvious that it looks different from all the others: There is no check that a QMI port was actually found. Add it similar to the one used for qmi_wwan.
* broadband-modem-qmi: split up peek_port_qmi_for_data()Stephan Gerhold2022-08-181-22/+42
| | | | | | | | | peek_port_qmi_for_data() is currently quite confusing to read because it mostly covers qmi_wwan while the mhi_net case returns early. Split this up into separate functions per driver to make it less confusing, similar to the variant in mm-broadband-modem-qmi-qcom-soc. No functional change.
* qcom-soc: simplify QMI port lookup for BAM-DMUXStephan Gerhold2022-08-181-13/+4
| | | | | | | | mm_broadband_modem_qmi_peek_port_qmi() already looks up a QMI port exactly the same way it is implemented in the BAM-DMUX variant of peek_port_qmi_for_data(), so we can just reuse it to simplify the code. No functional change.
* bearer-qmi: Add fallback for firmware with broken "Bind Data Port"Stephan Gerhold2022-08-181-4/+14
| | | | | | | | | | | | | | | | | | | | | "Bind Data Port" does not work correctly on newer platforms with BAM-DMUX (e.g. MSM8909). It returns "device unsupported" even for valid SIO port numbers. As an alternative, it seems to be possible to use the newer "Bind *Mux* Data Port" instead. This works even when QMAP multiplexing is disabled (using WDA "Set Data Format"). In this case the mux-id seems to be entirely ignored and can be a dummy value such as MUX_ID_UNBOUND. Implement this by checking for the error code of "Bind Data Port" and fallback to "Bind Mux Data Port" instead. The important part in this case is that the endpoint type and interface number are set correctly. At the moment this works only for the "wwan0" interface because the endpoint information is currently maintained globally as part of the QMI control port instead of being handled separately per data/net port. Further refactoring is needed to enable multiplexing on these platforms.
* port-qmi: Detect endpoint type based on net driverStephan Gerhold2022-08-183-40/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | At the moment the endpoint type and number for the QMI WDA calls are chosen based on the subsystem of the QMI control port. This does not work correctly for some configurations: - SUBSYS_QRTR currently implies ENDPOINT_TYPE_EMBEDDED, but this is only valid for QRTR+IPA configurations. For QRTR+BAM-DMUX the correct type is ENDPOINT_TYPE_BAM_DMUX. - SUBSYS_WWAN currently implies ENDPOINT_TYPE_PCIE, but there is already a comment that mentions that this selection works only for MHI/PCIe modems. SUBSYS_WWAN is also used by RPMSG+BAM-DMUX configurations in which case the correct type is also ENDPOINT_TYPE_BAM_DMUX. Looking closer at these cases suggests that the endpoint type actually refers to the data/net port and not the control port. It is more reliable choose it based on the network driver and not the subsystem of the control port. Address this partially by choosing the endpoint type based on the net_driver. Choosing the endpoint interface number correctly requires more refactoring since most of the logic is currently handled globally for a QMI control port, while it's actually specific to the chosen data/net port in some cases (e.g. multiple BAM-DMUX network interfaces).
* dispatcher-fcc-unlock: remove unused variableAleksander Morgado2022-08-171-1/+0
| | | | | | mm-dispatcher-fcc-unlock.c:100:27: warning: unused variable 'error' [-Wunused-variable] g_autoptr(GError) error = NULL; ^
* broadband-modem-mbim: remove unused variablesAleksander Morgado2022-08-171-2/+0
| | | | | | | | | mm-broadband-modem-mbim.c:8525:30: warning: unused variable 'message' [-Wunused-variable] g_autoptr(MbimMessage) message = NULL; ^ mm-broadband-modem-mbim.c:8582:29: warning: unused variable 'message' [-Wunused-variable] g_autoptr(MbimMessage) message = NULL; ^
* broadband-modem: remove unused variableAleksander Morgado2022-08-171-8/+7
| | | | | | mm-broadband-modem.c:10703:23: warning: unused variable 'cmd' [-Wunused-variable] g_autofree gchar *cmd = NULL; ^
* broadband-modem-mbim: remove context type comparison on disconnection reportsAleksander Morgado2022-08-161-2/+1
| | | | | | | | | | | | | | Since 1.18 the user can request a different APN type during the connection attempt, which translates into a different context type in the actual MBIM Connect Set request. Therefore, the context type of a given connection is no longer always INTERNET. Matching by the session id to report disconnections should be more than enough, which also helps to cover the case where the modem doesn't report the original context type used during the attempt (e.g. reporting NONE unconditionally). Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/614
* api,enums: added NGRAN-13 and NGRAN-26 bands.Aleksander Morgado2022-08-161-0/+4
|
* broadband-modem-mbim: fix typo 'proccessed'->'processed'Aleksander Morgado2022-08-151-8/+8
|
* bearer-mbim: enable multiplex support for wwan devicesDaniele Palmas2022-08-114-5/+23
|
* libmm-glib,profile-manager: fix memory leaks when listing connection profilesLouis-Alexis Eyraud2022-08-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit fixes memory leaks that occur when invoking mm_modem_3gpp_profile_manager_list function. When processing the connection profile data retrieved from dbus in build_list_results function, the iterator data (of GVariant type) were not properly freed after use in the while loop. ==7903== 2,697 (144 direct, 2,553 indirect) bytes in 3 blocks are definitely lost in loss record 2,525 of 2,538 ==7903== at 0x484086F: malloc (vg_replace_malloc.c:381) ==7903== by 0x4A13938: g_malloc (gmem.c:106) ==7903== by 0x4A2B1F4: g_slice_alloc (gslice.c:1069) ==7903== by 0x4A51322: UnknownInlinedFun (gvariant-core.c:486) ==7903== by 0x4A51322: UnknownInlinedFun (gvariant-core.c:624) ==7903== by 0x4A51322: g_variant_builder_end (gvariant.c:3718) ==7903== by 0x4C2FEC1: parse_value_from_blob.isra.0 (gdbusmessage.c:1866) ==7903== by 0x4C2FE8F: parse_value_from_blob.isra.0 (gdbusmessage.c:1766) ==7903== by 0x4C2FF37: parse_value_from_blob.isra.0 (gdbusmessage.c:1850) ==7903== by 0x4BF93A7: g_dbus_message_new_from_blob (gdbusmessage.c:2226) ==7903== by 0x4C09334: _g_dbus_worker_do_read_cb (gdbusprivate.c:750) ==7903== by 0x4B9EA79: g_task_return_now (gtask.c:1219) ==7903== by 0x4B9EABC: complete_in_idle_cb (gtask.c:1233) ==7903== by 0x4A0774A: g_idle_dispatch (gmain.c:5848) Signed-off-by: Louis-Alexis Eyraud <louis-alexis.eyraud@unabiz.com>
* sleep-monitor-powerd: remove unused variablesAleksander Morgado2022-08-091-2/+0
| | | | | | | | | | | mm-sleep-monitor-powerd.c: In function ‘signal_cb’: mm-sleep-monitor-powerd.c:81:14: error: unused variable ‘is_about_to_suspend’ [-Werror=unused-variable] 81 | gboolean is_about_to_suspend; | ^~~~~~~~~~~~~~~~~~~ mm-sleep-monitor-powerd.c: In function ‘on_pd_proxy_acquired’: mm-sleep-monitor-powerd.c:100:11: error: unused variable ‘owner’ [-Werror=unused-variable] 100 | char *owner; | ^~~~~
* build,autotools: print powerd suspend/resume status in configure outputAleksander Morgado2022-08-091-0/+1
|
* ci: fix systemd suspend-resume enabling in default testAleksander Morgado2022-08-091-1/+1
|
* ci: new test to build with powerd suspend-resume supportAleksander Morgado2022-08-091-0/+33
|