compat-wireless: deactivate namespace
authorHauke Mehrtens <hauke@hauke-m.de>
Tue, 17 Aug 2010 18:31:07 +0000 (20:31 +0200)
committerLuis R. Rodriguez <lrodriguez@atheros.com>
Tue, 17 Aug 2010 22:00:30 +0000 (15:00 -0700)
Namespace support was introduced with kernel 2.6.35 in struct class.
Deactivate it for older kernel.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
patches/32-remove-ns-type.patch [new file with mode: 0644]

diff --git a/patches/32-remove-ns-type.patch b/patches/32-remove-ns-type.patch
new file mode 100644 (file)
index 0000000..b35c927
--- /dev/null
@@ -0,0 +1,28 @@
+--- a/net/wireless/sysfs.c
++++ b/net/wireless/sysfs.c
+@@ -110,12 +110,14 @@ static int wiphy_resume(struct device *d
+       return ret;
+ }
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+ static const void *wiphy_namespace(struct device *d)
+ {
+       struct wiphy *wiphy = container_of(d, struct wiphy, dev);
+       return wiphy_net(wiphy);
+ }
++#endif
+ struct class ieee80211_class = {
+       .name = "ieee80211",
+@@ -127,8 +129,10 @@ struct class ieee80211_class = {
+ #endif
+       .suspend = wiphy_suspend,
+       .resume = wiphy_resume,
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+       .ns_type = &net_ns_type_operations,
+       .namespace = wiphy_namespace,
++#endif
+ };
+ int wiphy_sysfs_init(void)