+++ /dev/null
---- a/net/wireless/core.c
-+++ b/net/wireless/core.c
-@@ -160,6 +160,7 @@ int cfg80211_dev_rename(struct cfg80211_
- return 0;
- }
-
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
- int cfg80211_switch_netns(struct cfg80211_registered_device *rdev,
- struct net *net)
- {
-@@ -204,6 +205,7 @@ int cfg80211_switch_netns(struct cfg8021
-
- return 0;
- }
-+#endif
-
- static void cfg80211_rfkill_poll(struct rfkill *rfkill, void *data)
- {
-@@ -372,7 +374,9 @@ struct wiphy *wiphy_new(const struct cfg
- rdev->wiphy.flags |= WIPHY_FLAG_PS_ON_BY_DEFAULT;
- #endif
-
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
- wiphy_net_set(&rdev->wiphy, &init_net);
-+#endif
-
- rdev->rfkill_ops.set_block = cfg80211_rfkill_set_block;
- rdev->rfkill = rfkill_alloc(dev_name(&rdev->wiphy.dev),
-@@ -919,8 +923,10 @@ static int cfg80211_netdev_notifier_call
- wdev->identifier = ++rdev->wdev_id;
- list_add_rcu(&wdev->list, &rdev->wdev_list);
- rdev->devlist_generation++;
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
- /* can only change netns with wiphy */
- dev->features |= NETIF_F_NETNS_LOCAL;
-+#endif
-
- if (sysfs_create_link(&dev->dev.kobj, &rdev->wiphy.dev.kobj,
- "phy80211")) {
-@@ -1081,6 +1087,7 @@ static struct notifier_block cfg80211_ne
- .notifier_call = cfg80211_netdev_notifier_call,
- };
-
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
- static void __net_exit cfg80211_pernet_exit(struct net *net)
- {
- struct cfg80211_registered_device *rdev;
-@@ -1098,14 +1105,17 @@ static void __net_exit cfg80211_pernet_e
- static struct pernet_operations cfg80211_pernet_ops = {
- .exit = cfg80211_pernet_exit,
- };
-+#endif
-
- static int __init cfg80211_init(void)
- {
- int err;
-
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
- err = register_pernet_device(&cfg80211_pernet_ops);
- if (err)
- goto out_fail_pernet;
-+#endif
-
- err = wiphy_sysfs_init();
- if (err)
-@@ -1142,8 +1152,10 @@ out_fail_nl80211:
- out_fail_notifier:
- wiphy_sysfs_exit();
- out_fail_sysfs:
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
- unregister_pernet_device(&cfg80211_pernet_ops);
- out_fail_pernet:
-+#endif
- return err;
- }
- subsys_initcall(cfg80211_init);
-@@ -1155,7 +1167,9 @@ static void __exit cfg80211_exit(void)
- unregister_netdevice_notifier(&cfg80211_netdev_notifier);
- wiphy_sysfs_exit();
- regulatory_exit();
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
- unregister_pernet_device(&cfg80211_pernet_ops);
-+#endif
- destroy_workqueue(cfg80211_wq);
- }
- module_exit(cfg80211_exit);
---- a/net/wireless/nl80211.c
-+++ b/net/wireless/nl80211.c
-@@ -6740,7 +6740,9 @@ static int nl80211_wiphy_netns(struct sk
- if (!net_eq(wiphy_net(&rdev->wiphy), net))
- err = cfg80211_switch_netns(rdev, net);
-
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
- put_net(net);
-+#endif
- return err;
- }
-
+++ /dev/null
---- a/net/wireless/wext-core.c
-+++ b/net/wireless/wext-core.c
-@@ -367,6 +367,7 @@ static int __init wireless_nlevent_init(
- subsys_initcall(wireless_nlevent_init);
-
- /* Process events generated by the wireless layer or the driver. */
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
- static void wireless_nlevent_process(struct work_struct *work)
- {
- struct sk_buff *skb;
-@@ -382,6 +383,20 @@ static void wireless_nlevent_process(str
-
- rtnl_unlock();
- }
-+#else
-+static void wireless_nlevent_process(struct work_struct *work)
-+{
-+ struct sk_buff *skb;
-+ struct net *net;
-+
-+ rtnl_lock();
-+
-+ while ((skb = skb_dequeue(&net->wext_nlevents)))
-+ rtnl_notify(skb, 0, RTNLGRP_LINK, NULL, GFP_ATOMIC);
-+
-+ rtnl_unlock();
-+}
-+#endif
-
- static DECLARE_WORK(wireless_nlevent_work, wireless_nlevent_process);
-
---- a/net/wireless/wext-proc.c
-+++ b/net/wireless/wext-proc.c
-@@ -98,7 +98,11 @@ static void *wireless_dev_seq_start(stru
- return SEQ_START_TOKEN;
-
- off = 1;
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
- for_each_netdev(net, dev)
-+#else
-+ for_each_netdev(net)
-+#endif
- if (off++ == *pos)
- return dev;
- return NULL;