From dc38964e42eb4f5439ce666a433f6869ce63cab7 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Wed, 1 Mar 2023 09:35:48 -0600 Subject: [PATCH] station: Use ft_authenticate_onchannel In the case that the FT target is on the same channel as we're currently operating on, use ft_authenticate_onchannel instead of ft_authenticate. Going offchannel in this case can confuse some drivers. --- src/station.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/station.c b/src/station.c index 7f1a1e24..8688eaa7 100644 --- a/src/station.c +++ b/src/station.c @@ -2298,12 +2298,21 @@ static bool station_fast_transition(struct station *station, } /* Both ft_action/ft_authenticate will gate the associate work item */ - if ((hs->mde[4] & 1)) + if ((hs->mde[4] & 1)) { ft_action(netdev_get_ifindex(station->netdev), station->connected_bss->frequency, bss); - else - ft_authenticate(netdev_get_ifindex(station->netdev), bss); + goto done; + } + if (station->connected_bss->frequency == bss->frequency) { + ft_authenticate_onchannel(netdev_get_ifindex(station->netdev), + bss); + goto done; + } + + ft_authenticate(netdev_get_ifindex(station->netdev), bss); + +done: wiphy_radio_work_insert(station->wiphy, &station->ft_work, WIPHY_WORK_PRIORITY_CONNECT, &ft_work_ops);