Skip to content

Commit d4edda0

Browse files
Alain Michaudholtmann
authored andcommitted
Bluetooth: use configured default params for active scans
This patch fixes active scans to use the configured default parameters. Signed-off-by: Alain Michaud <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
1 parent 49b020c commit d4edda0

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

net/bluetooth/hci_request.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2767,8 +2767,9 @@ static int active_scan(struct hci_request *req, unsigned long opt)
27672767
if (err < 0)
27682768
own_addr_type = ADDR_LE_DEV_PUBLIC;
27692769

2770-
hci_req_start_scan(req, LE_SCAN_ACTIVE, interval, DISCOV_LE_SCAN_WIN,
2771-
own_addr_type, filter_policy);
2770+
hci_req_start_scan(req, LE_SCAN_ACTIVE, interval,
2771+
hdev->le_scan_window_discovery, own_addr_type,
2772+
filter_policy);
27722773
return 0;
27732774
}
27742775

@@ -2815,18 +2816,18 @@ static void start_discovery(struct hci_dev *hdev, u8 *status)
28152816
* to do BR/EDR inquiry.
28162817
*/
28172818
hci_req_sync(hdev, interleaved_discov,
2818-
DISCOV_LE_SCAN_INT * 2, HCI_CMD_TIMEOUT,
2819+
hdev->le_scan_int_discovery * 2, HCI_CMD_TIMEOUT,
28192820
status);
28202821
break;
28212822
}
28222823

28232824
timeout = msecs_to_jiffies(hdev->discov_interleaved_timeout);
2824-
hci_req_sync(hdev, active_scan, DISCOV_LE_SCAN_INT,
2825+
hci_req_sync(hdev, active_scan, hdev->le_scan_int_discovery,
28252826
HCI_CMD_TIMEOUT, status);
28262827
break;
28272828
case DISCOV_TYPE_LE:
28282829
timeout = msecs_to_jiffies(DISCOV_LE_TIMEOUT);
2829-
hci_req_sync(hdev, active_scan, DISCOV_LE_SCAN_INT,
2830+
hci_req_sync(hdev, active_scan, hdev->le_scan_int_discovery,
28302831
HCI_CMD_TIMEOUT, status);
28312832
break;
28322833
default:

0 commit comments

Comments
 (0)