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>
This commit is contained in:
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user