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

wiphy: Stop eapol state machine if disconnecting

This commit is contained in:
Denis Kenzior 2015-03-29 22:50:34 -05:00
parent 445ad55796
commit b2e1c36cbb

View File

@ -613,6 +613,10 @@ static struct l_dbus_message *device_disconnect(struct l_dbus *dbus,
if (!netdev->connected_bss)
return dbus_error_failed(message);
if (netdev->connected_bss->network->ssid_security ==
SCAN_SSID_SECURITY_PSK)
eapol_cancel(netdev->index);
msg = l_genl_msg_new_sized(NL80211_CMD_DEAUTHENTICATE, 512);
msg_append_attr(msg, NL80211_ATTR_IFINDEX, 4, &netdev->index);
msg_append_attr(msg, NL80211_ATTR_REASON_CODE, 2, &reason_code);