diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2014-05-23 06:15:37 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-12-03 10:51:15 -0500 |
commit | 23fb8de376181a30c35195351ec6230167098b48 (patch) | |
tree | 92f5a31cecef6f9a22c8e58efd0e95979a0865d0 /net/bluetooth/smp.h | |
parent | d2eb9e10f74fc1fe5e7e7abc9965ff965e1b4f54 (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.h | 13 |
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 { | |||
146 | SMP_STK, | 146 | SMP_STK, |
147 | SMP_LTK, | 147 | SMP_LTK, |
148 | SMP_LTK_SLAVE, | 148 | SMP_LTK_SLAVE, |
149 | SMP_LTK_P256, | ||
150 | SMP_LTK_P256_DEBUG, | ||
149 | }; | 151 | }; |
150 | 152 | ||
153 | static inline bool smp_ltk_is_sc(struct smp_ltk *key) | ||
154 | { | ||
155 | switch (key->type) { | ||
156 | case SMP_LTK_P256: | ||
157 | case SMP_LTK_P256_DEBUG: | ||
158 | return true; | ||
159 | } | ||
160 | |||
161 | return false; | ||
162 | } | ||
163 | |||
151 | static inline u8 smp_ltk_sec_level(struct smp_ltk *key) | 164 | static inline u8 smp_ltk_sec_level(struct smp_ltk *key) |
152 | { | 165 | { |
153 | if (key->authenticated) | 166 | if (key->authenticated) |