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

[PATCH netdev: Don't generate disconnect event in netdev_free

As discussed previously there's no point in having device.c change state
to autoconnect when device_remove will be called next.
This commit is contained in:
Andrew Zaborowski 2017-02-10 03:23:15 +01:00 committed by Denis Kenzior
parent 2ab67a1ee3
commit 7006d18550

View File

@ -371,10 +371,9 @@ static void netdev_free(void *data)
l_timeout_remove(netdev->neighbor_report_timeout); l_timeout_remove(netdev->neighbor_report_timeout);
} }
if (netdev->connected) { if (netdev->connected)
netdev->result = NETDEV_RESULT_ABORTED; netdev_connect_free(netdev);
netdev_connect_failed(NULL, netdev); else if (netdev->disconnect_cmd_id) {
} else if (netdev->disconnect_cmd_id) {
l_genl_family_cancel(nl80211, netdev->disconnect_cmd_id); l_genl_family_cancel(nl80211, netdev->disconnect_cmd_id);
netdev->disconnect_cmd_id = 0; netdev->disconnect_cmd_id = 0;