patch-2.4.15 linux/drivers/isdn/isdn_net.c
Next file: linux/drivers/isdn/isdn_ppp.c
Previous file: linux/drivers/isdn/isdn_common.c
Back to the patch index
Back to the overall index
- Lines: 95
- Date:
Fri Nov 9 13:41:41 2001
- Orig file:
v2.4.14/linux/drivers/isdn/isdn_net.c
- Orig date:
Tue Oct 9 17:06:51 2001
diff -u --recursive --new-file v2.4.14/linux/drivers/isdn/isdn_net.c linux/drivers/isdn/isdn_net.c
@@ -1,4 +1,4 @@
-/* $Id: isdn_net.c,v 1.140.6.10 2001/09/28 08:05:29 kai Exp $
+/* $Id: isdn_net.c,v 1.140.6.11 2001/11/06 20:58:28 kai Exp $
*
* Linux ISDN subsystem, network interfaces and related functions (linklevel).
*
@@ -175,7 +175,7 @@
static void isdn_net_ciscohdlck_connected(isdn_net_local *lp);
static void isdn_net_ciscohdlck_disconnected(isdn_net_local *lp);
-char *isdn_net_revision = "$Revision: 1.140.6.10 $";
+char *isdn_net_revision = "$Revision: 1.140.6.11 $";
/*
* Code for raw-networking over ISDN
@@ -333,7 +333,7 @@
anymore = 0;
while (p) {
isdn_net_local *l = p->local;
- if ((jiffies - last_jiffies) == 0)
+ if (jiffies == last_jiffies)
l->cps = l->transcount;
else
l->cps = (l->transcount * HZ) / (jiffies - last_jiffies);
@@ -352,9 +352,9 @@
{
if (l->hupflags & ISDN_MANCHARGE &&
l->hupflags & ISDN_CHARGEHUP) {
- while (jiffies - l->chargetime > l->chargeint)
+ while (time_after(jiffies, l->chargetime + l->chargeint))
l->chargetime += l->chargeint;
- if (jiffies - l->chargetime >= l->chargeint - 2 * HZ)
+ if (time_after(jiffies, l->chargetime + l->chargeint - 2 * HZ))
if (l->outgoing || l->hupflags & ISDN_INHUP)
isdn_net_hangup(&p->dev);
} else if (l->outgoing) {
@@ -363,7 +363,7 @@
printk(KERN_DEBUG "isdn_net: Hupflags of %s are %X\n",
l->name, l->hupflags);
isdn_net_hangup(&p->dev);
- } else if (jiffies - l->chargetime > l->chargeint) {
+ } else if (time_after(jiffies, l->chargetime + l->chargeint)) {
printk(KERN_DEBUG
"isdn_net: %s: chtime = %lu, chint = %d\n",
l->name, l->chargetime, l->chargeint);
@@ -599,7 +599,7 @@
anymore = 1;
if(lp->dialtimeout > 0)
- if(lp->dialstarted == 0 || jiffies > (lp->dialstarted + lp->dialtimeout + lp->dialwait)) {
+ if(lp->dialstarted == 0 || time_after(jiffies, lp->dialstarted + lp->dialtimeout + lp->dialwait)) {
lp->dialstarted = jiffies;
lp->dialwait_timer = 0;
}
@@ -659,7 +659,7 @@
printk(KERN_INFO "%s: Open leased line ...\n", lp->name);
} else {
if(lp->dialtimeout > 0)
- if(jiffies > (lp->dialstarted + lp->dialtimeout)) {
+ if (time_after(jiffies, lp->dialstarted + lp->dialtimeout)) {
restore_flags(flags);
lp->dialwait_timer = jiffies + lp->dialwait;
lp->dialstarted = 0;
@@ -1106,7 +1106,7 @@
lp->sqfull_stamp = jiffies;
} else {
/* subsequent overload: if slavedelay exceeded, start dialing */
- if ((jiffies - lp->sqfull_stamp) > lp->slavedelay) {
+ if (time_after(jiffies, lp->sqfull_stamp + lp->slavedelay)) {
slp = lp->slave->priv;
if (!(slp->flags & ISDN_NET_CONNECTED)) {
isdn_net_force_dial_lp((isdn_net_local *) lp->slave->priv);
@@ -1115,7 +1115,7 @@
}
}
} else {
- if (lp->sqfull && ((jiffies - lp->sqfull_stamp) > (lp->slavedelay + (10 * HZ)))) {
+ if (lp->sqfull && time_after(jiffies, lp->sqfull_stamp + lp->slavedelay + (10 * HZ))) {
lp->sqfull = 0;
}
/* this is a hack to allow auto-hangup for slaves on moderate loads */
@@ -1225,11 +1225,11 @@
cli();
if(lp->dialwait_timer <= 0)
- if(lp->dialstarted > 0 && lp->dialtimeout > 0 && jiffies < lp->dialstarted + lp->dialtimeout + lp->dialwait)
+ if(lp->dialstarted > 0 && lp->dialtimeout > 0 && time_before(jiffies, lp->dialstarted + lp->dialtimeout + lp->dialwait))
lp->dialwait_timer = lp->dialstarted + lp->dialtimeout + lp->dialwait;
if(lp->dialwait_timer > 0) {
- if(jiffies < lp->dialwait_timer) {
+ if(time_before(jiffies, lp->dialwait_timer)) {
isdn_net_unreachable(ndev, skb, "dial rejected: retry-time not reached");
dev_kfree_skb(skb);
restore_flags(flags);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)