patch-2.1.67 linux/drivers/net/x25_asy.c

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

diff -u --recursive --new-file v2.1.66/linux/drivers/net/x25_asy.c linux/drivers/net/x25_asy.c
@@ -662,7 +662,12 @@
 	if (!sl || sl->magic != X25_ASY_MAGIC)
 		return;
 
-	(void) dev_close(sl->dev);
+	if (sl->dev->flags & IFF_UP)
+	{
+		dev_lock_wait();
+		(void) dev_close(sl->dev);
+		dev_unlock_list();
+	}
 
 	tty->disc_data = 0;
 	sl->tty = NULL;
@@ -896,11 +901,6 @@
 	
 	/* New-style flags. */
 	dev->flags		= IFF_NOARP;
-	dev->family		= AF_X25;
-	dev->pa_addr		= 0;
-	dev->pa_brdaddr	        = 0;
-	dev->pa_mask		= 0;
-	dev->pa_alen		= 4;
 
 	return 0;
 }

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