aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-07-02 10:37:30 -0400
committerMarcel Holtmann <marcel@holtmann.org>2014-07-03 11:42:57 -0400
commit348d50b8e96c2c4630801e6e720c7c722ade83e8 (patch)
tree39992e1a21b0c62d985ade178e5b4a233db17652
parenta26f3dcff2cf5890f33d883c98d90cdfa51ed460 (diff)
Bluetooth: Fix missing update of conn params
We should update any stored connection parameters when we receive the LE Remote Connection Parameter Request HCI event. This patch adds the necessary code to the function that handles the event. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
-rw-r--r--net/bluetooth/hci_event.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index ed49a065dd67..3ad2576fd3f1 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -4429,9 +4429,25 @@ static void hci_le_remote_conn_param_req_evt(struct hci_dev *hdev,
4429 return send_conn_param_neg_reply(hdev, handle, 4429 return send_conn_param_neg_reply(hdev, handle,
4430 HCI_ERROR_INVALID_LL_PARAMS); 4430 HCI_ERROR_INVALID_LL_PARAMS);
4431 4431
4432 if (test_bit(HCI_CONN_MASTER, &hcon->flags)) 4432 if (test_bit(HCI_CONN_MASTER, &hcon->flags)) {
4433 struct hci_conn_params *params;
4434
4435 hci_dev_lock(hdev);
4436
4437 params = hci_conn_params_lookup(hdev, &hcon->dst,
4438 hcon->dst_type);
4439 if (params) {
4440 params->conn_min_interval = min;
4441 params->conn_max_interval = max;
4442 params->conn_latency = latency;
4443 params->supervision_timeout = timeout;
4444 }
4445
4446 hci_dev_unlock(hdev);
4447
4433 mgmt_new_conn_param(hdev, &hcon->dst, hcon->dst_type, min, max, 4448 mgmt_new_conn_param(hdev, &hcon->dst, hcon->dst_type, min, max,
4434 latency, timeout); 4449 latency, timeout);
4450 }
4435 4451
4436 cp.handle = ev->handle; 4452 cp.handle = ev->handle;
4437 cp.interval_min = ev->interval_min; 4453 cp.interval_min = ev->interval_min;