git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
drivers
/
net
/
ppp_async.c
diff --git
a/drivers/net/ppp_async.c
b/drivers/net/ppp_async.c
index
aa6540b
..
caabbc4
100644
(file)
--- a/
drivers/net/ppp_async.c
+++ b/
drivers/net/ppp_async.c
@@
-30,6
+30,7
@@
#include <linux/ppp_channel.h>
#include <linux/spinlock.h>
#include <linux/init.h>
#include <linux/ppp_channel.h>
#include <linux/spinlock.h>
#include <linux/init.h>
+#include <linux/jiffies.h>
#include <asm/uaccess.h>
#include <asm/string.h>
#include <asm/uaccess.h>
#include <asm/string.h>
@@
-124,8
+125,8
@@
static struct ppp_channel_ops async_ops = {
* way to fix this is to use a rwlock in the tty struct, but for now
* we use a single global rwlock for all ttys in ppp line discipline.
*
* way to fix this is to use a rwlock in the tty struct, but for now
* we use a single global rwlock for all ttys in ppp line discipline.
*
- * FIXME: this is no longer true. The _close path for the ldisc is
- * now guaranteed to be sane.
+ * FIXME: this is no longer true. The _close path for the ldisc is
+ * now guaranteed to be sane.
*/
static DEFINE_RWLOCK(disc_data_lock);
*/
static DEFINE_RWLOCK(disc_data_lock);
@@
-276,7
+277,7
@@
ppp_asynctty_write(struct tty_struct *tty, struct file *file,
* Called in process context only. May be re-entered by multiple
* ioctl calling threads.
*/
* Called in process context only. May be re-entered by multiple
* ioctl calling threads.
*/
-
+
static int
ppp_asynctty_ioctl(struct tty_struct *tty, struct file *file,
unsigned int cmd, unsigned long arg)
static int
ppp_asynctty_ioctl(struct tty_struct *tty, struct file *file,
unsigned int cmd, unsigned long arg)
@@
-570,7
+571,7
@@
ppp_async_encode(struct asyncppp *ap)
* character if necessary.
*/
if (islcp || flag_time == 0
* character if necessary.
*/
if (islcp || flag_time == 0
- ||
jiffies - ap->last_xmit >= flag_time
)
+ ||
time_after_eq(jiffies, ap->last_xmit + flag_time)
)
*buf++ = PPP_FLAG;
ap->last_xmit = jiffies;
fcs = PPP_INITFCS;
*buf++ = PPP_FLAG;
ap->last_xmit = jiffies;
fcs = PPP_INITFCS;
@@
-801,9
+802,9
@@
process_input_packet(struct asyncppp *ap)
/* check for address/control and protocol compression */
p = skb->data;
/* check for address/control and protocol compression */
p = skb->data;
- if (p[0] == PPP_ALLSTATIONS
&& p[1] == PPP_UI
) {
+ if (p[0] == PPP_ALLSTATIONS) {
/* chop off address/control */
/* chop off address/control */
- if (skb->len < 3)
+ if (
p[1] != PPP_UI ||
skb->len < 3)
goto err;
p = skb_pull(skb, 2);
}
goto err;
p = skb_pull(skb, 2);
}