diff options
author | Alexander Aring <alex.aring@gmail.com> | 2015-03-02 09:10:05 -0500 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-03-14 12:11:30 -0400 |
commit | 022d07e3d89157bf787e462bbce7b9ed47c3b563 (patch) | |
tree | d9e19e3a25a2cfce2edc17be0b4b328ab29ead52 /net/ieee802154/sysfs.c | |
parent | c4dd7471de03f0e4278265e08af2923243496db0 (diff) |
ieee802154: remove deprecated sysfs entries
It's only necessary to offer the name and index, others value are
available over netlink.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/ieee802154/sysfs.c')
-rw-r--r-- | net/ieee802154/sysfs.c | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/net/ieee802154/sysfs.c b/net/ieee802154/sysfs.c index dff55c2d87f3..133b4280660c 100644 --- a/net/ieee802154/sysfs.c +++ b/net/ieee802154/sysfs.c | |||
@@ -48,49 +48,6 @@ static ssize_t name_show(struct device *dev, | |||
48 | } | 48 | } |
49 | static DEVICE_ATTR_RO(name); | 49 | static DEVICE_ATTR_RO(name); |
50 | 50 | ||
51 | #define MASTER_SHOW_COMPLEX(name, format_string, args...) \ | ||
52 | static ssize_t name ## _show(struct device *dev, \ | ||
53 | struct device_attribute *attr, char *buf) \ | ||
54 | { \ | ||
55 | struct wpan_phy *phy = container_of(dev, struct wpan_phy, dev); \ | ||
56 | int ret; \ | ||
57 | \ | ||
58 | mutex_lock(&phy->pib_lock); \ | ||
59 | ret = snprintf(buf, PAGE_SIZE, format_string "\n", args); \ | ||
60 | mutex_unlock(&phy->pib_lock); \ | ||
61 | return ret; \ | ||
62 | } \ | ||
63 | static DEVICE_ATTR_RO(name) | ||
64 | |||
65 | #define MASTER_SHOW(field, format_string) \ | ||
66 | MASTER_SHOW_COMPLEX(field, format_string, phy->field) | ||
67 | |||
68 | MASTER_SHOW(current_channel, "%d"); | ||
69 | MASTER_SHOW(current_page, "%d"); | ||
70 | MASTER_SHOW(transmit_power, "%d +- 1 dB"); | ||
71 | MASTER_SHOW_COMPLEX(cca_mode, "%d", phy->cca.mode); | ||
72 | |||
73 | static ssize_t channels_supported_show(struct device *dev, | ||
74 | struct device_attribute *attr, | ||
75 | char *buf) | ||
76 | { | ||
77 | struct wpan_phy *phy = container_of(dev, struct wpan_phy, dev); | ||
78 | int ret; | ||
79 | int i, len = 0; | ||
80 | |||
81 | mutex_lock(&phy->pib_lock); | ||
82 | for (i = 0; i < 32; i++) { | ||
83 | ret = snprintf(buf + len, PAGE_SIZE - len, | ||
84 | "%#09x\n", phy->channels_supported[i]); | ||
85 | if (ret < 0) | ||
86 | break; | ||
87 | len += ret; | ||
88 | } | ||
89 | mutex_unlock(&phy->pib_lock); | ||
90 | return len; | ||
91 | } | ||
92 | static DEVICE_ATTR_RO(channels_supported); | ||
93 | |||
94 | static void wpan_phy_release(struct device *dev) | 51 | static void wpan_phy_release(struct device *dev) |
95 | { | 52 | { |
96 | struct cfg802154_registered_device *rdev = dev_to_rdev(dev); | 53 | struct cfg802154_registered_device *rdev = dev_to_rdev(dev); |
@@ -101,12 +58,6 @@ static void wpan_phy_release(struct device *dev) | |||
101 | static struct attribute *pmib_attrs[] = { | 58 | static struct attribute *pmib_attrs[] = { |
102 | &dev_attr_index.attr, | 59 | &dev_attr_index.attr, |
103 | &dev_attr_name.attr, | 60 | &dev_attr_name.attr, |
104 | /* below will be removed soon */ | ||
105 | &dev_attr_current_channel.attr, | ||
106 | &dev_attr_current_page.attr, | ||
107 | &dev_attr_channels_supported.attr, | ||
108 | &dev_attr_transmit_power.attr, | ||
109 | &dev_attr_cca_mode.attr, | ||
110 | NULL, | 61 | NULL, |
111 | }; | 62 | }; |
112 | ATTRIBUTE_GROUPS(pmib); | 63 | ATTRIBUTE_GROUPS(pmib); |