broadband-modem: fix reloading of operator code when enabling 3GPP location
When the 3GPP location is enabled, we need to reload the operator code information, but only if the modem is registered in a 3GPP network. Now, instead of looking at the global modem state value, look at the specific 3GPP registration state. This will avoid issues like: * updating 3GPP operator info and the modem registered in a CDMA network. * not updating the 3GPP operator info when the modem is registered in a 3GPP network but not yet fully enabled (i.e. 'enabling').
This commit is contained in:
@@ -6458,7 +6458,8 @@ enable_location_gathering (MMIfaceModemLocation *self,
|
||||
/* Reload registration to get LAC/CI */
|
||||
mm_iface_modem_3gpp_run_registration_checks (MM_IFACE_MODEM_3GPP (self), NULL, NULL);
|
||||
/* Reload operator to get MCC/MNC */
|
||||
if (MM_BROADBAND_MODEM (self)->priv->modem_state >= MM_MODEM_STATE_REGISTERED)
|
||||
if (MM_BROADBAND_MODEM (self)->priv->modem_3gpp_registration_state == MM_MODEM_3GPP_REGISTRATION_STATE_HOME ||
|
||||
MM_BROADBAND_MODEM (self)->priv->modem_3gpp_registration_state == MM_MODEM_3GPP_REGISTRATION_STATE_ROAMING)
|
||||
mm_iface_modem_3gpp_reload_current_operator (MM_IFACE_MODEM_3GPP (self), NULL, NULL);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user