diff options
Diffstat (limited to 'plugins/mm-plugin-longcheer.c')
-rw-r--r-- | plugins/mm-plugin-longcheer.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/plugins/mm-plugin-longcheer.c b/plugins/mm-plugin-longcheer.c index dbbe186..e63ff4e 100644 --- a/plugins/mm-plugin-longcheer.c +++ b/plugins/mm-plugin-longcheer.c @@ -114,6 +114,7 @@ grab_port (MMPluginBase *base, const char *name, *subsys, *sysfs_path; guint32 caps; MMPortType ptype = MM_PORT_TYPE_UNKNOWN; + guint16 vendor = 0, product = 0; port = mm_plugin_base_supports_task_get_port (task); g_assert (port); @@ -138,19 +139,28 @@ grab_port (MMPluginBase *base, subsys = g_udev_device_get_subsystem (port); name = g_udev_device_get_name (port); + if (!mm_plugin_base_get_device_ids (base, subsys, name, &vendor, &product)) { + g_set_error (error, 0, 0, "Could not get modem product ID."); + return NULL; + } + caps = mm_plugin_base_supports_task_get_probed_capabilities (task); sysfs_path = mm_plugin_base_supports_task_get_physdev_path (task); if (!existing) { if (caps & MM_PLUGIN_BASE_PORT_CAP_GSM) { modem = mm_modem_longcheer_gsm_new (sysfs_path, mm_plugin_base_supports_task_get_driver (task), - mm_plugin_get_name (MM_PLUGIN (base))); + mm_plugin_get_name (MM_PLUGIN (base)), + vendor, + product); } else if (caps & CAP_CDMA) { modem = mm_generic_cdma_new (sysfs_path, mm_plugin_base_supports_task_get_driver (task), mm_plugin_get_name (MM_PLUGIN (base)), !!(caps & MM_PLUGIN_BASE_PORT_CAP_IS856), - !!(caps & MM_PLUGIN_BASE_PORT_CAP_IS856_A)); + !!(caps & MM_PLUGIN_BASE_PORT_CAP_IS856_A), + vendor, + product); } if (modem) { |