patch-pre2.0.10 linux/net/core/dev.c

Next file: linux/net/core/skbuff.c
Previous file: linux/net/ax25/af_ax25.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file pre2.0.9/linux/net/core/dev.c linux/net/core/dev.c
@@ -332,7 +332,7 @@
  *	rest of the magic.
  */
 
-void dev_queue_xmit(struct sk_buff *skb, struct device *dev, int pri)
+static void do_dev_queue_xmit(struct sk_buff *skb, struct device *dev, int pri)
 {
 	unsigned long flags;
 	struct sk_buff_head *list;
@@ -443,15 +443,12 @@
 			}
 		}
 	}
-	start_bh_atomic();
 	if (dev->hard_start_xmit(skb, dev) == 0) {
 		/*
 		 *	Packet is now solely the responsibility of the driver
 		 */
-		end_bh_atomic();
 		return;
 	}
-	end_bh_atomic();
 
 	/*
 	 *	Transmission failed, put skb back into a list. Once on the list it's safe and
@@ -463,6 +460,13 @@
 	restore_flags(flags);
 }
 
+void dev_queue_xmit(struct sk_buff *skb, struct device *dev, int pri)
+{
+	start_bh_atomic();
+	do_dev_queue_xmit(skb, dev, pri);
+	end_bh_atomic();
+}
+
 /*
  *	Receive a packet from a device driver and queue it for the upper
  *	(protocol) levels.  It always succeeds. This is the recommended 
@@ -521,7 +525,7 @@
  *	This routine causes all interfaces to try to send some data. 
  */
  
-void dev_transmit(void)
+static void dev_transmit(void)
 {
 	struct device *dev;
 
@@ -758,7 +762,7 @@
 			 *	Feed them to the output stage and if it fails
 			 *	indicate they re-queue at the front.
 			 */
-			dev_queue_xmit(skb,dev,-i - 1);
+			do_dev_queue_xmit(skb,dev,-i - 1);
 			/*
 			 *	If we can take no more then stop here.
 			 */

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