diff options
author | John W. Linville <linville@tuxdriver.com> | 2012-11-19 23:37:43 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-11-19 23:37:43 +0400 |
commit | e56108d92760c89ce21c30aa02588595b9396251 (patch) | |
tree | 74fdba5362746e534b25063192cf645d7d279fbb /net/core | |
parent | da8fb123b041e487d28f54d3a77a15139cb9e3b9 (diff) | |
parent | 38c1a01cf10c6e4049b4ffbd4a6af655df2a46e1 (diff) | |
download | linux-e56108d92760c89ce21c30aa02588595b9396251.tar.xz |
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/net-sysfs.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index bcf02f608cbf..017a8bacfb27 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c @@ -429,6 +429,17 @@ static struct attribute_group netstat_group = { .name = "statistics", .attrs = netstat_attrs, }; + +#if IS_ENABLED(CONFIG_WIRELESS_EXT) || IS_ENABLED(CONFIG_CFG80211) +static struct attribute *wireless_attrs[] = { + NULL +}; + +static struct attribute_group wireless_group = { + .name = "wireless", + .attrs = wireless_attrs, +}; +#endif #endif /* CONFIG_SYSFS */ #ifdef CONFIG_RPS @@ -1409,6 +1420,15 @@ int netdev_register_kobject(struct net_device *net) groups++; *groups++ = &netstat_group; + +#if IS_ENABLED(CONFIG_WIRELESS_EXT) || IS_ENABLED(CONFIG_CFG80211) + if (net->ieee80211_ptr) + *groups++ = &wireless_group; +#if IS_ENABLED(CONFIG_WIRELESS_EXT) + else if (net->wireless_handlers) + *groups++ = &wireless_group; +#endif +#endif #endif /* CONFIG_SYSFS */ error = device_add(dev); |