summaryrefslogtreecommitdiffstats
path: root/include/net/bluetooth
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-02-18 10:19:33 +0200
committerMarcel Holtmann <marcel@holtmann.org>2014-02-18 00:47:03 -0800
commit970c4e46037ab8ece3940afc9fcf916d3ed7e003 (patch)
treefb71f7c47fc5a9b30020f93d5821de3285454004 /include/net/bluetooth
parent99780a7b639e73d8f8f291fa1a981db883aec47f (diff)
downloadop-kernel-dev-970c4e46037ab8ece3940afc9fcf916d3ed7e003.zip
op-kernel-dev-970c4e46037ab8ece3940afc9fcf916d3ed7e003.tar.gz
Bluetooth: Add basic IRK management support
This patch adds the initial IRK storage and management functions to the HCI core. This includes storing a list of IRKs per HCI device and the ability to add, remove and lookup entries in that list. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net/bluetooth')
-rw-r--r--include/net/bluetooth/hci_core.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index b344890..eac4223 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -103,6 +103,14 @@ struct smp_ltk {
u8 val[16];
};
+struct smp_irk {
+ struct list_head list;
+ bdaddr_t rpa;
+ bdaddr_t bdaddr;
+ u8 addr_type;
+ u8 val[16];
+};
+
struct link_key {
struct list_head list;
bdaddr_t bdaddr;
@@ -269,6 +277,7 @@ struct hci_dev {
struct list_head uuids;
struct list_head link_keys;
struct list_head long_term_keys;
+ struct list_head identity_resolving_keys;
struct list_head remote_oob_data;
struct list_head le_conn_params;
@@ -787,6 +796,13 @@ int hci_remove_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr);
int hci_smp_ltks_clear(struct hci_dev *hdev);
int hci_remove_link_key(struct hci_dev *hdev, bdaddr_t *bdaddr);
+struct smp_irk *hci_find_irk_by_rpa(struct hci_dev *hdev, bdaddr_t *rpa);
+struct smp_irk *hci_find_irk_by_addr(struct hci_dev *hdev, bdaddr_t *bdaddr,
+ u8 addr_type);
+int hci_add_irk(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 addr_type,
+ u8 val[16], bdaddr_t *rpa);
+void hci_smp_irks_clear(struct hci_dev *hdev);
+
int hci_remote_oob_data_clear(struct hci_dev *hdev);
struct oob_data *hci_find_remote_oob_data(struct hci_dev *hdev,
bdaddr_t *bdaddr);
OpenPOWER on IntegriCloud