summaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2013-08-19 01:37:52 +0200
committerLuis R. Rodriguez <mcgrof@do-not-panic.com>2013-08-27 11:43:04 -0700
commit0409ddafc06381fd1fb4afab80ac37b273eb7119 (patch)
treec0df0b15ce5e5f3613d1c1f75f523851c4c10772 /patches
parent5ecd54d3cbf3d12554d14ecade641369e7f4761c (diff)
backports: backport sysfs api in wireless
Older kernel versions do not support the new sysfs api with dev_groups. This makes net/wireless/sysfs.c use the old api on older kernels. This is a backport of this commit: commit f0bc99c84349ce87af5b35839d19bfb17bb9b27f Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Date: Wed Jul 24 15:05:35 2013 -0700 net: wireless: convert class code to use dev_groups This was mostly done by Johannes Berg <johannes@sipsolutions.net>. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Cc: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
Diffstat (limited to 'patches')
-rw-r--r--patches/collateral-evolutions/network/76-sysfs-api/net_wireless_sysfs.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/patches/collateral-evolutions/network/76-sysfs-api/net_wireless_sysfs.patch b/patches/collateral-evolutions/network/76-sysfs-api/net_wireless_sysfs.patch
new file mode 100644
index 00000000..5537c2b9
--- /dev/null
+++ b/patches/collateral-evolutions/network/76-sysfs-api/net_wireless_sysfs.patch
@@ -0,0 +1,30 @@
+--- a/net/wireless/sysfs.c
++++ b/net/wireless/sysfs.c
+@@ -71,6 +71,7 @@ static struct attribute *ieee80211_attrs
+ &dev_attr_name.attr,
+ NULL,
+ };
++#define BP_ATTR_GRP_STRUCT device_attribute
+ ATTRIBUTE_GROUPS(ieee80211);
+
+ static void wiphy_dev_release(struct device *dev)
+@@ -151,7 +152,11 @@ struct class ieee80211_class = {
+ .name = "ieee80211",
+ .owner = THIS_MODULE,
+ .dev_release = wiphy_dev_release,
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)
+ .dev_groups = ieee80211_groups,
++#else
++ .dev_attrs = ieee80211_dev_attrs,
++#endif
+ .dev_uevent = wiphy_uevent,
+ #ifdef CONFIG_PM
+ .suspend = wiphy_suspend,
+@@ -165,6 +170,7 @@ struct class ieee80211_class = {
+
+ int wiphy_sysfs_init(void)
+ {
++ init_ieee80211_attrs();
+ return class_register(&ieee80211_class);
+ }
+