Bluetooth: Use lower timeout for LE auto-connections
authorJohan Hedberg <johan.hedberg@intel.com>
Sun, 6 Jul 2014 10:41:15 +0000 (13:41 +0300)
committerJohan Hedberg <johan.hedberg@intel.com>
Sun, 6 Jul 2014 11:46:15 +0000 (14:46 +0300)
commit09ae260ba452c2ed36ec295941a58cb75db213ed
tree55b108d9a368ee131a6e7e723c26ea65e0f56f10
parent5ea234d3e5ff9b6e5c82bde5979307213dde249d
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>
include/net/bluetooth/hci.h
include/net/bluetooth/hci_core.h
net/bluetooth/hci_conn.c
net/bluetooth/hci_event.c
net/bluetooth/l2cap_core.c
net/bluetooth/mgmt.c