diff options
-rw-r--r-- | include/linux/netdevice.h | 4 | ||||
-rw-r--r-- | net/core/net-sysfs.c | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h index 193b637889f9..e5ece8dceaad 100644 --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h | |||
@@ -900,8 +900,8 @@ struct net_device | |||
900 | 900 | ||
901 | /* class/net/name entry */ | 901 | /* class/net/name entry */ |
902 | struct device dev; | 902 | struct device dev; |
903 | /* space for optional statistics and wireless sysfs groups */ | 903 | /* space for optional device, statistics, and wireless sysfs groups */ |
904 | const struct attribute_group *sysfs_groups[3]; | 904 | const struct attribute_group *sysfs_groups[4]; |
905 | 905 | ||
906 | /* rtnetlink link ops */ | 906 | /* rtnetlink link ops */ |
907 | const struct rtnl_link_ops *rtnl_link_ops; | 907 | const struct rtnl_link_ops *rtnl_link_ops; |
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 89de182353b0..157645c0da73 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c | |||
@@ -544,8 +544,11 @@ int netdev_register_kobject(struct net_device *net) | |||
544 | dev_set_name(dev, "%s", net->name); | 544 | dev_set_name(dev, "%s", net->name); |
545 | 545 | ||
546 | #ifdef CONFIG_SYSFS | 546 | #ifdef CONFIG_SYSFS |
547 | *groups++ = &netstat_group; | 547 | /* Allow for a device specific group */ |
548 | if (*groups) | ||
549 | groups++; | ||
548 | 550 | ||
551 | *groups++ = &netstat_group; | ||
549 | #ifdef CONFIG_WIRELESS_EXT_SYSFS | 552 | #ifdef CONFIG_WIRELESS_EXT_SYSFS |
550 | if (net->ieee80211_ptr) | 553 | if (net->ieee80211_ptr) |
551 | *groups++ = &wireless_group; | 554 | *groups++ = &wireless_group; |