commit 593fad52601648fa85d1733d8470997815ba8f1a
parent a2fff11823b311a907ef4e00a7df2c53175d31b3
Author: James Prestwood <prestwoj@gmail.com>
Date: Wed, 3 Jan 2024 10:46:31 -0800
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.
Diffstat:
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git 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);