]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - net/core/net-sysfs.c
Merge branch 'sysdev' into release
[mv-sheeva.git] / net / core / net-sysfs.c
index e23c01be5a5bdf27012ab839f05abd5a9366532f..5ceb257e860c18cbabe352f67cb8760d95bcba84 100644 (file)
@@ -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),
        {}
 };