diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-11-02 23:56:40 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-11-02 23:56:40 -0400 |
commit | 31cbecb4ab538f433145bc5a46f3bea9b9627031 (patch) | |
tree | d6206d42dea7298f7ef05fd1f7bf474245f0d43a /net/mac80211/debugfs_sta.c | |
parent | 2b72c9ccd22c4a3299e5a358dcd639fb253730f4 (diff) | |
parent | 278c023a99b0d6b471d0f4a79835c703482e29ac (diff) |
Merge branch 'osd-devel' into nfs-for-next
Diffstat (limited to 'net/mac80211/debugfs_sta.c')
-rw-r--r-- | net/mac80211/debugfs_sta.c | 37 |
1 files changed, 23 insertions, 14 deletions
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c index a01d2137fddc..c5f341798c16 100644 --- a/net/mac80211/debugfs_sta.c +++ b/net/mac80211/debugfs_sta.c | |||
@@ -56,19 +56,22 @@ STA_FILE(last_signal, last_signal, D); | |||
56 | static ssize_t sta_flags_read(struct file *file, char __user *userbuf, | 56 | static ssize_t sta_flags_read(struct file *file, char __user *userbuf, |
57 | size_t count, loff_t *ppos) | 57 | size_t count, loff_t *ppos) |
58 | { | 58 | { |
59 | char buf[100]; | 59 | char buf[121]; |
60 | struct sta_info *sta = file->private_data; | 60 | struct sta_info *sta = file->private_data; |
61 | u32 staflags = get_sta_flags(sta); | 61 | |
62 | int res = scnprintf(buf, sizeof(buf), "%s%s%s%s%s%s%s%s%s", | 62 | #define TEST(flg) \ |
63 | staflags & WLAN_STA_AUTH ? "AUTH\n" : "", | 63 | test_sta_flag(sta, WLAN_STA_##flg) ? #flg "\n" : "" |
64 | staflags & WLAN_STA_ASSOC ? "ASSOC\n" : "", | 64 | |
65 | staflags & WLAN_STA_PS_STA ? "PS (sta)\n" : "", | 65 | int res = scnprintf(buf, sizeof(buf), |
66 | staflags & WLAN_STA_PS_DRIVER ? "PS (driver)\n" : "", | 66 | "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", |
67 | staflags & WLAN_STA_AUTHORIZED ? "AUTHORIZED\n" : "", | 67 | TEST(AUTH), TEST(ASSOC), TEST(PS_STA), |
68 | staflags & WLAN_STA_SHORT_PREAMBLE ? "SHORT PREAMBLE\n" : "", | 68 | TEST(PS_DRIVER), TEST(AUTHORIZED), |
69 | staflags & WLAN_STA_WME ? "WME\n" : "", | 69 | TEST(SHORT_PREAMBLE), TEST(ASSOC_AP), |
70 | staflags & WLAN_STA_WDS ? "WDS\n" : "", | 70 | TEST(WME), TEST(WDS), TEST(CLEAR_PS_FILT), |
71 | staflags & WLAN_STA_MFP ? "MFP\n" : ""); | 71 | TEST(MFP), TEST(BLOCK_BA), TEST(PSPOLL), |
72 | TEST(UAPSD), TEST(SP), TEST(TDLS_PEER), | ||
73 | TEST(TDLS_PEER_AUTH)); | ||
74 | #undef TEST | ||
72 | return simple_read_from_buffer(userbuf, count, ppos, buf, res); | 75 | return simple_read_from_buffer(userbuf, count, ppos, buf, res); |
73 | } | 76 | } |
74 | STA_OPS(flags); | 77 | STA_OPS(flags); |
@@ -78,8 +81,14 @@ static ssize_t sta_num_ps_buf_frames_read(struct file *file, | |||
78 | size_t count, loff_t *ppos) | 81 | size_t count, loff_t *ppos) |
79 | { | 82 | { |
80 | struct sta_info *sta = file->private_data; | 83 | struct sta_info *sta = file->private_data; |
81 | return mac80211_format_buffer(userbuf, count, ppos, "%u\n", | 84 | char buf[17*IEEE80211_NUM_ACS], *p = buf; |
82 | skb_queue_len(&sta->ps_tx_buf)); | 85 | int ac; |
86 | |||
87 | for (ac = 0; ac < IEEE80211_NUM_ACS; ac++) | ||
88 | p += scnprintf(p, sizeof(buf)+buf-p, "AC%d: %d\n", ac, | ||
89 | skb_queue_len(&sta->ps_tx_buf[ac]) + | ||
90 | skb_queue_len(&sta->tx_filtered[ac])); | ||
91 | return simple_read_from_buffer(userbuf, count, ppos, buf, p - buf); | ||
83 | } | 92 | } |
84 | STA_OPS(num_ps_buf_frames); | 93 | STA_OPS(num_ps_buf_frames); |
85 | 94 | ||