aboutsummaryrefslogtreecommitdiff
path: root/plugins/telit/mm-shared-telit.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/telit/mm-shared-telit.c')
-rw-r--r--plugins/telit/mm-shared-telit.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/plugins/telit/mm-shared-telit.c b/plugins/telit/mm-shared-telit.c
index f32bf9af..e391746e 100644
--- a/plugins/telit/mm-shared-telit.c
+++ b/plugins/telit/mm-shared-telit.c
@@ -39,6 +39,7 @@ static GQuark private_quark;
typedef struct {
gboolean alternate_3g_bands;
+ gboolean ext_4g_bands;
GArray *supported_bands;
} Private;
@@ -68,6 +69,24 @@ initialize_alternate_3g_band (MMSharedTelit *self,
}
}
+static void
+initialize_ext_4g_band (MMSharedTelit *self,
+ Private *priv)
+{
+ MMPort *primary;
+ MMKernelDevice *port;
+
+ primary = MM_PORT (mm_base_modem_peek_port_primary (MM_BASE_MODEM (self)));
+ if (primary) {
+ port = mm_port_peek_kernel_device (primary);
+
+ /* Lookup for the tag specifying that we're using the ext 4G band mapping */
+ priv->ext_4g_bands = mm_kernel_device_get_global_property_as_boolean (port, "ID_MM_TELIT_BND_EXT");
+ if (priv->ext_4g_bands)
+ mm_obj_dbg (self, "telit modem using extended 4G band setup");
+ }
+}
+
static Private *
get_private (MMSharedTelit *self)
{
@@ -80,6 +99,7 @@ get_private (MMSharedTelit *self)
if (!priv) {
priv = g_slice_new0 (Private);
initialize_alternate_3g_band (self, priv);
+ initialize_ext_4g_band (self, priv);
g_object_set_qdata_full (G_OBJECT (self), private_quark, priv, (GDestroyNotify)private_free);
}
@@ -199,6 +219,7 @@ mm_shared_telit_load_supported_bands_ready (MMBaseModem *self,
mm_iface_modem_is_3g (MM_IFACE_MODEM (self)),
mm_iface_modem_is_4g (MM_IFACE_MODEM (self)),
priv->alternate_3g_bands,
+ priv->ext_4g_bands,
self,
&error);
if (!bands)
@@ -259,6 +280,7 @@ mm_shared_telit_load_current_bands_ready (MMBaseModem *self,
mm_iface_modem_is_3g (MM_IFACE_MODEM (self)),
mm_iface_modem_is_4g (MM_IFACE_MODEM (self)),
priv->alternate_3g_bands,
+ priv->ext_4g_bands,
self,
&error);
if (!bands)
@@ -340,6 +362,7 @@ mm_shared_telit_modem_set_current_bands (MMIfaceModem *self,
mm_iface_modem_is_3g (self),
mm_iface_modem_is_4g (self),
priv->alternate_3g_bands,
+ priv->ext_4g_bands,
&error);
if (!cmd) {
g_task_return_error (task, error);