Commit 3cc0fef6 authored by Michal Kazior's avatar Michal Kazior Committed by Kalle Valo

ath10k: keep track of queue depth per txq

This will be necessary for later.
Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent dd4717b6
...@@ -311,6 +311,7 @@ struct ath10k_peer { ...@@ -311,6 +311,7 @@ struct ath10k_peer {
struct ath10k_txq { struct ath10k_txq {
struct list_head list; struct list_head list;
unsigned long num_fw_queued;
}; };
struct ath10k_sta { struct ath10k_sta {
......
...@@ -3669,6 +3669,7 @@ static int ath10k_mac_tx_push_txq(struct ieee80211_hw *hw, ...@@ -3669,6 +3669,7 @@ static int ath10k_mac_tx_push_txq(struct ieee80211_hw *hw,
const bool is_presp = false; const bool is_presp = false;
struct ath10k *ar = hw->priv; struct ath10k *ar = hw->priv;
struct ath10k_htt *htt = &ar->htt; struct ath10k_htt *htt = &ar->htt;
struct ath10k_txq *artxq = (void *)txq->drv_priv;
struct ieee80211_vif *vif = txq->vif; struct ieee80211_vif *vif = txq->vif;
struct ieee80211_sta *sta = txq->sta; struct ieee80211_sta *sta = txq->sta;
enum ath10k_hw_txrx_mode txmode; enum ath10k_hw_txrx_mode txmode;
...@@ -3708,6 +3709,10 @@ static int ath10k_mac_tx_push_txq(struct ieee80211_hw *hw, ...@@ -3708,6 +3709,10 @@ static int ath10k_mac_tx_push_txq(struct ieee80211_hw *hw,
return ret; return ret;
} }
spin_lock_bh(&ar->htt.tx_lock);
artxq->num_fw_queued++;
spin_unlock_bh(&ar->htt.tx_lock);
return 0; return 0;
} }
......
...@@ -55,7 +55,9 @@ void ath10k_txrx_tx_unref(struct ath10k_htt *htt, ...@@ -55,7 +55,9 @@ void ath10k_txrx_tx_unref(struct ath10k_htt *htt,
struct ath10k *ar = htt->ar; struct ath10k *ar = htt->ar;
struct device *dev = ar->dev; struct device *dev = ar->dev;
struct ieee80211_tx_info *info; struct ieee80211_tx_info *info;
struct ieee80211_txq *txq;
struct ath10k_skb_cb *skb_cb; struct ath10k_skb_cb *skb_cb;
struct ath10k_txq *artxq;
struct sk_buff *msdu; struct sk_buff *msdu;
bool limit_mgmt_desc = false; bool limit_mgmt_desc = false;
...@@ -80,11 +82,16 @@ void ath10k_txrx_tx_unref(struct ath10k_htt *htt, ...@@ -80,11 +82,16 @@ void ath10k_txrx_tx_unref(struct ath10k_htt *htt,
} }
skb_cb = ATH10K_SKB_CB(msdu); skb_cb = ATH10K_SKB_CB(msdu);
txq = skb_cb->txq;
artxq = (void *)txq->drv_priv;
if (unlikely(skb_cb->flags & ATH10K_SKB_F_MGMT) && if (unlikely(skb_cb->flags & ATH10K_SKB_F_MGMT) &&
ar->hw_params.max_probe_resp_desc_thres) ar->hw_params.max_probe_resp_desc_thres)
limit_mgmt_desc = true; limit_mgmt_desc = true;
if (txq)
artxq->num_fw_queued--;
ath10k_htt_tx_free_msdu_id(htt, tx_done->msdu_id); ath10k_htt_tx_free_msdu_id(htt, tx_done->msdu_id);
ath10k_htt_tx_dec_pending(htt, limit_mgmt_desc); ath10k_htt_tx_dec_pending(htt, limit_mgmt_desc);
if (htt->num_pending_tx == 0) if (htt->num_pending_tx == 0)
......
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