Bluetooth: Add mgmt support for LE Secure Connections LTK types
[GitHub/LineageOS/android_kernel_motorola_exynos9610.git] / net / bluetooth / smp.h
index 7c3c351909f55ef8337b42e5e0cbda4f94ad072b..81d24c0ea08b60e77eeb154a18892d193742ba3f 100644 (file)
@@ -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)