summaryrefslogtreecommitdiff
path: root/net/bluetooth/hci_request.c
diff options
context:
space:
mode:
authorAlain Michaud <alainm@chromium.org>2020-06-29 20:04:15 +0300
committerMarcel Holtmann <marcel@holtmann.org>2020-07-07 18:37:03 +0300
commitd4edda0f791fccf4cbb8a88566a8f2b1228faaee (patch)
tree5f2ee0cd75b379e9377050c1f248d1ff145fe6f6 /net/bluetooth/hci_request.c
parent49b020c1d236a36a4533e7db6d2604cb57ed4c51 (diff)
downloadlinux-d4edda0f791fccf4cbb8a88566a8f2b1228faaee.tar.xz
Bluetooth: use configured default params for active scans
This patch fixes active scans to use the configured default parameters. Signed-off-by: Alain Michaud <alainm@chromium.org> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/hci_request.c')
-rw-r--r--net/bluetooth/hci_request.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c
index 116207009dde..68a2ec36e1c1 100644
--- a/net/bluetooth/hci_request.c
+++ b/net/bluetooth/hci_request.c
@@ -2767,8 +2767,9 @@ static int active_scan(struct hci_request *req, unsigned long opt)
if (err < 0)
own_addr_type = ADDR_LE_DEV_PUBLIC;
- hci_req_start_scan(req, LE_SCAN_ACTIVE, interval, DISCOV_LE_SCAN_WIN,
- own_addr_type, filter_policy);
+ hci_req_start_scan(req, LE_SCAN_ACTIVE, interval,
+ hdev->le_scan_window_discovery, own_addr_type,
+ filter_policy);
return 0;
}
@@ -2815,18 +2816,18 @@ static void start_discovery(struct hci_dev *hdev, u8 *status)
* to do BR/EDR inquiry.
*/
hci_req_sync(hdev, interleaved_discov,
- DISCOV_LE_SCAN_INT * 2, HCI_CMD_TIMEOUT,
+ hdev->le_scan_int_discovery * 2, HCI_CMD_TIMEOUT,
status);
break;
}
timeout = msecs_to_jiffies(hdev->discov_interleaved_timeout);
- hci_req_sync(hdev, active_scan, DISCOV_LE_SCAN_INT,
+ hci_req_sync(hdev, active_scan, hdev->le_scan_int_discovery,
HCI_CMD_TIMEOUT, status);
break;
case DISCOV_TYPE_LE:
timeout = msecs_to_jiffies(DISCOV_LE_TIMEOUT);
- hci_req_sync(hdev, active_scan, DISCOV_LE_SCAN_INT,
+ hci_req_sync(hdev, active_scan, hdev->le_scan_int_discovery,
HCI_CMD_TIMEOUT, status);
break;
default: