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

netdev: add check for running work item in netdev_disconnect

The send_disconnect flag was being improperly set based only
on connect_cmd_id being zero. This does not take into account
the case of CMD_CONNECT having finished but not EAPoL. In this
case we do need to send a disconnect.
This commit is contained in:
James Prestwood 2021-04-05 15:18:35 -07:00 committed by Denis Kenzior
parent 1c0b001b53
commit d008b93444

View File

@ -3214,7 +3214,8 @@ int netdev_disconnect(struct netdev *netdev,
if (netdev->connect_cmd_id) {
l_genl_family_cancel(nl80211, netdev->connect_cmd_id);
netdev->connect_cmd_id = 0;
} else
} else if (!wiphy_radio_work_is_running(netdev->wiphy,
netdev->work.id))
send_disconnect = false;
netdev_connect_failed(netdev, NETDEV_RESULT_ABORTED,