diff options
author | Vinicius Costa Gomes <vinicius.gomes@openbossa.org> | 2011-07-08 17:31:45 -0400 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-07-08 17:39:19 -0400 |
commit | 726b4ffcaa450d9593b9b6ac8605967ce9f3e506 (patch) | |
tree | 5d274067ab8946d081f01c9b160bff495aca857c /include/net | |
parent | 5a0a8b49746771fba79866fb9185ffa051a6a183 (diff) |
Bluetooth: Add support for storing the key size
In some cases it will be useful having the key size used for
encrypting the link. For example, some profiles may restrict
some operations depending on the key length.
The key size is stored in the key that is passed to userspace
using the pin_length field in the key structure.
For now this field is only valid for LE controllers. 3.0+HS
controllers define the Read Encryption Key Size command, this
field is intended for storing the value returned by that
command.
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@openbossa.org>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/bluetooth/hci_core.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 4ff530e3892b..c41e275917c7 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -261,6 +261,7 @@ struct hci_conn { | |||
261 | __u8 sec_level; | 261 | __u8 sec_level; |
262 | __u8 pending_sec_level; | 262 | __u8 pending_sec_level; |
263 | __u8 pin_length; | 263 | __u8 pin_length; |
264 | __u8 enc_key_size; | ||
264 | __u8 io_capability; | 265 | __u8 io_capability; |
265 | __u8 power_save; | 266 | __u8 power_save; |
266 | __u16 disc_timeout; | 267 | __u16 disc_timeout; |
@@ -556,7 +557,7 @@ struct link_key *hci_find_ltk(struct hci_dev *hdev, __le16 ediv, u8 rand[8]); | |||
556 | struct link_key *hci_find_link_key_type(struct hci_dev *hdev, | 557 | struct link_key *hci_find_link_key_type(struct hci_dev *hdev, |
557 | bdaddr_t *bdaddr, u8 type); | 558 | bdaddr_t *bdaddr, u8 type); |
558 | int hci_add_ltk(struct hci_dev *hdev, int new_key, bdaddr_t *bdaddr, | 559 | int hci_add_ltk(struct hci_dev *hdev, int new_key, bdaddr_t *bdaddr, |
559 | __le16 ediv, u8 rand[8], u8 ltk[16]); | 560 | u8 key_size, __le16 ediv, u8 rand[8], u8 ltk[16]); |
560 | int hci_remove_link_key(struct hci_dev *hdev, bdaddr_t *bdaddr); | 561 | int hci_remove_link_key(struct hci_dev *hdev, bdaddr_t *bdaddr); |
561 | 562 | ||
562 | int hci_remote_oob_data_clear(struct hci_dev *hdev); | 563 | int hci_remote_oob_data_clear(struct hci_dev *hdev); |