aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/mac80211/rc80211_simple.c3
-rw-r--r--net/mac80211/rx.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/net/mac80211/rc80211_simple.c b/net/mac80211/rc80211_simple.c
index c4678905a142..a669bcb8739f 100644
--- a/net/mac80211/rc80211_simple.c
+++ b/net/mac80211/rc80211_simple.c
@@ -7,6 +7,7 @@
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 */ 8 */
9 9
10#include <linux/jiffies.h>
10#include <linux/init.h> 11#include <linux/init.h>
11#include <linux/netdevice.h> 12#include <linux/netdevice.h>
12#include <linux/types.h> 13#include <linux/types.h>
@@ -175,7 +176,7 @@ static void rate_control_simple_tx_status(void *priv, struct net_device *dev,
175 rate_control_rate_dec(local, sta); 176 rate_control_rate_dec(local, sta);
176 } 177 }
177 178
178 if (srctrl->avg_rate_update + 60 * HZ < jiffies) { 179 if (time_after(jiffies, srctrl->avg_rate_update + 60 * HZ)) {
179 srctrl->avg_rate_update = jiffies; 180 srctrl->avg_rate_update = jiffies;
180 if (srctrl->tx_avg_rate_num > 0) { 181 if (srctrl->tx_avg_rate_num > 0) {
181#ifdef CONFIG_MAC80211_VERBOSE_DEBUG 182#ifdef CONFIG_MAC80211_VERBOSE_DEBUG
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 }