Merge ~alfonsosanchezbeato/snappy-hwe-snaps/+git/modem-manager:fix-qmi-eps-reg into ~snappy-hwe-team/snappy-hwe-snaps/+git/modem-manager:modem-manager/xenial/1.6.12

Proposed by Alfonso Sanchez-Beato
Status: Merged
Approved by: Tony Espy
Approved revision: 33dd913075d4214cc33523481329092f6709e721
Merged at revision: 33dd913075d4214cc33523481329092f6709e721
Proposed branch: ~alfonsosanchezbeato/snappy-hwe-snaps/+git/modem-manager:fix-qmi-eps-reg
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/modem-manager:modem-manager/xenial/1.6.12
Diff against target: 49 lines (+12/-6)
1 file modified
src/mm-broadband-modem-qmi.c (+12/-6)
Reviewer Review Type Date Requested Status
Tony Espy Approve
System Enablement Bot continuous-integration Needs Fixing
Review via email: mp+337566@code.launchpad.net

Description of the change

Update EPS registration state for LTE qmi modems

MM was not updating the EPS registration status for qmi modems. This
led to LTE-only modems never having 'registered' status. This was
happening for Quectel EC21-V modem. Merged in upstream:

https://cgit.freedesktop.org/ModemManager/ModemManager/commit/?id=10cb61f399b80c9db1b3b1b570214da164c469aa

To post a comment you must log in.
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Tony Espy (awe) wrote :

It looks like there are two other places in the qmi driver that call update_cs_registration_state() and update_ps_registration_state(). Shouldn't update_eps_registration_state() be called in those places as well?

review: Needs Information
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

There is only one additional place, in line 4631. I do not update EPS state because when that is run is because it is not a 3gpp network, and EPS is a specific feature of LTE/3gpp.

Revision history for this message
Tony Espy (awe) wrote :

OK, thanks for the explanation. LGTM otherwise!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/mm-broadband-modem-qmi.c b/src/mm-broadband-modem-qmi.c
2index 2f7115d..721fce0 100644
3--- a/src/mm-broadband-modem-qmi.c
4+++ b/src/mm-broadband-modem-qmi.c
5@@ -4714,6 +4714,8 @@ common_process_serving_system_3gpp (MMBroadbandModemQmi *self,
6 /* Report new registration states */
7 mm_iface_modem_3gpp_update_cs_registration_state (MM_IFACE_MODEM_3GPP (self), mm_cs_registration_state);
8 mm_iface_modem_3gpp_update_ps_registration_state (MM_IFACE_MODEM_3GPP (self), mm_ps_registration_state);
9+ if (mm_access_technologies & MM_MODEM_ACCESS_TECHNOLOGY_LTE)
10+ mm_iface_modem_3gpp_update_eps_registration_state (MM_IFACE_MODEM_3GPP (self), mm_ps_registration_state);
11
12 /* Get 3GPP location LAC and CI */
13 lac = 0;
14@@ -5169,6 +5171,7 @@ common_process_system_info_3gpp (MMBroadbandModemQmi *self,
15 guint16 lac;
16 guint32 cid;
17 gchar *operator_id;
18+ gboolean has_lte_info;
19
20 ps_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
21 cs_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN;
22@@ -5180,12 +5183,13 @@ common_process_system_info_3gpp (MMBroadbandModemQmi *self,
23 * LTE > WCDMA > GSM
24 * The first one giving results will be the one reported.
25 */
26- if (!process_lte_info (response_output, indication_output,
27- &cs_registration_state,
28- &ps_registration_state,
29- &lac,
30- &cid,
31- &operator_id) &&
32+ has_lte_info = process_lte_info (response_output, indication_output,
33+ &cs_registration_state,
34+ &ps_registration_state,
35+ &lac,
36+ &cid,
37+ &operator_id);
38+ if (!has_lte_info &&
39 !process_wcdma_info (response_output, indication_output,
40 &cs_registration_state,
41 &ps_registration_state,
42@@ -5210,6 +5214,8 @@ common_process_system_info_3gpp (MMBroadbandModemQmi *self,
43 /* Report new registration states */
44 mm_iface_modem_3gpp_update_cs_registration_state (MM_IFACE_MODEM_3GPP (self), cs_registration_state);
45 mm_iface_modem_3gpp_update_ps_registration_state (MM_IFACE_MODEM_3GPP (self), ps_registration_state);
46+ if (has_lte_info)
47+ mm_iface_modem_3gpp_update_eps_registration_state (MM_IFACE_MODEM_3GPP (self), ps_registration_state);
48 mm_iface_modem_3gpp_update_location (MM_IFACE_MODEM_3GPP (self), lac, cid);
49 }
50

Subscribers

People subscribed via source and target branches