diff options
-rw-r--r-- | cli/mmcli-modem-location.c | 2 | ||||
-rw-r--r-- | introspection/org.freedesktop.ModemManager1.Modem.Location.xml | 18 | ||||
-rw-r--r-- | libmm-glib/mm-location-3gpp.c | 45 | ||||
-rw-r--r-- | libmm-glib/mm-location-3gpp.h | 3 | ||||
-rw-r--r-- | src/mm-broadband-modem-qmi.c | 53 | ||||
-rw-r--r-- | src/mm-broadband-modem.c | 36 | ||||
-rw-r--r-- | src/mm-iface-modem-3gpp.c | 12 | ||||
-rw-r--r-- | src/mm-iface-modem-3gpp.h | 1 | ||||
-rw-r--r-- | src/mm-iface-modem-location.c | 18 | ||||
-rw-r--r-- | src/mm-iface-modem-location.h | 7 |
10 files changed, 148 insertions, 47 deletions
diff --git a/cli/mmcli-modem-location.c b/cli/mmcli-modem-location.c index 3425789f..0568b513 100644 --- a/cli/mmcli-modem-location.c +++ b/cli/mmcli-modem-location.c @@ -509,10 +509,12 @@ get_location_process_reply (MMLocation3gpp *location_3gpp, " 3GPP location | Mobile country code: '%u'\n" " | Mobile network code: '%u'\n" " | Location area code: '%lu'\n" + " | Tracking area code: '%lu'\n" " | Cell ID: '%lu'\n", mm_location_3gpp_get_mobile_country_code (location_3gpp), mm_location_3gpp_get_mobile_network_code (location_3gpp), mm_location_3gpp_get_location_area_code (location_3gpp), + mm_location_3gpp_get_tracking_area_code (location_3gpp), mm_location_3gpp_get_cell_id (location_3gpp)); else g_print (" -------------------------\n" diff --git a/introspection/org.freedesktop.ModemManager1.Modem.Location.xml b/introspection/org.freedesktop.ModemManager1.Modem.Location.xml index c38f428f..fa51a6e2 100644 --- a/introspection/org.freedesktop.ModemManager1.Modem.Location.xml +++ b/introspection/org.freedesktop.ModemManager1.Modem.Location.xml @@ -143,7 +143,7 @@ <listitem> <para> Devices supporting this - capability return a string in the format <literal>"MCC,MNC,LAC,CI"</literal> (without the + capability return a string in the format <literal>"MCC,MNC,LAC,CI,TAC"</literal> (without the quotes of course) where the following applies: </para> <variablelist> @@ -163,10 +163,10 @@ </varlistentry> <varlistentry><term><literal>LAC</literal></term> <listitem> - This is the two-byte Location Area Code of the base station with - which the mobile is registered, in upper-case hexadecimal format - without leading zeros, as specified in 3GPP TS 27.007 section - 10.1.19. e.g. <literal>"84CD"</literal>. + This is the two-byte Location Area Code of the GSM/UMTS base + station with which the mobile is registered, in upper-case + hexadecimal format without leading zeros, as specified in + 3GPP TS 27.007. E.g. <literal>"84CD"</literal>. </listitem> </varlistentry> <varlistentry><term><literal>CI</literal></term> @@ -177,6 +177,14 @@ e.g. <literal>"2BAF"</literal> or <literal>"D30156"</literal>. </listitem> </varlistentry> + <varlistentry><term><literal>TAC</literal></term> + <listitem> + This is the two-byte Location Area Code of the LTE base + station with which the mobile is registered, in upper-case + hexadecimal format without leading zeros, as specified in + 3GPP TS 27.007. E.g. <literal>"6FFE"</literal>. + </listitem> + </varlistentry> </variablelist> <para> The entire string may only be composed of the ASCII digits <literal>[0-9]</literal>, diff --git a/libmm-glib/mm-location-3gpp.c b/libmm-glib/mm-location-3gpp.c index 2de2bab9..a4cd7772 100644 --- a/libmm-glib/mm-location-3gpp.c +++ b/libmm-glib/mm-location-3gpp.c @@ -41,6 +41,7 @@ struct _MMLocation3gppPrivate { guint mobile_network_code; gulong location_area_code; gulong cell_id; + gulong tracking_area_code; }; /*****************************************************************************/ @@ -173,6 +174,38 @@ mm_location_3gpp_set_cell_id (MMLocation3gpp *self, /*****************************************************************************/ +/** + * mm_location_3gpp_get_tracking_area_code: + * @self: a #MMLocation3gpp. + * + * Gets the location area code of the 3GPP network. + * + * Returns: the location area code, or 0 if unknown. + */ +gulong +mm_location_3gpp_get_tracking_area_code (MMLocation3gpp *self) +{ + g_return_val_if_fail (MM_IS_LOCATION_3GPP (self), 0); + + return self->priv->tracking_area_code; +} + +gboolean +mm_location_3gpp_set_tracking_area_code (MMLocation3gpp *self, + gulong tracking_area_code) +{ + g_return_val_if_fail (MM_IS_LOCATION_3GPP (self), FALSE); + + /* If no change in the location info, don't do anything */ + if (self->priv->tracking_area_code == tracking_area_code) + return FALSE; + + self->priv->tracking_area_code = tracking_area_code; + return TRUE; +} + +/*****************************************************************************/ + GVariant * mm_location_3gpp_get_string_variant (MMLocation3gpp *self) { @@ -182,15 +215,16 @@ mm_location_3gpp_get_string_variant (MMLocation3gpp *self) if (self->priv->mobile_country_code && self->priv->mobile_network_code && - self->priv->location_area_code && + (self->priv->location_area_code || self->priv->tracking_area_code) && self->priv->cell_id) { gchar *str; - str = g_strdup_printf ("%u,%u,%lX,%lX", + str = g_strdup_printf ("%u,%u,%lX,%lX,%lX", self->priv->mobile_country_code, self->priv->mobile_network_code, self->priv->location_area_code, - self->priv->cell_id); + self->priv->cell_id, + self->priv->tracking_area_code); variant = g_variant_new_string (str); g_free (str); @@ -291,13 +325,16 @@ mm_location_3gpp_new_from_string_variant (GVariant *string, validate_string_length ("Location area code", split[2], 4, error) && validate_numeric_string_content ("Location area code", split[2], TRUE, error) && validate_string_length ("Cell ID", split[3], 8, error) && - validate_numeric_string_content ("Cell ID", split[3], TRUE, error)) { + validate_numeric_string_content ("Cell ID", split[3], TRUE, error) && + validate_string_length ("Tracking area code", split[4], 8, error) && + validate_numeric_string_content ("Tracking area code", split[4], TRUE, error)) { /* Create new location object */ self = mm_location_3gpp_new (); self->priv->mobile_country_code = strtol (split[0], NULL, 10); self->priv->mobile_network_code = strtol (split[1], NULL, 10); self->priv->location_area_code = strtol (split[2], NULL, 16); self->priv->cell_id = strtol (split[3], NULL, 16); + self->priv->tracking_area_code = strtol (split[4], NULL, 16); } g_strfreev (split); diff --git a/libmm-glib/mm-location-3gpp.h b/libmm-glib/mm-location-3gpp.h index 99e65a2e..cde055ce 100644 --- a/libmm-glib/mm-location-3gpp.h +++ b/libmm-glib/mm-location-3gpp.h @@ -59,6 +59,7 @@ guint mm_location_3gpp_get_mobile_country_code (MMLocation3gpp *self); guint mm_location_3gpp_get_mobile_network_code (MMLocation3gpp *self); gulong mm_location_3gpp_get_location_area_code (MMLocation3gpp *self); gulong mm_location_3gpp_get_cell_id (MMLocation3gpp *self); +gulong mm_location_3gpp_get_tracking_area_code (MMLocation3gpp *self); /*****************************************************************************/ /* ModemManager/libmm-glib/mmcli specific methods */ @@ -81,6 +82,8 @@ gboolean mm_location_3gpp_set_location_area_code (MMLocation3gpp *self, gulong location_area_code); gboolean mm_location_3gpp_set_cell_id (MMLocation3gpp *self, gulong cell_id); +gboolean mm_location_3gpp_set_tracking_area_code (MMLocation3gpp *self, + gulong tracking_area_code); #endif diff --git a/src/mm-broadband-modem-qmi.c b/src/mm-broadband-modem-qmi.c index 4be11867..aa640ef2 100644 --- a/src/mm-broadband-modem-qmi.c +++ b/src/mm-broadband-modem-qmi.c @@ -2016,7 +2016,7 @@ modem_load_supported_bands_finish (MMIfaceModem *_self, { MMBroadbandModemQmi *self = MM_BROADBAND_MODEM_QMI (_self); GArray *supported_bands; - + supported_bands = g_task_propagate_pointer (G_TASK (res), error); if (supported_bands) { if (self->priv->supported_bands) @@ -4397,6 +4397,7 @@ common_process_serving_system_3gpp (MMBroadbandModemQmi *self, const gchar *description; gboolean has_pcs_digit; guint16 lac; + guint16 tac; guint32 cid; MMModemAccessTechnology mm_access_technologies; MMModem3gppRegistrationState mm_cs_registration_state; @@ -4459,7 +4460,7 @@ common_process_serving_system_3gpp (MMBroadbandModemQmi *self, mm_iface_modem_3gpp_update_cs_registration_state (MM_IFACE_MODEM_3GPP (self), reg_state_3gpp); mm_iface_modem_3gpp_update_ps_registration_state (MM_IFACE_MODEM_3GPP (self), reg_state_3gpp); mm_iface_modem_3gpp_update_access_technologies (MM_IFACE_MODEM_3GPP (self), MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN); - mm_iface_modem_3gpp_update_location (MM_IFACE_MODEM_3GPP (self), 0, 0); + mm_iface_modem_3gpp_update_location (MM_IFACE_MODEM_3GPP (self), 0, 0, 0); return; } @@ -4548,18 +4549,22 @@ common_process_serving_system_3gpp (MMBroadbandModemQmi *self, 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); - /* Get 3GPP location LAC and CI */ + /* Get 3GPP location LAC/TAC and CI */ lac = 0; + tac = 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)) || - (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); - } + 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_lte_tac (response_output, &tac, NULL); + qmi_message_nas_get_serving_system_output_get_cid_3gpp (response_output, &cid, NULL); + } else if (indication_output) { + qmi_indication_nas_serving_system_output_get_lac_3gpp (indication_output, &lac, NULL); + qmi_indication_nas_serving_system_output_get_lte_tac (indication_output, &tac, NULL); + qmi_indication_nas_serving_system_output_get_cid_3gpp (indication_output, &cid, NULL); + } + /* Only update info in the interface if we get something */ + if (cid && (lac || tac)) + mm_iface_modem_3gpp_update_location (MM_IFACE_MODEM_3GPP (self), lac, tac, cid); /* Note: don't update access technologies with the ones retrieved here; they * are not really the 'current' access technologies */ @@ -4611,6 +4616,8 @@ process_common_info (QmiNasServiceStatus service_status, gboolean forbidden, gboolean lac_valid, guint16 lac, + gboolean tac_valid, + guint16 tac, gboolean cid_valid, guint32 cid, gboolean network_id_valid, @@ -4619,6 +4626,7 @@ process_common_info (QmiNasServiceStatus service_status, MMModem3gppRegistrationState *mm_cs_registration_state, MMModem3gppRegistrationState *mm_ps_registration_state, guint16 *mm_lac, + guint16 *mm_tac, guint32 *mm_cid, gchar **mm_operator_id) { @@ -4659,6 +4667,8 @@ process_common_info (QmiNasServiceStatus service_status, /* If we're registered either at home or roaming, try to get LAC/CID */ if (lac_valid) *mm_lac = lac; + if (tac_valid) + *mm_tac = tac; if (cid_valid) *mm_cid = cid; } @@ -4773,11 +4783,13 @@ process_gsm_info (QmiMessageNasGetSystemInfoOutput *response_output, roaming_status_valid, roaming_status, forbidden_valid, forbidden, lac_valid, lac, + FALSE, 0, cid_valid, cid, network_id_valid, mcc, mnc, mm_cs_registration_state, mm_ps_registration_state, mm_lac, + NULL, mm_cid, mm_operator_id)) { mm_dbg ("No GSM service registered"); @@ -4880,11 +4892,13 @@ process_wcdma_info (QmiMessageNasGetSystemInfoOutput *response_output, roaming_status_valid, roaming_status, forbidden_valid, forbidden, lac_valid, lac, + FALSE, 0, cid_valid, cid, network_id_valid, mcc, mnc, mm_cs_registration_state, mm_ps_registration_state, mm_lac, + NULL, mm_cid, mm_operator_id)) { mm_dbg ("No WCDMA service registered"); @@ -4900,6 +4914,7 @@ process_lte_info (QmiMessageNasGetSystemInfoOutput *response_output, MMModem3gppRegistrationState *mm_cs_registration_state, MMModem3gppRegistrationState *mm_ps_registration_state, guint16 *mm_lac, + guint16 *mm_tac, guint32 *mm_cid, gchar **mm_operator_id) { @@ -4912,6 +4927,8 @@ process_lte_info (QmiMessageNasGetSystemInfoOutput *response_output, gboolean forbidden; gboolean lac_valid; guint16 lac; + gboolean tac_valid; + guint16 tac; gboolean cid_valid; guint32 cid; gboolean network_id_valid; @@ -4924,6 +4941,7 @@ process_lte_info (QmiMessageNasGetSystemInfoOutput *response_output, *mm_ps_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN; *mm_cs_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN; *mm_lac = 0; + *mm_tac = 0; *mm_cid = 0; g_free (*mm_operator_id); *mm_operator_id = NULL; @@ -4945,7 +4963,7 @@ process_lte_info (QmiMessageNasGetSystemInfoOutput *response_output, &cid_valid, &cid, NULL, NULL, NULL, /* registration_reject_info */ &network_id_valid, &mcc, &mnc, - NULL, NULL, /* tac */ + &tac_valid, &tac, NULL)) { mm_dbg ("No LTE service reported"); /* No GSM service */ @@ -4968,7 +4986,7 @@ process_lte_info (QmiMessageNasGetSystemInfoOutput *response_output, &cid_valid, &cid, NULL, NULL, NULL, /* registration_reject_info */ &network_id_valid, &mcc, &mnc, - NULL, NULL, /* tac */ + &tac_valid, &tac, NULL)) { mm_dbg ("No LTE service reported"); /* No GSM service */ @@ -4981,11 +4999,13 @@ process_lte_info (QmiMessageNasGetSystemInfoOutput *response_output, roaming_status_valid, roaming_status, forbidden_valid, forbidden, lac_valid, lac, + tac_valid, tac, cid_valid, cid, network_id_valid, mcc, mnc, mm_cs_registration_state, mm_ps_registration_state, mm_lac, + mm_tac, mm_cid, mm_operator_id)) { mm_dbg ("No LTE service registered"); @@ -5003,6 +5023,7 @@ common_process_system_info_3gpp (MMBroadbandModemQmi *self, MMModem3gppRegistrationState cs_registration_state; MMModem3gppRegistrationState ps_registration_state; guint16 lac; + guint16 tac; guint32 cid; gchar *operator_id; gboolean has_lte_info; @@ -5010,6 +5031,7 @@ common_process_system_info_3gpp (MMBroadbandModemQmi *self, ps_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN; cs_registration_state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN; lac = 0; + tac = 0; cid = 0; operator_id = NULL; @@ -5021,6 +5043,7 @@ common_process_system_info_3gpp (MMBroadbandModemQmi *self, &cs_registration_state, &ps_registration_state, &lac, + &tac, &cid, &operator_id); if (!has_lte_info && @@ -5050,7 +5073,7 @@ 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); - mm_iface_modem_3gpp_update_location (MM_IFACE_MODEM_3GPP (self), lac, cid); + mm_iface_modem_3gpp_update_location (MM_IFACE_MODEM_3GPP (self), lac, tac, cid); } static void diff --git a/src/mm-broadband-modem.c b/src/mm-broadband-modem.c index a4be504d..a685e407 100644 --- a/src/mm-broadband-modem.c +++ b/src/mm-broadband-modem.c @@ -4008,7 +4008,7 @@ registration_state_changed (MMPortSerialAt *port, MMBroadbandModem *self) { MMModem3gppRegistrationState state = MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN; - gulong lac = 0, cell_id = 0; + gulong lac = 0, tac = 0, cell_id = 0; MMModemAccessTechnology act = MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN; gboolean cgreg = FALSE; gboolean cereg = FALSE; @@ -4028,13 +4028,24 @@ registration_state_changed (MMPortSerialAt *port, return; } - /* Report new registration state */ + /* Report new registration state and fix LAC/TAC. + * According to 3GPP TS 27.007: + * - If CREG reports <AcT> 7 (LTE) then the <lac> field contains TAC + * - CEREG always reports TAC + */ if (cgreg) mm_iface_modem_3gpp_update_ps_registration_state (MM_IFACE_MODEM_3GPP (self), state); - else if (cereg) + else if (cereg) { + tac = lac; + lac = 0; mm_iface_modem_3gpp_update_eps_registration_state (MM_IFACE_MODEM_3GPP (self), state); - else + } else { + if (act == MM_MODEM_ACCESS_TECHNOLOGY_LTE) { + tac = lac; + lac = 0; + } mm_iface_modem_3gpp_update_cs_registration_state (MM_IFACE_MODEM_3GPP (self), state); + } /* Only update access technologies from CREG/CGREG response if the modem * doesn't have custom commands for access technology loading, otherwise @@ -4045,7 +4056,7 @@ registration_state_changed (MMPortSerialAt *port, MM_IFACE_MODEM_GET_INTERFACE (self)->load_access_technologies == NULL) mm_iface_modem_3gpp_update_access_technologies (MM_IFACE_MODEM_3GPP (self), act); - mm_iface_modem_3gpp_update_location (MM_IFACE_MODEM_3GPP (self), lac, cell_id); + mm_iface_modem_3gpp_update_location (MM_IFACE_MODEM_3GPP (self), lac, tac, cell_id); } static void @@ -4266,6 +4277,7 @@ registration_status_check_ready (MMBroadbandModem *self, MMModem3gppRegistrationState state; MMModemAccessTechnology act; gulong lac; + gulong tac; gulong cid; ctx = g_task_get_task_data (task); @@ -4360,7 +4372,11 @@ registration_status_check_ready (MMBroadbandModem *self, return; } - /* Report new registration state */ + /* Report new registration state and fix LAC/TAC. + * According to 3GPP TS 27.007: + * - If CREG reports <AcT> 7 (LTE) then the <lac> field contains TAC + * - CEREG always reports TAC + */ if (cgreg) { if (ctx->running_cs) mm_dbg ("Got PS registration state when checking CS registration state"); @@ -4368,12 +4384,18 @@ registration_status_check_ready (MMBroadbandModem *self, mm_dbg ("Got PS registration state when checking EPS registration state"); mm_iface_modem_3gpp_update_ps_registration_state (MM_IFACE_MODEM_3GPP (self), state); } else if (cereg) { + tac = lac; + lac = 0; if (ctx->running_cs) mm_dbg ("Got EPS registration state when checking CS registration state"); else if (ctx->running_ps) mm_dbg ("Got EPS registration state when checking PS registration state"); mm_iface_modem_3gpp_update_eps_registration_state (MM_IFACE_MODEM_3GPP (self), state); } else { + if (act == MM_MODEM_ACCESS_TECHNOLOGY_LTE) { + tac = lac; + lac = 0; + } if (ctx->running_ps) mm_dbg ("Got CS registration state when checking PS registration state"); else if (ctx->running_eps) @@ -4382,7 +4404,7 @@ registration_status_check_ready (MMBroadbandModem *self, } mm_iface_modem_3gpp_update_access_technologies (MM_IFACE_MODEM_3GPP (self), act); - mm_iface_modem_3gpp_update_location (MM_IFACE_MODEM_3GPP (self), lac, cid); + mm_iface_modem_3gpp_update_location (MM_IFACE_MODEM_3GPP (self), lac, tac, cid); run_registration_checks_context_step (task); } diff --git a/src/mm-iface-modem-3gpp.c b/src/mm-iface-modem-3gpp.c index 4e19815d..4aeaa8a1 100644 --- a/src/mm-iface-modem-3gpp.c +++ b/src/mm-iface-modem-3gpp.c @@ -252,7 +252,7 @@ register_in_network_context_complete_failed (GTask *task, mm_iface_modem_3gpp_update_ps_registration_state (ctx->self, MM_MODEM_3GPP_REGISTRATION_STATE_IDLE); mm_iface_modem_3gpp_update_eps_registration_state (ctx->self, MM_MODEM_3GPP_REGISTRATION_STATE_IDLE); mm_iface_modem_3gpp_update_access_technologies (ctx->self, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN); - mm_iface_modem_3gpp_update_location (ctx->self, 0, 0); + mm_iface_modem_3gpp_update_location (ctx->self, 0, 0, 0); g_task_return_error (task, error); g_object_unref (task); @@ -1217,6 +1217,7 @@ mm_iface_modem_3gpp_update_access_technologies (MMIfaceModem3gpp *self, void mm_iface_modem_3gpp_update_location (MMIfaceModem3gpp *self, gulong location_area_code, + gulong tracking_area_code, gulong cell_id) { MMModem3gppRegistrationState state; @@ -1238,9 +1239,10 @@ mm_iface_modem_3gpp_update_location (MMIfaceModem3gpp *self, * change to registered), we also allow LAC/CID updates. */ if (reg_state_is_registered (state) || ctx->reloading_registration_info) { if (location_area_code > 0 && cell_id > 0) - mm_iface_modem_location_3gpp_update_lac_ci (MM_IFACE_MODEM_LOCATION (self), - location_area_code, - cell_id); + mm_iface_modem_location_3gpp_update_lac_tac_ci (MM_IFACE_MODEM_LOCATION (self), + location_area_code, + tracking_area_code, + cell_id); } else mm_iface_modem_location_3gpp_clear (MM_IFACE_MODEM_LOCATION (self)); } @@ -1689,7 +1691,7 @@ interface_disabling_step (GTask *task) case DISABLING_STEP_REGISTRATION_STATE: update_registration_state (self, MM_MODEM_3GPP_REGISTRATION_STATE_UNKNOWN, FALSE); mm_iface_modem_3gpp_update_access_technologies (self, MM_MODEM_ACCESS_TECHNOLOGY_UNKNOWN); - mm_iface_modem_3gpp_update_location (self, 0, 0); + mm_iface_modem_3gpp_update_location (self, 0, 0, 0); /* Fall down to next step */ ctx->step++; diff --git a/src/mm-iface-modem-3gpp.h b/src/mm-iface-modem-3gpp.h index 7b6d47e1..a08c5fb6 100644 --- a/src/mm-iface-modem-3gpp.h +++ b/src/mm-iface-modem-3gpp.h @@ -257,6 +257,7 @@ void mm_iface_modem_3gpp_update_access_technologies (MMIfaceModem3gpp *self, MMModemAccessTechnology access_tech); void mm_iface_modem_3gpp_update_location (MMIfaceModem3gpp *self, gulong location_area_code, + gulong tracking_area_code, gulong cell_id); /* Run all registration checks */ diff --git a/src/mm-iface-modem-location.c b/src/mm-iface-modem-location.c index d4fae0b7..4c45ab11 100644 --- a/src/mm-iface-modem-location.c +++ b/src/mm-iface-modem-location.c @@ -289,11 +289,12 @@ notify_3gpp_location_update (MMIfaceModemLocation *self, dbus_path = g_dbus_object_get_object_path (G_DBUS_OBJECT (self)); mm_dbg ("Modem %s: 3GPP location updated " - "(MCC: '%u', MNC: '%u', Location area code: '%lX', Cell ID: '%lX')", + "(MCC: '%u', MNC: '%u', Location area code: '%lX', Tracking area code: '%lX', Cell ID: '%lX')", dbus_path, mm_location_3gpp_get_mobile_country_code (location_3gpp), mm_location_3gpp_get_mobile_network_code (location_3gpp), mm_location_3gpp_get_location_area_code (location_3gpp), + mm_location_3gpp_get_tracking_area_code (location_3gpp), mm_location_3gpp_get_cell_id (location_3gpp)); /* We only update the property if we are supposed to signal @@ -338,9 +339,10 @@ mm_iface_modem_location_3gpp_update_mcc_mnc (MMIfaceModemLocation *self, } void -mm_iface_modem_location_3gpp_update_lac_ci (MMIfaceModemLocation *self, - gulong location_area_code, - gulong cell_id) +mm_iface_modem_location_3gpp_update_lac_tac_ci (MMIfaceModemLocation *self, + gulong location_area_code, + gulong tracking_area_code, + gulong cell_id) { MmGdbusModemLocation *skeleton; LocationContext *ctx; @@ -356,10 +358,9 @@ mm_iface_modem_location_3gpp_update_lac_ci (MMIfaceModemLocation *self, guint changed = 0; g_assert (ctx->location_3gpp != NULL); - changed += mm_location_3gpp_set_location_area_code (ctx->location_3gpp, - location_area_code); - changed += mm_location_3gpp_set_cell_id (ctx->location_3gpp, - cell_id); + changed += mm_location_3gpp_set_location_area_code (ctx->location_3gpp, location_area_code); + changed += mm_location_3gpp_set_tracking_area_code (ctx->location_3gpp, tracking_area_code); + changed += mm_location_3gpp_set_cell_id (ctx->location_3gpp, cell_id); if (changed) notify_3gpp_location_update (self, skeleton, ctx->location_3gpp); } @@ -385,6 +386,7 @@ mm_iface_modem_location_3gpp_clear (MMIfaceModemLocation *self) g_assert (ctx->location_3gpp != NULL); changed += mm_location_3gpp_set_location_area_code (ctx->location_3gpp, 0); + changed += mm_location_3gpp_set_tracking_area_code (ctx->location_3gpp, 0); changed += mm_location_3gpp_set_cell_id (ctx->location_3gpp, 0); changed += mm_location_3gpp_set_mobile_country_code (ctx->location_3gpp, 0); changed += mm_location_3gpp_set_mobile_network_code (ctx->location_3gpp, 0); diff --git a/src/mm-iface-modem-location.h b/src/mm-iface-modem-location.h index 96fe9b3b..e49fd79c 100644 --- a/src/mm-iface-modem-location.h +++ b/src/mm-iface-modem-location.h @@ -114,9 +114,10 @@ void mm_iface_modem_location_3gpp_clear (MMIfaceModemLocation *self); void mm_iface_modem_location_3gpp_update_mcc_mnc (MMIfaceModemLocation *self, guint mobile_country_code, guint mobile_network_code); -void mm_iface_modem_location_3gpp_update_lac_ci (MMIfaceModemLocation *self, - gulong location_area_code, - gulong cell_id); +void mm_iface_modem_location_3gpp_update_lac_tac_ci (MMIfaceModemLocation *self, + gulong location_area_code, + gulong tracking_area_code, + gulong cell_id); /* Update GPS location */ void mm_iface_modem_location_gps_update (MMIfaceModemLocation *self, |