platform: wifi: use nmp_utils_open_sysctl() to check if device is wifi
Since function nmp_utils_open_sysctl() can avoid race condition, use it in wifi_utils_is_wifi() to open sysfs and correctly check if it's a wifi device. https://bugzilla.gnome.org/show_bug.cgi?id=775613 Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
This commit is contained in:

committed by
Thomas Haller

parent
713c74f6e4
commit
b95556eb78
@@ -721,7 +721,7 @@ _linktype_get_type (NMPlatform *platform,
|
||||
}
|
||||
|
||||
/* Fallback for drivers that don't call SET_NETDEV_DEVTYPE() */
|
||||
if (wifi_utils_is_wifi (ifname))
|
||||
if (wifi_utils_is_wifi (ifindex, ifname))
|
||||
return NM_LINK_TYPE_WIFI;
|
||||
|
||||
if (arptype == ARPHRD_ETHER) {
|
||||
|
Reference in New Issue
Block a user