Commit b9a7a61e authored by Lukasz Rymanowski's avatar Lukasz Rymanowski Committed by Marcel Holtmann

Bluetooth: Add new debugfs parameter

With this patch it is possible to control discovery interleaved
timeout value from debugfs.

It is for fine tuning of this timeout.
Signed-off-by: default avatarLukasz Rymanowski <lukasz.rymanowski@tieto.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent ae55f598
...@@ -199,6 +199,7 @@ struct hci_dev { ...@@ -199,6 +199,7 @@ struct hci_dev {
__u16 le_scan_window; __u16 le_scan_window;
__u16 le_conn_min_interval; __u16 le_conn_min_interval;
__u16 le_conn_max_interval; __u16 le_conn_max_interval;
__u16 discov_interleaved_timeout;
__u8 ssp_debug_mode; __u8 ssp_debug_mode;
__u16 devid_source; __u16 devid_source;
......
...@@ -1823,6 +1823,9 @@ static int __hci_init(struct hci_dev *hdev) ...@@ -1823,6 +1823,9 @@ static int __hci_init(struct hci_dev *hdev)
&lowpan_debugfs_fops); &lowpan_debugfs_fops);
debugfs_create_file("le_auto_conn", 0644, hdev->debugfs, hdev, debugfs_create_file("le_auto_conn", 0644, hdev->debugfs, hdev,
&le_auto_conn_fops); &le_auto_conn_fops);
debugfs_create_u16("discov_interleaved_timeout", 0644,
hdev->debugfs,
&hdev->discov_interleaved_timeout);
} }
return 0; return 0;
...@@ -3785,6 +3788,7 @@ struct hci_dev *hci_alloc_dev(void) ...@@ -3785,6 +3788,7 @@ struct hci_dev *hci_alloc_dev(void)
hdev->le_conn_max_interval = 0x0038; hdev->le_conn_max_interval = 0x0038;
hdev->rpa_timeout = HCI_DEFAULT_RPA_TIMEOUT; hdev->rpa_timeout = HCI_DEFAULT_RPA_TIMEOUT;
hdev->discov_interleaved_timeout = DISCOV_INTERLEAVED_TIMEOUT;
mutex_init(&hdev->lock); mutex_init(&hdev->lock);
mutex_init(&hdev->req_lock); mutex_init(&hdev->req_lock);
......
...@@ -3372,7 +3372,7 @@ static void start_discovery_complete(struct hci_dev *hdev, u8 status) ...@@ -3372,7 +3372,7 @@ static void start_discovery_complete(struct hci_dev *hdev, u8 status)
break; break;
case DISCOV_TYPE_INTERLEAVED: case DISCOV_TYPE_INTERLEAVED:
timeout = msecs_to_jiffies(DISCOV_INTERLEAVED_TIMEOUT); timeout = msecs_to_jiffies(hdev->discov_interleaved_timeout);
break; break;
case DISCOV_TYPE_BREDR: case DISCOV_TYPE_BREDR:
......
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