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

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

diff -u --recursive --new-file v2.1.66/linux/drivers/net/slip.c linux/drivers/net/slip.c
@@ -589,12 +589,7 @@
 	sl->outfill_timer.data=(unsigned long)sl;
 	sl->outfill_timer.function=sl_outfill;
 #endif
-	/* Needed because address '0' is special */
-	if (dev->pa_addr == 0)  {
-		dev->pa_addr=ntohl(0xC0A80001);
-	}
 	dev->tbusy  = 0;
-/*	dev->flags |= IFF_UP; */
 	dev->start  = 1;
 
 	return 0;
@@ -626,8 +621,6 @@
 	dev->tbusy = 1;
 	dev->start = 0;
 
-/*	dev->flags &= ~IFF_UP; */
-
 	return 0;
 }
 
@@ -740,7 +733,11 @@
 		return;
 	}
 
-	(void) dev_close(sl->dev);
+	if (sl->dev->flags & IFF_UP)
+	{
+		/* STRONG layering violation! --ANK */
+		(void) dev_close(sl->dev);
+	}
 
 	tty->disc_data = 0;
 	sl->tty = NULL;
@@ -752,7 +749,6 @@
 		(void)del_timer (&sl->outfill_timer);
 #endif
 	sl_free(sl);
-	unregister_netdev(sl->dev);
 	MOD_DEC_USE_COUNT;
 }
 
@@ -1237,12 +1233,7 @@
 	dev_init_buffers(dev);
 	
 	/* New-style flags. */
-	dev->flags		= IFF_NOARP|IFF_MULTICAST;
-	dev->family		= AF_INET;
-	dev->pa_addr		= 0;
-	dev->pa_brdaddr	        = 0;
-	dev->pa_mask		= 0;
-	dev->pa_alen		= 4;
+	dev->flags		= IFF_NOARP|IFF_POINTOPOINT|IFF_MULTICAST;
 
 	return 0;
 }

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