xmm: prefer port flagged as AT_GPS_CONTROL to manage the GNSS engine

Use the new AT_GPS_CONTROL udev tag to decide which is the best port
to manage the GNSS engine.
This commit is contained in:
Aleksander Morgado
2022-02-09 15:42:53 +01:00
parent 343f27a5e7
commit f3e885e067

View File

@@ -1018,6 +1018,9 @@ gps_engine_start (GTask *task)
/* Look for an AT port to use for GPS. Prefer secondary port if there is one,
* otherwise use primary */
g_assert (!priv->gps_port);
priv->gps_port = mm_base_modem_get_port_gps_control (MM_BASE_MODEM (self));
if (!priv->gps_port) {
priv->gps_port = mm_base_modem_get_port_secondary (MM_BASE_MODEM (self));
if (!priv->gps_port) {
priv->gps_port = mm_base_modem_get_port_primary (MM_BASE_MODEM (self));
@@ -1028,6 +1031,7 @@ gps_engine_start (GTask *task)
return;
}
}
}
switch (state) {
case GPS_ENGINE_STATE_STANDALONE: