diff options
| author | Michal Kazior <michal.kazior@tieto.com> | 2016-03-17 05:51:05 -0400 |
|---|---|---|
| committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2016-03-21 12:29:17 -0400 |
| commit | 750eeed89cf3c466df302e4707491b015531e26c (patch) | |
| tree | 33141fb0f44940559e038df702c129efc5fbc269 /drivers/net | |
| parent | 9d71d47eed20f34620e54e29bcc90f959d5873b8 (diff) | |
ath10k: fix pull-push tx threshold handling
This prevents tx hangs or hiccups if pull-push
supporting firmware defines per-txq thresholds or
switches modes dynamically.
Fixes: 299468782d94 ("ath10k: implement wake_tx_queue")
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net')
| -rw-r--r-- | drivers/net/wireless/ath/ath10k/mac.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 1bc4bf1916a6..ed00853ea9cc 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c | |||
| @@ -3770,7 +3770,8 @@ void ath10k_mac_tx_push_pending(struct ath10k *ar) | |||
| 3770 | 3770 | ||
| 3771 | /* Prevent aggressive sta/tid taking over tx queue */ | 3771 | /* Prevent aggressive sta/tid taking over tx queue */ |
| 3772 | max = 16; | 3772 | max = 16; |
| 3773 | while (max--) { | 3773 | ret = 0; |
| 3774 | while (ath10k_mac_tx_can_push(hw, txq) && max--) { | ||
| 3774 | ret = ath10k_mac_tx_push_txq(hw, txq); | 3775 | ret = ath10k_mac_tx_push_txq(hw, txq); |
| 3775 | if (ret < 0) | 3776 | if (ret < 0) |
| 3776 | break; | 3777 | break; |
| @@ -4023,14 +4024,13 @@ static void ath10k_mac_op_wake_tx_queue(struct ieee80211_hw *hw, | |||
| 4023 | struct ath10k *ar = hw->priv; | 4024 | struct ath10k *ar = hw->priv; |
| 4024 | struct ath10k_txq *artxq = (void *)txq->drv_priv; | 4025 | struct ath10k_txq *artxq = (void *)txq->drv_priv; |
| 4025 | 4026 | ||
| 4026 | if (ath10k_mac_tx_can_push(hw, txq)) { | 4027 | spin_lock_bh(&ar->txqs_lock); |
| 4027 | spin_lock_bh(&ar->txqs_lock); | 4028 | if (list_empty(&artxq->list)) |
| 4028 | if (list_empty(&artxq->list)) | 4029 | list_add_tail(&artxq->list, &ar->txqs); |
| 4029 | list_add_tail(&artxq->list, &ar->txqs); | 4030 | spin_unlock_bh(&ar->txqs_lock); |
| 4030 | spin_unlock_bh(&ar->txqs_lock); | ||
| 4031 | 4031 | ||
| 4032 | if (ath10k_mac_tx_can_push(hw, txq)) | ||
| 4032 | tasklet_schedule(&ar->htt.txrx_compl_task); | 4033 | tasklet_schedule(&ar->htt.txrx_compl_task); |
| 4033 | } | ||
| 4034 | 4034 | ||
| 4035 | ath10k_htt_tx_txq_update(hw, txq); | 4035 | ath10k_htt_tx_txq_update(hw, txq); |
| 4036 | } | 4036 | } |
