3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-19 02:39:29 +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);
}
if (netdev->connected) {
netdev->result = NETDEV_RESULT_ABORTED;
netdev_connect_failed(NULL, netdev);
} else if (netdev->disconnect_cmd_id) {
if (netdev->connected)
netdev_connect_free(netdev);
else if (netdev->disconnect_cmd_id) {
l_genl_family_cancel(nl80211, netdev->disconnect_cmd_id);
netdev->disconnect_cmd_id = 0;