platform: better detection of OLPC Mesh interfaces

Instead of just looking at the udev tags, also look for sysfs entries
that the libertas driver uses when mesh is enabled.
This commit is contained in:
Dan Williams
2014-04-21 14:39:55 -05:00
parent 8ab45e3e5c
commit 085bc0876c

View File

@@ -564,8 +564,8 @@ link_type_from_udev (NMPlatform *platform, int ifindex, const char *ifname, int
if (!udev_device)
return_type (NM_LINK_TYPE_UNKNOWN, "unknown");
prop = g_udev_device_get_property (udev_device, "ID_NM_OLPC_MESH");
if (prop)
if ( g_udev_device_get_property (udev_device, "ID_NM_OLPC_MESH")
|| g_udev_device_get_sysfs_attr (udev_device, "anycast_mask"))
return_type (NM_LINK_TYPE_OLPC_MESH, "olpc-mesh");
prop = g_udev_device_get_property (udev_device, "DEVTYPE");