3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-23 06:02:37 +01:00

station: cancel quick scans on Connect()

At some point the non-interactive client tests began failing.
This was due to a bug in station where it would transition from
'connected' to 'autoconnect' due to a failed scan request. This
happened because a quick scan got scheduled during an ongoing
scan, then a Connect() gets issued. The work queue treats the
Connect as a priority so it delays the quick scan until after the
connection succeeds. This results in a failed quick scan which
IWD does not expect to happen when in a 'connected' state. This
failed scan actually triggers a state transition which then
gets IWD into a strange state where its connected from the
kernel point of view but does not think it is:

src/station.c:station_connect_cb() 13, result: 0
src/station.c:station_enter_state() Old State: connecting, new state: connected
src/wiphy.c:wiphy_radio_work_done() Work item 6 done
src/wiphy.c:wiphy_radio_work_next() Starting work item 5
src/station.c:station_quick_scan_triggered() Quick scan trigger failed: -95
src/station.c:station_enter_state() Old State: connected, new state: autoconnect_full

To fix this IWD should simply cancel any pending quick scans
if/when a Connect() call comes in.
This commit is contained in:
James Prestwood 2021-01-26 11:57:35 -08:00 committed by Denis Kenzior
parent b0e970ae38
commit a9c32d85ea

View File

@ -2539,6 +2539,12 @@ void station_connect_network(struct station *station, struct network *network,
dbus_error_failed(station->hidden_pending)); dbus_error_failed(station->hidden_pending));
} }
if (station->quick_scan_id) {
scan_cancel(netdev_get_wdev_id(station->netdev),
station->quick_scan_id);
station->quick_scan_id = 0;
}
if (station_is_busy(station)) { if (station_is_busy(station)) {
station_disconnect_onconnect(station, network, bss, message); station_disconnect_onconnect(station, network, bss, message);