mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 13:02:44 +01: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:
parent
46c1e8fa60
commit
016dcd52d8
@ -2162,6 +2162,7 @@ static void device_netdev_notify(struct netdev *netdev,
|
||||
|
||||
switch (event) {
|
||||
case NETDEV_WATCH_EVENT_UP:
|
||||
device->autoconnect = true;
|
||||
device_enter_state(device, DEVICE_STATE_AUTOCONNECT);
|
||||
|
||||
WATCHLIST_NOTIFY(&device_watches, device_watch_func_t,
|
||||
|
Loading…
Reference in New Issue
Block a user