Age | Commit message (Collapse) | Author |
|
|
|
|
|
New devices return a "Missing Argument" error in WDA Get Data Format,
requiring the use of the "Endpoint info" TLV. Given that all these new
devices are raw-ip only anyway, let's use this error to right away
fallback to require raw-ip in the interface.
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/177
|
|
mm-port-qmi.c:353:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
353 | ctx->step++;
| ~~~~~~~~~^~
mm-port-qmi.c:356:5: note: here
356 | case PORT_OPEN_STEP_CHECK_OPENING:
| ^~~~
mm-port-qmi.c:366:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
366 | ctx->step++;
| ~~~~~~~~~^~
mm-port-qmi.c:369:5: note: here
369 | case PORT_OPEN_STEP_CHECK_ALREADY_OPEN:
| ^~~~
mm-port-qmi.c:376:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
376 | ctx->step++;
| ~~~~~~~~~^~
mm-port-qmi.c:379:5: note: here
379 | case PORT_OPEN_STEP_DEVICE_NEW: {
| ^~~~
mm-port-qmi.c:424:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
424 | ctx->step++;
| ~~~~~~~~~^~
mm-port-qmi.c:427:5: note: here
427 | case PORT_OPEN_STEP_ALLOCATE_WDA_CLIENT:
| ^~~~
mm-port-qmi.c:474:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
474 | ctx->step++;
| ~~~~~~~~~^~
mm-port-qmi.c:477:5: note: here
477 | case PORT_OPEN_STEP_SET_KERNEL_DATA_FORMAT:
| ^~~~
|
|
mm-port-qmi.c: In function ‘port_open_step’:
mm-port-qmi.c:350:5: error: switch missing default case [-Werror=switch-default]
350 | switch (ctx->step) {
| ^~~~~~
|
|
To be in sync with the qmi_device_close_async() underlying method,
given that the synchronous one is deprecated.
|
|
The qmi_device_close() synchronous operation is deprecated.
|
|
Telit modems LM940/960 need more time for becoming responsive
to qmi requests after device appearance.
|
|
This allows us to reprobe the modem and respawn the
qmi-proxy in case it dies on us. This gets us access
to the modem and unsolicited notifications again. Do
this by connecting to the device-removed signal on
QmiDevice.
---
Rebased on top of git master by
Aleksander Morgado <aleksander@aleksander.es>
|
|
The internal QmiDevice will be gone when the port is closed, so we
cannot really do anything.
This avoid an issue happening when the modem goes away in the middle
of the client allocation logic performed by MMBroadbandModemQmi:
ModemManager[24820]: <debug> [1507279407.225777] Couldn't allocate client for service 'wms': Couldn't create client for service 'wms': CID allocation failed in the CTL client: Transaction timed out
ModemManager[24820]: qmi_device_allocate_client: assertion 'QMI_IS_DEVICE (self)' failed
==24820==
==24820== Process terminating with default action of signal 5 (SIGTRAP): dumping core
==24820== at 0x66E3411: ??? (in /usr/lib/libglib-2.0.so.0.5200.3)
==24820== by 0x66E46FA: g_logv (in /usr/lib/libglib-2.0.so.0.5200.3)
==24820== by 0x66E484E: g_log (in /usr/lib/libglib-2.0.so.0.5200.3)
==24820== by 0x538E259: qmi_device_allocate_client (qmi-device.c:1008)
==24820== by 0x1F5690: mm_port_qmi_allocate_client (mm-port-qmi.c:157)
==24820== by 0x1D20BA: allocate_next_client (mm-broadband-modem-qmi.c:11319)
==24820== by 0x1D2027: qmi_port_allocate_client_ready (mm-broadband-modem-qmi.c:11306)
==24820== by 0x612FD52: ??? (in /usr/lib/libgio-2.0.so.0.5200.3)
==24820== by 0x6130775: ??? (in /usr/lib/libgio-2.0.so.0.5200.3)
==24820== by 0x1F54E8: allocate_client_ready (mm-port-qmi.c:113)
==24820== by 0x612FD52: ??? (in /usr/lib/libgio-2.0.so.0.5200.3)
==24820== by 0x6130775: ??? (in /usr/lib/libgio-2.0.so.0.5200.3)
|
|
Commit 26ee94ec28b6f68 introduced a bug, where we would be completing
the client allocation task *before* tracking the new client allocation
info in the private tracking list.
This meant that if mm_port_qmi_peek_client() was called in the task
completion handler, the client object wouldn't be returned, as it
wasn't found in the private tracking list.
The fix is just to defer the task completion until after the private
tracking list is updated.
Reported-by: Salvador Penalva <salvador.penalva@digi.com>
|
|
|
|
|
|
g_free and g_object_unref are in form of `void (*)(gpointer)`, which
matches the GDestroyNotify signature. An explicit GDestroyNotify cast on
g_free and g_object_unref is thus not needed.
|
|
When the logic decided that we had to update the kernel data format to match the
one configured in the WWAN network interface, we were not flagging the port LLP
with the correct value, what resulted in NetworkManager trying to use dhclient
on the raw-ip interface:
dhclient[3257]: Unsupported device type 65534 for "wwan1"
dhclient[3257]:
dhclient[3257]: If you think you have received this message due to a bug rather
dhclient[3257]: than a configuration issue please read the section on submitting
dhclient[3257]: bugs on either our web page at www.isc.org or in the README file
dhclient[3257]: before submitting a bug. These pages explain the proper
dhclient[3257]: process and the information we find helpful for debugging..
dhclient[3257]:
dhclient[3257]: exiting.
Fix the internal LLP flag, so that Static IP addressing is requested for all raw-ip
based interfaces.
|
|
When using raw-ip we'll default to request static IP setup for now, so that we
don't rely on the DHCP client supporting raw-ip interfaces.
|
|
The port opening logic is changed completely.
Before this change, the logic would only try 802.3 setting via CTL when the
QmiDevice was being open.
With this new change, instead, we'll use WDA and the new libqmi APIs to query
the link layer protocol expected by both the device and the kernel. If the LLP
matches in both, we assume we're done; if they differ we'll try to update the
LLP expected by the kernel to the one setup in WDA. This change will allow us
to run with the modem using raw-ip if that is what WDA reports by default.
Also bumped the libqmi version to 1.13.6, which has support for the new required
APIs.
|
|
We already require libqmi > 1.7.0 in the build.
|
|
|