]> git.ozlabs.org Git - ppp.git/commitdiff
fixes from Al Longyear
authorPaul Mackerras <paulus@samba.org>
Mon, 30 May 1994 02:42:55 +0000 (02:42 +0000)
committerPaul Mackerras <paulus@samba.org>
Mon, 30 May 1994 02:42:55 +0000 (02:42 +0000)
linux/ppp.c
pppd/sys-linux.c

index 32d5fa604aa1a9c6ea5054c9f31094ca8413e05e..f0582e39bd35bf2405115990b951b63bec503669 100644 (file)
@@ -1,7 +1,7 @@
 /*
    PPP for Linux
 
-   $Id: ppp.c,v 1.1 1994/05/27 00:55:25 paulus Exp $
+   $Id: ppp.c,v 1.2 1994/05/30 02:42:55 paulus Exp $
 */
 
 /*
@@ -377,9 +377,9 @@ ppp_changedmtu (struct ppp *ppp, int new_mtu, int new_mru)
   PRINTKN (2,(KERN_INFO "ppp: channel %s mtu = %d, mru = %d\n",
              dev->name, new_mtu, new_mru));
        
-  new_xbuff = (unsigned char *) kmalloc(mtu + 4, GFP_KERNEL);
-  new_rbuff = (unsigned char *) kmalloc(mru + 4, GFP_KERNEL);
-  new_cbuff = (unsigned char *) kmalloc(mru + 4, GFP_KERNEL);
+  new_xbuff = (unsigned char *) kmalloc(mtu + 4, GFP_ATOMIC);
+  new_rbuff = (unsigned char *) kmalloc(mru + 4, GFP_ATOMIC);
+  new_cbuff = (unsigned char *) kmalloc(mru + 4, GFP_ATOMIC);
 /*
  *  If the buffers failed to allocate then complain.
  */
@@ -558,11 +558,7 @@ ppp_open(struct tty_struct *tty)
 
   PRINTKN (2,(KERN_INFO "ppp: channel %s open\n", ppp->dev->name));
 
-#ifdef NEW_TTY_DRIVERS
-  return (0);
-#else
   return (ppp->line);
-#endif
 }
 
 /* called when ppp interface goes "up".  here this just means we start
index aa829aad9201abcbe914cddf415fef34071a2e96..daaf612eccb69c4bfde9a029706ed5da0762b2ed 100644 (file)
@@ -40,7 +40,7 @@
 #include <linux/route.h>
 #include <linux/if_ether.h>
 #include <netinet/in.h>
-#include <net/if_ppp.h>
+#include <signal.h>
 
 #include "pppd.h"
 #include "ppp.h"
@@ -94,7 +94,12 @@ int set_kdebugflag (int requested_level)
 void establish_ppp (void)
 {
     int pppdisc = N_PPP;
-    int sig = SIGIO;
+    int sig    = SIGIO;
+
+    if (ioctl(fd, PPPIOCSINPSIG, &sig) == -1) {
+       syslog(LOG_ERR, "ioctl(PPPIOCSINPSIG): %m");
+       die(1);
+    }
 
     if (ioctl(fd, TIOCEXCL, 0) < 0) {
        syslog (LOG_WARNING, "ioctl(TIOCEXCL): %m");
@@ -116,14 +121,6 @@ void establish_ppp (void)
     }
 
     set_kdebugflag (kdebugflag);
-
-    /*
-     * Set the device to give us a SIGIO when data is available.
-     */
-    if (ioctl(fd, PPPIOCSINPSIG, &sig) == -1) {
-       syslog(LOG_ERR, "ioctl(PPPIOCSINPSIG): %m");
-       die(1);
-    }
 }
 
 /*