mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-22 17:20:09 +01:00
core: ignore Nokia PC-Suite ethernet devices we can't use yet
This commit is contained in:
parent
8cefc21dd9
commit
839c790982
1 changed files with 16 additions and 4 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue