summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap_core.c
diff options
context:
space:
mode:
authorMarcel Holtmann2019-07-16 20:34:41 +0200
committerJohan Hedberg2019-08-17 12:54:40 +0200
commit58a96fc35375ab87db7c5b69336f5befde1b548f (patch)
tree3232c0e7f6658ead557a8d5c6055676143dd3456 /net/bluetooth/l2cap_core.c
parentBluetooth: hci_qca: Skip 1 error print in device_want_to_sleep() (diff)
downloadkernel-qcow2-linux-58a96fc35375ab87db7c5b69336f5befde1b548f.tar.gz
kernel-qcow2-linux-58a96fc35375ab87db7c5b69336f5befde1b548f.tar.xz
kernel-qcow2-linux-58a96fc35375ab87db7c5b69336f5befde1b548f.zip
Bluetooth: Add debug setting for changing minimum encryption key size
For testing and qualification purposes it is useful to allow changing the minimum encryption key size value that the host stack is going to enforce. This adds a new debugfs setting min_encrypt_key_size to achieve this functionality. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/l2cap_core.c')
-rw-r--r--net/bluetooth/l2cap_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index cc506fe99b4d..dfc1edb168b7 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -1361,7 +1361,7 @@ static bool l2cap_check_enc_key_size(struct hci_conn *hcon)
* actually encrypted before enforcing a key size.
*/
return (!test_bit(HCI_CONN_ENCRYPT, &hcon->flags) ||
- hcon->enc_key_size >= HCI_MIN_ENC_KEY_SIZE);
+ hcon->enc_key_size >= hcon->hdev->min_enc_key_size);
}
static void l2cap_do_start(struct l2cap_chan *chan)