wifi: remove check for existing device in wifi_wext_is_wifi()

See also commit ab41c13b06.
This commit is contained in:
Thomas Haller 2016-12-10 16:30:42 +01:00
parent 4bdee37771
commit da7b8dd850

View file

@ -662,8 +662,15 @@ wifi_wext_is_wifi (const char *iface)
struct iwreq iwr;
gboolean is_wifi = FALSE;
if (!nmp_utils_device_exists (iface))
return FALSE;
/* performing an ioctl on a non-existing name may cause the automatic
* loading of kernel modules, which should be avoided.
*
* Usually, we should thus make sure that an inteface with this name
* exists.
*
* Note that wifi_wext_is_wifi() has only one caller which just verified
* that an interface with this name exists.
*/
fd = socket (PF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0);
if (fd >= 0) {