From: Luiz Augusto von Dentz Date: Wed, 2 Jul 2025 15:53:40 +0000 (-0400) Subject: Bluetooth: SMP: Fix using HCI_ERROR_REMOTE_USER_TERM on timeout X-Git-Tag: v5.10.241~484 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5a4509bfd89f901e2cc68f3838e3ff1225fc9f90;p=thirdparty%2Fkernel%2Fstable.git Bluetooth: SMP: Fix using HCI_ERROR_REMOTE_USER_TERM on timeout [ Upstream commit 6ef99c917688a8510259e565bd1b168b7146295a ] 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: 1e91c29eb60c ("Bluetooth: Use hci_disconnect for immediate disconnection from SMP") Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin --- diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c index 5a56e862ba13c..fc896d39a6d95 100644 --- a/net/bluetooth/smp.c +++ b/net/bluetooth/smp.c @@ -1374,7 +1374,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)