diff options
Diffstat (limited to 'plugins/mm-plugin-generic.c')
-rw-r--r-- | plugins/mm-plugin-generic.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/plugins/mm-plugin-generic.c b/plugins/mm-plugin-generic.c index e5e2ade8..377273e5 100644 --- a/plugins/mm-plugin-generic.c +++ b/plugins/mm-plugin-generic.c @@ -59,6 +59,8 @@ get_level_for_capabilities (guint32 capabilities) return 5; if (capabilities & CAP_CDMA) return 5; + if (capabilities & MM_PLUGIN_BASE_PORT_CAP_QCDM) + return 5; return 0; } @@ -159,12 +161,15 @@ grab_port (MMPluginBase *base, return NULL; } } - } else { - if (caps & (MM_PLUGIN_BASE_PORT_CAP_GSM | CAP_CDMA)) { - modem = existing; - if (!mm_modem_grab_port (modem, subsys, name, MM_PORT_TYPE_UNKNOWN, NULL, error)) - 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)) + return NULL; } return modem; |