From 94fc5b27c5387984da2260a68c160debceaa2b51 Mon Sep 17 00:00:00 2001 From: Andrei Emeltchenko Date: Fri, 8 May 2015 12:58:40 +0300 Subject: [PATCH] Bluetooth: Add definitions for LE Encrypt command and reply Add definitions for implementing HCI controller encryption. Change-Id: I4e919c8a081c9e61174e6b08f5b2ac088e4b1a4d Signed-off-by: Andrei Emeltchenko --- include/bluetooth/hci.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/bluetooth/hci.h b/include/bluetooth/hci.h index 33727d05f74..89c8ba6161e 100644 --- a/include/bluetooth/hci.h +++ b/include/bluetooth/hci.h @@ -202,6 +202,16 @@ struct bt_hci_cp_le_set_adv_enable { uint8_t enable; } PACK_STRUCT; +#define BT_HCI_OP_LE_ENCRYPT BT_OP(BT_OGF_LE, 0x0017) +struct bt_hci_cp_le_encrypt { + uint8_t key[16]; + uint8_t plaintext[16]; +} PACK_STRUCT; +struct bt_hci_rp_le_encrypt { + uint8_t status; + uint8_t enc_data[16]; +} PACK_STRUCT; + /* Event definitions */ #define BT_HCI_EVT_DISCONN_COMPLETE 0x05