aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2021-11-24 16:16:13 -0800
committerMarcel Holtmann <marcel@holtmann.org>2021-11-25 21:06:18 +0100
commit7978656caf2ad3963fb63797128ec8d71caa2798 (patch)
tree269891322b415ae938d3f1ab1d74a3ccfdeff86f /net/bluetooth
parentBluetooth: HCI: Fix definition of hci_rp_read_stored_link_key (diff)
downloadlinux-dev-7978656caf2ad3963fb63797128ec8d71caa2798.tar.xz
linux-dev-7978656caf2ad3963fb63797128ec8d71caa2798.zip
Bluetooth: HCI: Fix definition of hci_rp_delete_stored_link_key
num_keys is actually 2 octects not 1: BLUETOOTH CORE SPECIFICATION Version 5.3 | Vol 4, Part E page 1989: Num_Keys_Deleted: Size: 2 octets 0xXXXX Number of Link Keys Deleted Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/hci_event.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index bda7b3ad93fa..394d676c9baa 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -272,7 +272,7 @@ static void hci_cc_delete_stored_link_key(struct hci_dev *hdev,
return;
if (rp->num_keys <= hdev->stored_num_keys)
- hdev->stored_num_keys -= rp->num_keys;
+ hdev->stored_num_keys -= le16_to_cpu(rp->num_keys);
else
hdev->stored_num_keys = 0;
}