@@ -51,6 +51,7 @@ enum netdev_event {
NETDEV_EVENT_RSSI_LEVEL_NOTIFY,
NETDEV_EVENT_PACKET_LOSS_NOTIFY,
NETDEV_EVENT_FT_ROAMED,
+ NETDEV_EVENT_BEACON_LOSS_NOTIFY,
};
enum netdev_watch_event {
@@ -3347,6 +3347,20 @@ static void station_packets_lost(struct station *station, uint32_t num_pkts)
station_start_roam(station);
}
+static void station_beacon_lost(struct station *station)
+{
+ l_debug("Beacon lost event");
+
+ if (station_cannot_roam(station))
+ return;
+
+ station->force_roam = true;
+
+ station_debug_event(station, "beacon-loss-roam");
+
+ station_start_roam(station);
+}
+
static void station_netdev_event(struct netdev *netdev, enum netdev_event event,
void *event_data, void *user_data)
{
@@ -3391,6 +3405,9 @@ static void station_netdev_event(struct netdev *netdev, enum netdev_event event,
station_roamed(station);
break;
+ case NETDEV_EVENT_BEACON_LOSS_NOTIFY:
+ station_beacon_lost(station);
+ break;
}
}