diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-07-21 23:34:57 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-08-06 20:07:49 +0200 |
commit | 4cf4a98bba3a94efb49fea86636e13db017a351c (patch) | |
tree | 35e8c37990eafac47eba73509c4a21a4eddac830 /plugins/zte/mm-plugin-zte.c | |
parent | 855c0ec5143d3a48c3f8a5cba0eb58d74a45740c (diff) |
zte: support Icera-based modems
We request Icera support check during port probing, and we then decide which
modem object to create based on the check results.
Diffstat (limited to 'plugins/zte/mm-plugin-zte.c')
-rw-r--r-- | plugins/zte/mm-plugin-zte.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/plugins/zte/mm-plugin-zte.c b/plugins/zte/mm-plugin-zte.c index 1dd06fbc..0c331764 100644 --- a/plugins/zte/mm-plugin-zte.c +++ b/plugins/zte/mm-plugin-zte.c @@ -23,6 +23,7 @@ #include "mm-log.h" #include "mm-plugin-zte.h" #include "mm-broadband-modem-zte.h" +#include "mm-broadband-modem-zte-icera.h" G_DEFINE_TYPE (MMPluginZte, mm_plugin_zte, MM_TYPE_PLUGIN) @@ -58,6 +59,21 @@ create_modem (MMPlugin *self, GList *probes, GError **error) { + GList *l; + gboolean is_icera; + + for (l = probes, is_icera = FALSE; l && !is_icera; l = g_list_next (l)) { + if (mm_port_probe_is_icera (MM_PORT_PROBE (l->data))) + is_icera = TRUE; + } + + if (is_icera) + return MM_BASE_MODEM (mm_broadband_modem_zte_icera_new (sysfs_path, + driver, + mm_plugin_get_name (self), + vendor, + product)); + return MM_BASE_MODEM (mm_broadband_modem_zte_new (sysfs_path, driver, mm_plugin_get_name (self), @@ -108,6 +124,7 @@ mm_plugin_create (void) MM_PLUGIN_CUSTOM_AT_PROBE, custom_at_probe, MM_PLUGIN_ALLOWED_AT, TRUE, MM_PLUGIN_ALLOWED_QCDM, TRUE, + MM_PLUGIN_ICERA_PROBE, TRUE, NULL)); } |