mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-17 17:39:28 +01:00
device: Honor autoconnect setting on power up
If the device Powered state is toggled, honor the autoconnect setting instead of always going into AUTOCONNECT mode
This commit is contained in:
parent
996a6d2546
commit
b7fd5023f0
@ -2591,11 +2591,13 @@ 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);
|
||||
|
||||
l_dbus_property_changed(dbus, device_get_path(device),
|
||||
IWD_DEVICE_INTERFACE, "Powered");
|
||||
|
||||
if (device->autoconnect)
|
||||
device_enter_state(device, DEVICE_STATE_AUTOCONNECT);
|
||||
else
|
||||
device_enter_state(device, DEVICE_STATE_DISCONNECTED);
|
||||
break;
|
||||
case NETDEV_WATCH_EVENT_DOWN:
|
||||
device_enter_state(device, DEVICE_STATE_OFF);
|
||||
|
Loading…
Reference in New Issue
Block a user