From 0d50afa1e74de0c704761741da3c7324b5bd77db Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Fri, 16 Nov 2012 20:46:19 +0100 Subject: [PATCH] --- yaml --- r: 335861 b: refs/heads/master c: 38c1a01cf10c6e4049b4ffbd4a6af655df2a46e1 h: refs/heads/master i: 335859: d42272993c447743d179404fa9be753e89aaaa40 v: v3 --- [refs] | 2 +- trunk/net/core/net-sysfs.c | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 5b127f51eb65..0ba3af59d3c2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b78a4932f5fb11fadf41e69c606a33fa6787574c +refs/heads/master: 38c1a01cf10c6e4049b4ffbd4a6af655df2a46e1 diff --git a/trunk/net/core/net-sysfs.c b/trunk/net/core/net-sysfs.c index bcf02f608cbf..017a8bacfb27 100644 --- a/trunk/net/core/net-sysfs.c +++ b/trunk/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);