summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorLi Qiong <liqiong@nfschina.com>2022-06-06 16:54:49 +0300
committerKalle Valo <kvalo@kernel.org>2022-07-27 13:58:10 +0300
commitc2ce2145f7f3c1e92b9adceb729756a8be7ca145 (patch)
treee4f40b1fa586f83eed0f8f2808e5302839910b88 /drivers/net
parent14a3aacf517a9de725dd3219dbbcf741e31763c4 (diff)
downloadlinux-c2ce2145f7f3c1e92b9adceb729756a8be7ca145.tar.xz
wifi: mwl8k: use time_after to replace "jiffies > a"
time_after deals with timer wrapping correctly. Signed-off-by: Li Qiong <liqiong@nfschina.com> Signed-off-by: Kalle Valo <kvalo@kernel.org> Link: https://lore.kernel.org/r/20220606135449.23256-1-liqiong@nfschina.com Link: https://lore.kernel.org/r/20220618131305.13101-1-wangxiang@cdjrlc.com Link: https://lore.kernel.org/r/20220715050016.24164-1-wangborong@cdjrlc.com
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/marvell/mwl8k.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/marvell/mwl8k.c b/drivers/net/wireless/marvell/mwl8k.c
index c1bf8998109c..4dc7e2e53b81 100644
--- a/drivers/net/wireless/marvell/mwl8k.c
+++ b/drivers/net/wireless/marvell/mwl8k.c
@@ -1880,7 +1880,7 @@ static inline void mwl8k_tx_count_packet(struct ieee80211_sta *sta, u8 tid)
* packets ever exceeds the ampdu_min_traffic threshold, we will allow
* an ampdu stream to be started.
*/
- if (jiffies - tx_stats->start_time > HZ) {
+ if (time_after(jiffies, (unsigned long)tx_stats->start_time + HZ)) {
tx_stats->pkts = 0;
tx_stats->start_time = 0;
} else