3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 09:39:25 +01:00

station: Fix .Scanning being reset early

periodic_scan_stop is called whenever we exit the autoscan state but a
periodic scan may not be running at the time.  If we have a
user-triggered scan running, or the autoconnect_quick scan, and we reset
Scanning to false before that scan finished, a client could en up
calling GetOrderedNetwork too early and not receiving the scan results.
This commit is contained in:
Andrew Zaborowski 2020-10-14 14:35:19 +02:00 committed by Denis Kenzior
parent 9815fb38cf
commit 1f89ebb86a

View File

@ -1031,9 +1031,8 @@ static void periodic_scan_stop(struct station *station)
{
uint64_t id = netdev_get_wdev_id(station->netdev);
scan_periodic_stop(id);
station_property_set_scanning(station, false);
if (scan_periodic_stop(id))
station_property_set_scanning(station, false);
}
static bool station_needs_hidden_network_scan(struct station *station)