patch-2.3.47 linux/drivers/net/slip.c

Next file: linux/drivers/net/starfire.c
Previous file: linux/drivers/net/skfp/srf.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.46/linux/drivers/net/slip.c linux/drivers/net/slip.c
@@ -449,7 +449,7 @@
 	struct slip *sl = (struct slip *) tty->disc_data;
 
 	/* First make sure we're connected. */
-	if (!sl || sl->magic != SLIP_MAGIC || !test_bit(LINK_STATE_START, &sl->dev->state)) {
+	if (!sl || sl->magic != SLIP_MAGIC || !netif_running(sl->dev)) {
 		return;
 	}
 	if (sl->xleft <= 0)  {
@@ -472,10 +472,10 @@
 
 	spin_lock(&sl->lock);
 
-	if (test_bit(LINK_STATE_XOFF, &dev->state)) {
+	if (netif_queue_stopped(dev)) {
 		struct slip *sl = (struct slip*)(dev->priv);
 
-		if (!test_bit(LINK_STATE_START, &dev->state))
+		if (!netif_running(dev))
 			goto out;
 
 		/* May be we must check transmitter timeout here ?
@@ -507,7 +507,7 @@
 	struct slip *sl = (struct slip*)(dev->priv);
 
 	spin_lock(&sl->lock);
-	if (!test_bit(LINK_STATE_START, &dev->state))  {
+	if (!netif_running(dev))  {
 		spin_unlock(&sl->lock);
 		printk("%s: xmit call when iface is down\n", dev->name);
 		dev_kfree_skb(skb);
@@ -679,7 +679,7 @@
 	struct slip *sl = (struct slip *) tty->disc_data;
 
 	if (!sl || sl->magic != SLIP_MAGIC ||
-	    !test_bit(LINK_STATE_START, &sl->dev->state))
+	    !netif_running(sl->dev))
 		return;
 
 	/* Read the characters out of the buffer */
@@ -1468,7 +1468,7 @@
 			unsigned char s = END;
 #endif
 			/* put END into tty queue. Is it right ??? */
-			if (!test_bit(LINK_STATE_XOFF, &sl->dev->state))
+			if (!netif_queue_stopped(sl->dev))
 			{
 				/* if device busy no outfill */
 				sl->tty->driver.write(sl->tty, 0, &s, 1);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)