3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-22 14:49:24 +01:00

station: move scan cancelation to __station_connect_network

An earlier patch fixed a problem where a queued quick scan would
be triggered and fail once already connected, resulting in a state
transition from connected --> autoconnect_full. This fixed the
Connect() path but this could also happen via autoconnect. Starting
from a connected state, the sequence goes:

 - DBus scan is triggered
 - AP disconnects IWD
 - State transition from disconnected --> autoconnect_quick
 - Queue quick scan
 - DBus scan results come in and used to autoconnect
 - A connect work item is inserted ahead of all others, transition
   from autoconnect_quick --> connecting.
 - Connect completes, transition from connecting --> connected
 - Quick scan can finally get triggered, which the kernel fails to
   do since IWD is connected, transition from connected -->
   autoconnect_full.

This can be fixed by checking for a pending quick scan in the
autoconnect path.
This commit is contained in:
James Prestwood 2021-02-04 16:06:02 -08:00 committed by Denis Kenzior
parent 603988476a
commit c026337792

View File

@ -196,6 +196,13 @@ static void station_autoconnect_next(struct station *station)
if (!r) {
station_enter_state(station, STATION_STATE_CONNECTING);
if (station->quick_scan_id) {
scan_cancel(netdev_get_wdev_id(station->netdev),
station->quick_scan_id);
station->quick_scan_id = 0;
}
return;
}
}