diff options
Diffstat (limited to 'net/bluetooth/smp.h')
-rw-r--r-- | net/bluetooth/smp.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/net/bluetooth/smp.h b/net/bluetooth/smp.h index 5240537efde3..86a683a8b491 100644 --- a/net/bluetooth/smp.h +++ b/net/bluetooth/smp.h | |||
@@ -125,6 +125,14 @@ enum { | |||
125 | SMP_LTK_SLAVE, | 125 | SMP_LTK_SLAVE, |
126 | }; | 126 | }; |
127 | 127 | ||
128 | static inline u8 smp_ltk_sec_level(struct smp_ltk *key) | ||
129 | { | ||
130 | if (key->authenticated) | ||
131 | return BT_SECURITY_HIGH; | ||
132 | |||
133 | return BT_SECURITY_MEDIUM; | ||
134 | } | ||
135 | |||
128 | /* SMP Commands */ | 136 | /* SMP Commands */ |
129 | bool smp_sufficient_security(struct hci_conn *hcon, u8 sec_level); | 137 | bool smp_sufficient_security(struct hci_conn *hcon, u8 sec_level); |
130 | int smp_conn_security(struct hci_conn *hcon, __u8 sec_level); | 138 | int smp_conn_security(struct hci_conn *hcon, __u8 sec_level); |