Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 236912
b: refs/heads/master
c: 5bec3e5
h: refs/heads/master
v: v3
  • Loading branch information
Felix Fietkau authored and John W. Linville committed Jan 28, 2011
1 parent 8d3ac09 commit 83e72b8
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9ac58615d93c8a28b1c649a90a5e2ede4dfd368a
refs/heads/master: 5bec3e5ade813ee4bdbab03af1bb6f85859272ea
37 changes: 19 additions & 18 deletions trunk/drivers/net/wireless/ath/ath9k/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,14 +450,15 @@ static const struct file_operations fops_wiphy = {
.llseek = default_llseek,
};

#define PR_QNUM(_n) sc->tx.txq_map[_n]->axq_qnum
#define PR(str, elem) \
do { \
len += snprintf(buf + len, size - len, \
"%s%13u%11u%10u%10u\n", str, \
sc->debug.stats.txstats[WME_AC_BE].elem, \
sc->debug.stats.txstats[WME_AC_BK].elem, \
sc->debug.stats.txstats[WME_AC_VI].elem, \
sc->debug.stats.txstats[WME_AC_VO].elem); \
sc->debug.stats.txstats[PR_QNUM(WME_AC_BE)].elem, \
sc->debug.stats.txstats[PR_QNUM(WME_AC_BK)].elem, \
sc->debug.stats.txstats[PR_QNUM(WME_AC_VI)].elem, \
sc->debug.stats.txstats[PR_QNUM(WME_AC_VO)].elem); \
if (len >= size) \
goto done; \
} while(0)
Expand All @@ -466,10 +467,10 @@ static const struct file_operations fops_wiphy = {
do { \
len += snprintf(buf + len, size - len, \
"%s%13u%11u%10u%10u\n", str, \
(unsigned int)(sc->tx.txq[ATH_TXQ_AC_BE].elem), \
(unsigned int)(sc->tx.txq[ATH_TXQ_AC_BK].elem), \
(unsigned int)(sc->tx.txq[ATH_TXQ_AC_VI].elem), \
(unsigned int)(sc->tx.txq[ATH_TXQ_AC_VO].elem)); \
(unsigned int)(sc->tx.txq_map[WME_AC_BE]->elem), \
(unsigned int)(sc->tx.txq_map[WME_AC_BK]->elem), \
(unsigned int)(sc->tx.txq_map[WME_AC_VI]->elem), \
(unsigned int)(sc->tx.txq_map[WME_AC_VO]->elem)); \
if (len >= size) \
goto done; \
} while(0)
Expand All @@ -478,10 +479,10 @@ do { \
do { \
len += snprintf(buf + len, size - len, \
"%s%13i%11i%10i%10i\n", str, \
list_empty(&sc->tx.txq[ATH_TXQ_AC_BE].elem), \
list_empty(&sc->tx.txq[ATH_TXQ_AC_BK].elem), \
list_empty(&sc->tx.txq[ATH_TXQ_AC_VI].elem), \
list_empty(&sc->tx.txq[ATH_TXQ_AC_VO].elem)); \
list_empty(&sc->tx.txq_map[WME_AC_BE]->elem), \
list_empty(&sc->tx.txq_map[WME_AC_BK]->elem), \
list_empty(&sc->tx.txq_map[WME_AC_VI]->elem), \
list_empty(&sc->tx.txq_map[WME_AC_VO]->elem)); \
if (len >= size) \
goto done; \
} while (0)
Expand Down Expand Up @@ -528,10 +529,10 @@ static ssize_t read_file_xmit(struct file *file, char __user *user_buf,
PR("hw-tx-proc-desc: ", txprocdesc);
len += snprintf(buf + len, size - len,
"%s%11p%11p%10p%10p\n", "txq-memory-address:",
&(sc->tx.txq[ATH_TXQ_AC_BE]),
&(sc->tx.txq[ATH_TXQ_AC_BK]),
&(sc->tx.txq[ATH_TXQ_AC_VI]),
&(sc->tx.txq[ATH_TXQ_AC_VO]));
&(sc->tx.txq_map[WME_AC_BE]),
&(sc->tx.txq_map[WME_AC_BK]),
&(sc->tx.txq_map[WME_AC_VI]),
&(sc->tx.txq_map[WME_AC_VO]));
if (len >= size)
goto done;

Expand Down Expand Up @@ -751,9 +752,9 @@ static ssize_t read_file_misc(struct file *file, char __user *user_buf,
}

void ath_debug_stat_tx(struct ath_softc *sc, struct ath_buf *bf,
struct ath_tx_status *ts)
struct ath_tx_status *ts, struct ath_txq *txq)
{
int qnum = skb_get_queue_mapping(bf->bf_mpdu);
int qnum = txq->axq_qnum;

TX_STAT_INC(qnum, tx_pkts_all);
sc->debug.stats.txstats[qnum].tx_bytes_all += bf->bf_mpdu->len;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/ath/ath9k/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ int ath9k_init_debug(struct ath_hw *ah);

void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status);
void ath_debug_stat_tx(struct ath_softc *sc, struct ath_buf *bf,
struct ath_tx_status *ts);
struct ath_tx_status *ts, struct ath_txq *txq);
void ath_debug_stat_rx(struct ath_softc *sc, struct ath_rx_status *rs);

#else
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/net/wireless/ath/ath9k/xmit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1911,7 +1911,7 @@ static void ath_tx_complete_buf(struct ath_softc *sc, struct ath_buf *bf,
else
complete(&sc->paprd_complete);
} else {
ath_debug_stat_tx(sc, bf, ts);
ath_debug_stat_tx(sc, bf, ts, txq);
ath_tx_complete(sc, skb, tx_flags,
bf->bf_state.bfs_ftype, txq);
}
Expand Down

0 comments on commit 83e72b8

Please sign in to comment.