aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwlegacy/common.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/wireless/iwlegacy/common.c b/drivers/net/wireless/iwlegacy/common.c
index cbf2dc18341f..763c7529921b 100644
--- a/drivers/net/wireless/iwlegacy/common.c
+++ b/drivers/net/wireless/iwlegacy/common.c
@@ -4717,10 +4717,11 @@ il_check_stuck_queue(struct il_priv *il, int cnt)
4717 struct il_tx_queue *txq = &il->txq[cnt]; 4717 struct il_tx_queue *txq = &il->txq[cnt];
4718 struct il_queue *q = &txq->q; 4718 struct il_queue *q = &txq->q;
4719 unsigned long timeout; 4719 unsigned long timeout;
4720 unsigned long now = jiffies;
4720 int ret; 4721 int ret;
4721 4722
4722 if (q->read_ptr == q->write_ptr) { 4723 if (q->read_ptr == q->write_ptr) {
4723 txq->time_stamp = jiffies; 4724 txq->time_stamp = now;
4724 return 0; 4725 return 0;
4725 } 4726 }
4726 4727
@@ -4728,9 +4729,9 @@ il_check_stuck_queue(struct il_priv *il, int cnt)
4728 txq->time_stamp + 4729 txq->time_stamp +
4729 msecs_to_jiffies(il->cfg->wd_timeout); 4730 msecs_to_jiffies(il->cfg->wd_timeout);
4730 4731
4731 if (time_after(jiffies, timeout)) { 4732 if (time_after(now, timeout)) {
4732 IL_ERR("Queue %d stuck for %u ms.\n", q->id, 4733 IL_ERR("Queue %d stuck for %u ms.\n", q->id,
4733 il->cfg->wd_timeout); 4734 jiffies_to_msecs(now - txq->time_stamp));
4734 ret = il_force_reset(il, false); 4735 ret = il_force_reset(il, false);
4735 return (ret == -EAGAIN) ? 0 : 1; 4736 return (ret == -EAGAIN) ? 0 : 1;
4736 } 4737 }