Commit d4edda0f authored by Alain Michaud's avatar Alain Michaud Committed by Marcel Holtmann

Bluetooth: use configured default params for active scans

This patch fixes active scans to use the configured default parameters.
Signed-off-by: default avatarAlain Michaud <alainm@chromium.org>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 49b020c1
...@@ -2767,8 +2767,9 @@ static int active_scan(struct hci_request *req, unsigned long opt) ...@@ -2767,8 +2767,9 @@ static int active_scan(struct hci_request *req, unsigned long opt)
if (err < 0) if (err < 0)
own_addr_type = ADDR_LE_DEV_PUBLIC; own_addr_type = ADDR_LE_DEV_PUBLIC;
hci_req_start_scan(req, LE_SCAN_ACTIVE, interval, DISCOV_LE_SCAN_WIN, hci_req_start_scan(req, LE_SCAN_ACTIVE, interval,
own_addr_type, filter_policy); hdev->le_scan_window_discovery, own_addr_type,
filter_policy);
return 0; return 0;
} }
...@@ -2815,18 +2816,18 @@ static void start_discovery(struct hci_dev *hdev, u8 *status) ...@@ -2815,18 +2816,18 @@ static void start_discovery(struct hci_dev *hdev, u8 *status)
* to do BR/EDR inquiry. * to do BR/EDR inquiry.
*/ */
hci_req_sync(hdev, interleaved_discov, hci_req_sync(hdev, interleaved_discov,
DISCOV_LE_SCAN_INT * 2, HCI_CMD_TIMEOUT, hdev->le_scan_int_discovery * 2, HCI_CMD_TIMEOUT,
status); status);
break; break;
} }
timeout = msecs_to_jiffies(hdev->discov_interleaved_timeout); 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); HCI_CMD_TIMEOUT, status);
break; break;
case DISCOV_TYPE_LE: case DISCOV_TYPE_LE:
timeout = msecs_to_jiffies(DISCOV_LE_TIMEOUT); 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); HCI_CMD_TIMEOUT, status);
break; break;
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment