platform: rework link type detection for better fallback (bgo #743209)
See "Revert "wireless: Support of IFLA_INFO_KIND rtnl attribute"" http://www.spinics.net/lists/linux-wireless/msg132219.html The reverted kernel patch caused rtnl_link_get_type() to return "wlan" for WiFi devices. Since NM depends on this function returning NULL for WiFi devices so that it goes on to check the sysfs DEVTYPE attribute, the kernel patch caused WiFi devices to show up as Generic ones instead. That's wrong, and NM should be able to more easily handle changes in the kernel drivers from NULL to a more descriptive rtnl_link_get_type() return, since that's the kernel trend. What NM should be doing here is to fall back to other detection schemes if the type is NULL or unrecognized. Make that happen and clean things up to use a table instead of a giant if(strcmp()) block. https://bugzilla.gnome.org/show_bug.cgi?id=743209
This commit is contained in:
@@ -29,7 +29,7 @@
|
||||
|
||||
typedef struct WifiData WifiData;
|
||||
|
||||
gboolean wifi_utils_is_wifi (const char *iface, const char *sysfs_path, const char *devtype);
|
||||
gboolean wifi_utils_is_wifi (const char *iface, const char *sysfs_path);
|
||||
|
||||
WifiData *wifi_utils_init (const char *iface, int ifindex, gboolean check_scan);
|
||||
|
||||
|
Reference in New Issue
Block a user