diff options
author | Vinicius Costa Gomes <vinicius.gomes@openbossa.org> | 2012-02-02 19:08:01 -0500 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2012-02-13 10:01:33 -0500 |
commit | c9839a11c0e460a2457e7cac76650d07773e6c3b (patch) | |
tree | 053e815839a9dcc099bad50863acb63eed884857 /include/net | |
parent | b899efaf9b26cadb084752862490b4fc44bc3169 (diff) |
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>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/bluetooth/hci_core.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index c998176a503d..2649caf4db96 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -658,12 +658,13 @@ int hci_link_keys_clear(struct hci_dev *hdev); | |||
658 | struct link_key *hci_find_link_key(struct hci_dev *hdev, bdaddr_t *bdaddr); | 658 | struct link_key *hci_find_link_key(struct hci_dev *hdev, bdaddr_t *bdaddr); |
659 | int hci_add_link_key(struct hci_dev *hdev, struct hci_conn *conn, int new_key, | 659 | int hci_add_link_key(struct hci_dev *hdev, struct hci_conn *conn, int new_key, |
660 | bdaddr_t *bdaddr, u8 *val, u8 type, u8 pin_len); | 660 | bdaddr_t *bdaddr, u8 *val, u8 type, u8 pin_len); |
661 | struct link_key *hci_find_ltk(struct hci_dev *hdev, __le16 ediv, u8 rand[8]); | 661 | struct smp_ltk *hci_find_ltk(struct hci_dev *hdev, __le16 ediv, u8 rand[8]); |
662 | struct link_key *hci_find_link_key_type(struct hci_dev *hdev, | 662 | int hci_add_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 addr_type, u8 type, |
663 | bdaddr_t *bdaddr, u8 type); | 663 | int new_key, u8 authenticated, u8 tk[16], |
664 | u8 enc_size, u16 ediv, u8 rand[8]); | ||
665 | struct smp_ltk *hci_find_ltk_by_addr(struct hci_dev *hdev, bdaddr_t *bdaddr, | ||
666 | u8 addr_type); | ||
664 | int hci_remove_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr); | 667 | int hci_remove_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr); |
665 | int hci_add_ltk(struct hci_dev *hdev, int new_key, bdaddr_t *bdaddr, | ||
666 | u8 key_size, __le16 ediv, u8 rand[8], u8 ltk[16]); | ||
667 | int hci_smp_ltks_clear(struct hci_dev *hdev); | 668 | int hci_smp_ltks_clear(struct hci_dev *hdev); |
668 | int hci_remove_link_key(struct hci_dev *hdev, bdaddr_t *bdaddr); | 669 | int hci_remove_link_key(struct hci_dev *hdev, bdaddr_t *bdaddr); |
669 | 670 | ||