Bluetooth: Consolidate whitelist debugfs entry into device_list
Subsystems (2)
Marcel Holtmann
maintainerPATCH 1/1 Bluetooth: Consolidate whitelist debugfs entry into device_list
The debufs entry for the BR/EDR whitelist is confusing since there is a controller debugfs entry with the name white_list and both are two different things.
With the BR/EDR whitelist, the actual interface in use is the device list and thus just include all values from the internal BR/EDR whitelist in the device_list debugfs entry.
Signed-off-by Marcel Holtmann <[email protected]>
--- net/bluetooth/hci_core.c | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-)
net/bluetooth/hci_core.c +4 -28
@@ -200,31 +200,6 @@ static const struct file_operations blacklist_fops = { .release = single_release, }; -static int whitelist_show (struct seq_file *f,void *p) -{ -struct hci_dev *hdev = f->private; -struct bdaddr_list *b; - -hci_dev_lock (hdev); -list_for_each_entry (b, &hdev->whitelist, list) -seq_printf (f,"%pMR (type %u)\n" , &b->bdaddr, b->bdaddr_type); -hci_dev_unlock (hdev); - -return 0 ; -} - -static int whitelist_open (struct inode *inode,struct file *file) -{ -return single_open (file, whitelist_show, inode->i_private); -} - -static const struct file_operations whitelist_fops = { - .open = whitelist_open, - .read = seq_read, - .llseek = seq_lseek, - .release = single_release, -}; -static int uuids_show (struct seq_file *f,void *p) {struct hci_dev *hdev = f->private;
@@ -1030,10 +1005,13 @@ static int device_list_show(struct seq_file *f, void *ptr) {struct hci_dev *hdev = f->private;struct hci_conn_params *p; +struct bdaddr_list *b;hci_dev_lock (hdev); +list_for_each_entry (b, &hdev->whitelist, list) +seq_printf (f,"%pMR (type %u)\n" , &b->bdaddr, b->bdaddr_type);list_for_each_entry (p, &hdev->le_conn_params, list) { -seq_printf (f,"%pMR %u %u\n" , &p->addr, p->addr_type, +seq_printf (f,"%pMR (type %u) %u\n" , &p->addr, p->addr_type, p->auto_connect); }hci_dev_unlock (hdev);
@@ -1817,8 +1795,6 @@ static int __hci_init(struct hci_dev *hdev)debugfs_create_u16 ("hci_revision" ,0444 , hdev->debugfs, &hdev->hci_rev);debugfs_create_file ("blacklist" ,0444 , hdev->debugfs, hdev, &blacklist_fops); -debugfs_create_file ("whitelist" ,0444 , hdev->debugfs, hdev, - &whitelist_fops);debugfs_create_file ("uuids" ,0444 , hdev->debugfs, hdev, &uuids_fops); debugfs_create_file("conn_info_min_age", 0644, hdev->debugfs, hdev,
Signature · 1 line
1.9.3