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
This commit is contained in:
parent
14a3aacf51
commit
c2ce2145f7
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue