Home Home > GIT Browse > SLE15-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKernel Build Daemon <kbuild@suse.de>2019-05-27 07:17:52 +0200
committerKernel Build Daemon <kbuild@suse.de>2019-05-27 07:17:52 +0200
commit309cf6c914274dd970975f2a8692a91b8968cec7 (patch)
tree39878b988a324266f7913abd486295c9d3f0661b
parent07b08f36a273653930e93c7e28afc5c138d9ade3 (diff)
parenta7d68fb6b9bd9ba5f9ba1c2ce16b957fa1c8dc80 (diff)
Merge branch 'SLE15' into SLE15-AZURESLE15-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