3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-22 23:09:34 +01:00

wsc: Only add WSC interface if netdev is UP

This commit is contained in:
Denis Kenzior 2018-11-29 11:45:20 -06:00
parent e424a29911
commit 5b3ae4c40c

View File

@ -1082,7 +1082,8 @@ static void wsc_netdev_watch(struct netdev *netdev,
switch (event) { switch (event) {
case NETDEV_WATCH_EVENT_UP: case NETDEV_WATCH_EVENT_UP:
case NETDEV_WATCH_EVENT_NEW: case NETDEV_WATCH_EVENT_NEW:
if (netdev_get_iftype(netdev) == NETDEV_IFTYPE_STATION) if (netdev_get_iftype(netdev) == NETDEV_IFTYPE_STATION &&
netdev_get_is_up(netdev))
wsc_add_interface(netdev); wsc_add_interface(netdev);
break; break;
case NETDEV_WATCH_EVENT_DOWN: case NETDEV_WATCH_EVENT_DOWN: