summaryrefslogtreecommitdiff
path: root/net/bluetooth/smp.h
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-05-23 13:15:37 +0300
committerMarcel Holtmann <marcel@holtmann.org>2014-12-03 16:51:15 +0100
commit23fb8de376181a30c35195351ec6230167098b48 (patch)
tree92f5a31cecef6f9a22c8e58efd0e95979a0865d0 /net/bluetooth/smp.h
parentd2eb9e10f74fc1fe5e7e7abc9965ff965e1b4f54 (diff)
Bluetooth: Add mgmt support for LE Secure Connections LTK types
We need a dedicated LTK type for LTK resulting from a Secure Connections based SMP pairing. This patch adds a new define for it and ensures that both the New LTK event as well as the Load LTKs command supports it. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/smp.h')
-rw-r--r--net/bluetooth/smp.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/net/bluetooth/smp.h b/net/bluetooth/smp.h
index 7c3c351909f5..81d24c0ea08b 100644
--- a/net/bluetooth/smp.h
+++ b/net/bluetooth/smp.h
@@ -146,8 +146,21 @@ enum {
SMP_STK,
SMP_LTK,
SMP_LTK_SLAVE,
+ SMP_LTK_P256,
+ SMP_LTK_P256_DEBUG,
};
+static inline bool smp_ltk_is_sc(struct smp_ltk *key)
+{
+ switch (key->type) {
+ case SMP_LTK_P256:
+ case SMP_LTK_P256_DEBUG:
+ return true;
+ }
+
+ return false;
+}
+
static inline u8 smp_ltk_sec_level(struct smp_ltk *key)
{
if (key->authenticated)