Commit 8cbc3d51 authored by Wang Qing's avatar Wang Qing Committed by Kalle Valo

cw1200: use time_is_after_jiffies() instead of open coding it

Use the helper function time_is_{before,after}_jiffies() to improve
code readability.
Signed-off-by: default avatarWang Qing <wangqing@vivo.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/1646018060-61275-1-git-send-email-wangqing@vivo.com
parent 56e4e453
......@@ -8,6 +8,7 @@
#include <net/mac80211.h>
#include <linux/sched.h>
#include <linux/jiffies.h>
#include "queue.h"
#include "cw1200.h"
#include "debug.h"
......@@ -94,7 +95,7 @@ static void __cw1200_queue_gc(struct cw1200_queue *queue,
bool wakeup_stats = false;
list_for_each_entry_safe(item, tmp, &queue->queue, head) {
if (jiffies - item->queue_timestamp < queue->ttl)
if (time_is_after_jiffies(item->queue_timestamp + queue->ttl))
break;
--queue->num_queued;
--queue->link_map_cache[item->txpriv.link_id];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment