summaryrefslogtreecommitdiffstats
path: root/net/core
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2012-11-19 14:37:43 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-11-19 14:37:43 -0500
commite56108d92760c89ce21c30aa02588595b9396251 (patch)
tree74fdba5362746e534b25063192cf645d7d279fbb /net/core
parentda8fb123b041e487d28f54d3a77a15139cb9e3b9 (diff)
parent38c1a01cf10c6e4049b4ffbd4a6af655df2a46e1 (diff)
downloadop-kernel-dev-e56108d92760c89ce21c30aa02588595b9396251.zip
op-kernel-dev-e56108d92760c89ce21c30aa02588595b9396251.tar.gz
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.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index bcf02f6..017a8ba 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);
OpenPOWER on IntegriCloud