diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2021-07-09 10:45:09 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2021-07-09 10:45:09 +0200 |
commit | 63f3dcb2fe3dee42fe223751c5394a751e7ecc42 (patch) | |
tree | 91ee2c4eaa71ca7d1e86a522025ee976a1d8a3cc /libmm-glib/mm-common-helpers.c | |
parent | 681d5d29d577ab4d2d822bb42ccbb74ac7d73b95 (diff) |
iface-modem: don't fail enabling if modem_power_up() isn't implemented
There are modems (e.g. Nokia, Thuraya, Iridium) which don't require or
don't support power management, and therefore there is no way to
either load or update the power status.
In those modems we just assume ON is the current and only value (set
in the skeleton during initialization) and so when we attempt to
update the power state to ON during enabling, the logic should not
break.
Fix the logic by making sure the requested_power_setup() function
pointers are only checked for validity after ensuring we're not
already in the desired power state.
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/398
Diffstat (limited to 'libmm-glib/mm-common-helpers.c')
0 files changed, 0 insertions, 0 deletions