aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@aleksander.es>2015-10-13 10:41:10 +0200
committerAleksander Morgado <aleksander@aleksander.es>2015-10-15 09:15:36 +0200
commit1cb68c810e9e3f3589bdd121f0c383da1556cdeb (patch)
tree494c47262a226f87f697b99519e4513ba55146fc
parent2c0da9431918ea2aea6f871ab522425b8466b942 (diff)
broadband-modem-qmi: LAC/CID not given in all serving system indications
LAC/CID may only be given in the serving system indications when the values change, and therefore we shouldn't reset the values to 0 whenever they're not reported. This seems to happen in newer devices; older devices like the MC7710 did always report the values in the indications.
-rw-r--r--src/mm-broadband-modem-qmi.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/mm-broadband-modem-qmi.c b/src/mm-broadband-modem-qmi.c
index 4c721ae0..49b3e14b 100644
--- a/src/mm-broadband-modem-qmi.c
+++ b/src/mm-broadband-modem-qmi.c
@@ -4196,22 +4196,23 @@ common_process_serving_system_3gpp (MMBroadbandModemQmi *self,
mnc);
}
+ /* Report new registration states */
+ 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);
+
/* Get 3GPP location LAC and CI */
lac = 0;
cid = 0;
- if (response_output) {
- qmi_message_nas_get_serving_system_output_get_lac_3gpp (response_output, &lac, NULL);
- qmi_message_nas_get_serving_system_output_get_cid_3gpp (response_output, &cid, NULL);
- } else {
- qmi_indication_nas_serving_system_output_get_lac_3gpp (indication_output, &lac, NULL);
- qmi_indication_nas_serving_system_output_get_cid_3gpp (indication_output, &cid, NULL);
+ if ((response_output &&
+ qmi_message_nas_get_serving_system_output_get_lac_3gpp (response_output, &lac, NULL) &&
+ qmi_message_nas_get_serving_system_output_get_cid_3gpp (response_output, &cid, NULL)) ||
+ (indication_output &&
+ qmi_indication_nas_serving_system_output_get_lac_3gpp (indication_output, &lac, NULL) &&
+ qmi_indication_nas_serving_system_output_get_cid_3gpp (indication_output, &cid, NULL))) {
+ /* Only update info in the interface if we get something */
+ mm_iface_modem_3gpp_update_location (MM_IFACE_MODEM_3GPP (self), lac, cid);
}
- /* Report new registration states */
- 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);
- mm_iface_modem_3gpp_update_location (MM_IFACE_MODEM_3GPP (self), lac, cid);
-
/* Note: don't update access technologies with the ones retrieved here; they
* are not really the 'current' access technologies */
}