aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/smp.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth/smp.h')
-rw-r--r--net/bluetooth/smp.h8
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
128static 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 */
129bool smp_sufficient_security(struct hci_conn *hcon, u8 sec_level); 137bool smp_sufficient_security(struct hci_conn *hcon, u8 sec_level);
130int smp_conn_security(struct hci_conn *hcon, __u8 sec_level); 138int smp_conn_security(struct hci_conn *hcon, __u8 sec_level);