mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 11:50:14 +01:00
wifi: remove check for existing device in wifi_wext_is_wifi()
See also commit ab41c13b06.
This commit is contained in:
parent
4bdee37771
commit
da7b8dd850
1 changed files with 9 additions and 2 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue