aboutsummaryrefslogtreecommitdiff
path: root/src/mm-error-helpers.h
diff options
context:
space:
mode:
authorAleksander Morgado <aleksandermj@chromium.org>2024-10-16 13:08:00 +0200
committerAleksander Morgado <aleksander@aleksander.es>2024-10-21 09:14:00 +0000
commit6c1888f76cd4e675210508e666d4a1d0e686d466 (patch)
treef1d4cac7342a30bdc030958803b74397e73cee46 /src/mm-error-helpers.h
parent891b1a41f997e231242673eb6e3fd8517529fb29 (diff)
iface-modem-3gpp: fix crash when trying to set unknown power state
Certain QMI-based USB modems will report an "unknown" power state upon boot, before our first attempt to set one: $ sudo qmicli --dms-get-operating-mode -d /dev/cdc-wdm0 -p [/dev/cdc-wdm0] Operating mode retrieved: Mode: 'unknown' HW restricted: 'no' Due to this, the logic trying to recover the previous power state during an attach settings update would end up asserting: [modem3] set initial EPS bearer settings state (3/5): recover previous power state ** ERROR:../src/mm-iface-modem.c:4554:mm_iface_modem_set_power_state: code should not be reached Bail out! ERROR:../src/mm-iface-modem.c:4554:mm_iface_modem_set_power_state: code should not be reached Aborted This is a rare case, and instead of handling it in the QMI specific implementation, we can try to fix it in a safer way directly in the logic that handles the attach settings update. If we ever detect that the reported power state is "unknown", we will default it to "on" while emitting a warning.
Diffstat (limited to 'src/mm-error-helpers.h')
0 files changed, 0 insertions, 0 deletions