Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 214722
b: refs/heads/master
c: cfddc11
h: refs/heads/master
v: v3
  • Loading branch information
Bruno Randolf authored and John W. Linville committed Sep 21, 2010
1 parent 0f5c444 commit d24a95b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 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: 925e0b061300c94912be36eac16f0b44249a1add
refs/heads/master: cfddc11c429a655e418ffc111372cc69dee6a1a5
9 changes: 7 additions & 2 deletions trunk/drivers/net/wireless/ath/ath5k/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -777,9 +777,14 @@ static ssize_t read_file_queue(struct file *file, char __user *user_buf,
if (!txq->setup)
continue;

n = 0;
spin_lock_bh(&txq->lock);
list_for_each_entry_safe(bf, bf0, &txq->q, list)
n++;
len += snprintf(buf+len, sizeof(buf)-len, " len: %d\n", n);
spin_unlock_bh(&txq->lock);

len += snprintf(buf+len, sizeof(buf)-len,
" len: %d bufs: %d\n", txq->txq_len, n);
}

if (len > sizeof(buf))
Expand Down

0 comments on commit d24a95b

Please sign in to comment.