patch-2.1.20 linux/drivers/net/net_init.c

Next file: linux/drivers/net/pi2.c
Previous file: linux/drivers/net/mkiss.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.19/linux/drivers/net/net_init.c linux/drivers/net/net_init.c
@@ -174,9 +174,9 @@
 	int i;
 	/* Fill in the fields of the device structure with ethernet-generic values.
 	   This should be in a common file instead of per-driver.  */
-	for (i = 0; i < DEV_NUMBUFFS; i++)
-		skb_queue_head_init(&dev->buffs[i]);
 
+	dev_init_buffers(dev);
+	
 	/* register boot-defined "eth" devices */
 	if (dev->name && (strncmp(dev->name, "eth", 3) == 0)) {
 		i = simple_strtoul(dev->name + 3, NULL, 0);
@@ -217,16 +217,14 @@
 #ifdef CONFIG_FDDI
 
 void fddi_setup(struct device *dev)
-	{
-	int i;
-
+{
 	/*
 	 * Fill in the fields of the device structure with FDDI-generic values.
 	 * This should be in a common file instead of per-driver.
 	 */
-	for (i=0; i < DEV_NUMBUFFS; i++)
-		skb_queue_head_init(&dev->buffs[i]);
-
+	
+	dev_init_buffers(dev);
+	
 	dev->change_mtu			= fddi_change_mtu;
 	dev->hard_header		= fddi_header;
 	dev->rebuild_header		= fddi_rebuild_header;
@@ -247,7 +245,7 @@
 	dev->pa_mask	= 0;
 	dev->pa_alen	= 4;
 	return;
-	}
+}
 
 #endif
 
@@ -398,8 +396,7 @@
 #define MAX_TR_CARDS 16 /* same as the number of irq's in irq2dev[] */
 static struct device *trdev_index[MAX_TR_CARDS];
 
-struct device *
-init_trdev(struct device *dev, int sizeof_priv)
+struct device *init_trdev(struct device *dev, int sizeof_priv)
 {
 	int new_device = 0;
 	int i;
@@ -436,7 +433,7 @@
 		new_device = 1;
 	}
 
-	trfound:						/* From the double loop above. */
+trfound:						/* From the double loop above. */
 
 	for (i = 0; i < MAX_TR_CARDS; ++i)
 		if (trdev_index[i] == NULL) {
@@ -511,11 +508,9 @@
 int register_trdev(struct device *dev)
 {
 	unsigned long flags;
-	int i;
 	
-	for (i = 0; i < DEV_NUMBUFFS; i++)
-		skb_queue_head_init(&dev->buffs[i]);
-
+	dev_init_buffers(dev);
+	
 	save_flags(flags);
 
 	if (dev && dev->init) {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov