patch-1.3.57 linux/net/core/dev.c

Next file: linux/net/ipv4/ip_input.c
Previous file: linux/mm/vmscan.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.56/linux/net/core/dev.c linux/net/core/dev.c
@@ -41,6 +41,7 @@
  *		Rudi Cilibrasi	:	Pass the right thing to set_mac_address()
  *		Dave Miller	:	32bit quantity for the device lock to make it work out
  *					on a Sparc.
+ *		Bjorn Ekwall	:	Added KERNELD hack
  *
  */
 
@@ -73,6 +74,9 @@
 #ifdef CONFIG_NET_ALIAS
 #include <linux/net_alias.h>
 #endif
+#ifdef CONFIG_KERNELD
+#include <linux/kerneld.h>
+#endif
 
 /*
  *	The list of packet types we will receive (as opposed to discard)
@@ -203,6 +207,13 @@
 		if (strcmp(dev->name, name) == 0)
 			return(dev);
 	}
+#ifdef CONFIG_KERNELD
+	if (request_module(name) == 0)
+		for (dev = dev_base; dev != NULL; dev = dev->next) {
+			if (strcmp(dev->name, name) == 0)
+				return(dev);
+		}
+#endif
 	return(NULL);
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this