|
@@ -757,6 +757,34 @@ static int conn_max_interval_get(void *data, u64 *val)
|
|
|
DEFINE_SIMPLE_ATTRIBUTE(conn_max_interval_fops, conn_max_interval_get,
|
|
|
conn_max_interval_set, "%llu\n");
|
|
|
|
|
|
+static int adv_channel_map_set(void *data, u64 val)
|
|
|
+{
|
|
|
+ struct hci_dev *hdev = data;
|
|
|
+
|
|
|
+ if (val < 0x01 || val > 0x07)
|
|
|
+ return -EINVAL;
|
|
|
+
|
|
|
+ hci_dev_lock(hdev);
|
|
|
+ hdev->le_adv_channel_map = val;
|
|
|
+ hci_dev_unlock(hdev);
|
|
|
+
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+static int adv_channel_map_get(void *data, u64 *val)
|
|
|
+{
|
|
|
+ struct hci_dev *hdev = data;
|
|
|
+
|
|
|
+ hci_dev_lock(hdev);
|
|
|
+ *val = hdev->le_adv_channel_map;
|
|
|
+ hci_dev_unlock(hdev);
|
|
|
+
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+DEFINE_SIMPLE_ATTRIBUTE(adv_channel_map_fops, adv_channel_map_get,
|
|
|
+ adv_channel_map_set, "%llu\n");
|
|
|
+
|
|
|
static ssize_t lowpan_read(struct file *file, char __user *user_buf,
|
|
|
size_t count, loff_t *ppos)
|
|
|
{
|
|
@@ -1605,6 +1633,8 @@ static int __hci_init(struct hci_dev *hdev)
|
|
|
hdev, &conn_min_interval_fops);
|
|
|
debugfs_create_file("conn_max_interval", 0644, hdev->debugfs,
|
|
|
hdev, &conn_max_interval_fops);
|
|
|
+ debugfs_create_file("adv_channel_map", 0644, hdev->debugfs,
|
|
|
+ hdev, &adv_channel_map_fops);
|
|
|
debugfs_create_file("6lowpan", 0644, hdev->debugfs, hdev,
|
|
|
&lowpan_debugfs_fops);
|
|
|
}
|
|
@@ -3264,6 +3294,7 @@ struct hci_dev *hci_alloc_dev(void)
|
|
|
hdev->sniff_max_interval = 800;
|
|
|
hdev->sniff_min_interval = 80;
|
|
|
|
|
|
+ hdev->le_adv_channel_map = 0x07;
|
|
|
hdev->le_scan_interval = 0x0060;
|
|
|
hdev->le_scan_window = 0x0030;
|
|
|
hdev->le_conn_min_interval = 0x0028;
|