[PATCH] Enable GPS_UNMANAGED for Huawei modems
David McCullough
david.mccullough at accelecon.com
Thu Jul 3 18:18:36 PDT 2014
Hi all,
Here's a patch to enable the new unmanaged GPS mode for Huawei modems,
Cheers,
Davidm
Signed-off-by: David McCullough <david.mccullough at accelecon.com>
---
plugins/huawei/mm-broadband-modem-huawei.c | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/plugins/huawei/mm-broadband-modem-huawei.c b/plugins/huawei/mm-broadband-modem-huawei.c
index 614b354..69d0bce 100644
--- a/plugins/huawei/mm-broadband-modem-huawei.c
+++ b/plugins/huawei/mm-broadband-modem-huawei.c
@@ -3211,7 +3211,9 @@ parent_load_capabilities_ready (MMIfaceModemLocation *self,
/* not sure how to check if GPS is supported, just allow it */
if (mm_base_modem_peek_port_gps (MM_BASE_MODEM (self)))
- sources |= (MM_MODEM_LOCATION_SOURCE_GPS_NMEA | MM_MODEM_LOCATION_SOURCE_GPS_RAW);
+ sources |= (MM_MODEM_LOCATION_SOURCE_GPS_NMEA |
+ MM_MODEM_LOCATION_SOURCE_GPS_RAW |
+ MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED);
/* So we're done, complete */
g_simple_async_result_set_op_res_gpointer (simple,
@@ -3283,11 +3285,13 @@ disable_location_gathering (MMIfaceModemLocation *_self,
/* Only stop GPS engine if no GPS-related sources enabled */
if (source & (MM_MODEM_LOCATION_SOURCE_GPS_NMEA |
- MM_MODEM_LOCATION_SOURCE_GPS_RAW)) {
+ MM_MODEM_LOCATION_SOURCE_GPS_RAW |
+ MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED)) {
self->priv->enabled_sources &= ~source;
if (!(self->priv->enabled_sources & (MM_MODEM_LOCATION_SOURCE_GPS_NMEA |
- MM_MODEM_LOCATION_SOURCE_GPS_RAW)))
+ MM_MODEM_LOCATION_SOURCE_GPS_RAW |
+ MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED)))
stop_gps = TRUE;
}
@@ -3408,10 +3412,12 @@ parent_enable_location_gathering_ready (MMIfaceModemLocation *self,
/* NMEA and RAW are both enabled in the same way */
if (ctx->source & (MM_MODEM_LOCATION_SOURCE_GPS_NMEA |
- MM_MODEM_LOCATION_SOURCE_GPS_RAW)) {
+ MM_MODEM_LOCATION_SOURCE_GPS_RAW |
+ MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED)) {
/* Only start GPS engine if not done already */
if (!(ctx->self->priv->enabled_sources & (MM_MODEM_LOCATION_SOURCE_GPS_NMEA |
- MM_MODEM_LOCATION_SOURCE_GPS_RAW)))
+ MM_MODEM_LOCATION_SOURCE_GPS_RAW |
+ MM_MODEM_LOCATION_SOURCE_GPS_UNMANAGED)))
start_gps = TRUE;
ctx->self->priv->enabled_sources |= ctx->source;
}
--
1.8.2.rc0
More information about the ModemManager-devel
mailing list