aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/bluetooth/hci_core.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 3c1014c2dcde..b7c4ada1beb6 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -93,6 +93,20 @@ static const struct file_operations inquiry_cache_fops = {
93 .release = single_release, 93 .release = single_release,
94}; 94};
95 95
96static int voice_setting_get(void *data, u64 *val)
97{
98 struct hci_dev *hdev = data;
99
100 hci_dev_lock(hdev);
101 *val = hdev->voice_setting;
102 hci_dev_unlock(hdev);
103
104 return 0;
105}
106
107DEFINE_SIMPLE_ATTRIBUTE(voice_setting_fops, voice_setting_get,
108 NULL, "0x%4.4llx\n");
109
96static int auto_accept_delay_set(void *data, u64 val) 110static int auto_accept_delay_set(void *data, u64 val)
97{ 111{
98 struct hci_dev *hdev = data; 112 struct hci_dev *hdev = data;
@@ -833,6 +847,8 @@ static int __hci_init(struct hci_dev *hdev)
833 if (lmp_bredr_capable(hdev)) { 847 if (lmp_bredr_capable(hdev)) {
834 debugfs_create_file("inquiry_cache", 0444, hdev->debugfs, 848 debugfs_create_file("inquiry_cache", 0444, hdev->debugfs,
835 hdev, &inquiry_cache_fops); 849 hdev, &inquiry_cache_fops);
850 debugfs_create_file("voice_setting", 0444, hdev->debugfs,
851 hdev, &voice_setting_fops);
836 } 852 }
837 853
838 if (lmp_ssp_capable(hdev)) 854 if (lmp_ssp_capable(hdev))