diff options
Diffstat (limited to 'drivers/net/ppp_async.c')
-rw-r--r-- | drivers/net/ppp_async.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/net/ppp_async.c b/drivers/net/ppp_async.c index 6de8399d6dd9..6a375ea4947d 100644 --- a/drivers/net/ppp_async.c +++ b/drivers/net/ppp_async.c | |||
@@ -36,7 +36,7 @@ | |||
36 | 36 | ||
37 | #define PPP_VERSION "2.4.2" | 37 | #define PPP_VERSION "2.4.2" |
38 | 38 | ||
39 | #define OBUFSIZE 256 | 39 | #define OBUFSIZE 4096 |
40 | 40 | ||
41 | /* Structure for storing local state. */ | 41 | /* Structure for storing local state. */ |
42 | struct asyncppp { | 42 | struct asyncppp { |
@@ -337,10 +337,7 @@ ppp_asynctty_poll(struct tty_struct *tty, struct file *file, poll_table *wait) | |||
337 | return 0; | 337 | return 0; |
338 | } | 338 | } |
339 | 339 | ||
340 | /* | 340 | /* May sleep, don't call from interrupt level or with interrupts disabled */ |
341 | * This can now be called from hard interrupt level as well | ||
342 | * as soft interrupt level or mainline. | ||
343 | */ | ||
344 | static void | 341 | static void |
345 | ppp_asynctty_receive(struct tty_struct *tty, const unsigned char *buf, | 342 | ppp_asynctty_receive(struct tty_struct *tty, const unsigned char *buf, |
346 | char *cflags, int count) | 343 | char *cflags, int count) |
@@ -561,8 +558,8 @@ ppp_async_encode(struct asyncppp *ap) | |||
561 | * Start of a new packet - insert the leading FLAG | 558 | * Start of a new packet - insert the leading FLAG |
562 | * character if necessary. | 559 | * character if necessary. |
563 | */ | 560 | */ |
564 | if (islcp || flag_time == 0 | 561 | if (islcp || flag_time == 0 || |
565 | || time_after_eq(jiffies, ap->last_xmit + flag_time)) | 562 | time_after_eq(jiffies, ap->last_xmit + flag_time)) |
566 | *buf++ = PPP_FLAG; | 563 | *buf++ = PPP_FLAG; |
567 | ap->last_xmit = jiffies; | 564 | ap->last_xmit = jiffies; |
568 | fcs = PPP_INITFCS; | 565 | fcs = PPP_INITFCS; |
@@ -699,8 +696,8 @@ ppp_async_push(struct asyncppp *ap) | |||
699 | */ | 696 | */ |
700 | clear_bit(XMIT_BUSY, &ap->xmit_flags); | 697 | clear_bit(XMIT_BUSY, &ap->xmit_flags); |
701 | /* any more work to do? if not, exit the loop */ | 698 | /* any more work to do? if not, exit the loop */ |
702 | if (!(test_bit(XMIT_WAKEUP, &ap->xmit_flags) | 699 | if (!(test_bit(XMIT_WAKEUP, &ap->xmit_flags) || |
703 | || (!tty_stuffed && ap->tpkt))) | 700 | (!tty_stuffed && ap->tpkt))) |
704 | break; | 701 | break; |
705 | /* more work to do, see if we can do it now */ | 702 | /* more work to do, see if we can do it now */ |
706 | if (test_and_set_bit(XMIT_BUSY, &ap->xmit_flags)) | 703 | if (test_and_set_bit(XMIT_BUSY, &ap->xmit_flags)) |
@@ -757,8 +754,8 @@ scan_ordinary(struct asyncppp *ap, const unsigned char *buf, int count) | |||
757 | 754 | ||
758 | for (i = 0; i < count; ++i) { | 755 | for (i = 0; i < count; ++i) { |
759 | c = buf[i]; | 756 | c = buf[i]; |
760 | if (c == PPP_ESCAPE || c == PPP_FLAG | 757 | if (c == PPP_ESCAPE || c == PPP_FLAG || |
761 | || (c < 0x20 && (ap->raccm & (1 << c)) != 0)) | 758 | (c < 0x20 && (ap->raccm & (1 << c)) != 0)) |
762 | break; | 759 | break; |
763 | } | 760 | } |
764 | return i; | 761 | return i; |