From: Marcelo Feitoza Parisi <[EMAIL PROTECTED]>

Use of time_after() macro, defined at linux/jiffies.h, which deal with
wrapping correctly and are nicer to read.


Signed-off-by: Marcelo Feitoza Parisi <[EMAIL PROTECTED]>
Signed-off-by: Domen Puncer <[EMAIL PROTECTED]>

---
 strip.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Index: quilt/drivers/net/wireless/strip.c
===================================================================
--- quilt.orig/drivers/net/wireless/strip.c
+++ quilt/drivers/net/wireless/strip.c
@@ -112,7 +112,7 @@ static const char StripVersion[] = "1.3A
 #include <linux/ip.h>
 #include <linux/tcp.h>
 #include <linux/time.h>
-
+#include <linux/jiffies.h>
 
 /************************************************************************/
 /* Useful structures and definitions                                   */
@@ -1576,7 +1576,7 @@ static int strip_xmit(struct sk_buff *sk
        del_timer(&strip_info->idle_timer);
 
 
-       if (jiffies - strip_info->pps_timer > HZ) {
+       if (time_after(jiffies, strip_info->pps_timer + HZ)) {
                unsigned long t = jiffies - strip_info->pps_timer;
                unsigned long rx_pps_count = (strip_info->rx_pps_count * HZ * 8 
+ t / 2) / t;
                unsigned long tx_pps_count = (strip_info->tx_pps_count * HZ * 8 
+ t / 2) / t;

--
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to