From f1c7401a17ff34294d283da733028163c17cde21 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Tue, 17 Aug 2010 20:31:07 +0200 Subject: [PATCH] compat-wireless: deactivate namespace Namespace support was introduced with kernel 2.6.35 in struct class. Deactivate it for older kernel. Signed-off-by: Hauke Mehrtens --- patches/32-remove-ns-type.patch | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 patches/32-remove-ns-type.patch diff --git a/patches/32-remove-ns-type.patch b/patches/32-remove-ns-type.patch new file mode 100644 index 000000000000..b35c92796bff --- /dev/null +++ b/patches/32-remove-ns-type.patch @@ -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) -- 2.30.2