[lwlan-devel] patch for 2.6.26
Pavel Roskin
proski at gnu.org
Mon Jul 28 19:14:29 EDT 2008
On Mon, 2008-07-28 at 23:44 +0200, Tormod Volden wrote:
> Hi,
> The netdevice namespace code changed in 2.6.26 and a new CONFIG_NET_NS
> was introduced. If I understand correctly, the nd_net bit we added for
> 2.6.24 must now only be used if CONFIG_NET_NS is set. I am not sure
> this is the most clean and correct way to handle this, but the below
> patch seems to work.
Actually, if you look at the patch between Linux 2.6.25 and 2.6.26,
you'll see several changes like this:
- dev->nd_net = &init_net;
+ dev_net_set(dev, &init_net);
And that's what we should be doing, I believe.
Index: src/p80211/p80211netdev.c
===================================================================
--- src/p80211/p80211netdev.c (revision 1865)
+++ src/p80211/p80211netdev.c (working copy)
@@ -947,7 +947,9 @@
#endif
#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) )
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) )
+ dev_net_set(dev, &init_net);
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,24) )
dev->nd_net = &init_net;
#endif
Also the kernel version probing should be fixed. Linux 2.6.27 will need
changes to accommodate changes in Wireless Extensions API (but they are
already in updated Fedora 9 kernels). I'll post those patches
separately.
--
Regards,
Pavel Roskin
More information about the Linux-wlan-devel
mailing list