aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/net-sysfs.c
diff options
context:
space:
mode:
authorMatthew Garrett <mjg@redhat.com>2011-03-28 06:47:38 -0400
committerMatthew Garrett <mjg@redhat.com>2011-03-28 06:47:38 -0400
commit72ed73c3f0801e860ee27e53ab6aaf47941ba324 (patch)
treeb46c546d77ee8931d47dafc97bf23b11472bffeb /net/core/net-sysfs.c
parent883ae7992c09435927dda642b61f1455fceb5b85 (diff)
parentbd1573a5546b4351b5d042f1e4cd631ea67cc6b0 (diff)
downloadkernel_samsung_smdk4412-72ed73c3f0801e860ee27e53ab6aaf47941ba324.zip
kernel_samsung_smdk4412-72ed73c3f0801e860ee27e53ab6aaf47941ba324.tar.gz
kernel_samsung_smdk4412-72ed73c3f0801e860ee27e53ab6aaf47941ba324.tar.bz2
Merge branch 'x86-platform-next' into x86-platform
Diffstat (limited to 'net/core/net-sysfs.c')
-rw-r--r--net/core/net-sysfs.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index e23c01b..5ceb257 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -99,7 +99,7 @@ NETDEVICE_SHOW(addr_assign_type, fmt_dec);
NETDEVICE_SHOW(addr_len, fmt_dec);
NETDEVICE_SHOW(iflink, fmt_dec);
NETDEVICE_SHOW(ifindex, fmt_dec);
-NETDEVICE_SHOW(features, fmt_long_hex);
+NETDEVICE_SHOW(features, fmt_hex);
NETDEVICE_SHOW(type, fmt_dec);
NETDEVICE_SHOW(link_mode, fmt_dec);
@@ -295,6 +295,20 @@ static ssize_t show_ifalias(struct device *dev,
return ret;
}
+NETDEVICE_SHOW(group, fmt_dec);
+
+static int change_group(struct net_device *net, unsigned long new_group)
+{
+ dev_set_group(net, (int) new_group);
+ return 0;
+}
+
+static ssize_t store_group(struct device *dev, struct device_attribute *attr,
+ const char *buf, size_t len)
+{
+ return netdev_store(dev, attr, buf, len, change_group);
+}
+
static struct device_attribute net_class_attributes[] = {
__ATTR(addr_assign_type, S_IRUGO, show_addr_assign_type, NULL),
__ATTR(addr_len, S_IRUGO, show_addr_len, NULL),
@@ -316,6 +330,7 @@ static struct device_attribute net_class_attributes[] = {
__ATTR(flags, S_IRUGO | S_IWUSR, show_flags, store_flags),
__ATTR(tx_queue_len, S_IRUGO | S_IWUSR, show_tx_queue_len,
store_tx_queue_len),
+ __ATTR(netdev_group, S_IRUGO | S_IWUSR, show_group, store_group),
{}
};