aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Prestwood <prestwoj@gmail.com>2024-01-03 10:46:31 -0800
committerDenis Kenzior <denkenz@gmail.com>2024-01-04 11:46:39 -0600
commit593fad52601648fa85d1733d8470997815ba8f1a (patch)
treecf150699b56572896ec8c9e8ad89fc08302135d7
parenta2fff11823b311a907ef4e00a7df2c53175d31b3 (diff)
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.
-rw-r--r--src/station.c12
1 files changed, 11 insertions, 1 deletions
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);