Bluetooth: Pass store hint to mgmt_new_conn_param

The calling functions of mgmt_new_conn_param have more information about
the parameters, such as whether the kernel is tracking them or not. It
makes therefore sense to have them pass an initial store_hint value to
the mgmt_new_conn_param function.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
Johan Hedberg
2014-07-02 17:37:32 +03:00
committed by Marcel Holtmann
parent 7d6ca6939c
commit f4869e2adb
4 changed files with 18 additions and 10 deletions

View File

@@ -4431,6 +4431,7 @@ static void hci_le_remote_conn_param_req_evt(struct hci_dev *hdev,
if (test_bit(HCI_CONN_MASTER, &hcon->flags)) {
struct hci_conn_params *params;
u8 store_hint;
hci_dev_lock(hdev);
@@ -4441,12 +4442,15 @@ static void hci_le_remote_conn_param_req_evt(struct hci_dev *hdev,
params->conn_max_interval = max;
params->conn_latency = latency;
params->supervision_timeout = timeout;
store_hint = 0x01;
} else{
store_hint = 0x00;
}
hci_dev_unlock(hdev);
mgmt_new_conn_param(hdev, &hcon->dst, hcon->dst_type, min, max,
latency, timeout);
mgmt_new_conn_param(hdev, &hcon->dst, hcon->dst_type,
store_hint, min, max, latency, timeout);
}
cp.handle = ev->handle;