summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/pcie/tx.c
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-08-04 21:30:10 +0300
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-08-04 21:30:10 +0300
commitd4a81698540a644d1316bcd5836f3ae495844216 (patch)
treed3126de0bfb4295fc5f8ad65d5df33ee25438136 /drivers/net/wireless/iwlwifi/pcie/tx.c
parent36fb90172688c8eeac67e1ef01d232549c9a6131 (diff)
parentaecdc63d87891c75e60906973c7b7c9cd58403d6 (diff)
downloadlinux-d4a81698540a644d1316bcd5836f3ae495844216.tar.xz
Merge remote-tracking branch 'iwlwifi-fixes/master' into next
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Conflicts: drivers/net/wireless/iwlwifi/pcie/internal.h
Diffstat (limited to 'drivers/net/wireless/iwlwifi/pcie/tx.c')
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/tx.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/pcie/tx.c b/drivers/net/wireless/iwlwifi/pcie/tx.c
index b7d1268bf969..a8c8a4a7420b 100644
--- a/drivers/net/wireless/iwlwifi/pcie/tx.c
+++ b/drivers/net/wireless/iwlwifi/pcie/tx.c
@@ -1948,8 +1948,19 @@ int iwl_trans_pcie_tx(struct iwl_trans *trans, struct sk_buff *skb,
/* start timer if queue currently empty */
if (q->read_ptr == q->write_ptr) {
- if (txq->wd_timeout)
- mod_timer(&txq->stuck_timer, jiffies + txq->wd_timeout);
+ if (txq->wd_timeout) {
+ /*
+ * If the TXQ is active, then set the timer, if not,
+ * set the timer in remainder so that the timer will
+ * be armed with the right value when the station will
+ * wake up.
+ */
+ if (!txq->frozen)
+ mod_timer(&txq->stuck_timer,
+ jiffies + txq->wd_timeout);
+ else
+ txq->frozen_expiry_remainder = txq->wd_timeout;
+ }
IWL_DEBUG_RPM(trans, "Q: %d first tx - take ref\n", q->id);
iwl_trans_pcie_ref(trans);
}