aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/wil6210/txrx_edma.c
diff options
context:
space:
mode:
authorDedy Lansky <dlansky@codeaurora.org>2018-07-24 10:44:24 +0300
committerKalle Valo <kvalo@codeaurora.org>2018-07-31 10:59:50 +0300
commita24a3d6abb978d4abc25d541e787981e7ef555c8 (patch)
tree78fd5e07de7c7f3308968c09d70935cb2a076e02 /drivers/net/wireless/ath/wil6210/txrx_edma.c
parentwil6210: drop Rx packets with L2 error indication from HW (diff)
downloadlinux-a24a3d6abb978d4abc25d541e787981e7ef555c8.tar.xz
linux-a24a3d6abb978d4abc25d541e787981e7ef555c8.zip
wil6210: add TX latency statistics
Collect statistics of TX latency. The latency is measured from the time the HW gets aware of new SKB to transmit until the HW indicates tx complete for this SKB. The statistics are shown via new "tx_latency" debugfs. Signed-off-by: Dedy Lansky <dlansky@codeaurora.org> Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/txrx_edma.c')
-rw-r--r--drivers/net/wireless/ath/wil6210/txrx_edma.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/wil6210/txrx_edma.c b/drivers/net/wireless/ath/wil6210/txrx_edma.c
index b5d399f1c1c7..2ea9767b01d1 100644
--- a/drivers/net/wireless/ath/wil6210/txrx_edma.c
+++ b/drivers/net/wireless/ath/wil6210/txrx_edma.c
@@ -1217,6 +1217,9 @@ int wil_tx_sring_handler(struct wil6210_priv *wil,
if (stats) {
stats->tx_packets++;
stats->tx_bytes += skb->len;
+
+ wil_tx_latency_calc(wil, skb,
+ &wil->sta[cid]);
}
} else {
ndev->stats.tx_errors++;
@@ -1467,6 +1470,11 @@ static int __wil_tx_ring_tso_edma(struct wil6210_priv *wil,
*/
wmb();
+ if (wil->tx_latency)
+ *(ktime_t *)&skb->cb = ktime_get();
+ else
+ memset(skb->cb, 0, sizeof(ktime_t));
+
wil_w(wil, ring->hwtail, ring->swhead);
return 0;