summaryrefslogtreecommitdiff
path: root/net/bluetooth/hci_core.c
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2014-06-30 12:34:36 +0200
committerMarcel Holtmann <marcel@holtmann.org>2014-07-03 17:42:51 +0200
commit04fb7d9066dd9173ef0d4ccea8fe3bb59bd94605 (patch)
tree9d55d6113ff0a9bccfdbe2b781167a878bd98d0e /net/bluetooth/hci_core.c
parent8afef092a192cb946393bb11cc95b59739c1e57b (diff)
downloadlwn-04fb7d9066dd9173ef0d4ccea8fe3bb59bd94605.tar.gz
lwn-04fb7d9066dd9173ef0d4ccea8fe3bb59bd94605.zip
Bluetooth: Provide defaults for LE connection latency and timeout
Store the connection latency and supervision timeout default values with all the other controller defaults. And when needed use them for new connections. Signed-off-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r--net/bluetooth/hci_core.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 8d972023196b..94551c33c4c6 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -3439,8 +3439,8 @@ int hci_conn_params_add(struct hci_dev *hdev, bdaddr_t *addr, u8 addr_type,
update:
params->conn_min_interval = conn_min_interval;
params->conn_max_interval = conn_max_interval;
- params->conn_latency = 0x0000;
- params->supervision_timeout = 0x002a;
+ params->conn_latency = hdev->le_conn_latency;
+ params->supervision_timeout = hdev->le_supv_timeout;
params->auto_connect = auto_connect;
switch (auto_connect) {
@@ -3706,6 +3706,8 @@ struct hci_dev *hci_alloc_dev(void)
hdev->le_scan_window = 0x0030;
hdev->le_conn_min_interval = 0x0028;
hdev->le_conn_max_interval = 0x0038;
+ hdev->le_conn_latency = 0x0000;
+ hdev->le_supv_timeout = 0x002a;
hdev->rpa_timeout = HCI_DEFAULT_RPA_TIMEOUT;
hdev->discov_interleaved_timeout = DISCOV_INTERLEAVED_TIMEOUT;