1 The only other namespace change. Note that pach 01-netdev.patch
2 also has some other namespace changes there, look at that file
3 for the other changes. It'd be nice to figure out a way to
4 bring thise here cleanly and seprately but they touch the same
7 --- a/net/wireless/nl80211.c
8 +++ b/net/wireless/nl80211.c
9 @@ -29,7 +29,9 @@ static struct genl_family nl80211_fam =
10 .hdrsize = 0, /* no private header */
11 .version = 1, /* no particular meaning now */
12 .maxattr = NL80211_ATTR_MAX,
13 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
18 /* internal helper: get rdev and dev */
19 @@ -4187,7 +4189,9 @@ static int nl80211_wiphy_netns(struct sk
21 err = cfg80211_switch_netns(rdev, net);
23 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
27 cfg80211_unlock_rdev(rdev);
29 --- a/net/wireless/core.c
30 +++ b/net/wireless/core.c
31 @@ -223,6 +223,7 @@ int cfg80211_dev_rename(struct cfg80211_
35 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
36 int cfg80211_switch_netns(struct cfg80211_registered_device *rdev,
39 @@ -258,6 +259,7 @@ int cfg80211_switch_netns(struct cfg8021
45 static void cfg80211_rfkill_poll(struct rfkill *rfkill, void *data)
47 @@ -370,7 +372,9 @@ struct wiphy *wiphy_new(const struct cfg
48 rdev->wiphy.flags |= WIPHY_FLAG_PS_ON_BY_DEFAULT;
51 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
52 wiphy_net_set(&rdev->wiphy, &init_net);
55 rdev->rfkill_ops.set_block = cfg80211_rfkill_set_block;
56 rdev->rfkill = rfkill_alloc(dev_name(&rdev->wiphy.dev),
57 @@ -683,8 +687,10 @@ static int cfg80211_netdev_notifier_call
58 mutex_lock(&rdev->devlist_mtx);
59 list_add_rcu(&wdev->list, &rdev->netdev_list);
60 rdev->devlist_generation++;
61 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
62 /* can only change netns with wiphy */
63 dev->features |= NETIF_F_NETNS_LOCAL;
66 if (sysfs_create_link(&dev->dev.kobj, &rdev->wiphy.dev.kobj,
68 @@ -827,6 +833,7 @@ static struct notifier_block cfg80211_ne
69 .notifier_call = cfg80211_netdev_notifier_call,
72 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
73 static void __net_exit cfg80211_pernet_exit(struct net *net)
75 struct cfg80211_registered_device *rdev;
76 @@ -844,14 +851,17 @@ static void __net_exit cfg80211_pernet_e
77 static struct pernet_operations cfg80211_pernet_ops = {
78 .exit = cfg80211_pernet_exit,
82 static int __init cfg80211_init(void)
86 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
87 err = register_pernet_device(&cfg80211_pernet_ops);
92 err = wiphy_sysfs_init();
94 @@ -886,8 +896,10 @@ out_fail_nl80211:
98 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
99 unregister_pernet_device(&cfg80211_pernet_ops);
104 subsys_initcall(cfg80211_init);
105 @@ -899,7 +911,9 @@ static void cfg80211_exit(void)
106 unregister_netdevice_notifier(&cfg80211_netdev_notifier);
109 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
110 unregister_pernet_device(&cfg80211_pernet_ops);
112 destroy_workqueue(cfg80211_wq);
114 module_exit(cfg80211_exit);
115 --- a/net/wireless/wext-core.c
116 +++ b/net/wireless/wext-core.c
117 @@ -399,7 +399,11 @@ static void wireless_nlevent_process(uns
120 while ((skb = skb_dequeue(&wireless_nlevent_queue)))
121 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
122 rtnl_notify(skb, &init_net, 0, RTNLGRP_LINK, NULL, GFP_ATOMIC);
124 + rtnl_notify(skb, 0, RTNLGRP_LINK, NULL, GFP_ATOMIC);
128 static DECLARE_TASKLET(wireless_nlevent_tasklet, wireless_nlevent_process, 0);
129 --- a/net/wireless/wext-proc.c
130 +++ b/net/wireless/wext-proc.c
131 @@ -98,7 +98,11 @@ static void *wireless_dev_seq_start(stru
132 return SEQ_START_TOKEN;
135 +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24))
136 for_each_netdev(net, dev)
138 + for_each_netdev(net)