Commit cfddc11c authored by Bruno Randolf's avatar Bruno Randolf Committed by John W. Linville
Browse files

ath5k: Fix queue debug file

Take txq lock in debug file and fix reporting of used buffers.
Signed-off-by: default avatarBruno Randolf <>
Signed-off-by: default avatarJohn W. Linville <>
parent 925e0b06
......@@ -763,7 +763,7 @@ static ssize_t read_file_queue(struct file *file, char __user *user_buf,
struct ath5k_txq *txq;
struct ath5k_buf *bf, *bf0;
int i, n = 0;
int i, n;
len += snprintf(buf+len, sizeof(buf)-len,
"available txbuffers: %d\n", sc->txbuf_len);
......@@ -777,9 +777,14 @@ static ssize_t read_file_queue(struct file *file, char __user *user_buf,
if (!txq->setup)
n = 0;
list_for_each_entry_safe(bf, bf0, &txq->q, list)
len += snprintf(buf+len, sizeof(buf)-len, " len: %d\n", n);
len += snprintf(buf+len, sizeof(buf)-len,
" len: %d bufs: %d\n", txq->txq_len, n);
if (len > sizeof(buf))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment