diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2014-12-31 17:43:17 -0500 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-01-02 16:22:03 -0500 |
commit | 91389af67c3a8d8f9eca5f51deda58fae4d9326e (patch) | |
tree | edf3df498be17d95db708387f7379a87904f3746 /net/bluetooth | |
parent | 300acfdec916be696373864226267b11302d3b84 (diff) |
Bluetooth: Remove broken force_lesc_support debugfs option
The force_lesc_support debugfs option never really worked. It has a race
condition between creating the debugfs entry and registering the L2CAP
fixed channel for BR/EDR SMP support.
Also this has been replaced with a working force_bredr_smp debugfs
switch that developers can use now.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth')
-rw-r--r-- | net/bluetooth/hci_debugfs.c | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/net/bluetooth/hci_debugfs.c b/net/bluetooth/hci_debugfs.c index ee33ce88d3d8..dc8f994a957b 100644 --- a/net/bluetooth/hci_debugfs.c +++ b/net/bluetooth/hci_debugfs.c | |||
@@ -421,50 +421,6 @@ static const struct file_operations force_sc_support_fops = { | |||
421 | .llseek = default_llseek, | 421 | .llseek = default_llseek, |
422 | }; | 422 | }; |
423 | 423 | ||
424 | static ssize_t force_lesc_support_read(struct file *file, | ||
425 | char __user *user_buf, | ||
426 | size_t count, loff_t *ppos) | ||
427 | { | ||
428 | struct hci_dev *hdev = file->private_data; | ||
429 | char buf[3]; | ||
430 | |||
431 | buf[0] = test_bit(HCI_FORCE_LESC, &hdev->dbg_flags) ? 'Y': 'N'; | ||
432 | buf[1] = '\n'; | ||
433 | buf[2] = '\0'; | ||
434 | return simple_read_from_buffer(user_buf, count, ppos, buf, 2); | ||
435 | } | ||
436 | |||
437 | static ssize_t force_lesc_support_write(struct file *file, | ||
438 | const char __user *user_buf, | ||
439 | size_t count, loff_t *ppos) | ||
440 | { | ||
441 | struct hci_dev *hdev = file->private_data; | ||
442 | char buf[32]; | ||
443 | size_t buf_size = min(count, (sizeof(buf)-1)); | ||
444 | bool enable; | ||
445 | |||
446 | if (copy_from_user(buf, user_buf, buf_size)) | ||
447 | return -EFAULT; | ||
448 | |||
449 | buf[buf_size] = '\0'; | ||
450 | if (strtobool(buf, &enable)) | ||
451 | return -EINVAL; | ||
452 | |||
453 | if (enable == test_bit(HCI_FORCE_LESC, &hdev->dbg_flags)) | ||
454 | return -EALREADY; | ||
455 | |||
456 | change_bit(HCI_FORCE_LESC, &hdev->dbg_flags); | ||
457 | |||
458 | return count; | ||
459 | } | ||
460 | |||
461 | static const struct file_operations force_lesc_support_fops = { | ||
462 | .open = simple_open, | ||
463 | .read = force_lesc_support_read, | ||
464 | .write = force_lesc_support_write, | ||
465 | .llseek = default_llseek, | ||
466 | }; | ||
467 | |||
468 | static int idle_timeout_set(void *data, u64 val) | 424 | static int idle_timeout_set(void *data, u64 val) |
469 | { | 425 | { |
470 | struct hci_dev *hdev = data; | 426 | struct hci_dev *hdev = data; |
@@ -568,11 +524,6 @@ void hci_debugfs_create_bredr(struct hci_dev *hdev) | |||
568 | 524 | ||
569 | debugfs_create_file("force_sc_support", 0644, hdev->debugfs, | 525 | debugfs_create_file("force_sc_support", 0644, hdev->debugfs, |
570 | hdev, &force_sc_support_fops); | 526 | hdev, &force_sc_support_fops); |
571 | |||
572 | if (lmp_le_capable(hdev)) | ||
573 | debugfs_create_file("force_lesc_support", 0644, | ||
574 | hdev->debugfs, hdev, | ||
575 | &force_lesc_support_fops); | ||
576 | } | 527 | } |
577 | 528 | ||
578 | if (lmp_sniff_capable(hdev)) { | 529 | if (lmp_sniff_capable(hdev)) { |