drivers: net: wimax: i2400m: i2400m-usb: Use time_after for time comparison
Use time_after() for time comparison with the new fix. Signed-off-by: Karim Eshapa <karim.eshapa@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f92ceb01c2
commit
4c19e2f2a8
|
@ -131,7 +131,7 @@ static inline int edc_inc(struct edc *edc, u16 max_err, u16 timeframe)
|
||||||
unsigned long now;
|
unsigned long now;
|
||||||
|
|
||||||
now = jiffies;
|
now = jiffies;
|
||||||
if (now - edc->timestart > timeframe) {
|
if (time_after(now, edc->timestart + timeframe)) {
|
||||||
edc->errorcount = 1;
|
edc->errorcount = 1;
|
||||||
edc->timestart = now;
|
edc->timestart = now;
|
||||||
} else if (++edc->errorcount > max_err) {
|
} else if (++edc->errorcount > max_err) {
|
||||||
|
|
Loading…
Reference in New Issue