Commit 6ef99c91 authored by Luiz Augusto von Dentz's avatar Luiz Augusto von Dentz
Browse files

Bluetooth: SMP: Fix using HCI_ERROR_REMOTE_USER_TERM on timeout



This replaces the usage of HCI_ERROR_REMOTE_USER_TERM, which as the name
suggest is to indicate a regular disconnection initiated by an user,
with HCI_ERROR_AUTH_FAILURE to indicate the session has timeout thus any
pairing shall be considered as failed.

Fixes: 1e91c29e ("Bluetooth: Use hci_disconnect for immediate disconnection from SMP")
Signed-off-by: default avatarLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
parent fe4840df
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1379,7 +1379,7 @@ static void smp_timeout(struct work_struct *work)

	bt_dev_dbg(conn->hcon->hdev, "conn %p", conn);

	hci_disconnect(conn->hcon, HCI_ERROR_REMOTE_USER_TERM);
	hci_disconnect(conn->hcon, HCI_ERROR_AUTH_FAILURE);
}

static struct smp_chan *smp_chan_create(struct l2cap_conn *conn)