3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 13:02:44 +01:00

device: Handle disconnect by AP and by SME events same way

The difference in the handlers was that in the
NETDEV_EVENT_DISCONNECT_BY_AP case we would make sure to reply
to a pending dbus Connect call.  We also need to do that for
NETDEV_EVENT_DISCONNECT_BY_SME.  This happens if another process
sends an nl80211 disconnect command while we're connecting.
This commit is contained in:
Andrew Zaborowski 2018-04-18 07:03:21 +02:00 committed by Denis Kenzior
parent ab9c5670f7
commit c6e3140b38

View File

@ -588,7 +588,7 @@ static void device_disassociated(struct device *device)
device_enter_state(device, DEVICE_STATE_AUTOCONNECT); device_enter_state(device, DEVICE_STATE_AUTOCONNECT);
} }
static void device_disconnect_by_ap(struct device *device) static void device_disconnect_event(struct device *device)
{ {
l_debug("%d", device->index); l_debug("%d", device->index);
@ -1603,10 +1603,8 @@ static void device_netdev_event(struct netdev *netdev, enum netdev_event event,
device_lost_beacon(device); device_lost_beacon(device);
break; break;
case NETDEV_EVENT_DISCONNECT_BY_AP: case NETDEV_EVENT_DISCONNECT_BY_AP:
device_disconnect_by_ap(device);
break;
case NETDEV_EVENT_DISCONNECT_BY_SME: case NETDEV_EVENT_DISCONNECT_BY_SME:
device_disassociated(device); device_disconnect_event(device);
break; break;
case NETDEV_EVENT_RSSI_THRESHOLD_LOW: case NETDEV_EVENT_RSSI_THRESHOLD_LOW:
if (device->signal_low) if (device->signal_low)