patch-2.3.47 linux/drivers/net/wan/x25_asy.c

Next file: linux/drivers/net/wavelan.c
Previous file: linux/drivers/net/wan/sdla.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.46/linux/drivers/net/wan/x25_asy.c linux/drivers/net/wan/x25_asy.c
@@ -301,7 +301,7 @@
 	struct x25_asy *sl = (struct x25_asy *) tty->disc_data;
 
 	/* First make sure we're connected. */
-	if (!sl || sl->magic != X25_ASY_MAGIC || !test_bit(LINK_STATE_START, &sl->dev->state))
+	if (!sl || sl->magic != X25_ASY_MAGIC || !netif_running(sl->dev))
 		return;
 
 	if (sl->xleft <= 0)  
@@ -340,7 +340,7 @@
 	struct x25_asy *sl = (struct x25_asy*)(dev->priv);
 	int err;
 
-	if (!test_bit(LINK_STATE_START, &sl->dev->state))
+	if (!netif_running(sl->dev))
 	{
 		printk("%s: xmit call when iface is down\n", dev->name);
 		return 1;
@@ -406,7 +406,7 @@
 static void x25_asy_data_transmit(void *token, struct sk_buff *skb)
 {
 	struct x25_asy *sl=token;
-	if(test_bit(LINK_STATE_XOFF, &sl->dev->state))
+	if (netif_queue_stopped(sl->dev))
 	{
 		printk(KERN_ERR "x25_asy: tbusy drop\n");
 		kfree_skb(skb);
@@ -563,7 +563,7 @@
 {
 	struct x25_asy *sl = (struct x25_asy *) tty->disc_data;
 
-	if (!sl || sl->magic != X25_ASY_MAGIC || !test_bit(LINK_STATE_START, &sl->dev->state))
+	if (!sl || sl->magic != X25_ASY_MAGIC || !netif_running(sl->dev))
 		return;
 
 	/*
@@ -903,7 +903,7 @@
 				 * VSV = if dev->start==0, then device
 				 * unregistered while close proc.
 				 */
-				if (test_bit(LINK_STATE_START, &x25_asy_ctrls[i]->dev.state))
+				if (netif_running(&(x25_asy_ctrls[i]->dev)))
 					unregister_netdev(&(x25_asy_ctrls[i]->dev));
 
 				kfree(x25_asy_ctrls[i]);

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