diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-06-27 13:57:34 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-08-29 17:14:47 +0200 |
commit | db99f340c89f589784a76879bcf3735c8317cfc7 (patch) | |
tree | 28fa37e8f3e74bd03fccfe684ef79d0e07eb0e5d /src/mm-plugin.c | |
parent | 3e251129c2f2d481e3391d64db9fc12820899803 (diff) |
port-probe: launch QMI probing on cdc-wdm ports
Some devices may export cdc-wdm ports talking AT. We need to explicitly check
for QMI protocol support on the cdc-wdm ports before assuming they are QMI.
Diffstat (limited to 'src/mm-plugin.c')
-rw-r--r-- | src/mm-plugin.c | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/src/mm-plugin.c b/src/mm-plugin.c index ef0453bf..8948e96c 100644 --- a/src/mm-plugin.c +++ b/src/mm-plugin.c @@ -589,10 +589,8 @@ mm_plugin_supports_port (MMPlugin *self, g_udev_device_get_subsystem (port), g_udev_device_get_name (port)); - /* Before launching any probing, check if the port is a net OR a wdm device - * (which cannot be probed). */ - if (g_str_equal (g_udev_device_get_subsystem (port), "net") || - g_str_equal (g_udev_device_get_subsystem (port), "cdc-wdm")) { + /* Before launching any probing, check if the port is a net device. */ + if (g_str_equal (g_udev_device_get_subsystem (port), "net")) { g_simple_async_result_set_op_res_gpointer ( async_result, GUINT_TO_POINTER (MM_PLUGIN_SUPPORTS_PORT_DEFER_UNTIL_SUGGESTED), @@ -602,19 +600,25 @@ mm_plugin_supports_port (MMPlugin *self, } /* Build flags depending on what probing needed */ - probe_run_flags = MM_PORT_PROBE_NONE; - if (self->priv->at) - probe_run_flags |= MM_PORT_PROBE_AT; - else if (self->priv->single_at) - probe_run_flags |= MM_PORT_PROBE_AT; - if (need_vendor_probing) - probe_run_flags |= (MM_PORT_PROBE_AT | MM_PORT_PROBE_AT_VENDOR); - if (need_product_probing) - probe_run_flags |= (MM_PORT_PROBE_AT | MM_PORT_PROBE_AT_PRODUCT); - if (self->priv->qcdm) - probe_run_flags |= MM_PORT_PROBE_QCDM; - if (self->priv->icera_probe || self->priv->allowed_icera || self->priv->forbidden_icera) - probe_run_flags |= (MM_PORT_PROBE_AT | MM_PORT_PROBE_AT_ICERA); + if (!g_str_has_prefix (g_udev_device_get_name (port), "cdc-wdm")) { + /* Serial ports... */ + probe_run_flags = MM_PORT_PROBE_NONE; + if (self->priv->at) + probe_run_flags |= MM_PORT_PROBE_AT; + else if (self->priv->single_at) + probe_run_flags |= MM_PORT_PROBE_AT; + if (need_vendor_probing) + probe_run_flags |= (MM_PORT_PROBE_AT | MM_PORT_PROBE_AT_VENDOR); + if (need_product_probing) + probe_run_flags |= (MM_PORT_PROBE_AT | MM_PORT_PROBE_AT_PRODUCT); + if (self->priv->qcdm) + probe_run_flags |= MM_PORT_PROBE_QCDM; + if (self->priv->icera_probe || self->priv->allowed_icera || self->priv->forbidden_icera) + probe_run_flags |= (MM_PORT_PROBE_AT | MM_PORT_PROBE_AT_ICERA); + } else { + /* cdc-wdm ports... */ + probe_run_flags = MM_PORT_PROBE_QMI; + } g_assert (probe_run_flags != MM_PORT_PROBE_NONE); |