diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2021-11-24 16:16:13 -0800 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2021-11-25 21:06:18 +0100 |
commit | 7978656caf2ad3963fb63797128ec8d71caa2798 (patch) | |
tree | 269891322b415ae938d3f1ab1d74a3ccfdeff86f /net | |
parent | e88422bccda86808359f0d4179e25e5c2191ab4f (diff) | |
download | linux-7978656caf2ad3963fb63797128ec8d71caa2798.tar.bz2 |
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')
-rw-r--r-- | net/bluetooth/hci_event.c | 2 |
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; } |