Home Home > GIT Browse > SLE12-SP4-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKernel Build Daemon <kbuild@suse.de>2019-05-27 07:05:49 +0200
committerKernel Build Daemon <kbuild@suse.de>2019-05-27 07:05:49 +0200
commit8acd99e93b27546245dde31dcf02f5b1451413a1 (patch)
tree7e743a4c13845e30ad9f793309e09034d87e5ebc
parent6c9a6658248735088b9109aa49904f931d053958 (diff)
parent8305d8628a2b333cf695b3fd04fd007fdc87db06 (diff)
Merge branch 'SLE12-SP4' into SLE12-SP4-AZURE
-rw-r--r--net/bluetooth/hci_conn.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c
index c02864a9ef24..6bf4524e568a 100644
--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -1148,8 +1148,13 @@ int hci_conn_check_link_mode(struct hci_conn *conn)
return 0;
}
- if (hci_conn_ssp_enabled(conn) &&
- !test_bit(HCI_CONN_ENCRYPT, &conn->flags))
+ /* If Secure Simple Pairing is not enabled, then legacy connection
+ * setup is used and no encryption or key sizes can be enforced.
+ */
+ if (!hci_conn_ssp_enabled(conn))
+ return 1;
+
+ if (!test_bit(HCI_CONN_ENCRYPT, &conn->flags))
return 0;
/* The minimum encryption key size needs to be enforced by the