diff options
author | Dan Williams <dcbw@redhat.com> | 2012-08-23 21:01:49 -0500 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2012-08-23 21:01:49 -0500 |
commit | 62503143817b20834caaede212fe2a966ae50274 (patch) | |
tree | cb9bad14778880b20916a6592045f22fcd759660 | |
parent | 6d4515c231387d7cfe3d9aca2f25a9d68b96b13b (diff) |
sierra: fix detection of CDMA modems
They were getting detected as GSM, because of course the port
type for CDMA modem AT ports is MM_PORT_TYPE_AT, which passed
the check for GSM. Oops.
-rw-r--r-- | plugins/mm-plugin-sierra.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/mm-plugin-sierra.c b/plugins/mm-plugin-sierra.c index 4565c68e..85cd0cdb 100644 --- a/plugins/mm-plugin-sierra.c +++ b/plugins/mm-plugin-sierra.c @@ -153,6 +153,7 @@ grab_port (MMPluginBase *base, MMPortType ptype; guint16 vendor = 0, product = 0; MMAtPortFlags pflags = MM_AT_PORT_FLAG_NONE; + gboolean sierra_app1_port; port = mm_plugin_base_supports_task_get_port (task); g_assert (port); @@ -164,7 +165,8 @@ grab_port (MMPluginBase *base, ptype = mm_plugin_base_probed_capabilities_to_port_type (caps); /* Is it a GSM secondary port? */ - if (g_object_get_data (G_OBJECT (task), TAG_SIERRA_APP1_PORT)) { + sierra_app1_port = !!g_object_get_data (G_OBJECT (task), TAG_SIERRA_APP1_PORT); + if (sierra_app1_port) { if (g_object_get_data (G_OBJECT (task), TAG_SIERRA_APP_PPP_OK)) pflags = MM_AT_PORT_FLAG_PPP; else @@ -185,7 +187,7 @@ grab_port (MMPluginBase *base, sysfs_path = mm_plugin_base_supports_task_get_physdev_path (task); if (!existing) { - if ((caps & MM_PLUGIN_BASE_PORT_CAP_GSM) || (ptype != MM_PORT_TYPE_UNKNOWN)) { + if ((caps & MM_PLUGIN_BASE_PORT_CAP_GSM) || sierra_app1_port) { modem = mm_modem_sierra_gsm_new (sysfs_path, mm_plugin_base_supports_task_get_driver (task), mm_plugin_get_name (MM_PLUGIN (base)), |