From 593fad52601648fa85d1733d8470997815ba8f1a Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Wed, 3 Jan 2024 10:46:31 -0800 Subject: station: handle netconfig after roaming for FW roams This was not taken into account for FW roams and would result in the station state being set to connected regardless of netconfig's result. --- src/station.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/station.c b/src/station.c index 73de26bbd..5c9ede8b9 100644 --- a/src/station.c +++ b/src/station.c @@ -3406,6 +3406,16 @@ static void station_beacon_lost(struct station *station) station_roam_timeout_rearm(station, LOSS_ROAM_RATE_LIMIT); } +static void station_event_roaming(struct station *station) +{ + if (station->netconfig && station->state != STATION_STATE_CONNECTED) { + netconfig_reset(station->netconfig); + station->netconfig_after_roam = true; + } + + station_enter_state(station, STATION_STATE_FW_ROAMING); +} + static void station_netdev_event(struct netdev *netdev, enum netdev_event event, void *event_data, void *user_data) { @@ -3433,7 +3443,7 @@ static void station_netdev_event(struct netdev *netdev, enum netdev_event event, station_signal_agent_notify(station); break; case NETDEV_EVENT_ROAMING: - station_enter_state(station, STATION_STATE_FW_ROAMING); + station_event_roaming(station); break; case NETDEV_EVENT_ROAMED: station_event_roamed(station, (struct scan_bss *) event_data); -- cgit 1.2.3-korg