]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: Add timeout for LE connection attempts
authorJohan Hedberg <johan.hedberg@intel.com>
Fri, 28 Feb 2014 15:45:46 +0000 (17:45 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 28 Feb 2014 15:56:42 +0000 (07:56 -0800)
commitff6a74ae756e8bb0c985682460f1a05c6f017b12
treece538aec7505fcf547a3ad7aad3607e99a0db3d1
parentdcd230d3c87f9422ebd756eb9372dedae6cb1ba2
Bluetooth: Add timeout for LE connection attempts

LE connection attempts do not have a controller side timeout in the same
way as BR/EDR has (in form of the page timeout). Since we always do
scanning before initiating connections the attempts are always expected
to succeed in some reasonable time.

This patch adds a timer which forces a cancellation of the connection
attempt within 20 seconds if it has not been successful by then. This
way we e.g. ensure that mgmt_pair_device times out eventually and gives
an error response.

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