aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2023-09-11iface-modem: ensure error is set when UNKNOWN returned in modem state waitAleksander Morgado
2023-09-11iface-modem-3gpp: ignore UNKNOWN ps state explicitly during wait operationAleksander Morgado
2023-09-11iface-modem: ignore UNKNOWN modem state explicitly during wait operationAleksander Morgado
2023-09-08quectel: add Sahara udev tag to EM061K-GL modemsQuectelDuke
Signed-off-by: QuectelDuke <duke.xin@quectel.com>
2023-08-30mm-sms-part-3gpp: avoid buffer overflow if packed data is too largeEric Caruso
With GSM7 encoding, packedlen is the length of the unpacked string after expanding septets to octets so it will be ~14% bigger than the original string length. This means we have to be careful not to copy too much data into the PDU buffer. Similar issues exist in other branches of the same function. Thanks rhezashan@gmail.com for the report.
2023-08-14quectel: add support for EM060K-GL usb modulesQuectelDuke
Signed-off-by: QuectelDuke <duke.xin@quectel.com>
2023-08-07port-qmi: add QMAP support to mhi_net based setupsDaniele Palmas
2023-08-07port-qmi: restore driver initial MTU for mhi-net when resetting linkDaniele Palmas
Kernel driver mhi-net sets a custom MTU for the netdevice: use the same value when resetting the netdevice to its initial state. This is important especially when rmnet is used on top of mhi-net, since rmnet netdevices get their initial MTU from the mhi-net one.
2023-08-05fibocom: disable multiplexing support in NL668Aleksander Morgado
The NL668 doesn't seem to support multiplexing, as it fails to transfer data even in the one multiplexed PDN case.
2023-08-04bearer-mbim: simplify the logic to require static IPv6 addressingAleksander Morgado
Rely exclusively on whether a global IPv6 was given or not, regardless of what the DNS or gateway settings are, same as we do for IPv4. Also, assume we only get 1 single IPv6 address. No need to have a FIXME to add support for more addresses.
2023-07-28plugin-manager: increase probing timeoutsAleksander Morgado
This will make device probing slower unconditionally, but it should also ensure newer more complex devices that take longer to boot are handled properly.
2023-07-17port-qmi: set qmi_wwan requested dl dap max size to 16384 for rmnetDaniele Palmas
The current requested downlink data aggregation protocol maximum size is set to 32768, but this is not accordingly set as the MTU of the main qmi_wwan interface, that is instead set to RMNET_MAX_PACKET_SIZE that is 16384. So, the modem is able to send QMAP aggregated blocks larger than 16384, but the driver is not able to properly collect them, since the URB size is 16384. It is not simply possible to set qmi_wwan main interface MTU to the returned dl max aggregated size, since when creating the rmnet netdevice the rmnet kernel module automatically set the mtu as the size of the parent netdevice MTU - the qmap header size (4), but this won't work because the rmnet kernel module does not support MTU > 16384. As an immediate fix, set the requested dl dap max size to 16384, while thinking about how to refactor the logic for supporting higher values. qmi_wwan inbox qmap management is not affected by this issue.
2023-07-17port-qmi: fix rmnet setup when QMAP is configured in the modem at MM startupDaniele Palmas
It could happen that when MM starts the aggregation protocol is already configured on the modem side (e.g. if MM is stopped and restarted): this prevents the links to be properly configured, resulting in using the qmimux multiplex implementation even if rmnet is available. Fix the issue by always performing the first time the links reset procedure, even if the data format on the modem side is the expected one.
2023-07-17port-qmi: fix rmnet checksum flag with qmi_wwanDaniele Palmas
When using QMAPv5 and QMAPv4 the checksum is enabled by default at the modem level, so it should be also enabled when creating the rmnet netdevices: add the required flags also when rmnet is used through qmi_wwan.
2023-07-14broadband-modem-mbim: only update bearer speeds if connectedAleksander Morgado
We should not update speeds on already disconnected bearers.
2023-07-14broadband-modem-mbim: reset packet service state if unregisteredAleksander Morgado
2023-07-14broadband-modem-mbim: propagate packet service state to 3GPP iface ↵Aleksander Morgado
unconditionally
2023-07-13huawei: don't add DST to TZ offsetokaestne
DST is already included in TZ offset. Adjust tests accordingly.
2023-07-13huawei: check ^NWTIME not ^NTCT for time supportokaestne
^NTCT seems to be used to enable or disable ^NWTIME messages.
2023-07-13quectel: fix debug output if QGPS isn't supportedAndrey Skvortsov
FEATURE_NOT_SUPPORTED is equal 1 in the enum FeatureSupport, as a result even if QGPS isn't supported by modem debug message printed available support.
2023-07-12port-qmi: fix qmi_device_list_links usageDaniele Palmas
qmi_device_list_links can return TRUE, but with a NULL value for the links list: check for validity before using the list.
2023-07-07quectel: avoid assuming modem is MBIM capable in shared utilsAleksander Morgado
(ModemManager:10426): GLib-GObject-WARNING **: 09:44:23.142: invalid cast from 'MMBroadbandModemQmiQuectel' to 'MMBroadbandModemMbim' ** ERROR:../git/src/mm-broadband-modem-mbim.c:284:mm_broadband_modem_mbim_peek_port_mbim: assertion failed: (MM_IS_BROADBAND_MODEM_MBIM (self)) Bail out! ERROR:../git/src/mm-broadband-modem-mbim.c:284:mm_broadband_modem_mbim_peek_port_mbim: assertion failed: (MM_IS_BROADBAND_MODEM_MBIM (self)) See https://lists.freedesktop.org/archives/modemmanager-devel/2023-July/009729.html
2023-06-24fibocom: allow qmi over mbimdiekleinekuh
2023-06-23shared-qmi: fix memory leak in set_supl_server commandAndrey Skvortsov
ctx->supl is allocated in mm_shared_qmi_location_set_supl_server using g_strdup. g_strdup requires to free string when unneeded. The problem could be reproduced using following commands ``` while true; do mmcli -m any --location-set-supl-server="supl.google.com:7276"; mem=$(cat /proc/$(pgrep ModemManager)/statm | awk '{print $6}') echo $(date +"%s"), $mem | tee -a mm-leak.log; done; ```
2023-06-16fibocom: limit multiplexing in NL668 to one single PDNAleksander Morgado
NL668 doesn't correctly support more than one multiplexed PDN connection. Limit this explicitly so that it never attempts to use more than one. # mmcli -m a --simple-connect="multiplex=requested,apn=internet,ip-type=ipv4v6,apn-type=default" successfully connected the modem # mmcli -m a --simple-connect="multiplex=requested,apn=internet2,ip-type=ipv4v6,apn-type=default" error: couldn't connect the modem: 'GDBus.Error:org.freedesktop.ModemManager1.Error.Core.Unsupported: Invalid bearer properties: Maximum number of multiplexed bearers reached'
2023-06-16broadband-modem-qmi|mbim: allow limiting multiplexed links with udev tagsAleksander Morgado
Certain QMI or MBIM devices may not be able to support multiplexing at all, or they may support a limited amount of links. The new ID_MM_MAX_MULTIPLEXED_LINKS udev tag allows specifying the maximum number of supported multiplexed links; e.g. 0 to report none supported or 1 to report that one single multiplexed link is supported.
2023-06-14iface-modem: sim swap check always refers to the active SIMAleksander Morgado
Since 503e886c02 the events on inactive SIMs don't trigger a full modem reprobe, and the slot index check is fully unused.
2023-06-14iface-modem: ignore sim swap check if not implementedAleksander Morgado
Explicitly return TRUE to indicate success because otherwise the caller will expect a valid GError set.
2023-06-08api: new carrier lock supportUjjwal Pande
Adding support for carrier lock for MBIM modems using google simlock mechanism.
2023-05-25iface-modem-3gpp: cleanup packet service state on disablingAleksander Morgado
Otherwise the state cached by the protocol implementation will be different to the one exposed in the 3GPP interface.
2023-05-25broadband-modem-mbim: common process for register state messagesAleksander Morgado
Both the register state indications and the register state set response messages will be processed in the same way. This ensures that the registration state reported during the set response, along with the additional info provided in that message (e.g. access technologies) are taken into account. This change also avoids fully relying on the register state indications sent by the modem, as the indication may not be sent after a successful update operation (given that the operation response already contains the last valid state).
2023-05-25broadband-modem-mbim: run explicit packet service queryAleksander Morgado
When running the 3GPP registration checks (e.g. after reaching enabled state, or when synchronizing state after a quick suspend/resume), we also update the current packet service state explicitly, without needing to fully rely on the indications.
2023-05-24broadband-modem-mbim: common process for packet service messagesAleksander Morgado
Both the packet service indications and the packet service set response messages will be processed in the same way. This ensures that the packet service state reported during the set response, along with the additional info provided in that message (e.g. speeds) are taken into account. This change also avoids fully relying on the packet service indications sent by the modem, as the indication may not be sent after a successful update operation (given that the operation response already contains the last valid state).
2023-05-22mm-modem-helpers-ublox: added support for ublox LARA-R6001 / LARA-R6001D modulesKristian Sloth Lauszus
2023-05-18charsets: fix read of uninitialized memory in gsm unpacked conversionAleksander Morgado
==1==WARNING: MemorySanitizer: use-of-uninitialized-value #0 0x59c6c88a31ef in gsm_ext_char_to_utf8 src/mm-charsets.c:256:13 #1 0x59c6c88a31ef in charset_gsm_unpacked_to_utf8 src/mm-charsets.c:339:20 #2 0x59c6c88a31ef in mm_modem_charset_bytearray_to_utf8 src/mm-charsets.c:857:30 #3 0x59c6c889babd in sms_decode_address src/mm-sms-part-3gpp.c:143:16 #4 0x59c6c8899d3a in mm_sms_part_3gpp_new_from_binary_pdu src/mm-sms-part-3gpp.c:514:15
2023-05-17broadband-modem: plug leak processing SIM loading stepsAleksander Morgado
==6971== 52 (16 direct, 36 indirect) bytes in 1 blocks are definitely lost in loss record 3,764 of 6,140 ==6971== at 0x4842839: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so) ==6971== by 0x4A1ADE8: g_malloc (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6800.1) ==6971== by 0x4A31FF1: g_slice_alloc (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6800.1) ==6971== by 0x4A3266D: g_slice_alloc0 (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6800.1) ==6971== by 0x49FD397: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6800.1) ==6971== by 0x49FD8B4: g_error_new_valist (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6800.1) ==6971== by 0x49FDACE: g_set_error (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.6800.1) ==6971== by 0x187A4C: mm_base_modem_peek_best_at_port (mm-base-modem.c:1129) ==6971== by 0x184116: _at_command (mm-base-modem-at.c:634) ==6971== by 0x1841FE: mm_base_modem_at_command (mm-base-modem-at.c:660) ==6971== by 0x18F6F1: load_sim_identifier (mm-base-sim.c:2016) ==6971== by 0x18CA03: mm_base_sim_load_sim_identifier (mm-base-sim.c:820)
2023-05-17modem-helpers-mbim: allow optional outputs in mm_signal_from_mbim_signal_state()Nagi Marupaka
Fixes 470dff235c70683928ab0eb39c64151a8a4ceb7c
2023-05-12broadband-modem-mbim: account for race condition in quick hot swap caseNagi Marupaka
On MBIM modems, when the SIM is ejected and re-inserted in a quick manner, the state machine logic encounters a race condition and eventually, the modem response for subscriber status is ignored. This change accounts for that state transition without erroring out. Fixes #672.
2023-05-12mm-broadband-modem-mbim: fix log prints in certain notificationsNagi Marupaka
2023-05-11mm-iface-modem: increase the SIM retries to 7Nagi Marupaka
In some cases modem is taking 7 tries to detect an initialized SIM.
2023-05-11broadband-modem-mbim: use MBIMEx v2 signal loading explicitly if supportedAleksander Morgado
2023-05-11iface-modem-signal: launch explicit signal query after setting up thresholdsAleksander Morgado
2023-05-11broadband-modem-mbim: non-zero interval when enabling thresholdsAleksander Morgado
Fix bug in Fibocom FM350 modem where a non-zero signal strength interval needs to be configured as part of threshold setup. Fixes #733
2023-05-11sierra: port type hints for RC7611Aleksander Morgado
2023-05-10Revert "iface-modem-signal: send a query after threshold set up"Aleksander Morgado
This reverts commit 17ed63637fea7ab7238880ec5eb75df910355dd2. We were reusing the signal_state_query_ready() callback in the wrong way.
2023-05-10iface-modem-signal: send a query after threshold set upNagi Marupaka
After the setup of threshold for signal state notifications, trigger a query of the current signal state values.
2023-05-10broadband-modem-qmi: enable/disable messaging AT unsolicited events tooSebastian Krzyszkowiak
When the host is resuming from system suspend, QMI indications sent by the modem at resume time can be lost. The exact reason why it happens is still unknown. Until this is fixed, ModemManager currently workarounds that in QMI mode by listening and reacting to AT URCs too, which are being received reliably. In order to achieve that, messaging_setup_unsolicited_events chains the parent's implementation with its own, effectively setting up handlers for both AT and QMI channels. This worked fine on modems such as EG25 which enable SMS indications by default. However, some modems, such as BM818, don't have these indications enabled on boot and don't report incoming messages via AT unless requested via AT+CNMI. To make SMS handling on resume reliable on such modems, make sure that MMBroadbandModemQmi also enables/disables unsolicited events in the same way it already sets up handlers for them. Signed-off-by: Sebastian Krzyszkowiak <dos@dosowisko.net>
2023-05-03shared-qmi: don't assume cancellation signal handler is setup in the ↵Aleksander Morgado
registration wait The cancellation_id will not be set if the cancellable is already cancelled by the time g_cancellable_connect() is called.
2023-05-03shared-qmi: ensure cancellation is setup last in the registration waitAleksander Morgado
register_in_network_cancelled() may be called early if the given cancellable is already cancelled, and if so, we want it to remove the timeout and signal handler, which should have been configured before setting up the cancellation signal handler.
2023-05-03broadband-modem-mbim: group together all runtime state while enabled in its ↵Aleksander Morgado
own struct