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

station: fail if trying to scan while connecting

If a scan is requested during the middle of a connection we should
return busy instead of attempting the scan. The kernel ends up coming
back with not supported in this case, which is misleading and
difficult to debug.
This commit is contained in:
James Prestwood 2019-11-14 10:59:59 -08:00 committed by Denis Kenzior
parent 299337b579
commit 90fb7eff7d

View File

@ -2751,6 +2751,9 @@ static struct l_dbus_message *station_dbus_scan(struct l_dbus *dbus,
if (station->dbus_scan_id)
return dbus_error_busy(message);
if (station->state == STATION_STATE_CONNECTING)
return dbus_error_busy(message);
station->dbus_scan_id = station_scan_trigger(station, NULL,
station_dbus_scan_triggered,
new_scan_results,