mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-23 06:02:37 +01:00
netdev: Don't assume disconnect on beacon loss
The kernel doesn't reset the netdev's state to disconnected when it sends us a beacon loss event so we can't either unless we automatically send a disconnect command to the kernel. It seems the handling of beacon loss depends on the driver. For example in mac80211 only after N beacon loss events (default 7) a probe request is sent to the AP and a deauthenticate packet is sent if no probe reply is receiver within T (default 500ms).
This commit is contained in:
parent
d67f8acd57
commit
5c4313bcc2
@ -557,12 +557,6 @@ static void device_disassociated(struct device *device)
|
|||||||
static void device_lost_beacon(struct device *device)
|
static void device_lost_beacon(struct device *device)
|
||||||
{
|
{
|
||||||
l_debug("%d", device->index);
|
l_debug("%d", device->index);
|
||||||
|
|
||||||
if (device->connect_pending)
|
|
||||||
dbus_pending_reply(&device->connect_pending,
|
|
||||||
dbus_error_failed(device->connect_pending));
|
|
||||||
|
|
||||||
device_disassociated(device);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void device_disconnect_by_ap(struct device *device)
|
static void device_disconnect_by_ap(struct device *device)
|
||||||
|
@ -442,8 +442,6 @@ static void netdev_lost_beacon(struct netdev *netdev)
|
|||||||
if (netdev->event_filter)
|
if (netdev->event_filter)
|
||||||
netdev->event_filter(netdev, NETDEV_EVENT_LOST_BEACON,
|
netdev->event_filter(netdev, NETDEV_EVENT_LOST_BEACON,
|
||||||
netdev->user_data);
|
netdev->user_data);
|
||||||
|
|
||||||
netdev_connect_free(netdev);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -70 dBm is a popular choice for low signal threshold for roaming */
|
/* -70 dBm is a popular choice for low signal threshold for roaming */
|
||||||
|
@ -372,8 +372,6 @@ static void wsc_netdev_event(struct netdev *netdev, enum netdev_event event,
|
|||||||
break;
|
break;
|
||||||
case NETDEV_EVENT_LOST_BEACON:
|
case NETDEV_EVENT_LOST_BEACON:
|
||||||
l_debug("Lost beacon");
|
l_debug("Lost beacon");
|
||||||
wsc_connect_cb(device_get_netdev(wsc->device),
|
|
||||||
NETDEV_RESULT_HANDSHAKE_FAILED, wsc);
|
|
||||||
break;
|
break;
|
||||||
case NETDEV_EVENT_DISCONNECT_BY_AP:
|
case NETDEV_EVENT_DISCONNECT_BY_AP:
|
||||||
l_debug("Disconnect by AP");
|
l_debug("Disconnect by AP");
|
||||||
|
Loading…
Reference in New Issue
Block a user