aboutsummaryrefslogtreecommitdiff
path: root/net/bluetooth/mgmt.c
diff options
context:
space:
mode:
authorGravatar Mikel Astiz <mikel.astiz@bmw-carit.de> 2014-04-08 14:21:32 +0200
committerGravatar Johan Hedberg <johan.hedberg@intel.com> 2014-04-11 10:33:08 -0700
commit6fd6b915bd94cd81611254f318fa3bb769cc4afe (patch)
tree4a58b3ae03e2cdfcc6f1740ebf78b52112d53785 /net/bluetooth/mgmt.c
parentBluetooth: Refactor hci_get_auth_req() (diff)
downloadlinux-6fd6b915bd94cd81611254f318fa3bb769cc4afe.tar.gz
linux-6fd6b915bd94cd81611254f318fa3bb769cc4afe.tar.bz2
linux-6fd6b915bd94cd81611254f318fa3bb769cc4afe.zip
Bluetooth: Refactor code for outgoing dedicated bonding
Do not always set the MITM protection requirement by default in the field conn->auth_type, since this will be added later in hci_io_capa_request_evt(), as part of the requirements specified in HCI_OP_IO_CAPABILITY_REPLY. This avoids a hackish exception for the auto-reject case, but doesn't change the behavior of the code at all. Signed-off-by: Mikel Astiz <mikel.astiz@bmw-carit.de> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r--net/bluetooth/mgmt.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 11cb00a2befb..54abbce3a39e 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -2850,10 +2850,7 @@ static int pair_device(struct sock *sk, struct hci_dev *hdev, void *data,
}
sec_level = BT_SECURITY_MEDIUM;
- if (cp->io_cap == 0x03)
- auth_type = HCI_AT_DEDICATED_BONDING;
- else
- auth_type = HCI_AT_DEDICATED_BONDING_MITM;
+ auth_type = HCI_AT_DEDICATED_BONDING;
if (cp->addr.type == BDADDR_BREDR) {
conn = hci_connect_acl(hdev, &cp->addr.bdaddr, sec_level,