Commit 342bbf3f authored by Johannes Berg's avatar Johannes Berg Committed by John W. Linville

iwlwifi: always monitor for stuck queues

If we only monitor while associated, the following
can happen:
 - we're associated, and the queue stuck check
   runs, setting the queue "touch" time to X
 - we disassociate, stopping the monitoring,
   which leaves the time set to X
 - almost 2s later, we associate, and enqueue
   a frame
 - before the frame is transmitted, we monitor
   for stuck queues, and find the time set to
   X, although it is now later than X + 2000ms,
   so we decide that the queue is stuck and
   erroneously restart the device

It happens more with P2P because there we can
go between associated/unassociated frequently.

Cc: stable@vger.kernel.org
Reported-by: default avatarBen Cahill <ben.m.cahill@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 26627687
...@@ -1345,20 +1345,10 @@ void iwl_bg_watchdog(unsigned long data) ...@@ -1345,20 +1345,10 @@ void iwl_bg_watchdog(unsigned long data)
if (timeout == 0) if (timeout == 0)
return; return;
/* monitor and check for stuck cmd queue */ /* monitor and check for stuck queues */
if (iwl_check_stuck_queue(priv, priv->shrd->cmd_queue)) for (cnt = 0; cnt < hw_params(priv).max_txq_num; cnt++)
return;
/* monitor and check for other stuck queues */
if (iwl_is_any_associated(priv)) {
for (cnt = 0; cnt < hw_params(priv).max_txq_num; cnt++) {
/* skip as we already checked the command queue */
if (cnt == priv->shrd->cmd_queue)
continue;
if (iwl_check_stuck_queue(priv, cnt)) if (iwl_check_stuck_queue(priv, cnt))
return; return;
}
}
mod_timer(&priv->watchdog, jiffies + mod_timer(&priv->watchdog, jiffies +
msecs_to_jiffies(IWL_WD_TICK(timeout))); msecs_to_jiffies(IWL_WD_TICK(timeout)));
......
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