netdev: remove unneeded disconnect for OWE failure

If OWE fails in association there is no reason to send a disconnect
since its already known that we failed. Instead we can directly
call netdev_connect_failed
This commit is contained in:
James Prestwood 2019-02-27 14:44:15 -08:00 committed by Denis Kenzior
parent 51f21c1c9b
commit d6abf62946
1 changed files with 2 additions and 7 deletions

View File

@ -2600,19 +2600,14 @@ static void netdev_owe_tx_associate(struct iovec *ie_iov, size_t iov_len,
static void netdev_owe_complete(uint16_t status, void *user_data) static void netdev_owe_complete(uint16_t status, void *user_data)
{ {
struct netdev *netdev = user_data; struct netdev *netdev = user_data;
struct l_genl_msg *msg;
if (status) { if (status) {
/* /*
* OWE will never fail during authenticate, at least internally, * OWE will never fail during authenticate, at least internally,
* so we can always assume its association that failed. * so we can always assume its association that failed.
*/ */
netdev->result = NETDEV_RESULT_ASSOCIATION_FAILED; netdev_connect_failed(netdev, NETDEV_RESULT_ASSOCIATION_FAILED,
netdev->last_status_code = status; status);
msg = netdev_build_cmd_disconnect(netdev, status);
netdev->disconnect_cmd_id = l_genl_family_send(nl80211, msg,
netdev_disconnect_cb,
netdev, NULL);
return; return;
} }