Commit Graph

7305 Commits

Author SHA1 Message Date
Aleksander Morgado
e9ee6dfdb8 broadband-modem-qmi: remove unused variables 2021-04-08 10:04:42 +00:00
Benjamin Tissoires
01f2109ae0 CI: make use of ci-templates
full list of benefits at:
https://freedesktop.pages.freedesktop.org/ci-templates/templates.html#why-use-the-ci-templates

But the main ones are:
- reproducible (just download the container and run the `script` part
  to be in the same environment the CI was running)
- no more before script that pulls hundreds of MB and spend useless time.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2021-04-08 11:39:48 +02:00
Zrshuo Zhang
179e12befc fibocom: add port type hints for the NL668-AM 2021-04-07 12:18:58 +02:00
Aleksander Morgado
1db0f0b66f iface-modem-simple: add multiplex info in connection details logging 2021-04-02 15:05:02 +02:00
Aleksander Morgado
c3fdaca4c8 iface-modem-simple: minor renames in logging of connection details 2021-04-02 15:05:02 +02:00
Aleksander Morgado
e6a04c0703 iface-modem-3gpp-ussd: use common method to abort invocation if not enabled 2021-04-02 15:05:02 +02:00
Aleksander Morgado
7dfe6198e1 iface-modem: publish helper to abort invocation if state not reached
So that we can use it in other interfaces to abort invocations e.g. if
the modem is not yet enabled.
2021-04-02 15:05:02 +02:00
Aleksander Morgado
cc59492caf base-bearer: add autoptr setup for MMBearerConnectResult 2021-04-02 15:05:02 +02:00
Aleksander Morgado
851a708442 modem-helpers: ip family normalization doesn't need log_object 2021-04-01 11:24:42 +02:00
Aleksander Morgado
2c27a7aadc base-bearer: remove default IP family property
There is no point in providing a configurable default IP family in the
bearer object, because we can always assume IPv4 as being the only
default expected.

Simplify the logic and also provide a new method to get the normalize
the IP family, using IPv4 as default always.
2021-03-31 23:46:31 +02:00
Aleksander Morgado
3179006351 cinterion: remove unused checkup of default IP family
Looks like the logic is just there to write a debug log, as the
selected IP family is not used anywhere else. Just remove this.
2021-03-31 23:13:33 +02:00
Pavan Holla
250c09b73c shared-qmi: Fix crash when a hotswap occurs while loading slots 2021-03-31 15:56:44 +00:00
Aleksander Morgado
7b141a6715 port-serial: remove misleading comments 2021-03-31 13:55:52 +02:00
Aleksander Morgado
c456027563 port-serial: the 'FlashOk' property is not really set on construct 2021-03-31 13:55:52 +02:00
Aleksander Morgado
9b72ff0adf mmtty: new --spew-control option
So that we simulate enabling the spew control, as we do during
probing.
2021-03-31 13:55:52 +02:00
Aleksander Morgado
65e860439a mmtty: allow enabling LF with --send-lf 2021-03-31 13:55:52 +02:00
Aleksander Morgado
9d6ff2485a mmtty: fix printing logs with --verbose
The _mm_log() implementation provided in 'mm-log-test.h' relies on
g_test_verbose() to decide whether the logs are printed or not. We are
not running under the GTest setup in mmtty, so that would not work
properly.

Just provide a custom _mm_log() method that checks for the
verbose_flag instead.
2021-03-31 13:55:52 +02:00
Aleksander Morgado
3ca80d8e51 mmtty: make sure \r\n is removed from the user line 2021-03-31 13:55:47 +02:00
Aleksander Morgado
9f7bbf28d2 iface-modem: avoid check for SIM swap if no interface skeleton available 2021-03-24 21:53:45 +01:00
Aleksander Morgado
96d83392a8 iface-modem: avoid lock info update if no interface skeleton available
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/351
2021-03-24 21:53:45 +01:00
Aleksander Morgado
342b7119c3 cli,3gpp-ussd: move actions to a separate source file
All the USSD operations together in a separate file, as they're
managed in a separate 3GPP USSD interface.
2021-03-24 15:31:13 +01:00
Aleksander Morgado
08ed7b75db docs,libmm-glib: move USSD to its own section
It's not a generic interface, it's a feature interface, same as
messaging or location.
2021-03-24 15:31:08 +01:00
Aleksander Morgado
c28bfe3cac docs: explicitly ignore .actions files
These are generated by gtk-doc.
2021-03-24 12:08:11 +01:00
Aleksander Morgado
d6a724c7b3 broadband-modem: don't warn enabling/disabling USSD failures
USSD is a feature interface, not critical for connection management,
so skip warning on interface enabling/disabling failures.
2021-03-24 11:56:08 +01:00
Aleksander Morgado
4b19b9693f libmm-glib,bearer-properties: fix 'allowed-auth' comparison 2021-03-24 11:00:22 +01:00
Aleksander Morgado
16ade1c5d2 build: require libgudev 232 to include autoptr support
The code in git master already relies on autoptr support in GUdev
types, which was introduced in commit 272533131c6ed38479a88805,
included in libgudev 232.

See https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/349
2021-03-23 15:26:32 +01:00
Aleksander Morgado
42fbcb0b7d api,bearer: minor alignment fix 2021-03-23 15:10:52 +01:00
Aleksander Morgado
97ae345d9e api: add 'Since' tags
These are not actively used by gdbus-codegen or gtk-doc, but they're
helpful anyway so that users know when a given API method was
introduced.
2021-03-23 12:50:17 +01:00
Aleksander Morgado
dd3cb6e774 docs,libmm-glib: add low-level SAR interface reference 2021-03-23 12:50:17 +01:00
Aleksander Morgado
e30e3ac56d docs,libmm-glib: add missing reference to mm_sim_preferred_network_list_free() 2021-03-23 12:50:17 +01:00
Aleksander Morgado
3e05b3a982 docs,api: include missing reference to the SAR interface 2021-03-23 12:02:20 +01:00
Aleksander Morgado
7ad2e3ce9c build: add support for the new SAR interface
Include the new SAR interface in the build so that gdbus-codegen
generates support for it in libmm-glib as well as proper documentation
in the API reference.
2021-03-23 08:49:30 +00:00
Aleksander Morgado
09cead8279 api,sar: improve documentation and add example of SAR mapping table 2021-03-23 08:49:30 +00:00
Madhav
6dd34b7965 api,sar: add D-Bus interface to support SAR
Add a new D-Bus interface to support dynamic SAR across multiple platforms.
The new interface exposes methods to configure sar power levels,
handle the communications with the modem, and let the platform
code be agnostic to modem type.
2021-03-23 08:49:30 +00:00
Aleksander Morgado
a21233c7ab api: define bearer settings only in the 'Properties' property
Avoid defining them multiple times in the Modem.CreateBearer(),
Simple.Connect() and Modem3gpp.SetInitialEpsBearerSettings() methods.
2021-03-22 15:31:50 +01:00
Aleksander Morgado
634682b602 cinterion: make sure FALSE sets GError in parse_smong_response()
The g_regex_match_full() method may return FALSE without setting the
GError, so that case needs to be considered.

In addition to that, the following g_assert() was not doing what it
should have been, as it was comparing the address of the variable and
not the variable itself; rework the code to avoid that as well:
  g_assert (access_tech != MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN);
2021-03-21 13:44:16 +01:00
Aleksander Morgado
d01bca493d cinterion: make sure FALSE sets GError in provcfg_response_to_cid()
The g_regex_match_full() method may return FALSE without setting the
GError, so that case needs to be considered.

Reported by Jan Mazura.

Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/347
2021-03-21 13:40:01 +01:00
Aleksander Morgado
5285e958ab cinterion: allow '*' in Prov/Cfg response
E.g. in a Cinterion PLS8-E (REVISION 04.004) to match the following
line:

  ^SCFG: "MEopMode/Prov/Cfg","fallback*"

Fix suggested by Jan Mazura.

See https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/347
2021-03-21 13:39:33 +01:00
Dylan Van Assche
192e067f97 quectel: ignore QGPSURC
QGPSURCs are not ignored and causes calls to be rejected in some cases
2021-03-21 10:01:52 +00:00
Andrew Lassalle
dbb3825984 kernel-device-helpers: Remove unused variable 2021-03-18 17:10:54 -07:00
Aleksander Morgado
ab007a4496 base-modem: plug leaks when organizing ports
The GLists maintained in the logic need to be explicitly freed (just
the lists, not the list contents) if we exit early on error or if we
end up deciding that the specific ports are available but unsupported
by the plugin (e.g. if a plugin that doesn't support net ports finds
net ports in the modem).

  ==225333== 24 bytes in 1 blocks are definitely lost in loss record 2,024 of 5,525
  ==225333==    at 0x483E77F: malloc (vg_replace_malloc.c:307)
  ==225333==    by 0x506C539: g_malloc (in /usr/lib/libglib-2.0.so.0.6600.7)
  ==225333==    by 0x508DC8F: g_slice_alloc (in /usr/lib/libglib-2.0.so.0.6600.7)
  ==225333==    by 0x50636B4: g_list_append (in /usr/lib/libglib-2.0.so.0.6600.7)
  ==225333==    by 0x17E671: mm_base_modem_organize_ports (mm-base-modem.c:1298)
  ==225333==    by 0x1E4409: mm_plugin_create_modem (mm-plugin.c:1094)
  ==225333==    by 0x162C81: mm_device_create_modem (mm-device.c:481)
  ==225333==    by 0x15DE60: device_support_check_ready (mm-base-manager.c:218)
  ==225333==    by 0x4EA8173: ??? (in /usr/lib/libgio-2.0.so.0.6600.7)
  ==225333==    by 0x4EAC6E8: ??? (in /usr/lib/libgio-2.0.so.0.6600.7)
  ==225333==    by 0x16730F: device_context_run_ready (mm-plugin-manager.c:1533)
  ==225333==    by 0x4EA8173: ??? (in /usr/lib/libgio-2.0.so.0.6600.7)
2021-03-18 14:27:34 +01:00
Balázs Úr
bf3065cdaa po: update Hungarian translation 2021-03-18 00:56:27 +00:00
Aleksander Morgado
3e58fbe547 base-bearer: ignore forced disconnections
If using PPP, ModemManager is never in charge of deciding when the
connection is finished, because that would end up making ModemManager
try to use the TTY port while pppd is still using it.

When the modem goes unregistered for some time, we should not force
the disconnection of the bearer object, we still need to wait for pppd
to tell us the modem is disconnected.

Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/331
2021-03-17 09:19:17 +00:00
Aleksander Morgado
952f416577 bearer-mbim: if no explicit 'multiplex' setting, treat as 'requested' 2021-03-17 09:39:10 +01:00
Aleksander Morgado
8f3df02ba1 broadband-modem-mbim: report up to 256 multiplexed bearers
As defined in the MBIM protocol (session id 0 to 255).
2021-03-17 09:39:10 +01:00
Aleksander Morgado
2d374b1c41 bearer-mbim: implement multiplex support 2021-03-17 09:39:10 +01:00
Aleksander Morgado
32c4b20066 port-mbim: implement new link setup/cleanup methods
These are really wrappers around the MbimDevice methods, only making
sure the MMPortMbim is open before they're used.
2021-03-17 09:39:10 +01:00
Aleksander Morgado
e5305498b7 bearer-mbim: session id 0 by default in all non-multiplexed connections
The original logic in the MBIM modem would assume that if we had more
than one network interface in the same modem, we could connect
multiple data interfaces, each one with a different session. That
logic is actually wrong, when using the master (non-multiplexed)
network interface we should always use session id 0, which is the one
holding all non-VLAN-tagged traffic.

So, remove the logic that automatically creates new bearers with a
different session id, as that is really wrong.
2021-03-17 09:39:10 +01:00
Aleksander Morgado
0830f9510c bearer-mbim: refactor and switch to autoptr
Also, keep track of the MMPortMbim instead of the MbimDevice directly,
because the new multiplex support will require operations on the port
as well, not only on the device.
2021-03-17 09:39:10 +01:00
Aleksander Morgado
1fa8ce3f08 broadband-modem-mbim: reset all net ports during initialization
We want to start with the data ports as clean as possible when the
modem is initialized, so we make sure the master interface is down and
that all links found are removed. This ensures a clean restart if
e.g. the daemon crashes for some other reason.
2021-03-17 09:39:10 +01:00