mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 21:22:37 +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:
parent
ab9c5670f7
commit
c6e3140b38
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user