summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libnm-platform/nm-linux-platform.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/libnm-platform/nm-linux-platform.c b/src/libnm-platform/nm-linux-platform.c
index 8719eca494..2fdef42ad6 100644
--- a/src/libnm-platform/nm-linux-platform.c
+++ b/src/libnm-platform/nm-linux-platform.c
@@ -1285,6 +1285,17 @@ _linktype_get_type(NMPlatform *platform,
return NM_LINK_TYPE_WIFI;
}
+ if (arptype == ARPHRD_ETHER) {
+ /* The USB gadget interfaces behave and look like ordinary ethernet devices
+ * aside from the DEVTYPE. */
+ if (nm_streq0(devtype, "gadget"))
+ return NM_LINK_TYPE_ETHERNET;
+
+ /* Distributed Switch Architecture switch chips */
+ if (nm_streq0(devtype, "dsa"))
+ return NM_LINK_TYPE_ETHERNET;
+ }
+
/* Misc non-upstream WWAN drivers. rmnet is Qualcomm's proprietary
* modem interface, ccmni is MediaTek's. FIXME: these drivers should
* really set devtype=WWAN.
@@ -1312,15 +1323,6 @@ _linktype_get_type(NMPlatform *platform,
*/
if (!kind && !devtype)
return NM_LINK_TYPE_ETHERNET;
-
- /* The USB gadget interfaces behave and look like ordinary ethernet devices
- * aside from the DEVTYPE. */
- if (nm_streq0(devtype, "gadget"))
- return NM_LINK_TYPE_ETHERNET;
-
- /* Distributed Switch Architecture switch chips */
- if (nm_streq0(devtype, "dsa"))
- return NM_LINK_TYPE_ETHERNET;
}
}