Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Bluetooth: Remove connection link attributes

The connection link attributes are not used and expose no valuable
information.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>

authored by

Marcel Holtmann and committed by
Johan Hedberg
2a0be139 7c2b9bff

-45
-45
net/bluetooth/hci_sysfs.c
··· 7 7 8 8 static struct class *bt_class; 9 9 10 - static inline char *link_typetostr(int type) 11 - { 12 - switch (type) { 13 - case ACL_LINK: 14 - return "ACL"; 15 - case SCO_LINK: 16 - return "SCO"; 17 - case ESCO_LINK: 18 - return "eSCO"; 19 - case LE_LINK: 20 - return "LE"; 21 - default: 22 - return "UNKNOWN"; 23 - } 24 - } 25 - 26 - static ssize_t show_link_type(struct device *dev, 27 - struct device_attribute *attr, char *buf) 28 - { 29 - struct hci_conn *conn = to_hci_conn(dev); 30 - return sprintf(buf, "%s\n", link_typetostr(conn->type)); 31 - } 32 - 33 - static ssize_t show_link_address(struct device *dev, 34 - struct device_attribute *attr, char *buf) 35 - { 36 - struct hci_conn *conn = to_hci_conn(dev); 37 - return sprintf(buf, "%pMR\n", &conn->dst); 38 - } 39 - 40 - #define LINK_ATTR(_name, _mode, _show, _store) \ 41 - struct device_attribute link_attr_##_name = __ATTR(_name, _mode, _show, _store) 42 - 43 - static LINK_ATTR(type, S_IRUGO, show_link_type, NULL); 44 - static LINK_ATTR(address, S_IRUGO, show_link_address, NULL); 45 - 46 - static struct attribute *bt_link_attrs[] = { 47 - &link_attr_type.attr, 48 - &link_attr_address.attr, 49 - NULL 50 - }; 51 - 52 - ATTRIBUTE_GROUPS(bt_link); 53 - 54 10 static void bt_link_release(struct device *dev) 55 11 { 56 12 struct hci_conn *conn = to_hci_conn(dev); ··· 15 59 16 60 static struct device_type bt_link = { 17 61 .name = "link", 18 - .groups = bt_link_groups, 19 62 .release = bt_link_release, 20 63 }; 21 64