diff options
| author | Johan Hedberg <johan.hedberg@intel.com> | 2014-02-18 03:19:33 -0500 |
|---|---|---|
| committer | Marcel Holtmann <marcel@holtmann.org> | 2014-02-18 03:47:03 -0500 |
| commit | 970c4e46037ab8ece3940afc9fcf916d3ed7e003 (patch) | |
| tree | fb71f7c47fc5a9b30020f93d5821de3285454004 /include/net/bluetooth | |
| parent | 99780a7b639e73d8f8f291fa1a981db883aec47f (diff) | |
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.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index b344890b18f5..eac422337582 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
| @@ -103,6 +103,14 @@ struct smp_ltk { | |||
| 103 | u8 val[16]; | 103 | u8 val[16]; |
| 104 | }; | 104 | }; |
| 105 | 105 | ||
| 106 | struct smp_irk { | ||
| 107 | struct list_head list; | ||
| 108 | bdaddr_t rpa; | ||
| 109 | bdaddr_t bdaddr; | ||
| 110 | u8 addr_type; | ||
| 111 | u8 val[16]; | ||
| 112 | }; | ||
| 113 | |||
| 106 | struct link_key { | 114 | struct link_key { |
| 107 | struct list_head list; | 115 | struct list_head list; |
| 108 | bdaddr_t bdaddr; | 116 | bdaddr_t bdaddr; |
| @@ -269,6 +277,7 @@ struct hci_dev { | |||
| 269 | struct list_head uuids; | 277 | struct list_head uuids; |
| 270 | struct list_head link_keys; | 278 | struct list_head link_keys; |
| 271 | struct list_head long_term_keys; | 279 | struct list_head long_term_keys; |
| 280 | struct list_head identity_resolving_keys; | ||
| 272 | struct list_head remote_oob_data; | 281 | struct list_head remote_oob_data; |
| 273 | struct list_head le_conn_params; | 282 | struct list_head le_conn_params; |
| 274 | 283 | ||
| @@ -787,6 +796,13 @@ int hci_remove_ltk(struct hci_dev *hdev, bdaddr_t *bdaddr); | |||
| 787 | int hci_smp_ltks_clear(struct hci_dev *hdev); | 796 | int hci_smp_ltks_clear(struct hci_dev *hdev); |
| 788 | int hci_remove_link_key(struct hci_dev *hdev, bdaddr_t *bdaddr); | 797 | int hci_remove_link_key(struct hci_dev *hdev, bdaddr_t *bdaddr); |
| 789 | 798 | ||
| 799 | struct smp_irk *hci_find_irk_by_rpa(struct hci_dev *hdev, bdaddr_t *rpa); | ||
| 800 | struct smp_irk *hci_find_irk_by_addr(struct hci_dev *hdev, bdaddr_t *bdaddr, | ||
| 801 | u8 addr_type); | ||
| 802 | int hci_add_irk(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 addr_type, | ||
| 803 | u8 val[16], bdaddr_t *rpa); | ||
| 804 | void hci_smp_irks_clear(struct hci_dev *hdev); | ||
| 805 | |||
| 790 | int hci_remote_oob_data_clear(struct hci_dev *hdev); | 806 | int hci_remote_oob_data_clear(struct hci_dev *hdev); |
| 791 | struct oob_data *hci_find_remote_oob_data(struct hci_dev *hdev, | 807 | struct oob_data *hci_find_remote_oob_data(struct hci_dev *hdev, |
| 792 | bdaddr_t *bdaddr); | 808 | bdaddr_t *bdaddr); |
