Skip to contentSkip to conversation

ath9k: Show some live tx-queue values in debugfs.

PATCH New greearb at candelatech.com 1 participant 2 messages Dec 7, 2010 – Jan 5, 2011 Qualcomm Atheros ATH9K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath9k: Show some live tx-queue values in debugfs.

From: Ben Greear <[email protected]>

I thought this might help track down stuck queues, etc.

---
:100644 100644 3586c43... 5075faa... M drivers/net/wireless/ath/ath9k/debug.c

 drivers/net/wireless/ath/ath9k/debug.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
drivers/net/wireless/ath/ath9k/debug.c +16 -0
index 3586c43..5075faa 100644
@@ -589,6 +589,16 @@ static const struct file_operations fops_wiphy = {
 		sc->debug.stats.txstats[WME_AC_VO].elem); \
 } while(0)
 
+#define PRX(str, elem)							\
+do {									\
+	len += snprintf(buf + len, size - len,				\
+			"%s%13u%11u%10u%10u\n", str,			\
+			(unsigned int)(sc->tx.txq[WME_AC_BE].elem),	\
+			(unsigned int)(sc->tx.txq[WME_AC_BK].elem),	\
+			(unsigned int)(sc->tx.txq[WME_AC_VI].elem),	\
+			(unsigned int)(sc->tx.txq[WME_AC_VO].elem));	\
+} while(0)
+
 static ssize_t read_file_xmit(struct file *file, char __user *user_buf,
 			      size_t count, loff_t *ppos)
 {
@@ -619,6 +629,12 @@ static ssize_t read_file_xmit(struct file *file, char __user *user_buf,
 	PR("TX-Pkts-All:     ", tx_pkts_all);
 	PR("TX-Bytes-All:    ", tx_bytes_all);
 
+	PRX("axq-qnum:        ", axq_qnum);
+	PRX("axq-depth:       ", axq_depth);
+	PRX("axq-stopped      ", stopped);
+	PRX("tx-in-progress   ", axq_tx_inprogress);
+	PRX("pending-frames   ", pending_frames);
+
 	if (len > size)
 		len = size;
 
Signature · 1 line
1.7.2.3
author
#1 lore raw

PATCH 1/1 ath9k: Show some live tx-queue values in debugfs.

Quoted 3 lines · greearb at candelatech.com

From: Ben Greear<[email protected]>

I thought this might help track down stuck queues, etc.

Any comments on this one? Seems it was never picked up...

Thanks,
Ben

Quoted 41 lines

---
:100644 100644 3586c43... 5075faa... M drivers/net/wireless/ath/ath9k/debug.c

  drivers/net/wireless/ath/ath9k/debug.c |   16 ++++++++++++++++
  1 files changed, 16 insertions(+), 0 deletions(-)
drivers/net/wireless/ath/ath9k/debug.c +16 -0
index 3586c43..5075faa 100644
@@ -589,6 +589,16 @@ static const struct file_operations fops_wiphy = {
  		sc->debug.stats.txstats[WME_AC_VO].elem); \
  } while(0)
 
+#define PRX(str, elem)							\
+do {									\
+	len += snprintf(buf + len, size - len,				\
+			"%s%13u%11u%10u%10u\n", str,			\
+			(unsigned int)(sc->tx.txq[WME_AC_BE].elem),	\
+			(unsigned int)(sc->tx.txq[WME_AC_BK].elem),	\
+			(unsigned int)(sc->tx.txq[WME_AC_VI].elem),	\
+			(unsigned int)(sc->tx.txq[WME_AC_VO].elem));	\
+} while(0)
+
  static ssize_t read_file_xmit(struct file *file, char __user *user_buf,
  			      size_t count, loff_t *ppos)
  {
@@ -619,6 +629,12 @@ static ssize_t read_file_xmit(struct file *file, char __user *user_buf,
  	PR("TX-Pkts-All:     ", tx_pkts_all);
  	PR("TX-Bytes-All:    ", tx_bytes_all);
 
+	PRX("axq-qnum:        ", axq_qnum);
+	PRX("axq-depth:       ", axq_depth);
+	PRX("axq-stopped      ", stopped);
+	PRX("tx-in-progress   ", axq_tx_inprogress);
+	PRX("pending-frames   ", pending_frames);
+
  	if (len>  size)
  		len = size;
 
Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com