diff mbox series

[1/8] station: handle netconfig after roaming for FW roams

Message ID 20240103184638.533221-1-prestwoj@gmail.com (mailing list archive)
State Accepted, archived
Headers show
Series [1/8] station: handle netconfig after roaming for FW roams | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-alpine-ci-fetch success Fetch PR
prestwoj/iwd-ci-fetch success Fetch PR
prestwoj/iwd-ci-gitlint success GitLint
prestwoj/iwd-ci-makedistcheck success Make Distcheck
prestwoj/iwd-alpine-ci-makedistcheck success Make Distcheck
prestwoj/iwd-ci-build success Build - Configure
prestwoj/iwd-alpine-ci-build success Build - Configure
prestwoj/iwd-ci-makecheckvalgrind success Make Check w/Valgrind
prestwoj/iwd-ci-makecheck success Make Check
prestwoj/iwd-ci-clang success clang PASS
prestwoj/iwd-alpine-ci-makecheckvalgrind fail Make FAIL: monitor/main.c: In function 'open_packet': monitor/main.c:176:17: error: implicit declaration of function 'close'; did you mean 'pclose'? [-Werror=implicit-function-declaration] 176 | close(fd); | ^~~~~ | pclose cc1: all warnings being treated as errors make[1]: *** [Makefile:2572: monitor/main.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:1735: all] Error 2
prestwoj/iwd-alpine-ci-makecheck pending makecheck SKIP
prestwoj/iwd-alpine-ci-incremental_build fail Make FAIL (patch 0): monitor/main.c: In function 'open_packet': monitor/main.c:176:17: error: implicit declaration of function 'close'; did you mean 'pclose'? [-Werror=implicit-function-declaration] 176 | close(fd); | ^~~~~ | pclose cc1: all warnings being treated as errors make[1]: *** [Makefile:2541: monitor/main.o] Error 1 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:1715: all] Error 2
prestwoj/iwd-ci-incremental_build success Incremental Build with patches
prestwoj/iwd-ci-testrunner success test-runner PASS

Commit Message

James Prestwood Jan. 3, 2024, 6:46 p.m. UTC
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(-)

Comments

Denis Kenzior Jan. 4, 2024, 5:56 p.m. UTC | #1
Hi James,

On 1/3/24 12:46, James Prestwood wrote:
> 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(-)
> 

Applied, thanks.

Regards,
-Denis
diff mbox series

Patch

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);