aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-05-26broadband-modem: fail synchronization if no modem exported in DBusAleksander Morgado
2021-05-26iface-modem: synchronize state when resumingDylan Van Assche
Refresh signal strength and access technologies, check for SIM swaps, and check if the SIM is locked. The modem may have switched to a different access technologies or have a different signal strength when resuming. Moreover, the user may swap or remove the SIM when suspended.
2021-05-26broadband-modem: skip 3GPP interface sync if no 3GPP supportAleksander Morgado
2021-05-26broadband-modem: fix type in the ready() for iface_modem_3gpp_sync()Aleksander Morgado
When calling an async method ona given type, the convention is to use the same type in the corresponding ready() method, so that we can use it without additional casts on the finish().
2021-05-26iface-modem-3gpp: ignore cancellation during sync()Aleksander Morgado
There is no input cancellable in the method, so the GTask will never get cancelled from the outside.
2021-05-26iface-modem-3gpp: remove redundant log messageAleksander Morgado
It doesn't give us any valuable information, so just remove it.
2021-05-26iface-modem-3gpp: fix double GError free on registration sync failureAleksander Morgado
2021-05-26iface-modem-3gpp: use g_autoptr() for the MMBearerProperties during syncAleksander Morgado
2021-05-26iface-modem-3gpp: synchronize state when resumingDylan Van Assche
On resume, refresh the EPS bearers and 3GPP registration as the registration and bearers may expired during suspend.
2021-05-26iface-modem-time: ignore cancellation during sync()Aleksander Morgado
There is no input cancellable in the method, so the GTask will never get cancelled from the outside.
2021-05-26broadband-modem: skip time interface sync if no time supportAleksander Morgado
2021-05-26iface-modem-time: synchronize state when resumingDylan Van Assche
On resume, fetch the current network time as the network time may be changed when suspended.
2021-05-26broadband-modem: skip synchronization after resume if not neededAleksander Morgado
The synchronization after resume should only be needed on enabled modems, as otherwise there is really no chance that the state of the modem may have changed during suspend. E.g. if a modem is failed because it doesn't have a SIM card, or if the SIM-PIN is locked, or if the modem has never been enabled, there is no point in attempting to synchronize the runtime state of the modem.
2021-05-26broadband-modem: ignore cancellation during sync()Aleksander Morgado
There is no input cancellable in the method, so the GTask will never get cancelled from the outside.
2021-05-26base-modem: make sync() available only if suspend-resume enabledAleksander Morgado
2021-05-26base-modem: don't fail if sync() isn't implementedAleksander Morgado
2021-05-26base-modem: fix modem_sync() operation handlingAleksander Morgado
The mm_base_modem_sync() method is an asynchronous method that receives a callback and user data, and therefore we MUST always complete the async method calling that callback. Set that up with a GTask as usual. Also, the mm_base_modem_sync_finish() method should be implemented along with mm_base_modem_sync(), not in the source file of the caller of the async method. The finish() always depends on how the async method was implemented, in our case using a GTask.
2021-05-26base-manager: avoid using the `mm_` prefix for static private methodsAleksander Morgado
2021-05-26base-manager: don't assume a MMDevice always holds a MMModemAleksander Morgado
There are cases, e.g. during modem object disposal, where this is not true.
2021-05-26base-manager: make sure g_autoptr() variables are initialized to NULLAleksander Morgado
Otherwise, we may have memory issues if the variable isn't initialized and the method exits.
2021-05-26base-manager: add quick suspend/resume baseDylan Van Assche
Quick suspend/resume infrastructure for synchronizing the interfaces when resuming.
2021-05-26base-manager: ensure all GUdevDevices have subsystem and name setAleksander Morgado
Under certain rare conditions (e.g. race between querying devices of a given subsystem and the kernel tearing those devices down), the subsystem reported for a GUdevDevice seems to be NULL. So, ensure both subsystem and name are set on the GUdevDevice before we process them. The issue has been observed on GUdevDevices listed by g_udev_client_query_by_subsystem(), not on the ones asynchronously reported via uevents, but we add the validity check on both places for consistency. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/343
2021-05-26quectel: the generic AT based modem supports SIM hot swapAleksander Morgado
2021-05-26broadband-modem-qmi: assume all QMI based modems support SIM hot swapAleksander Morgado
As we have a generic SIM hot swap implementation in the QMI broadband modem object.
2021-05-26ci: build with artifacts only in master and tagsAleksander Morgado
2021-05-26ci: don't trigger build on branches or pushesAleksander Morgado
We rely on merge requests to merge new changes, so let's free a bit the number of pipelines we launch, and avoid doing it on every branch update.
2021-05-24broadband-modem: check if skeleton exists when creating device idAleksander Morgado
The logic that creates the device identifier uses some fields that are exposed in DBus (e.g. model, manufacturer...). We should not attempt to load any of that info if the DBus skeleton for the Modem interface is no longer available, as e.g. the device may have gone away already. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/374
2021-05-24broadband-modem: trivial coding style fixAleksander Morgado
2021-05-23mm-iface-modem: fix typo in step functionDylan Van Assche
2021-05-22iface-modem-3gpp: skip initialization in LOCKED stateMichal Mazur
2021-05-22broadband-modem: allow 3GPP initialization before fallbackMichal Mazur
To enable call to disable-facility-lock in LOCKED state, 3gpp interface needs to be initialized before going to fallback step.
2021-05-22modem-qmi: detect personalization locks in LOCKED stateMichal Mazur
2021-05-22base-sim: ignore personalization locks after SIM unlockMichal Mazur
2021-05-23docs,libmm-glib: add missing reference for DisableFacilityLock() supportAleksander Morgado
2021-05-23docs,libmm-glib: add missing non-API methods to Private sectionsAleksander Morgado
2021-05-23bearer-mbim: network error 0 is actually a valid error (unknown)Aleksander Morgado
2021-05-23broadband-modem-mbim: detailed connection error on disconnection reportsAleksander Morgado
When we receive an indication reporting a network-initiated disconnection, convert the MBIM network error into a MMMobileEquipmentError, and publish it in the new 'ConnectionError' property.
2021-05-23bearer-qmi: detailed connection error on disconnection reportsAleksander Morgado
When we receive an indication reporting a network-initiated disconnection, convert the QMI call end reason into a MMMobileEquipmentError, and publish it in the new 'ConnectionError' property.
2021-05-23base-bearer: never overwrite a connection error that is already setAleksander Morgado
2021-05-23base-bearer: limit the type of errors we can set as 'ConnectionError'Aleksander Morgado
2021-05-23base-bearer: clear connection error on every new attemptAleksander Morgado
2021-05-23base-bearer: report connection error on network initiated disconnectionsAleksander Morgado
By default, fallback to "unknown" mobile equipment error when the modem gets disconnected by the network and we don't have any way to know a more detailed reason.
2021-05-23base-bearer: report connection error on failed connection attemptsAleksander Morgado
When a user-requested connection attempt fails, we not only return the connection error to the user that requested it, we also publish the specific connection error in DBus for others to check why the failure happened.
2021-05-23api,bearer: new 'ConnectionError' propertyAleksander Morgado
This new property will provide detailed information about the failed connection attempt, or about the network initiated disconnection. The property will be cleared only if a new connection attempt is triggered, and so it can be used to investigate why a given attempt failed without needing to be the one who triggered the attempt (e.g. so that failures in NetworkManager-triggered connection attempts can be investigated looking at the DBus API). The property is built as a (ss) tuple, but the libmm-glib interface provides methods to read this property as a GError.
2021-05-22libmm-glib: setup common helper to register DBus errorsAleksander Morgado
2021-05-22api,errors: document all DBus error name prefixesAleksander Morgado
Since ModemManager 1.0 we were publishing symbols to identify all the possible DBus error name prefixes, but these were never documented, they were explicitly ignored in gtk-doc. Let's provide proper documentation for them and make them first-class API symbols.
2021-05-22docs,api: add index for 1.14Aleksander Morgado
Some of the newly deprecated enum values were introduced in 1.14.
2021-05-22bearer-qmi: rework connection failure error reportingAleksander Morgado
On a failed QMI modem connection, we won't return the generic "CallFailed" error, we'll try to convert the 3GPP verbose call end reason to a MMMobileEquipmentError. And if we cannot find a mapping, or if the reported error is not a 3GPP verbose call end reason, we'll return a Unknown MMMobileEquipmentError with a string message providing detailed error information.
2021-05-22modem-helpers-mbim: rework nw error code mappingAleksander Morgado
Instead of having a switch with a lot of cases, provide a one to one mapping for the MbimNwError and MMMobileEquipmentError codes in an array, and make use of the mm_mobile_equipment_error_for_code() helper to build the actual GError.
2021-05-22api: update MMMobileEquipmentError enum valuesAleksander Morgado
Update the list of mobile equipment error codes according to v17.1.0 of 3GPP TS 27.007 (March 2021). A lot of the enum values that were prefixed with the 'GPRS_' keyword have now been flagged as deprecated, and a new enum name given to the corresponding value. The deprecated symbol names are kept in the compat support to avoid breaking API/ABI.