From: Vinicius Costa Gomes Date: Fri, 2 Sep 2011 17:51:22 +0000 (-0300) Subject: Bluetooth: Use the MEDIUM security level for pairings X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c908df362c20be0eeef506fe62e13d835a4633f9;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git Bluetooth: Use the MEDIUM security level for pairings This lifts the requirement of 16 digits pin codes when pairing with devices that do not support SSP when using the mgmt interface. Signed-off-by: Vinicius Costa Gomes Signed-off-by: Gustavo F. Padovan --- diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 545f84dbae8..6493e807634 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -1365,13 +1365,11 @@ static int pair_device(struct sock *sk, u16 index, unsigned char *data, u16 len) hci_dev_lock_bh(hdev); - if (cp->io_cap == 0x03) { - sec_level = BT_SECURITY_MEDIUM; + sec_level = BT_SECURITY_MEDIUM; + if (cp->io_cap == 0x03) auth_type = HCI_AT_DEDICATED_BONDING; - } else { - sec_level = BT_SECURITY_HIGH; + else auth_type = HCI_AT_DEDICATED_BONDING_MITM; - } entry = hci_find_adv_entry(hdev, &cp->bdaddr); if (entry)