patch-1.3.23 linux/net/core/dev.c
Next file: linux/net/ipv4/ip.c
Previous file: linux/include/linux/mcdx.h
Back to the patch index
Back to the overall index
- Lines: 51
- Date:
Sun Sep 3 12:00:24 1995
- Orig file:
v1.3.22/linux/net/core/dev.c
- Orig date:
Sun Sep 3 12:27:05 1995
diff -u --recursive --new-file v1.3.22/linux/net/core/dev.c linux/net/core/dev.c
@@ -1305,7 +1305,7 @@
void dev_init(void)
{
- struct device *dev, *dev2;
+ struct device *dev, **dp;
/*
* Add the devices.
@@ -1313,24 +1313,25 @@
* from the chain disconnecting the device until the
* next reboot.
*/
-
- dev2 = NULL;
- for (dev = dev_base; dev != NULL; dev=dev->next)
+
+ dp = &dev_base;
+ while ((dev = *dp) != NULL)
{
+ int i;
+ for (i = 0; i < DEV_NUMBUFFS; i++) {
+ skb_queue_head_init(dev->buffs + i);
+ }
+
if (dev->init && dev->init(dev))
{
/*
* It failed to come up. Unhook it.
*/
-
- if (dev2 == NULL)
- dev_base = dev->next;
- else
- dev2->next = dev->next;
+ *dp = dev->next;
}
else
{
- dev2 = dev;
+ dp = &dev->next;
}
}
proc_net_register(&(struct proc_dir_entry) {
@@ -1339,6 +1340,5 @@
0, &proc_net_inode_operations,
dev_get_info
});
-
}
FUNET's LINUX-ADM group, [email protected]
TCL-scripts by Sam Shen, [email protected]
with Sam's (original) version of this