wiphy: If connection failed, reset the PSK

This allows us to retry the agent for the correct passphrase
This commit is contained in:
Denis Kenzior 2015-04-08 15:07:02 -05:00
parent 0b48ba3a4a
commit c9f1090380
1 changed files with 9 additions and 0 deletions

View File

@ -1228,6 +1228,15 @@ static void mlme_disconnect_event(struct l_genl_msg *msg,
dbus_pending_reply(&netdev->connect_pending,
dbus_error_failed(netdev->connect_pending));
/*
* Connection failed, if PSK try asking for the passphrase
* once more
*/
if (network->ssid_security == SCAN_SSID_SECURITY_PSK) {
l_free(network->psk);
network->psk = NULL;
}
}
netdev->connected_bss = NULL;