summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/l2cap_core.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/l2cap_core.c
parent5ea234d3e5ff9b6e5c82bde5979307213dde249d (diff)
downloadop-kernel-dev-09ae260ba452c2ed36ec295941a58cb75db213ed.zip
op-kernel-dev-09ae260ba452c2ed36ec295941a58cb75db213ed.tar.gz
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/l2cap_core.c')
-rw-r--r--net/bluetooth/l2cap_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c
index f1f544a..a219276 100644
--- a/net/bluetooth/l2cap_core.c
+++ b/net/bluetooth/l2cap_core.c
@@ -7135,7 +7135,7 @@ int l2cap_chan_connect(struct l2cap_chan *chan, __le16 psm, u16 cid,
dst_type = ADDR_LE_DEV_RANDOM;
hcon = hci_connect_le(hdev, dst, dst_type, chan->sec_level,
- auth_type);
+ auth_type, HCI_LE_CONN_TIMEOUT);
} else {
hcon = hci_connect_acl(hdev, dst, chan->sec_level, auth_type);
}
OpenPOWER on IntegriCloud