Skip to content

Commit

Permalink
ath10k: fix pull-push tx threshold handling
Browse files Browse the repository at this point in the history
This prevents tx hangs or hiccups if pull-push
supporting firmware defines per-txq thresholds or
switches modes dynamically.

Fixes: 2994687 ("ath10k: implement wake_tx_queue")
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
  • Loading branch information
Michal Kazior authored and Kalle Valo committed Mar 21, 2016
1 parent 9d71d47 commit 750eeed
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions drivers/net/wireless/ath/ath10k/mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -3770,7 +3770,8 @@ void ath10k_mac_tx_push_pending(struct ath10k *ar)

/* Prevent aggressive sta/tid taking over tx queue */
max = 16;
while (max--) {
ret = 0;
while (ath10k_mac_tx_can_push(hw, txq) && max--) {
ret = ath10k_mac_tx_push_txq(hw, txq);
if (ret < 0)
break;
Expand Down Expand Up @@ -4023,14 +4024,13 @@ static void ath10k_mac_op_wake_tx_queue(struct ieee80211_hw *hw,
struct ath10k *ar = hw->priv;
struct ath10k_txq *artxq = (void *)txq->drv_priv;

if (ath10k_mac_tx_can_push(hw, txq)) {
spin_lock_bh(&ar->txqs_lock);
if (list_empty(&artxq->list))
list_add_tail(&artxq->list, &ar->txqs);
spin_unlock_bh(&ar->txqs_lock);
spin_lock_bh(&ar->txqs_lock);
if (list_empty(&artxq->list))
list_add_tail(&artxq->list, &ar->txqs);
spin_unlock_bh(&ar->txqs_lock);

if (ath10k_mac_tx_can_push(hw, txq))
tasklet_schedule(&ar->htt.txrx_compl_task);
}

ath10k_htt_tx_txq_update(hw, txq);
}
Expand Down

0 comments on commit 750eeed

Please sign in to comment.