aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/bluetooth/hci.h
diff options
context:
space:
mode:
authorAndrei Emeltchenko <andrei.emeltchenko@intel.com>2012-05-23 04:31:20 -0400
committerJohan Hedberg <johan.hedberg@intel.com>2012-06-04 23:34:06 -0400
commit9b3b44604ac8e06d299718c5d0fa0b91b675ae0b (patch)
treeb079fbe2b97d297f19c5d4c24560169157ac3db9 /include/net/bluetooth/hci.h
parenta6c511c636848f871f5b7aef38e25e5b894b3b48 (diff)
Bluetooth: Use defined link key size
Remove magic number with defined link key size. Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net/bluetooth/hci.h')
-rw-r--r--include/net/bluetooth/hci.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 97c57aa938f3..0bc5555510f3 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -30,6 +30,8 @@
30#define HCI_MAX_EVENT_SIZE 260 30#define HCI_MAX_EVENT_SIZE 260
31#define HCI_MAX_FRAME_SIZE (HCI_MAX_ACL_SIZE + 4) 31#define HCI_MAX_FRAME_SIZE (HCI_MAX_ACL_SIZE + 4)
32 32
33#define HCI_LINK_KEY_SIZE 16
34
33/* HCI dev events */ 35/* HCI dev events */
34#define HCI_DEV_REG 1 36#define HCI_DEV_REG 1
35#define HCI_DEV_UNREG 2 37#define HCI_DEV_UNREG 2
@@ -371,7 +373,7 @@ struct hci_cp_reject_conn_req {
371#define HCI_OP_LINK_KEY_REPLY 0x040b 373#define HCI_OP_LINK_KEY_REPLY 0x040b
372struct hci_cp_link_key_reply { 374struct hci_cp_link_key_reply {
373 bdaddr_t bdaddr; 375 bdaddr_t bdaddr;
374 __u8 link_key[16]; 376 __u8 link_key[HCI_LINK_KEY_SIZE];
375} __packed; 377} __packed;
376 378
377#define HCI_OP_LINK_KEY_NEG_REPLY 0x040c 379#define HCI_OP_LINK_KEY_NEG_REPLY 0x040c
@@ -1048,7 +1050,7 @@ struct hci_ev_link_key_req {
1048#define HCI_EV_LINK_KEY_NOTIFY 0x18 1050#define HCI_EV_LINK_KEY_NOTIFY 0x18
1049struct hci_ev_link_key_notify { 1051struct hci_ev_link_key_notify {
1050 bdaddr_t bdaddr; 1052 bdaddr_t bdaddr;
1051 __u8 link_key[16]; 1053 __u8 link_key[HCI_LINK_KEY_SIZE];
1052 __u8 key_type; 1054 __u8 key_type;
1053} __packed; 1055} __packed;
1054 1056