mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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>
This commit is contained in:
parent
6600c0808e
commit
58a96fc353
4 changed files with 34 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue