mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 23:09:34 +01:00
netdev: better handle disconnect after FW scan
This should have been updated along with the connect and roam event separation. Since netdev_connect_event is not being re-used for CMD_ROAM the comment did not make sense anymore. Still, there needs to be a check to ensure we were not disconnected while waiting for GET_SCAN to come back.
This commit is contained in:
parent
0d6b572ca5
commit
44625373bc
@ -4099,12 +4099,10 @@ static bool netdev_get_fw_scan_cb(int err, struct l_queue *bss_list,
|
|||||||
struct scan_bss *bss = NULL;
|
struct scan_bss *bss = NULL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If there was a failure in netdev_connect_event this would reset
|
* If we happened to be disconnected prior to GET_SCAN coming back
|
||||||
* the connect state (netdev_connect_free) causing the sm to be freed.
|
* just bail out now. This disconnect should already have been handled.
|
||||||
* In this case we should just ignore this and allow the disconnect
|
|
||||||
* logic to continue.
|
|
||||||
*/
|
*/
|
||||||
if (!netdev->sm)
|
if (!netdev->connected)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (err < 0) {
|
if (err < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user