diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2021-11-24 16:16:12 -0800 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2021-11-25 21:03:45 +0100 |
commit | e88422bccda86808359f0d4179e25e5c2191ab4f (patch) | |
tree | 8bd0e188c9e61b98bb56f3785d6b9117298a64a2 /net/bluetooth | |
parent | 899663be5e75dc0174dc8bda0b5e6826edf0b29a (diff) | |
download | linux-e88422bccda86808359f0d4179e25e5c2191ab4f.tar.bz2 |
Bluetooth: HCI: Fix definition of hci_rp_read_stored_link_key
Both max_num_keys and num_key are 2 octects:
BLUETOOTH CORE SPECIFICATION Version 5.3 | Vol 4, Part E
page 1985:
Max_Num_Keys:
Size: 2 octets
Range: 0x0000 to 0xFFFF
Num_Keys_Read:
Size: 2 octets
Range: 0x0000 to 0xFFFF
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.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index dee4ef22fc88..bda7b3ad93fa 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -256,8 +256,8 @@ static void hci_cc_read_stored_link_key(struct hci_dev *hdev, return; if (!rp->status && sent->read_all == 0x01) { - hdev->stored_max_keys = rp->max_keys; - hdev->stored_num_keys = rp->num_keys; + hdev->stored_max_keys = le16_to_cpu(rp->max_keys); + hdev->stored_num_keys = le16_to_cpu(rp->num_keys); } } |