diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2014-06-24 07:13:04 -0400 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2014-07-03 11:42:46 -0400 |
commit | 985d904902681d736924afe3f4dae212c0e5f6a4 (patch) | |
tree | 762a86e5fe3fd6c24ad39f0f850f45e8f1e10ea9 /net | |
parent | b97109790c1fcbe6b5da21c441ba336cf1ab9a3c (diff) |
Bluetooth: Remove ssp_debug_mode debugfs option
The ssp_debug_mode debugfs option for developers is no longer
needed. Support for using Secure Simple Pairing (SSP) debug
mode is exposed by the management interface now.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/hci_core.c | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 159783e746c0..9852449ac104 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -352,55 +352,6 @@ static int auto_accept_delay_get(void *data, u64 *val) | |||
352 | DEFINE_SIMPLE_ATTRIBUTE(auto_accept_delay_fops, auto_accept_delay_get, | 352 | DEFINE_SIMPLE_ATTRIBUTE(auto_accept_delay_fops, auto_accept_delay_get, |
353 | auto_accept_delay_set, "%llu\n"); | 353 | auto_accept_delay_set, "%llu\n"); |
354 | 354 | ||
355 | static int ssp_debug_mode_set(void *data, u64 val) | ||
356 | { | ||
357 | struct hci_dev *hdev = data; | ||
358 | struct sk_buff *skb; | ||
359 | __u8 mode; | ||
360 | int err; | ||
361 | |||
362 | if (val != 0 && val != 1) | ||
363 | return -EINVAL; | ||
364 | |||
365 | if (!test_bit(HCI_UP, &hdev->flags)) | ||
366 | return -ENETDOWN; | ||
367 | |||
368 | hci_req_lock(hdev); | ||
369 | mode = val; | ||
370 | skb = __hci_cmd_sync(hdev, HCI_OP_WRITE_SSP_DEBUG_MODE, sizeof(mode), | ||
371 | &mode, HCI_CMD_TIMEOUT); | ||
372 | hci_req_unlock(hdev); | ||
373 | |||
374 | if (IS_ERR(skb)) | ||
375 | return PTR_ERR(skb); | ||
376 | |||
377 | err = -bt_to_errno(skb->data[0]); | ||
378 | kfree_skb(skb); | ||
379 | |||
380 | if (err < 0) | ||
381 | return err; | ||
382 | |||
383 | hci_dev_lock(hdev); | ||
384 | hdev->ssp_debug_mode = val; | ||
385 | hci_dev_unlock(hdev); | ||
386 | |||
387 | return 0; | ||
388 | } | ||
389 | |||
390 | static int ssp_debug_mode_get(void *data, u64 *val) | ||
391 | { | ||
392 | struct hci_dev *hdev = data; | ||
393 | |||
394 | hci_dev_lock(hdev); | ||
395 | *val = hdev->ssp_debug_mode; | ||
396 | hci_dev_unlock(hdev); | ||
397 | |||
398 | return 0; | ||
399 | } | ||
400 | |||
401 | DEFINE_SIMPLE_ATTRIBUTE(ssp_debug_mode_fops, ssp_debug_mode_get, | ||
402 | ssp_debug_mode_set, "%llu\n"); | ||
403 | |||
404 | static ssize_t force_sc_support_read(struct file *file, char __user *user_buf, | 355 | static ssize_t force_sc_support_read(struct file *file, char __user *user_buf, |
405 | size_t count, loff_t *ppos) | 356 | size_t count, loff_t *ppos) |
406 | { | 357 | { |
@@ -1787,8 +1738,6 @@ static int __hci_init(struct hci_dev *hdev) | |||
1787 | if (lmp_ssp_capable(hdev)) { | 1738 | if (lmp_ssp_capable(hdev)) { |
1788 | debugfs_create_file("auto_accept_delay", 0644, hdev->debugfs, | 1739 | debugfs_create_file("auto_accept_delay", 0644, hdev->debugfs, |
1789 | hdev, &auto_accept_delay_fops); | 1740 | hdev, &auto_accept_delay_fops); |
1790 | debugfs_create_file("ssp_debug_mode", 0644, hdev->debugfs, | ||
1791 | hdev, &ssp_debug_mode_fops); | ||
1792 | debugfs_create_file("force_sc_support", 0644, hdev->debugfs, | 1741 | debugfs_create_file("force_sc_support", 0644, hdev->debugfs, |
1793 | hdev, &force_sc_support_fops); | 1742 | hdev, &force_sc_support_fops); |
1794 | debugfs_create_file("sc_only_mode", 0444, hdev->debugfs, | 1743 | debugfs_create_file("sc_only_mode", 0444, hdev->debugfs, |