Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 158836
b: refs/heads/master
c: 386aa23
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jul 10, 2009
1 parent 949f917 commit dbf7906
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 37 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: f1d58c2521eb160178b2151d6326d8dc5d7c8560
refs/heads/master: 386aa23dd5f94b810210b9f849807946a5100b57
98 changes: 62 additions & 36 deletions trunk/net/mac80211/debugfs_sta.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,45 +120,38 @@ STA_OPS(last_seq_ctrl);
static ssize_t sta_agg_status_read(struct file *file, char __user *userbuf,
size_t count, loff_t *ppos)
{
char buf[768], *p = buf;
char buf[30 + STA_TID_NUM * 70], *p = buf;
int i;
struct sta_info *sta = file->private_data;
p += scnprintf(p, sizeof(buf)+buf-p, "Agg state for STA is:\n");
p += scnprintf(p, sizeof(buf)+buf-p, " STA next dialog_token is %d \n "
"TIDs info is: \n TID :",
(sta->ampdu_mlme.dialog_token_allocator + 1));
for (i = 0; i < STA_TID_NUM; i++)
p += scnprintf(p, sizeof(buf)+buf-p, "%5d", i);

p += scnprintf(p, sizeof(buf)+buf-p, "\n RX :");
for (i = 0; i < STA_TID_NUM; i++)
p += scnprintf(p, sizeof(buf)+buf-p, "%5d",
sta->ampdu_mlme.tid_state_rx[i]);

p += scnprintf(p, sizeof(buf)+buf-p, "\n DTKN:");
for (i = 0; i < STA_TID_NUM; i++)
p += scnprintf(p, sizeof(buf)+buf-p, "%5d",
sta->ampdu_mlme.tid_state_rx[i] ?
sta->ampdu_mlme.tid_rx[i]->dialog_token : 0);

p += scnprintf(p, sizeof(buf)+buf-p, "\n TX :");
for (i = 0; i < STA_TID_NUM; i++)
p += scnprintf(p, sizeof(buf)+buf-p, "%5d",
sta->ampdu_mlme.tid_state_tx[i]);

p += scnprintf(p, sizeof(buf)+buf-p, "\n DTKN:");
for (i = 0; i < STA_TID_NUM; i++)
p += scnprintf(p, sizeof(buf)+buf-p, "%5d",
sta->ampdu_mlme.tid_state_tx[i] ?
sta->ampdu_mlme.tid_tx[i]->dialog_token : 0);

p += scnprintf(p, sizeof(buf)+buf-p, "\n SSN :");
for (i = 0; i < STA_TID_NUM; i++)
p += scnprintf(p, sizeof(buf)+buf-p, "%5d",
sta->ampdu_mlme.tid_state_tx[i] ?
sta->ampdu_mlme.tid_tx[i]->ssn : 0);

p += scnprintf(p, sizeof(buf)+buf-p, "\n");
spin_lock_bh(&sta->lock);
p += scnprintf(p, sizeof(buf)+buf-p, "next dialog_token is %#02x\n",
sta->ampdu_mlme.dialog_token_allocator + 1);
for (i = 0; i < STA_TID_NUM; i++) {
p += scnprintf(p, sizeof(buf)+buf-p, "TID %02d:", i);
p += scnprintf(p, sizeof(buf)+buf-p, " RX=%x",
sta->ampdu_mlme.tid_state_rx[i]);
p += scnprintf(p, sizeof(buf)+buf-p, "/DTKN=%#.2x",
sta->ampdu_mlme.tid_state_rx[i] ?
sta->ampdu_mlme.tid_rx[i]->dialog_token : 0);
p += scnprintf(p, sizeof(buf)+buf-p, "/SSN=%#.3x",
sta->ampdu_mlme.tid_state_rx[i] ?
sta->ampdu_mlme.tid_rx[i]->ssn : 0);

p += scnprintf(p, sizeof(buf)+buf-p, " TX=%x",
sta->ampdu_mlme.tid_state_tx[i]);
p += scnprintf(p, sizeof(buf)+buf-p, "/DTKN=%#.2x",
sta->ampdu_mlme.tid_state_tx[i] ?
sta->ampdu_mlme.tid_tx[i]->dialog_token : 0);
p += scnprintf(p, sizeof(buf)+buf-p, "/SSN=%#.3x",
sta->ampdu_mlme.tid_state_tx[i] ?
sta->ampdu_mlme.tid_tx[i]->ssn : 0);
p += scnprintf(p, sizeof(buf)+buf-p, "/pending=%03d",
sta->ampdu_mlme.tid_state_tx[i] ?
skb_queue_len(&sta->ampdu_mlme.tid_tx[i]->pending) : 0);
p += scnprintf(p, sizeof(buf)+buf-p, "\n");
}
spin_unlock_bh(&sta->lock);

return simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
}
Expand Down Expand Up @@ -203,6 +196,22 @@ void ieee80211_sta_debugfs_add(struct sta_info *sta)
DEBUGFS_ADD(inactive_ms);
DEBUGFS_ADD(last_seq_ctrl);
DEBUGFS_ADD(agg_status);
DEBUGFS_ADD(dev);
DEBUGFS_ADD(rx_packets);
DEBUGFS_ADD(tx_packets);
DEBUGFS_ADD(rx_bytes);
DEBUGFS_ADD(tx_bytes);
DEBUGFS_ADD(rx_duplicates);
DEBUGFS_ADD(rx_fragments);
DEBUGFS_ADD(rx_dropped);
DEBUGFS_ADD(tx_fragments);
DEBUGFS_ADD(tx_filtered);
DEBUGFS_ADD(tx_retry_failed);
DEBUGFS_ADD(tx_retry_count);
DEBUGFS_ADD(last_signal);
DEBUGFS_ADD(last_qual);
DEBUGFS_ADD(last_noise);
DEBUGFS_ADD(wep_weak_iv_count);
}

void ieee80211_sta_debugfs_remove(struct sta_info *sta)
Expand All @@ -212,6 +221,23 @@ void ieee80211_sta_debugfs_remove(struct sta_info *sta)
DEBUGFS_DEL(inactive_ms);
DEBUGFS_DEL(last_seq_ctrl);
DEBUGFS_DEL(agg_status);
DEBUGFS_DEL(aid);
DEBUGFS_DEL(dev);
DEBUGFS_DEL(rx_packets);
DEBUGFS_DEL(tx_packets);
DEBUGFS_DEL(rx_bytes);
DEBUGFS_DEL(tx_bytes);
DEBUGFS_DEL(rx_duplicates);
DEBUGFS_DEL(rx_fragments);
DEBUGFS_DEL(rx_dropped);
DEBUGFS_DEL(tx_fragments);
DEBUGFS_DEL(tx_filtered);
DEBUGFS_DEL(tx_retry_failed);
DEBUGFS_DEL(tx_retry_count);
DEBUGFS_DEL(last_signal);
DEBUGFS_DEL(last_qual);
DEBUGFS_DEL(last_noise);
DEBUGFS_DEL(wep_weak_iv_count);

debugfs_remove(sta->debugfs.dir);
sta->debugfs.dir = NULL;
Expand Down
17 changes: 17 additions & 0 deletions trunk/net/mac80211/sta_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,23 @@ struct sta_info {
struct dentry *inactive_ms;
struct dentry *last_seq_ctrl;
struct dentry *agg_status;
struct dentry *aid;
struct dentry *dev;
struct dentry *rx_packets;
struct dentry *tx_packets;
struct dentry *rx_bytes;
struct dentry *tx_bytes;
struct dentry *rx_duplicates;
struct dentry *rx_fragments;
struct dentry *rx_dropped;
struct dentry *tx_fragments;
struct dentry *tx_filtered;
struct dentry *tx_retry_failed;
struct dentry *tx_retry_count;
struct dentry *last_signal;
struct dentry *last_qual;
struct dentry *last_noise;
struct dentry *wep_weak_iv_count;
bool add_has_run;
} debugfs;
#endif
Expand Down

0 comments on commit dbf7906

Please sign in to comment.