Bluetooth: Use the updated key structures for handling LTKs
This updates all the users of the older way, that was using the link_keys list to store the SMP keys, to use the new way. This includes defining new types for the keys, we have a type for each combination of STK/LTK and Master/Slave. Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
committed by
Johan Hedberg
parent
b899efaf9b
commit
c9839a11c0
@@ -658,12 +658,13 @@ int hci_link_keys_clear(struct hci_dev *hdev);
|
||||
struct link_key *hci_find_link_key(struct hci_dev *hdev, bdaddr_t *bdaddr);
|
||||
int hci_add_link_key(struct hci_dev *hdev, struct hci_conn *conn, int new_key,
|
||||
bdaddr_t *bdaddr, u8 *val, u8 type, u8 pin_len);
|
||||
struct link_key *hci_find_ltk(struct hci_dev *hdev, __le16 ediv, u8 rand[8]);
|
||||
struct link_key *hci_find_link_key_type(struct hci_dev *hdev,
|
||||
bdaddr_t *bdaddr, u8 type);
|
||||
struct smp_ltk *hci_find_ltk(struct hci_dev *hdev, __le16 ediv, u8 rand[8]);
|
||||
int hci_add_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 addr_type, u8 type,
|
||||
int new_key, u8 authenticated, u8 tk[16],
|
||||
u8 enc_size, u16 ediv, u8 rand[8]);
|
||||
struct smp_ltk *hci_find_ltk_by_addr(struct hci_dev *hdev, bdaddr_t *bdaddr,
|
||||
u8 addr_type);
|
||||
int hci_remove_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr);
|
||||
int hci_add_ltk(struct hci_dev *hdev, int new_key, bdaddr_t *bdaddr,
|
||||
u8 key_size, __le16 ediv, u8 rand[8], u8 ltk[16]);
|
||||
int hci_smp_ltks_clear(struct hci_dev *hdev);
|
||||
int hci_remove_link_key(struct hci_dev *hdev, bdaddr_t *bdaddr);
|
||||
|
||||
|
Reference in New Issue
Block a user