Skip to content

Commit

Permalink
drivers: net: wimax: i2400m: i2400m-usb: Use time_after for time comp…
Browse files Browse the repository at this point in the history
…arison

Use time_after() for time comparison with the new fix.

Signed-off-by: Karim Eshapa <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
karimeshapaLinux authored and davem330 committed May 9, 2017
1 parent f92ceb0 commit 4c19e2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wimax/i2400m/i2400m-usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ static inline int edc_inc(struct edc *edc, u16 max_err, u16 timeframe)
unsigned long now;

now = jiffies;
if (now - edc->timestart > timeframe) {
if (time_after(now, edc->timestart + timeframe)) {
edc->errorcount = 1;
edc->timestart = now;
} else if (++edc->errorcount > max_err) {
Expand Down

0 comments on commit 4c19e2f

Please sign in to comment.