From edee1e3f84b34b6a4bd6f230371a36ea03539af7 Mon Sep 17 00:00:00 2001 From: Vincent Palatin Date: Thu, 29 Apr 2021 17:34:54 +0200 Subject: broadband-modem-qmi: ensure we do not re-use old EPS registration state When updating the registration state, in the case where LTE is not ready, ensure we reset the EPS registration state rather than leaving its old value. Else when the consolidated registration is built, it can wrongly think we are registered, e.g. the following case was happening: [modem0] consolidated registration state: cs 'home', ps 'home', eps 'home', 5gs 'unknown' --> 'home' a bit later [modem0] consolidated registration state: cs 'unknown', ps 'unknown', eps 'home', 5gs 'unknown' --> 'home' then it wrongly tries immediatly to connect and fails due to 'no-service' On Qualcomm SC7180, running the following sequence would often reproduce it: mmcli -m 0 -d mmcli -m 0 --set-power-state-low sleep 10 mmcli -m 0 -e mmcli -m 0 --simple-connect="apn=broadband" --- src/mm-broadband-modem-qmi.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/mm-broadband-modem-qmi.c b/src/mm-broadband-modem-qmi.c index 873260b8..8c7e6bd0 100644 --- a/src/mm-broadband-modem-qmi.c +++ b/src/mm-broadband-modem-qmi.c @@ -3467,6 +3467,8 @@ common_process_system_info_3gpp (MMBroadbandModemQmi *self, mm_iface_modem_3gpp_update_ps_registration_state (MM_IFACE_MODEM_3GPP (self), ps_registration_state); if (has_lte_info) mm_iface_modem_3gpp_update_eps_registration_state (MM_IFACE_MODEM_3GPP (self), ps_registration_state); + else + mm_iface_modem_3gpp_update_eps_registration_state (MM_IFACE_MODEM_3GPP (self), MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN); mm_iface_modem_3gpp_update_location (MM_IFACE_MODEM_3GPP (self), lac, tac, cid); } -- cgit v1.2.3-70-g09d2