core: ignore Nokia PC-Suite ethernet devices we can't use yet

This commit is contained in:
Dan Williams
2011-04-04 16:41:55 -05:00
parent 8cefc21dd9
commit 839c790982

View File

@@ -419,7 +419,7 @@ net_add (NMUdevManager *self, GUdevDevice *device)
{
gint etype;
const char *iface;
const char *devtype;
const char *tmp;
g_return_if_fail (device != NULL);
@@ -436,12 +436,24 @@ net_add (NMUdevManager *self, GUdevDevice *device)
* subclass. ModemManager will pick it up though and so we'll handle it
* through the mobile broadband stuff.
*/
devtype = g_udev_device_get_property (device, "DEVTYPE");
if (devtype && !strcmp (devtype, "wwan")) {
nm_log_dbg (LOGD_HW, "ignoring interface with devtype '%s'", devtype);
tmp = g_udev_device_get_property (device, "DEVTYPE");
if (g_strcmp0 (tmp, "wwan") == 0) {
nm_log_dbg (LOGD_HW, "ignoring interface with devtype '%s'", tmp);
return;
}
/* Ignore Nokia cdc-ether interfaces in PC-Suite mode since we need to
* talk phonet to use them, which ModemManager doesn't do yet.
*/
tmp = g_udev_device_get_property (device, "ID_VENDOR_ID");
if (g_strcmp0 (tmp, "0421") == 0) { /* Nokia vendor ID */
tmp = g_udev_device_get_property (device, "ID_MODEL");
if (tmp && (strstr (tmp, "PC-Suite") || strstr (tmp, "PC Suite"))) {
nm_log_dbg (LOGD_HW, "ignoring Nokia PC-Suite ethernet interface");
return;
}
}
iface = g_udev_device_get_name (device);
if (!iface) {
nm_log_dbg (LOGD_HW, "failed to get device's interface");