summaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorVinicius Costa Gomes <vinicius.gomes@openbossa.org>2011-09-02 14:51:22 -0300
committerGustavo F. Padovan <padovan@profusion.mobi>2011-09-21 12:58:13 -0300
commitc908df362c20be0eeef506fe62e13d835a4633f9 (patch)
treec4716edab67e75ae213ec3d16fdf836bccd51d93 /net/bluetooth
parente9bf2bf03e14627fac8520468231ea11dfa37610 (diff)
downloadop-kernel-dev-c908df362c20be0eeef506fe62e13d835a4633f9.zip
op-kernel-dev-c908df362c20be0eeef506fe62e13d835a4633f9.tar.gz
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 <vinicius.gomes@openbossa.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/mgmt.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 545f84d..6493e80 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)
OpenPOWER on IntegriCloud