upgrade to linux 2.6.10-1.12_FC2
[linux-2.6.git] / drivers / net / ppp_async.c
index ae5255a..e8be5a2 100644 (file)
@@ -266,7 +266,7 @@ ppp_asynctty_read(struct tty_struct *tty, struct file *file,
  */
 static ssize_t
 ppp_asynctty_write(struct tty_struct *tty, struct file *file,
-                  const unsigned char __user *buf, size_t count)
+                  const unsigned char *buf, size_t count)
 {
        return -EAGAIN;
 }
@@ -686,7 +686,7 @@ ppp_async_push(struct asyncppp *ap)
                if (!tty_stuffed && ap->optr < ap->olim) {
                        avail = ap->olim - ap->optr;
                        set_bit(TTY_DO_WRITE_WAKEUP, &tty->flags);
-                       sent = tty->driver->write(tty, 0, ap->optr, avail);
+                       sent = tty->driver->write(tty, ap->optr, avail);
                        if (sent < 0)
                                goto flush;     /* error, e.g. loss of CD */
                        ap->optr += sent;
@@ -911,7 +911,9 @@ ppp_async_input(struct asyncppp *ap, const unsigned char *buf,
                        break;
 
                c = buf[n];
-               if (c == PPP_FLAG) {
+               if (flags != NULL && flags[n] != 0) {
+                       ap->state |= SC_TOSS;
+               } else if (c == PPP_FLAG) {
                        process_input_packet(ap);
                } else if (c == PPP_ESCAPE) {
                        ap->state |= SC_ESCAPE;