aboutsummaryrefslogtreecommitdiff
path: root/src/mm-port-qmi.c
AgeCommit message (Collapse)Author
2020-04-09port-qmi: allow users to release clients when no longer neededAleksander Morgado
2020-04-08ports: port to object loggingAleksander Morgado
2020-02-01port-qmi: fallback to raw-ip if WDA Get Data Format requests argumentsAleksander Morgado
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
2020-01-31port-qmi: fix warnings with -Wimplicit-fallthroughAleksander Morgado
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: | ^~~~
2020-01-31port-qmi: fix warnings with -Wswitch-defaultAleksander Morgado
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) { | ^~~~~~
2020-01-22port-qmi: asynchronous close operation alwaysAleksander Morgado
To be in sync with the qmi_device_close_async() underlying method, given that the synchronous one is deprecated.
2020-01-22port-qmi: use qmi_device_close_async() in the port open logicAleksander Morgado
The qmi_device_close() synchronous operation is deprecated.
2019-02-22port-qmi: increase qmi_device_open retriesDaniele Palmas
Telit modems LM940/960 need more time for becoming responsive to qmi requests after device appearance.
2017-10-22mm-broadband-modem-qmi: reprobe on qmi-proxy deathEric Caruso
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>
2017-10-06port-qmi: don't allow client allocation if port is closedAleksander Morgado
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)
2017-05-05port-qmi: fix QMI client allocation procedureAleksander Morgado
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>
2017-04-08port-qmi: port mm_port_qmi_allocate_client to use GTaskBen Chan
2017-04-07port-qmi: port mm_port_qmi_open to use GTaskBen Chan
2017-03-29core: remove explicit GDestroyNotify cast on g_free / g_object_unrefBen Chan
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.
2016-07-14broadband-modem-qmi: fix dhcp/static IP setting when kernel data format updatedAleksander Morgado
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.
2016-01-24bearer-qmi: use static IP if LLP is raw-ipAleksander Morgado
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.
2016-01-24port-qmi: support new Qualcomm chipsets working always in raw-ipAleksander Morgado
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.
2014-12-30port-qmi: always use QMI proxyAleksander Morgado
We already require libqmi > 1.7.0 in the build.
2014-02-13ports: rename 'MMQmiPort' to 'MMPortQmi'Aleksander Morgado