aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/rx.c
diff options
context:
space:
mode:
authorS.Çağlar Onur <caglar@pardus.org.tr>2008-02-14 10:36:47 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-02-29 15:37:10 -0500
commitab46623ec1f4ea022b861333ce959f0b8f9eb70e (patch)
treea23b54ed3379ab103e3c2e37bdba8d152a9c6380 /net/mac80211/rx.c
parentac2bf3242e1a329543be50b5c9df4f0119ee188c (diff)
net/mac80211/: Use time_* macros
The functions time_before, time_before_eq, time_after, and time_after_eq are more robust for comparing jiffies against other values. So following patch implements usage of the time_after() macro, defined at linux/jiffies.h, which deals with wrapping correctly Cc: linux-wireless@vger.kernel.org Signed-off-by: S.Çağlar Onur <caglar@pardus.org.tr> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r--net/mac80211/rx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index b1fc112152c9..472b19fc9143 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -9,6 +9,7 @@
9 * published by the Free Software Foundation. 9 * published by the Free Software Foundation.
10 */ 10 */
11 11
12#include <linux/jiffies.h>
12#include <linux/kernel.h> 13#include <linux/kernel.h>
13#include <linux/skbuff.h> 14#include <linux/skbuff.h>
14#include <linux/netdevice.h> 15#include <linux/netdevice.h>
@@ -767,7 +768,7 @@ ieee80211_reassemble_find(struct ieee80211_sub_if_data *sdata,
767 compare_ether_addr(hdr->addr2, f_hdr->addr2) != 0) 768 compare_ether_addr(hdr->addr2, f_hdr->addr2) != 0)
768 continue; 769 continue;
769 770
770 if (entry->first_frag_time + 2 * HZ < jiffies) { 771 if (time_after(jiffies, entry->first_frag_time + 2 * HZ)) {
771 __skb_queue_purge(&entry->skb_list); 772 __skb_queue_purge(&entry->skb_list);
772 continue; 773 continue;
773 } 774 }