plugin-base: avoid trying to probe 'net' devices

Some devices support 'net' devices, which cannot be AT or QCDM probed.

If the port being checked for support corresponds to an already existing modem,
the port will be reported as SUPPORTED.

If this is the first port of the modem being checked for support, we will just
DEFER the support check until we get a modem created.
This commit is contained in:
Aleksander Morgado
2012-03-15 14:14:21 +01:00
committed by Aleksander Morgado
parent db356bb20b
commit a1d2f20021
+14
View File
@@ -603,6 +603,20 @@ supports_port (MMPlugin *plugin,
goto out;
}
/* Before launching any probing, check if the port is a net device (which
* cannot be probed). */
if (g_str_equal (subsys, "net")) {
/* If we already have a existing modem, then mark it as supported.
* Otherwise, just defer a bit */
g_simple_async_result_set_op_res_gpointer (async_result,
GUINT_TO_POINTER ((existing ?
MM_PLUGIN_SUPPORTS_PORT_SUPPORTED :
MM_PLUGIN_SUPPORTS_PORT_DEFER)),
NULL);
g_simple_async_result_complete_in_idle (async_result);
goto out;
}
/* Need to launch new probing */
probe = mm_port_probe_cache_get (port, physdev_path, driver);
g_assert (probe);