Skip to contentSkip to conversation

ath9k_htc: Add RX error statistics

PATCH New Sujith 1 participant 1 message Apr 13, 2011 Qualcomm Atheros ATH9K wireless driver

lore
Share & tools
lore

Sujith

author
#0 lore raw

PATCH 12/40 ath9k_htc: Add RX error statistics

From: Sujith Manoharan <[email protected]>

---
 drivers/net/wireless/ath/ath9k/htc.h           |   16 ++++
 drivers/net/wireless/ath/ath9k/htc_drv_debug.c |  107 ++++++++++++++++++++++--
 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c  |    2 +
 3 files changed, 117 insertions(+), 8 deletions(-)
drivers/net/wireless/ath/ath9k/htc.h +16 -0
index 20511af..0e48fa0 100644
@@ -296,6 +296,9 @@ struct ath9k_htc_tx_ctl {
 
 #define TX_QSTAT_INC(q) (priv->debug.tx_stats.queue_stats[q]++)
 
+void ath9k_htc_err_stat_rx(struct ath9k_htc_priv *priv,
+			   struct ath_htc_rx_status *rxs);
+
 struct ath_tx_stats {
 	u32 buf_queued;
 	u32 buf_completed;
@@ -310,6 +313,14 @@ struct ath_rx_stats {
 	u32 skb_allocated;
 	u32 skb_completed;
 	u32 skb_dropped;
+	u32 err_crc;
+	u32 err_decrypt_crc;
+	u32 err_mic;
+	u32 err_pre_delim;
+	u32 err_post_delim;
+	u32 err_decrypt_busy;
+	u32 err_phy;
+	u32 err_phy_stats[ATH9K_PHYERR_MAX];
 };
 
 struct ath9k_debug {
@@ -330,6 +341,11 @@ struct ath9k_debug {
 
 #define TX_QSTAT_INC(c) do { } while (0)
 
+static inline void ath9k_htc_err_stat_rx(struct ath9k_htc_priv *priv,
+					 struct ath_htc_rx_status *rxs)
+{
+}
+
 #endif /* CONFIG_ATH9K_HTC_DEBUGFS */
 
 #define ATH_LED_PIN_DEF             1
drivers/net/wireless/ath/ath9k/htc_drv_debug.c +100 -9

127 lines not on this page · raw message

drivers/net/wireless/ath/ath9k/htc_drv_txrx.c +2 -0
index 0e28558..a62495d 100644
@@ -540,6 +540,8 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,
 		goto rx_next;
 	}
 
+	ath9k_htc_err_stat_rx(priv, rxstatus);
+
 	/* Get the RX status information */
 	memcpy(&rxbuf->rxstatus, rxstatus, HTC_RX_FRAME_HEADER_SIZE);
 	skb_pull(skb, HTC_RX_FRAME_HEADER_SIZE);
Signature · 1 line
1.7.4.4