The device always reports empty TX/RX values so there is no point in
periodically asking.
The logic to poll for stats is kept in place only if the device
requires the IP packet filters removal hack.
MMBroadbandModemQmi only disables signal polling once it successfully
sets the indication up. To do that, it sets the properties on
MMIfaceModem. This, however, doesn't actually disable polling, as the
property values are only checked once in get_private when Private
structure hasn't been created yet. Once that happens, only the cached
values are ever checked, and there's nothing that would update them.
Since there's only one place where these properties are checked, get
rid of cached bools in Private structure and instead read the property
values directly in periodic_signal_check_step, letting QMI modems
actually disable polling at runtime.
Fibocom L850 modems report an invalid part index (always 1) in the
response message. Because we know which message part was requested,
we can use that value instead to workaround this bug.
Not quite correct -- with the patch applied, the newly allocated GError
could potentially overwrite inner_error that was set previously.
This reverts commit d550a24ffdae4492e9f9e18fdf294adcda28fb65.
Fibocom's MBIM support needs this:
mm-port-mbim-fibocom.c: In function ‘iface_port_at_check_support’:
mm-port-mbim-fibocom.c:64:66: error: ‘MBIM_SERVICE_FIBOCOM’ undeclared (first use in this function); did you mean ‘MBIM_SERVICE_GOOGLE’?
64 | if (!mm_port_mbim_supports_command (MM_PORT_MBIM (self), MBIM_SERVICE_FIBOCOM, MBIM_CID_FIBOCOM_AT_COMMAND)) {
| ^~~~~~~~~~~~~~~~~~~~
| MBIM_SERVICE_GOOGLE
mm-port-mbim-fibocom.c:64:66: note: each undeclared identifier is reported only once for each function it appears in
mm-port-mbim-fibocom.c:64:88: error: ‘MBIM_CID_FIBOCOM_AT_COMMAND’ undeclared (first use in this function)
64 | if (!mm_port_mbim_supports_command (MM_PORT_MBIM (self), MBIM_SERVICE_FIBOCOM, MBIM_CID_FIBOCOM_AT_COMMAND)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
Fixes: c66a6b89ec ('fibocom: create custom MBIM port object with potential AT support')
GCC 14 is unhappy. Not sure why does this matter, maybe it just does
not. Let's silence the warning at the very least:
libqcdm/src/result.c: In function ‘val_new_string’:
libqcdm/src/result.c:76:25: warning: ‘calloc’ sizes specified with
‘sizeof’ in the earlier argument and not in the later argument
[-Wcalloc-transposed-args]
76 | v = calloc (sizeof (Val), 1);
| ^~~
When a modem is not able to register to the network, MBIM and QMI indications
related to registration reports network rejection cause codes if request is
rejected by the network. This information is currently logged in the ModemManager
but not exposed outside of ModemManager.
These are the changes to define interface to expose network reject cause codes
over d-bus to the above layers which could be used by above layers to present
this information in a user friendly way.
If CID parsing from the +CGDCONT response fails, the very last PDP
structure allocated is not put on the list yet and therefore
mm_3gpp_pdp_context_list_free() wouldn't free it.
Let's put it on the list first, as to not leak it on error.