aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/smp.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth/smp.c')
-rw-r--r--net/bluetooth/smp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index a08b077cb725..3700dd8d9d0b 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -1114,7 +1114,7 @@ static bool smp_ltk_encrypt(struct l2cap_conn *conn, u8 sec_level)
1114 if (!key) 1114 if (!key)
1115 return false; 1115 return false;
1116 1116
1117 if (sec_level > BT_SECURITY_MEDIUM && !key->authenticated) 1117 if (smp_ltk_sec_level(key) < sec_level)
1118 return false; 1118 return false;
1119 1119
1120 if (test_and_set_bit(HCI_CONN_ENCRYPT_PEND, &hcon->flags)) 1120 if (test_and_set_bit(HCI_CONN_ENCRYPT_PEND, &hcon->flags))