linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / net / wireless / strip.c
index ccaf28e..18baacf 100644 (file)
@@ -81,6 +81,7 @@ static const char StripVersion[] = "1.3A-STUART.CHESHIRE";
 /************************************************************************/
 /* Header files                                                                */
 
+#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/init.h>
@@ -111,7 +112,7 @@ static const char StripVersion[] = "1.3A-STUART.CHESHIRE";
 #include <linux/ip.h>
 #include <linux/tcp.h>
 #include <linux/time.h>
-#include <linux/jiffies.h>
+
 
 /************************************************************************/
 /* Useful structures and definitions                                   */
@@ -467,7 +468,6 @@ static int arp_query(unsigned char *haddr, u32 paddr,
                     struct net_device *dev)
 {
        struct neighbour *neighbor_entry;
-       int ret = 0;
 
        neighbor_entry = neigh_lookup(&arp_tbl, &paddr, dev);
 
@@ -475,11 +475,10 @@ static int arp_query(unsigned char *haddr, u32 paddr,
                neighbor_entry->used = jiffies;
                if (neighbor_entry->nud_state & NUD_VALID) {
                        memcpy(haddr, neighbor_entry->ha, dev->addr_len);
-                       ret = 1;
+                       return 1;
                }
-               neigh_release(neighbor_entry);
        }
-       return ret;
+       return 0;
 }
 
 static void DumpData(char *msg, struct strip *strip_info, __u8 * ptr,
@@ -1570,7 +1569,7 @@ static int strip_xmit(struct sk_buff *skb, struct net_device *dev)
        del_timer(&strip_info->idle_timer);
 
 
-       if (time_after(jiffies, strip_info->pps_timer + HZ)) {
+       if (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;