aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-08-19cli,output: plug leak of OutputItemListItem itemsAleksander Morgado
2022-08-20mm-shared-qmi: Fix current modesAkash Aggarwal
Modem reports 2G+3G+4G+5G current modes, while 2G is not supported. Consider device capabilities in deciding current modes.
2022-08-19libmm-glib,sms: simplify 'data' property retrieval logicAleksander Morgado
2022-08-19sim-qmi: implement loading GID1 and GID2Aleksander Morgado
2022-08-19sim-qmi: define common SIM file paths for MF and ADFAleksander Morgado
2022-08-19base-sim: add steps to load GID1 and GID2 during initAleksander Morgado
2022-08-19cli,sim: print GID1 and GID2 fields if availableAleksander Morgado
2022-08-19cli,sms: minor alignment fixAleksander Morgado
2022-08-19libmm-glib,sim: add support to get GID1 and GID2 fieldsAleksander Morgado
2022-08-19libmm-glib,sim: add missing separators in source codeAleksander Morgado
2022-08-19api,introspection: add Gid1 and Gid2 properties in SIM interfaceAleksander Morgado
2022-08-18mm-bearer-qmi: allocate separate WDS client for each endpointStephan Gerhold
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.
2022-08-18broadband-modem-qmi: choose endpoint number based on data portStephan Gerhold
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.
2022-08-18broadband-modem-qmi: add missing error check for MHIStephan Gerhold
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.
2022-08-18broadband-modem-qmi: split up peek_port_qmi_for_data()Stephan Gerhold
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.
2022-08-18qcom-soc: simplify QMI port lookup for BAM-DMUXStephan Gerhold
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.
2022-08-18bearer-qmi: Add fallback for firmware with broken "Bind Data Port"Stephan Gerhold
"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.
2022-08-18port-qmi: Detect endpoint type based on net driverStephan Gerhold
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).
2022-08-17dispatcher-fcc-unlock: remove unused variableAleksander Morgado
mm-dispatcher-fcc-unlock.c:100:27: warning: unused variable 'error' [-Wunused-variable] g_autoptr(GError) error = NULL; ^
2022-08-17broadband-modem-mbim: remove unused variablesAleksander Morgado
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; ^
2022-08-17broadband-modem: remove unused variableAleksander Morgado
mm-broadband-modem.c:10703:23: warning: unused variable 'cmd' [-Wunused-variable] g_autofree gchar *cmd = NULL; ^
2022-08-16broadband-modem-mbim: remove context type comparison on disconnection reportsAleksander Morgado
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
2022-08-16api,enums: added NGRAN-13 and NGRAN-26 bands.Aleksander Morgado
2022-08-15broadband-modem-mbim: fix typo 'proccessed'->'processed'Aleksander Morgado
2022-08-11bearer-mbim: enable multiplex support for wwan devicesDaniele Palmas
2022-08-09libmm-glib,profile-manager: fix memory leaks when listing connection profilesLouis-Alexis Eyraud
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>
2022-08-09sleep-monitor-powerd: remove unused variablesAleksander Morgado
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; | ^~~~~
2022-08-09build,autotools: print powerd suspend/resume status in configure outputAleksander Morgado
2022-08-09ci: fix systemd suspend-resume enabling in default testAleksander Morgado
2022-08-09ci: new test to build with powerd suspend-resume supportAleksander Morgado
2022-08-09ci: new test to build without suspend-resume supportAleksander Morgado
2022-08-09ci: remove check for WITH_NEWEST_QMI_COMMANDSAleksander Morgado
The newest QMI commands are already builtin the default compilation of ModemManager.
2022-08-09ci: move no-tests check before the default onesAleksander Morgado
2022-08-09mm-sim-mbim: Fix compile failure if WITH_SUSPEND_RESUME is not setPavan Holla
Fixes 86f6d3351351f7143a7f1c5fb90ddb465089ac69
2022-08-05core, log: make libraries logging use the MM level and formatAleksander Morgado
The log level of the libraries was not honoring the log level configured in MM, so we would see debug messages reported even if the default log level configured was INFO or MSG. The format of the logs emitted by the libraries was also not following the format of the rest of MM logs, e.g. they would not include timing info in the logs which would make it hard to follow certain event transitions. Make the libraries logging use the ModemManager logging method, to fix all those issues.
2022-08-05core,log: minor coding style changesAleksander Morgado
2022-08-04broadband-modem-mbim: SIM slots ptr array should have GDestroyNotifyAleksander Morgado
The SIM slots ptr array should have a proper GDestroyNotify, so that whenever the array is unref-ed as part of the modem disposal logic, the SIM objects (and the modem object references they keep) are also unref-ed. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/571
2022-08-04shared-qmi: minor rework SetPacketServiceState()Aleksander Morgado
Port to using g_autoptr() so that we avoid the gotos.
2022-08-04iface-modem-3gpp: update packet service state in the interfaceAleksander Morgado
The skeleton property will be update automatically as they're bound.
2022-08-04iface-modem-simple: wait for packet service state is 3GPP specificAleksander Morgado
2022-08-04broadband-modem-qmi: force IDLE state if PS registered but DSD RAT unavailableAleksander Morgado
We provide a consolidated method to update the PS/EPS/5GS registration states, based on the actual state reported via NAS and the availabiity or not of the DSD data RAT. On this consolidated method, we now force the IDLE state for every case where it would have been HOME/ROAMING if the data RAT reported via the DSD service is unknown. This includes not only transitions into the HOME/ROAMING state, but also transitions to unknown data RAT.
2022-08-04iface-modem-simple: wait for packet service 'attach' state in ConnectionStepAkash Aggarwal
2022-08-04broadband-modem-qmi,mm-shared-qmi: implement support for ↵Akash Aggarwal
'SetPacketServiceState()'
2022-08-04broadband-modem-qmi: Move to "registered" state based on DSD System Status ↵Akash Aggarwal
for PS domain "registered" state should not wholly depend on the PS/EPS/5GS domain state reported by NAS. It should listen to DSD system status for availabilty of data network at modem before moving to 'registered' state".
2022-08-04broadband-modem: SIM swap check should consider errors loading as no SIMAleksander Morgado
A failure loading IMSI or ICCID (unless for the UNSUPPORTED case) could be an indication that there is no SIM. Ideally, the logic checking if a SIM swap happened should have checked first if there is a SIM card in the slot, and only if there is one go on to try to load IMSI or ICCID.
2022-08-01sim-mbim: clear cached subscriber info on modem sync requestAleksander Morgado
2022-08-01broadband-modem: notify when a sync is needed after a suspend/resumeAleksander Morgado
Modem/SIM implementations that keep cached info that is not supposed to change during runtime of a modem may need to be notified about when a suspend/resume has happened, so that they can clear and reload the internally cached data.
2022-07-29iface-modem: reordering of ready methods in sync()Aleksander Morgado
2022-07-29broadband-modem: quick sync the Modem interface also if disabledAleksander Morgado
If the modem was in disabled state, we still want to sync the Modem interface, among other things to make sure no SIM event happened during the system suspension. Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/605
2022-07-27po: add Georgian translationNorwayFun