public inbox for iwd@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH 1/8] station: handle netconfig after roaming for FW roams
@ 2024-01-03 18:46 James Prestwood
  2024-01-03 18:46 ` [PATCH 2/8] station: add additional internal state, STATION_STATE_NETCONFIG James Prestwood
                   ` (7 more replies)
  0 siblings, 8 replies; 18+ messages in thread
From: James Prestwood @ 2024-01-03 18:46 UTC (permalink / raw)
  To: iwd; +Cc: James Prestwood

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 73de26bb..5c9ede8b 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);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2024-01-04 21:01 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-03 18:46 [PATCH 1/8] station: handle netconfig after roaming for FW roams James Prestwood
2024-01-03 18:46 ` [PATCH 2/8] station: add additional internal state, STATION_STATE_NETCONFIG James Prestwood
2024-01-03 18:46 ` [PATCH 3/8] station: add handling for new NETCONFIG state James Prestwood
2024-01-04 18:14   ` Denis Kenzior
2024-01-04 18:31     ` James Prestwood
2024-01-04 18:55       ` Denis Kenzior
2024-01-04 19:55         ` James Prestwood
2024-01-04 21:01           ` Denis Kenzior
2024-01-03 18:46 ` [PATCH 4/8] station: add debug events for internal states James Prestwood
2024-01-04 17:57   ` Denis Kenzior
2024-01-03 18:46 ` [PATCH 5/8] auto-t: update roam test to use new debug events James Prestwood
2024-01-04 17:58   ` Denis Kenzior
2024-01-03 18:46 ` [PATCH 6/8] auto-t: add test for roaming + netconfig James Prestwood
2024-01-03 18:46 ` [PATCH 7/8] auto-t: improve failure handling in testPSK-roam James Prestwood
2024-01-04 18:00   ` Denis Kenzior
2024-01-03 18:46 ` [PATCH 8/8] auto-t: fix random testPSK-roam failure James Prestwood
2024-01-04 18:00   ` Denis Kenzior
2024-01-04 17:56 ` [PATCH 1/8] station: handle netconfig after roaming for FW roams Denis Kenzior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox