mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-17 12:08:43 +00:00
ath9k: add CAB queue info to debugfs
Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
1803d02d7a
commit
18fcf1c6a6
1 changed files with 27 additions and 16 deletions
|
@ -732,6 +732,28 @@ static ssize_t read_file_xmit(struct file *file, char __user *user_buf,
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static ssize_t print_queue(struct ath_softc *sc, struct ath_txq *txq,
|
||||||
|
char *buf, ssize_t size)
|
||||||
|
{
|
||||||
|
ssize_t len = 0;
|
||||||
|
|
||||||
|
ath_txq_lock(sc, txq);
|
||||||
|
|
||||||
|
len += snprintf(buf + len, size - len, "%s: %d ",
|
||||||
|
"qnum", txq->axq_qnum);
|
||||||
|
len += snprintf(buf + len, size - len, "%s: %2d ",
|
||||||
|
"qdepth", txq->axq_depth);
|
||||||
|
len += snprintf(buf + len, size - len, "%s: %2d ",
|
||||||
|
"ampdu-depth", txq->axq_ampdu_depth);
|
||||||
|
len += snprintf(buf + len, size - len, "%s: %3d ",
|
||||||
|
"pending", txq->pending_frames);
|
||||||
|
len += snprintf(buf + len, size - len, "%s: %d\n",
|
||||||
|
"stopped", txq->stopped);
|
||||||
|
|
||||||
|
ath_txq_unlock(sc, txq);
|
||||||
|
return len;
|
||||||
|
}
|
||||||
|
|
||||||
static ssize_t read_file_queues(struct file *file, char __user *user_buf,
|
static ssize_t read_file_queues(struct file *file, char __user *user_buf,
|
||||||
size_t count, loff_t *ppos)
|
size_t count, loff_t *ppos)
|
||||||
{
|
{
|
||||||
|
@ -749,24 +771,13 @@ static ssize_t read_file_queues(struct file *file, char __user *user_buf,
|
||||||
|
|
||||||
for (i = 0; i < IEEE80211_NUM_ACS; i++) {
|
for (i = 0; i < IEEE80211_NUM_ACS; i++) {
|
||||||
txq = sc->tx.txq_map[i];
|
txq = sc->tx.txq_map[i];
|
||||||
len += snprintf(buf + len, size - len, "(%s): ", qname[i]);
|
len += snprintf(buf + len, size - len, "(%s): ", qname[i]);
|
||||||
|
len += print_queue(sc, txq, buf + len, size - len);
|
||||||
ath_txq_lock(sc, txq);
|
|
||||||
|
|
||||||
len += snprintf(buf + len, size - len, "%s: %d ",
|
|
||||||
"qnum", txq->axq_qnum);
|
|
||||||
len += snprintf(buf + len, size - len, "%s: %2d ",
|
|
||||||
"qdepth", txq->axq_depth);
|
|
||||||
len += snprintf(buf + len, size - len, "%s: %2d ",
|
|
||||||
"ampdu-depth", txq->axq_ampdu_depth);
|
|
||||||
len += snprintf(buf + len, size - len, "%s: %3d ",
|
|
||||||
"pending", txq->pending_frames);
|
|
||||||
len += snprintf(buf + len, size - len, "%s: %d\n",
|
|
||||||
"stopped", txq->stopped);
|
|
||||||
|
|
||||||
ath_txq_unlock(sc, txq);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
len += snprintf(buf + len, size - len, "(CAB): ");
|
||||||
|
len += print_queue(sc, sc->beacon.cabq, buf + len, size - len);
|
||||||
|
|
||||||
if (len > size)
|
if (len > size)
|
||||||
len = size;
|
len = size;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue