diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2020-06-12 09:17:40 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2020-06-12 09:18:37 +0200 |
commit | 8340237f9da911ca6ecc58fd6c453e9ea32616d4 (patch) | |
tree | 705cbf9dc924d0a698542b97e49d29deab330402 /src | |
parent | 3af93cbe18709864a10c3efd752e7db44f41c18f (diff) |
broadband-modem-qmi: avoid using stale EPS registration state
When the device goes from LTE to UMTS, we must make sure we also
always update the EPS registration state as unknown, or the built
consolidated state will be wrong.
Fixes https://gitlab.freedesktop.org/mobile-broadband/ModemManager/-/issues/225
Diffstat (limited to 'src')
-rw-r--r-- | src/mm-broadband-modem-qmi.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/mm-broadband-modem-qmi.c b/src/mm-broadband-modem-qmi.c index 2926d2fb..e6a05b2c 100644 --- a/src/mm-broadband-modem-qmi.c +++ b/src/mm-broadband-modem-qmi.c @@ -2766,11 +2766,18 @@ common_process_serving_system_3gpp (MMBroadbandModemQmi *self, g_free (new_operator_id); } - /* Report new registration states */ + /* Report new registration states. The QMI serving system API reports "CS" + * and "PS" registration states, and if the device is in LTE, we'll take the "PS" + * one as "EPS". But, if the device is not in LTE, we should also set the "EPS" + * state as unknown, so that the "PS" one takes precedence when building + * the consolidated registration state (otherwise we may be using some old cached + * "EPS" state wrongly). */ mm_iface_modem_3gpp_update_cs_registration_state (MM_IFACE_MODEM_3GPP (self), mm_cs_registration_state); mm_iface_modem_3gpp_update_ps_registration_state (MM_IFACE_MODEM_3GPP (self), mm_ps_registration_state); - if (mm_access_technologies & MM_MODEM_ACCESS_TECHNOLOGY_LTE) - mm_iface_modem_3gpp_update_eps_registration_state (MM_IFACE_MODEM_3GPP (self), mm_ps_registration_state); + if (mm_iface_modem_is_3gpp_lte (MM_IFACE_MODEM (self))) + mm_iface_modem_3gpp_update_eps_registration_state (MM_IFACE_MODEM_3GPP (self), + (mm_access_technologies & MM_MODEM_ACCESS_TECHNOLOGY_LTE) ? + mm_ps_registration_state : MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN); /* Get 3GPP location LAC/TAC and CI */ lac = 0; |