aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2014-04-08 07:21:40 -0400
committerKalle Valo <kvalo@qca.qualcomm.com>2014-04-11 01:35:56 -0400
commit4bfee8e8c13fc9477eb9420efd5a5d12e32ac614 (patch)
treef4f814c3f848f456312eb5e4164b347caf470814 /drivers/net/wireless
parentd650097bfadab387dfb762bf46b8598cbedf50b3 (diff)
ath10k: improve htc tx credit debugging prints
This way it's easier to track and debug htc tx credit issues. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ath/ath10k/htc.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c
index 7f1bccd3597f..5b58dbb17416 100644
--- a/drivers/net/wireless/ath/ath10k/htc.c
+++ b/drivers/net/wireless/ath/ath10k/htc.c
@@ -157,6 +157,9 @@ int ath10k_htc_send(struct ath10k_htc *htc,
157 goto err_pull; 157 goto err_pull;
158 } 158 }
159 ep->tx_credits -= credits; 159 ep->tx_credits -= credits;
160 ath10k_dbg(ATH10K_DBG_HTC,
161 "htc ep %d consumed %d credits (total %d)\n",
162 eid, credits, ep->tx_credits);
160 spin_unlock_bh(&htc->tx_lock); 163 spin_unlock_bh(&htc->tx_lock);
161 } 164 }
162 165
@@ -185,6 +188,9 @@ err_credits:
185 if (ep->tx_credit_flow_enabled) { 188 if (ep->tx_credit_flow_enabled) {
186 spin_lock_bh(&htc->tx_lock); 189 spin_lock_bh(&htc->tx_lock);
187 ep->tx_credits += credits; 190 ep->tx_credits += credits;
191 ath10k_dbg(ATH10K_DBG_HTC,
192 "htc ep %d reverted %d credits back (total %d)\n",
193 eid, credits, ep->tx_credits);
188 spin_unlock_bh(&htc->tx_lock); 194 spin_unlock_bh(&htc->tx_lock);
189 195
190 if (ep->ep_ops.ep_tx_credits) 196 if (ep->ep_ops.ep_tx_credits)
@@ -234,12 +240,12 @@ ath10k_htc_process_credit_report(struct ath10k_htc *htc,
234 if (report->eid >= ATH10K_HTC_EP_COUNT) 240 if (report->eid >= ATH10K_HTC_EP_COUNT)
235 break; 241 break;
236 242
237 ath10k_dbg(ATH10K_DBG_HTC, "ep %d got %d credits\n",
238 report->eid, report->credits);
239
240 ep = &htc->endpoint[report->eid]; 243 ep = &htc->endpoint[report->eid];
241 ep->tx_credits += report->credits; 244 ep->tx_credits += report->credits;
242 245
246 ath10k_dbg(ATH10K_DBG_HTC, "htc ep %d got %d credits (total %d)\n",
247 report->eid, report->credits, ep->tx_credits);
248
243 if (ep->ep_ops.ep_tx_credits) { 249 if (ep->ep_ops.ep_tx_credits) {
244 spin_unlock_bh(&htc->tx_lock); 250 spin_unlock_bh(&htc->tx_lock);
245 ep->ep_ops.ep_tx_credits(htc->ar); 251 ep->ep_ops.ep_tx_credits(htc->ar);