Bluetooth: Fix not notifying when connection encryption changes
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Mon, 23 Oct 2023 23:26:23 +0000 (16:26 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 1 Jan 2024 12:42:31 +0000 (12:42 +0000)
commit399dea9d5ac8b21ccc104236df3ce4cd73031eca
treefde3c8e74be3978f45150241c8ee58098cc346ba
parentffced26692f83212aa09d0ece0213b23cc2f611d
Bluetooth: Fix not notifying when connection encryption changes

[ Upstream commit f67eabffb57d0bee379994a18ec5f462b2cbdf86 ]

Some layers such as SMP depend on getting notified about encryption
changes immediately as they only allow certain PDU to be transmitted
over an encrypted link which may cause SMP implementation to reject
valid PDUs received thus causing pairing to fail when it shouldn't.

Fixes: 7aca0ac4792e ("Bluetooth: Wait for HCI_OP_WRITE_AUTH_PAYLOAD_TO to complete")
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/bluetooth/hci_event.c