summaryrefslogtreecommitdiff
path: root/src/nm-udev-manager.c
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2011-04-04 16:41:55 -0500
committerDan Williams <dcbw@redhat.com>2011-04-04 16:41:55 -0500
commit839c790982c215a08f7df0bc12d030e3b1d6bf75 (patch)
tree8bf241a07777b7563434e7b4f0557075471f08f3 /src/nm-udev-manager.c
parent8cefc21dd9d1311cfaadc729f476a28d34113d96 (diff)
downloadNetworkManager-839c790982c215a08f7df0bc12d030e3b1d6bf75.tar.gz
core: ignore Nokia PC-Suite ethernet devices we can't use yet
Diffstat (limited to 'src/nm-udev-manager.c')
-rw-r--r--src/nm-udev-manager.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/nm-udev-manager.c b/src/nm-udev-manager.c
index 9972042afa..3563a5741c 100644
--- a/src/nm-udev-manager.c
+++ b/src/nm-udev-manager.c
@@ -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");