aboutsummaryrefslogtreecommitdiff
path: root/plugins/mm-plugin-generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mm-plugin-generic.c')
-rw-r--r--plugins/mm-plugin-generic.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/plugins/mm-plugin-generic.c b/plugins/mm-plugin-generic.c
index 54726202..46b9824a 100644
--- a/plugins/mm-plugin-generic.c
+++ b/plugins/mm-plugin-generic.c
@@ -117,6 +117,7 @@ grab_port (MMPluginBase *base,
const char *name, *subsys, *devfile, *sysfs_path, *driver;
guint32 caps;
guint16 vendor = 0, product = 0;
+ MMPortType ptype;
port = mm_plugin_base_supports_task_get_port (task);
g_assert (port);
@@ -144,6 +145,7 @@ grab_port (MMPluginBase *base,
}
caps = mm_plugin_base_supports_task_get_probed_capabilities (task);
+ ptype = mm_plugin_base_probed_capabilities_to_port_type (caps);
sysfs_path = mm_plugin_base_supports_task_get_physdev_path (task);
if (!existing) {
if (caps & CAP_CDMA) {
@@ -163,19 +165,14 @@ grab_port (MMPluginBase *base,
}
if (modem) {
- if (!mm_modem_grab_port (modem, subsys, name, MM_PORT_TYPE_UNKNOWN, NULL, error)) {
+ if (!mm_modem_grab_port (modem, subsys, name, ptype, MM_AT_PORT_FLAG_NONE, NULL, error)) {
g_object_unref (modem);
return NULL;
}
}
} else if (get_level_for_capabilities (caps)) {
- MMPortType ptype = MM_PORT_TYPE_UNKNOWN;
-
- if (caps & MM_PLUGIN_BASE_PORT_CAP_QCDM)
- ptype = MM_PORT_TYPE_QCDM;
-
modem = existing;
- if (!mm_modem_grab_port (modem, subsys, name, ptype, NULL, error))
+ if (!mm_modem_grab_port (modem, subsys, name, ptype, MM_AT_PORT_FLAG_NONE, NULL, error))
return NULL;
}