aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cli/mmcli-modem-location.c26
-rw-r--r--docs/man/mmcli.110
-rw-r--r--include/ModemManager-compat.h14
-rw-r--r--include/ModemManager-enums.h4
-rw-r--r--introspection/org.freedesktop.ModemManager1.Modem.Location.xml4
-rw-r--r--plugins/xmm/mm-shared-xmm.c8
-rw-r--r--src/mm-iface-modem-location.c16
-rw-r--r--src/mm-shared-qmi.c16
8 files changed, 56 insertions, 42 deletions
diff --git a/cli/mmcli-modem-location.c b/cli/mmcli-modem-location.c
index b07d76c1..075e874e 100644
--- a/cli/mmcli-modem-location.c
+++ b/cli/mmcli-modem-location.c
@@ -49,8 +49,8 @@ static Context *ctx;
static gboolean status_flag;
static gboolean enable_3gpp_flag;
static gboolean disable_3gpp_flag;
-static gboolean enable_agps_flag;
-static gboolean disable_agps_flag;
+static gboolean enable_agps_msa_flag;
+static gboolean disable_agps_msa_flag;
static gboolean enable_gps_nmea_flag;
static gboolean disable_gps_nmea_flag;
static gboolean enable_gps_raw_flag;
@@ -83,12 +83,12 @@ static GOptionEntry entries[] = {
"Disable 3GPP location gathering.",
NULL
},
- { "location-enable-agps", 0, 0, G_OPTION_ARG_NONE, &enable_agps_flag,
- "Enable A-GPS location gathering.",
+ { "location-enable-agps-msa", 0, 0, G_OPTION_ARG_NONE, &enable_agps_msa_flag,
+ "Enable MSA A-GPS location gathering.",
NULL
},
- { "location-disable-agps", 0, 0, G_OPTION_ARG_NONE, &disable_agps_flag,
- "Disable A-GPS location gathering.",
+ { "location-disable-agps-msa", 0, 0, G_OPTION_ARG_NONE, &disable_agps_msa_flag,
+ "Disable MSA A-GPS location gathering.",
NULL
},
{ "location-enable-gps-nmea", 0, 0, G_OPTION_ARG_NONE, &enable_gps_nmea_flag,
@@ -163,7 +163,7 @@ mmcli_modem_location_get_option_group (void)
#define any_location_setup_flag ( \
enable_3gpp_flag || disable_3gpp_flag || \
- enable_agps_flag || disable_agps_flag || \
+ enable_agps_msa_flag || disable_agps_msa_flag || \
enable_gps_nmea_flag || disable_gps_nmea_flag || \
enable_gps_raw_flag || disable_gps_raw_flag || \
enable_cdma_bs_flag || disable_cdma_bs_flag || \
@@ -180,7 +180,7 @@ mmcli_modem_location_options_enabled (void)
return !!n_actions;
if ((enable_3gpp_flag && disable_3gpp_flag) ||
- (enable_agps_flag && disable_agps_flag) ||
+ (enable_agps_msa_flag && disable_agps_msa_flag) ||
(enable_gps_nmea_flag && disable_gps_nmea_flag) ||
(enable_gps_raw_flag && disable_gps_raw_flag) ||
(enable_gps_unmanaged_flag && disable_gps_unmanaged_flag) ||
@@ -276,7 +276,7 @@ print_location_status (void)
gps_refresh_rate = g_strdup_printf ("%u", rate);
/* If A-GPS supported, show SUPL server setup */
- if (mm_modem_location_get_capabilities (ctx->modem_location) & MM_MODEM_LOCATION_SOURCE_AGPS)
+ if (mm_modem_location_get_capabilities (ctx->modem_location) & MM_MODEM_LOCATION_SOURCE_AGPS_MSA)
gps_supl_server = mm_modem_location_get_supl_server (ctx->modem_location);
mask = mm_modem_location_get_supported_assistance_data (ctx->modem_location);
@@ -447,10 +447,10 @@ build_sources_from_flags (void)
if (disable_3gpp_flag)
sources &= ~MM_MODEM_LOCATION_SOURCE_3GPP_LAC_CI;
- if (enable_agps_flag)
- sources |= MM_MODEM_LOCATION_SOURCE_AGPS;
- if (disable_agps_flag)
- sources &= ~MM_MODEM_LOCATION_SOURCE_AGPS;
+ if (enable_agps_msa_flag)
+ sources |= MM_MODEM_LOCATION_SOURCE_AGPS_MSA;
+ if (disable_agps_msa_flag)
+ sources &= ~MM_MODEM_LOCATION_SOURCE_AGPS_MSA;
if (enable_gps_nmea_flag)
sources |= MM_MODEM_LOCATION_SOURCE_GPS_NMEA;
diff --git a/docs/man/mmcli.1 b/docs/man/mmcli.1
index cb00f329..361612bd 100644
--- a/docs/man/mmcli.1
+++ b/docs/man/mmcli.1
@@ -390,14 +390,14 @@ Enable location discovery using the 3GPP network.
.B \-\-location\-disable\-3gpp
Disable location discovery using the 3GPP network.
.TP
-.B \-\-location\-enable\-agps
+.B \-\-location\-enable\-agps-msa
Enable A-GPS (MSA) support. This command does not implicitly start the GPS
engine, it just specifies that A-GPS should be enabled when the engine is
started. Therefore, the user should request enabling A-GPS before the raw
or NMEA outputs are enabled with \fB\-\-location\-enable\-gps\-raw\fR or
\fB\-\-location\-enable\-gps\-nmea\fR.
.TP
-.B \-\-location\-disable\-agps
+.B \-\-location\-disable\-agps-msa
Disable A-GPS (MSA) support.
.TP
.B \-\-location\-enable\-gps\-nmea
@@ -893,14 +893,14 @@ to start the GPS engine.
.Bd -literal -compact
$ mmcli -m 0 --location-status
--------------------------------
- Location | capabilities: 3gpp-lac-ci, gps-raw, gps-nmea, agps
+ Location | capabilities: 3gpp-lac-ci, gps-raw, gps-nmea, agps-msa
| enabled: 3gpp-lac-ci
| signals: no
-----------------------------
GPS | refresh rate: 30 seconds
| a-gps supl server: supl.google.com:7276
- $ sudo mmcli -m 0 --location-enable-agps
+ $ sudo mmcli -m 0 --location-enable-agps-msa
successfully setup location gathering
$ sudo mmcli -m 0 --location-enable-gps-nmea
@@ -924,7 +924,7 @@ XTRA assistance data is usually valid for several days.
.Bd -literal -compact
$ mmcli -m 0 --location-status
--------------------------------
- Location | capabilities: 3gpp-lac-ci, gps-raw, gps-nmea, agps
+ Location | capabilities: 3gpp-lac-ci, gps-raw, gps-nmea, agps-msa
| enabled: 3gpp-lac-ci
| signals: no
--------------------------------
diff --git a/include/ModemManager-compat.h b/include/ModemManager-compat.h
index 974b69bf..2019d25a 100644
--- a/include/ModemManager-compat.h
+++ b/include/ModemManager-compat.h
@@ -694,6 +694,20 @@ typedef int MMModemBandDeprecated;
*/
#define MM_MODEM_BAND_CDMA_BC19_US_LOWER_700 ((MMModemBandDeprecated)MM_MODEM_BAND_CDMA_BC19)
+/* The following type exists just so that we can get deprecation warnings */
+MM_DEPRECATED
+typedef int MMModemLocationSourceDeprecated;
+
+/**
+ * MM_MODEM_LOCATION_SOURCE_AGPS:
+ *
+ * A-GPS location requested.
+ *
+ * Since: 1.0
+ * Deprecated: 1.12.0: Use #MM_MODEM_LOCATION_SOURCE_AGPS_MSA instead.
+ */
+#define MM_MODEM_LOCATION_SOURCE_AGPS ((MMModemLocationSourceDeprecated)MM_MODEM_LOCATION_SOURCE_AGPS_MSA)
+
#endif /* MM_DISABLE_DEPRECATED */
#endif /* _MODEMMANAGER_COMPAT_H_ */
diff --git a/include/ModemManager-enums.h b/include/ModemManager-enums.h
index 9e75e2f4..7a8162cb 100644
--- a/include/ModemManager-enums.h
+++ b/include/ModemManager-enums.h
@@ -928,7 +928,7 @@ typedef enum { /*< underscore_name=mm_sms_cdma_service_category >*/
* @MM_MODEM_LOCATION_SOURCE_GPS_NMEA: GPS location given as NMEA traces.
* @MM_MODEM_LOCATION_SOURCE_CDMA_BS: CDMA base station position.
* @MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED: No location given, just GPS module setup.
- * @MM_MODEM_LOCATION_SOURCE_AGPS: A-GPS location requested.
+ * @MM_MODEM_LOCATION_SOURCE_AGPS_MSA: Mobile Station Assisted A-GPS location requested. Since 1.12.
*
* Sources of location information supported by the modem.
*/
@@ -939,7 +939,7 @@ typedef enum { /*< underscore_name=mm_modem_location_source >*/
MM_MODEM_LOCATION_SOURCE_GPS_NMEA = 1 << 2,
MM_MODEM_LOCATION_SOURCE_CDMA_BS = 1 << 3,
MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED = 1 << 4,
- MM_MODEM_LOCATION_SOURCE_AGPS = 1 << 5,
+ MM_MODEM_LOCATION_SOURCE_AGPS_MSA = 1 << 5,
} MMModemLocationSource;
/**
diff --git a/introspection/org.freedesktop.ModemManager1.Modem.Location.xml b/introspection/org.freedesktop.ModemManager1.Modem.Location.xml
index 5c49abb9..3ddc45ad 100644
--- a/introspection/org.freedesktop.ModemManager1.Modem.Location.xml
+++ b/introspection/org.freedesktop.ModemManager1.Modem.Location.xml
@@ -47,8 +47,8 @@
location information.
The optional
- <link linkend="MM-MODEM-LOCATION-SOURCE-AGPS:CAPS">MM_MODEM_LOCATION_SOURCE_AGPS</link>
- allows to request A-GPS operation, and it must be given along with either
+ <link linkend="MM-MODEM-LOCATION-SOURCE-AGPS:CAPS">MM_MODEM_LOCATION_SOURCE_AGPS_MSA</link>
+ allows to request MSA A-GPS operation, and it must be given along with either
<link linkend="MM-MODEM-LOCATION-SOURCE-GPS-RAW:CAPS">MM_MODEM_LOCATION_SOURCE_GPS_RAW</link>
or
<link linkend="MM-MODEM-LOCATION-SOURCE-GPS-NMEA:CAPS">MM_MODEM_LOCATION_SOURCE_GPS_NMEA</link>.
diff --git a/plugins/xmm/mm-shared-xmm.c b/plugins/xmm/mm-shared-xmm.c
index cbc7c7b4..de8bbfa2 100644
--- a/plugins/xmm/mm-shared-xmm.c
+++ b/plugins/xmm/mm-shared-xmm.c
@@ -855,7 +855,7 @@ xlcslsr_test_ready (MMBaseModem *self,
if (transport_protocol_supl_supported && ms_assisted_based_position_mode_supported) {
mm_dbg ("XLCSLSR based A-GPS control supported");
- priv->supported_sources |= MM_MODEM_LOCATION_SOURCE_AGPS;
+ priv->supported_sources |= MM_MODEM_LOCATION_SOURCE_AGPS_MSA;
} else {
mm_dbg ("XLCSLSR based A-GPS control unsupported: protocol supl %s, ms assisted/based %s",
transport_protocol_supl_supported ? "supported" : "unsupported",
@@ -1192,7 +1192,7 @@ gps_engine_state_get_expected (MMModemLocationSource sources)
/* If at lease one of GPS nmea/raw sources enabled, engine started */
if (sources & (MM_MODEM_LOCATION_SOURCE_GPS_NMEA | MM_MODEM_LOCATION_SOURCE_GPS_RAW)) {
/* If A-GPS is enabled, ASSISTED mode */
- if (sources & MM_MODEM_LOCATION_SOURCE_AGPS)
+ if (sources & MM_MODEM_LOCATION_SOURCE_AGPS_MSA)
return GPS_ENGINE_STATE_ASSISTED;
/* Otherwise, STANDALONE */
return GPS_ENGINE_STATE_STANDALONE;
@@ -1290,7 +1290,7 @@ mm_shared_xmm_disable_location_gathering (MMIfaceModemLocation *self,
/* We only expect GPS sources here */
g_assert (source & (MM_MODEM_LOCATION_SOURCE_GPS_NMEA |
MM_MODEM_LOCATION_SOURCE_GPS_RAW |
- MM_MODEM_LOCATION_SOURCE_AGPS));
+ MM_MODEM_LOCATION_SOURCE_AGPS_MSA));
/* Update engine based on the expected sources */
gps_engine_state_select (MM_SHARED_XMM (self),
@@ -1382,7 +1382,7 @@ mm_shared_xmm_enable_location_gathering (MMIfaceModemLocation *self,
/* We only expect GPS sources here */
g_assert (source & (MM_MODEM_LOCATION_SOURCE_GPS_NMEA |
MM_MODEM_LOCATION_SOURCE_GPS_RAW |
- MM_MODEM_LOCATION_SOURCE_AGPS));
+ MM_MODEM_LOCATION_SOURCE_AGPS_MSA));
/* Update engine based on the expected sources */
gps_engine_state_select (MM_SHARED_XMM (self),
diff --git a/src/mm-iface-modem-location.c b/src/mm-iface-modem-location.c
index 2168140b..f3ae281d 100644
--- a/src/mm-iface-modem-location.c
+++ b/src/mm-iface-modem-location.c
@@ -140,7 +140,7 @@ build_location_dictionary (GVariant *previous,
break;
case MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED:
g_assert_not_reached ();
- case MM_MODEM_LOCATION_SOURCE_AGPS:
+ case MM_MODEM_LOCATION_SOURCE_AGPS_MSA:
g_assert_not_reached ();
default:
g_warn_if_reached ();
@@ -506,7 +506,7 @@ update_location_source_status (MMIfaceModemLocation *self,
g_clear_object (&ctx->location_cdma_bs);
break;
case MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED:
- case MM_MODEM_LOCATION_SOURCE_AGPS:
+ case MM_MODEM_LOCATION_SOURCE_AGPS_MSA:
/* Nothing to setup in the context */
default:
break;
@@ -622,7 +622,7 @@ setup_gathering_step (GTask *task)
return;
}
- while (ctx->current <= MM_MODEM_LOCATION_SOURCE_AGPS) {
+ while (ctx->current <= MM_MODEM_LOCATION_SOURCE_AGPS_MSA) {
gchar *source_str;
if (ctx->to_enable & ctx->current) {
@@ -721,7 +721,7 @@ setup_gathering (MMIfaceModemLocation *self,
/* Loop through all known bits in the bitmask to enable/disable specific location sources */
for (source = MM_MODEM_LOCATION_SOURCE_3GPP_LAC_CI;
- source <= MM_MODEM_LOCATION_SOURCE_AGPS;
+ source <= MM_MODEM_LOCATION_SOURCE_AGPS_MSA;
source = source << 1) {
/* skip unsupported sources */
if (!(mm_gdbus_modem_location_get_capabilities (ctx->skeleton) & source))
@@ -982,7 +982,7 @@ handle_set_supl_server_auth_ready (MMBaseModem *self,
}
/* If A-GPS is NOT supported, set error */
- if (!(mm_gdbus_modem_location_get_capabilities (ctx->skeleton) & MM_MODEM_LOCATION_SOURCE_AGPS)) {
+ if (!(mm_gdbus_modem_location_get_capabilities (ctx->skeleton) & MM_MODEM_LOCATION_SOURCE_AGPS_MSA)) {
g_dbus_method_invocation_return_error (ctx->invocation,
MM_CORE_ERROR,
MM_CORE_ERROR_UNSUPPORTED,
@@ -1496,7 +1496,7 @@ interface_enabling_step (GTask *task)
default_sources &= ~(MM_MODEM_LOCATION_SOURCE_GPS_RAW |
MM_MODEM_LOCATION_SOURCE_GPS_NMEA |
MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED |
- MM_MODEM_LOCATION_SOURCE_AGPS);
+ MM_MODEM_LOCATION_SOURCE_AGPS_MSA);
setup_gathering (self,
default_sources,
@@ -1723,7 +1723,7 @@ interface_initialization_step (GTask *task)
case INITIALIZATION_STEP_SUPL_SERVER:
/* If the modem supports A-GPS, load SUPL server */
- if (ctx->capabilities & MM_MODEM_LOCATION_SOURCE_AGPS &&
+ if (ctx->capabilities & MM_MODEM_LOCATION_SOURCE_AGPS_MSA &&
MM_IFACE_MODEM_LOCATION_GET_INTERFACE (self)->load_supl_server &&
MM_IFACE_MODEM_LOCATION_GET_INTERFACE (self)->load_supl_server_finish) {
MM_IFACE_MODEM_LOCATION_GET_INTERFACE (self)->load_supl_server (
@@ -1737,7 +1737,7 @@ interface_initialization_step (GTask *task)
case INITIALIZATION_STEP_SUPPORTED_ASSISTANCE_DATA:
/* If the modem supports any GPS-related technology, check assistance data types supported */
- if ((ctx->capabilities & (MM_MODEM_LOCATION_SOURCE_AGPS |
+ if ((ctx->capabilities & (MM_MODEM_LOCATION_SOURCE_AGPS_MSA |
MM_MODEM_LOCATION_SOURCE_GPS_RAW |
MM_MODEM_LOCATION_SOURCE_GPS_NMEA)) &&
MM_IFACE_MODEM_LOCATION_GET_INTERFACE (self)->load_supported_assistance_data &&
diff --git a/src/mm-shared-qmi.c b/src/mm-shared-qmi.c
index 1e0ae784..beef0af5 100644
--- a/src/mm-shared-qmi.c
+++ b/src/mm-shared-qmi.c
@@ -4424,7 +4424,7 @@ set_gps_operation_mode_standalone_ready (MMSharedQmi *self,
priv = get_private (self);
- priv->enabled_sources &= ~MM_MODEM_LOCATION_SOURCE_AGPS;
+ priv->enabled_sources &= ~MM_MODEM_LOCATION_SOURCE_AGPS_MSA;
g_task_return_boolean (task, TRUE);
g_object_unref (task);
@@ -4451,7 +4451,7 @@ mm_shared_qmi_disable_location_gathering (MMIfaceModemLocation *_self,
if (!(source & (MM_MODEM_LOCATION_SOURCE_GPS_NMEA |
MM_MODEM_LOCATION_SOURCE_GPS_RAW |
- MM_MODEM_LOCATION_SOURCE_AGPS))) {
+ MM_MODEM_LOCATION_SOURCE_AGPS_MSA))) {
g_task_return_boolean (task, TRUE);
g_object_unref (task);
return;
@@ -4460,7 +4460,7 @@ mm_shared_qmi_disable_location_gathering (MMIfaceModemLocation *_self,
g_assert (!(priv->pds_client && priv->loc_client));
/* Disable A-GPS? */
- if (source == MM_MODEM_LOCATION_SOURCE_AGPS) {
+ if (source == MM_MODEM_LOCATION_SOURCE_AGPS_MSA) {
set_gps_operation_mode (self,
GPS_OPERATION_MODE_STANDALONE,
(GAsyncReadyCallback)set_gps_operation_mode_standalone_ready,
@@ -4536,7 +4536,7 @@ set_gps_operation_mode_assisted_ready (MMSharedQmi *self,
priv = get_private (self);
- priv->enabled_sources |= MM_MODEM_LOCATION_SOURCE_AGPS;
+ priv->enabled_sources |= MM_MODEM_LOCATION_SOURCE_AGPS_MSA;
g_task_return_boolean (task, TRUE);
g_object_unref (task);
@@ -4565,14 +4565,14 @@ parent_enable_location_gathering_ready (MMIfaceModemLocation *_self,
/* We only consider GPS related sources in this shared QMI implementation */
if (!(source & (MM_MODEM_LOCATION_SOURCE_GPS_NMEA |
MM_MODEM_LOCATION_SOURCE_GPS_RAW |
- MM_MODEM_LOCATION_SOURCE_AGPS))) {
+ MM_MODEM_LOCATION_SOURCE_AGPS_MSA))) {
g_task_return_boolean (task, TRUE);
g_object_unref (task);
return;
}
/* Enabling A-GPS? */
- if (source == MM_MODEM_LOCATION_SOURCE_AGPS) {
+ if (source == MM_MODEM_LOCATION_SOURCE_AGPS_MSA) {
set_gps_operation_mode (self,
GPS_OPERATION_MODE_ASSISTED,
(GAsyncReadyCallback)set_gps_operation_mode_assisted_ready,
@@ -4662,13 +4662,13 @@ parent_load_capabilities_ready (MMIfaceModemLocation *self,
if (mm_shared_qmi_peek_client (MM_SHARED_QMI (self), QMI_SERVICE_PDS, MM_PORT_QMI_FLAG_DEFAULT, NULL))
sources |= (MM_MODEM_LOCATION_SOURCE_GPS_NMEA |
MM_MODEM_LOCATION_SOURCE_GPS_RAW |
- MM_MODEM_LOCATION_SOURCE_AGPS);
+ MM_MODEM_LOCATION_SOURCE_AGPS_MSA);
/* If we have support for the LOC client, GPS location is supported */
if (mm_shared_qmi_peek_client (MM_SHARED_QMI (self), QMI_SERVICE_LOC, MM_PORT_QMI_FLAG_DEFAULT, NULL))
sources |= (MM_MODEM_LOCATION_SOURCE_GPS_NMEA |
MM_MODEM_LOCATION_SOURCE_GPS_RAW |
- MM_MODEM_LOCATION_SOURCE_AGPS);
+ MM_MODEM_LOCATION_SOURCE_AGPS_MSA);
/* So we're done, complete */
g_task_return_int (task, sources);