3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-10-04 02:18:49 +02:00

device: Fix an autoconnect corner case

Make sure device->autoconnect is set when entering the autoconnect state
after netdev UP event.  Otherwise the next time
device_set_autoconnect(device, false) is called it will exit early seeing
that device->autoconnect is false and not switch the device state.
This commit is contained in:
Andrew Zaborowski 2017-11-27 15:34:23 +01:00 committed by Denis Kenzior
parent 46c1e8fa60
commit 016dcd52d8

View File

@ -2162,6 +2162,7 @@ static void device_netdev_notify(struct netdev *netdev,
switch (event) { switch (event) {
case NETDEV_WATCH_EVENT_UP: case NETDEV_WATCH_EVENT_UP:
device->autoconnect = true;
device_enter_state(device, DEVICE_STATE_AUTOCONNECT); device_enter_state(device, DEVICE_STATE_AUTOCONNECT);
WATCHLIST_NOTIFY(&device_watches, device_watch_func_t, WATCHLIST_NOTIFY(&device_watches, device_watch_func_t,