summaryrefslogtreecommitdiff
path: root/patches/collateral-evolutions/network/76-sysfs-api/net_wireless_sysfs.patch
blob: 5537c2b9edf6bcae715b6642239bb3616af8abdd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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);
 }