summaryrefslogtreecommitdiffstats
path: root/net/mac80211/debugfs_sta.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2018-08-31 10:31:08 +0200
committerJohannes Berg <johannes.berg@intel.com>2018-09-05 10:03:13 +0200
commitadf8ed01e4fdd254efead978d633718ab01a7d5c (patch)
tree52d3daf8a8b99db1d72cbe0fcf1efb8e4c770c8b /net/mac80211/debugfs_sta.c
parentmac80211: use le16_encode_bits() instead of open-coding (diff)
downloadlinux-adf8ed01e4fdd254efead978d633718ab01a7d5c.tar.xz
linux-adf8ed01e4fdd254efead978d633718ab01a7d5c.zip
mac80211: add an optional TXQ for other PS-buffered frames
Some drivers may want to also use the TXQ abstraction with non-data packets that need powersave buffering, so add a hardware flag to allow this. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/debugfs_sta.c')
-rw-r--r--net/mac80211/debugfs_sta.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
index de66f685a107..95124978947f 100644
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -141,7 +141,7 @@ static ssize_t sta_aqm_read(struct file *file, char __user *userbuf,
{
struct sta_info *sta = file->private_data;
struct ieee80211_local *local = sta->local;
- size_t bufsz = AQM_TXQ_ENTRY_LEN*(IEEE80211_NUM_TIDS+1);
+ size_t bufsz = AQM_TXQ_ENTRY_LEN * (IEEE80211_NUM_TIDS + 2);
char *buf = kzalloc(bufsz, GFP_KERNEL), *p = buf;
struct txq_info *txqi;
ssize_t rv;
@@ -163,7 +163,9 @@ static ssize_t sta_aqm_read(struct file *file, char __user *userbuf,
bufsz+buf-p,
"tid ac backlog-bytes backlog-packets new-flows drops marks overlimit collisions tx-bytes tx-packets flags\n");
- for (i = 0; i < IEEE80211_NUM_TIDS; i++) {
+ for (i = 0; i < ARRAY_SIZE(sta->sta.txq); i++) {
+ if (!sta->sta.txq[i])
+ continue;
txqi = to_txq_info(sta->sta.txq[i]);
p += scnprintf(p, bufsz+buf-p,
"%d %d %u %u %u %u %u %u %u %u %u 0x%lx(%s%s%s)\n",