patch-2.3.45 linux/drivers/net/wan/lapbether.c

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

diff -u --recursive --new-file v2.3.44/linux/drivers/net/wan/lapbether.c linux/drivers/net/wan/lapbether.c
@@ -163,7 +163,7 @@
 	
 	dev = lapbeth_get_x25_dev(dev);
 
-	if (dev == NULL || dev->start == 0) {
+	if (dev == NULL || test_bit(LINK_STATE_START, &dev->state) == 0) {
 		kfree_skb(skb);
 		return 0;
 	}
@@ -215,7 +215,7 @@
 	 * Just to be *really* sure not to send anything if the interface
 	 * is down, the ethernet device may have gone.
 	 */
-	if (!dev->start) {
+	if (!test_bit(LINK_STATE_START, &dev->state)) {
 		lapbeth_check_devices(dev);
 		kfree_skb(skb);
 		return -ENODEV;
@@ -360,9 +360,6 @@
 	if (lapbeth_check_devices(dev))
 		return -ENODEV;		/* oops, it's gone */
 	
-	dev->tbusy = 0;
-	dev->start = 1;
-
 	lapbeth = (struct lapbethdev *)dev->priv;
 
 	lapbeth_callbacks.connect_confirmation    = lapbeth_connected;
@@ -374,12 +371,11 @@
 
 	if ((err = lapb_register(lapbeth, &lapbeth_callbacks)) != LAPB_OK) {
 		printk(KERN_ERR "lapbeth: lapb_register error - %d\n", err);
-		dev->tbusy = 1;
-		dev->start = 0;
 		return -ENODEV;
 	}
 
 	MOD_INC_USE_COUNT;
+	netif_start_queue(dev);
 
 	return 0;
 }
@@ -389,9 +385,8 @@
 	struct lapbethdev *lapbeth;
 	int err;
 
-	dev->tbusy = 1;
-	dev->start = 0;
-
+	netif_stop_queue(dev);
+	
 	lapbeth = (struct lapbethdev *)dev->priv;
 
 	if ((err = lapb_unregister(lapbeth)) != LAPB_OK)

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