summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/mgmt.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-07-06 13:41:15 +0300
committerJohan Hedberg <johan.hedberg@intel.com>2014-07-06 14:46:15 +0300
commit09ae260ba452c2ed36ec295941a58cb75db213ed (patch)
tree55b108d9a368ee131a6e7e723c26ea65e0f56f10 /net/bluetooth/mgmt.c
parent5ea234d3e5ff9b6e5c82bde5979307213dde249d (diff)
downloadlinux-stable-09ae260ba452c2ed36ec295941a58cb75db213ed.tar.gz
linux-stable-09ae260ba452c2ed36ec295941a58cb75db213ed.tar.bz2
linux-stable-09ae260ba452c2ed36ec295941a58cb75db213ed.zip
Bluetooth: Use lower timeout for LE auto-connections
When we establish connections as a consequence of receiving an advertising report it makes no sense to wait the normal 20 second LE connection timeout. This patch modifies the hci_connect_le function to take an extra timeout value and uses a lower 2 second timeout for the auto-connection case. This timeout is intentionally chosen to be just a bit higher than the 1.28 second timeout that High Duty Cycle Advertising uses. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r--net/bluetooth/mgmt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index e253f8e1fa47..be91d55c258b 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -3116,7 +3116,8 @@ static int pair_device(struct sock *sk, struct hci_dev *hdev, void *data,
hci_conn_params_add(hdev, &cp->addr.bdaddr, addr_type);
conn = hci_connect_le(hdev, &cp->addr.bdaddr, addr_type,
- sec_level, auth_type);
+ sec_level, auth_type,
+ HCI_LE_CONN_TIMEOUT);
}
if (IS_ERR(conn)) {