patch-2.2.2 linux/drivers/net/syncppp.c
Next file: linux/drivers/net/syncppp.h
Previous file: linux/drivers/net/smc-ultra.c
Back to the patch index
Back to the overall index
- Lines: 43
- Date:
Thu Feb 18 16:29:30 1999
- Orig file:
v2.2.1/linux/drivers/net/syncppp.c
- Orig date:
Fri Nov 27 13:09:24 1998
diff -u --recursive --new-file v2.2.1/linux/drivers/net/syncppp.c linux/drivers/net/syncppp.c
@@ -51,7 +51,7 @@
#include <asm/byteorder.h>
#include "syncppp.h"
-#define MAXALIVECNT 3 /* max. alive packets */
+#define MAXALIVECNT 6 /* max. alive packets */
#define PPP_ALLSTATIONS 0xff /* All-Stations broadcast address */
#define PPP_UI 0x03 /* Unnumbered Information */
@@ -380,6 +380,7 @@
if_down (dev);
if (! (sp->pp_flags & PP_CISCO)) {
/* Shut down the PPP link. */
+ sp->lcp.magic = jiffies;
sp->lcp.state = LCP_STATE_CLOSED;
sp->ipcp.state = IPCP_STATE_CLOSED;
sppp_clear_timeout (sp);
@@ -841,6 +842,25 @@
}
EXPORT_SYMBOL(sppp_open);
+
+int sppp_reopen (struct device *dev)
+{
+ struct sppp *sp = &((struct ppp_device *)dev)->sppp;
+ sppp_close(dev);
+ dev->flags |= IFF_RUNNING;
+ if (!(sp->pp_flags & PP_CISCO))
+ {
+ sp->lcp.magic = jiffies;
+ ++sp->pp_seq;
+ sp->lcp.state = LCP_STATE_CLOSED;
+ sp->ipcp.state = IPCP_STATE_CLOSED;
+ /* Give it a moment for the line to settle then go */
+ sppp_set_timeout (sp, 1);
+ }
+ return 0;
+}
+
+EXPORT_SYMBOL(sppp_reopen);
int sppp_change_mtu(struct device *dev, int new_mtu)
{
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)