* [PATCH 1/3] ath9k: Add tx-failed counter.
@ 2012-04-03 16:16 greearb
2012-04-03 16:19 ` Ben Greear
0 siblings, 1 reply; 2+ messages in thread
From: greearb @ 2012-04-03 16:16 UTC (permalink / raw)
To: linux-wireless; +Cc: ath9k-devel, Ben Greear
From: Ben Greear <greearb@candelatech.com>
This counts any failure during getting packets into
the DMA buffers, including out-of-memory, etc.
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
:100644 100644 35d1c8e... 9078279... M drivers/net/wireless/ath/ath9k/debug.c
:100644 100644 64fcfad... d1c132f... M drivers/net/wireless/ath/ath9k/debug.h
:100644 100644 215eb25... 2e49a43... M drivers/net/wireless/ath/ath9k/main.c
drivers/net/wireless/ath/ath9k/debug.c | 1 +
drivers/net/wireless/ath/ath9k/debug.h | 2 ++
drivers/net/wireless/ath/ath9k/main.c | 1 +
3 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
index 35d1c8e..9078279 100644
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -529,6 +529,7 @@ static ssize_t read_file_xmit(struct file *file, char __user *user_buf,
PR("hw-put-tx-buf: ", puttxbuf);
PR("hw-tx-start: ", txstart);
PR("hw-tx-proc-desc: ", txprocdesc);
+ PR("TX-Failed: ", txfailed);
len += snprintf(buf + len, size - len,
"%s%11p%11p%10p%10p\n", "txq-memory-address:",
sc->tx.txq_map[WME_AC_BE],
diff --git a/drivers/net/wireless/ath/ath9k/debug.h b/drivers/net/wireless/ath/ath9k/debug.h
index 64fcfad..d1c132f 100644
--- a/drivers/net/wireless/ath/ath9k/debug.h
+++ b/drivers/net/wireless/ath/ath9k/debug.h
@@ -113,6 +113,7 @@ struct ath_interrupt_stats {
* @puttxbuf: Number of times hardware was given txbuf to write.
* @txstart: Number of times hardware was told to start tx.
* @txprocdesc: Number of times tx descriptor was processed
+ * @txfailed: Out-of-memory or other errors in xmit path.
*/
struct ath_tx_stats {
u32 tx_pkts_all;
@@ -135,6 +136,7 @@ struct ath_tx_stats {
u32 puttxbuf;
u32 txstart;
u32 txprocdesc;
+ u32 txfailed;
};
/**
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 215eb25..2e49a43 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1135,6 +1135,7 @@ static void ath9k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
if (ath_tx_start(hw, skb, &txctl) != 0) {
ath_dbg(common, XMIT, "TX failed\n");
+ TX_STAT_INC(txctl.txq->axq_qnum, txfailed);
goto exit;
}
--
1.7.3.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/3] ath9k: Add tx-failed counter.
2012-04-03 16:16 [PATCH 1/3] ath9k: Add tx-failed counter greearb
@ 2012-04-03 16:19 ` Ben Greear
0 siblings, 0 replies; 2+ messages in thread
From: Ben Greear @ 2012-04-03 16:19 UTC (permalink / raw)
To: greearb; +Cc: linux-wireless, ath9k-devel
On 04/03/2012 09:16 AM, greearb@candelatech.com wrote:
> From: Ben Greear<greearb@candelatech.com>
>
> This counts any failure during getting packets into
> the DMA buffers, including out-of-memory, etc.
Errr, that should be 1/2. I can re-send if
needed..might be other requests for changes
anyway...
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-04-03 16:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-03 16:16 [PATCH 1/3] ath9k: Add tx-failed counter greearb
2012-04-03 16:19 ` Ben Greear
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).