From: greearb@candelatech.com
To: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org, Ben Greear <greearb@candelatech.com>
Subject: [PATCH 07/10] ath9k: Add tx-failed counter.
Date: Wed, 11 Apr 2012 10:52:15 -0700 [thread overview]
Message-ID: <1334166738-28243-8-git-send-email-greearb@candelatech.com> (raw)
In-Reply-To: <1334166738-28243-1-git-send-email-greearb@candelatech.com>
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 ff47b32... 186efc5... M drivers/net/wireless/ath/ath9k/debug.c
:100644 100644 2d47f74... fe2b487... M drivers/net/wireless/ath/ath9k/debug.h
:100644 100644 39f8f7c... c18290a... 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 ff47b32..186efc5 100644
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -524,6 +524,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 2d47f74..fe2b487 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 39f8f7c..c18290a 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1150,6 +1150,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
next prev parent reply other threads:[~2012-04-11 17:53 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-11 17:52 [PATCH 00/10] Wireless patches for wireless-testing greearb
2012-04-11 17:52 ` [PATCH 01/10] cfg80211: Add framework to support ethtool stats greearb
2012-04-11 17:52 ` [PATCH 02/10] mac80211: Support getting sta_info stats via ethtool greearb
2012-04-11 17:52 ` [PATCH 03/10] mac80211: Framework to get wifi-driver " greearb
2012-04-11 17:52 ` [PATCH 04/10] ath9k: Support ethtool getstats api greearb
2012-04-11 17:52 ` greearb [this message]
2012-04-11 17:52 ` [PATCH 10/10] ath9k: Gather and report IRQ sync_cause errors greearb
[not found] ` <1334166738-28243-1-git-send-email-greearb-my8/4N5VtI7c+919tysfdA@public.gmane.org>
2012-04-11 17:52 ` [PATCH 05/10] mac80211: Add more ethtools stats: survey, rates, etc greearb-my8/4N5VtI7c+919tysfdA
[not found] ` <1334166738-28243-6-git-send-email-greearb-my8/4N5VtI7c+919tysfdA@public.gmane.org>
2012-04-11 18:01 ` Ben Greear
2012-04-12 3:46 ` Johannes Berg
[not found] ` <1334202406.3788.8.camel-8upI4CBIZJIJvtFkdXX2HixXY32XiHfO@public.gmane.org>
2012-04-12 14:50 ` Ben Greear
2012-04-12 15:23 ` Ben Greear
2012-04-11 17:52 ` [PATCH 06/10] mac80211: Add sta_state to ethtool stats greearb-my8/4N5VtI7c+919tysfdA
2012-04-12 3:49 ` Johannes Berg
2012-04-12 14:48 ` Ben Greear
2012-04-11 17:52 ` [PATCH 08/10] mac80211: Support on-channel scan option greearb-my8/4N5VtI7c+919tysfdA
2012-04-12 3:45 ` Johannes Berg
2012-04-12 15:03 ` Ben Greear
2012-04-11 17:52 ` [PATCH 09/10] ath9k: Add more recv stats greearb-my8/4N5VtI7c+919tysfdA
2012-04-12 3:39 ` [PATCH 00/10] Wireless patches for wireless-testing Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1334166738-28243-8-git-send-email-greearb@candelatech.com \
--to=greearb@candelatech.com \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).