summaryrefslogtreecommitdiff
path: root/net/mac80211/debugfs_sta.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-09-29 16:04:29 +0200
committerJohn W. Linville <linville@tuxdriver.com>2011-09-30 15:57:12 -0400
commit948d887dec1042a7d78ae311908113e26502062f (patch)
treee4240d0f45c0200d3625693bd6d543d243859d0a /net/mac80211/debugfs_sta.c
parent60750397122fe0fb81a6e52fd790b3f749b6e010 (diff)
downloadlinux-3.10-948d887dec1042a7d78ae311908113e26502062f.tar.gz
linux-3.10-948d887dec1042a7d78ae311908113e26502062f.tar.bz2
linux-3.10-948d887dec1042a7d78ae311908113e26502062f.zip
mac80211: split PS buffers into ACs
For uAPSD support we'll need to have per-AC PS buffers. As this is a major undertaking, split the buffers before really adding support for uAPSD. This already makes some reference to the uapsd_queues variable, but for now that will never be non-zero. Since book-keeping is complicated, also change the logic for keeping a maximum of frames only and allow 64 frames per AC (up from 128 for a station). Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/debugfs_sta.c')
-rw-r--r--net/mac80211/debugfs_sta.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
index a01d2137fdd..20ec2b0cb3c 100644
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -78,8 +78,14 @@ static ssize_t sta_num_ps_buf_frames_read(struct file *file,
size_t count, loff_t *ppos)
{
struct sta_info *sta = file->private_data;
- return mac80211_format_buffer(userbuf, count, ppos, "%u\n",
- skb_queue_len(&sta->ps_tx_buf));
+ char buf[17*IEEE80211_NUM_ACS], *p = buf;
+ int ac;
+
+ for (ac = 0; ac < IEEE80211_NUM_ACS; ac++)
+ p += scnprintf(p, sizeof(buf)+buf-p, "AC%d: %d\n", ac,
+ skb_queue_len(&sta->ps_tx_buf[ac]) +
+ skb_queue_len(&sta->tx_filtered[ac]));
+ return simple_read_from_buffer(userbuf, count, ppos, buf, p - buf);
}
STA_OPS(num_ps_buf_frames);