aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/debugfs_sta.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-11-14 17:22:21 -0500
committerJohannes Berg <johannes.berg@intel.com>2012-11-19 09:44:00 -0500
commit5a306f5887d5fd840beb8ea872897fa89e8fcdef (patch)
treedadc13f05e360f8f35c15acb36a860056f4848fe /net/mac80211/debugfs_sta.c
parent0f92732344e88023807342fef4c566e0660c2fd9 (diff)
mac80211: introduce IEEE80211_NUM_TIDS and use it
Introduce IEEE80211_NUM_TIDS in the generic 802.11 header file and use it in place of STA_TID_NUM and NUM_RX_DATA_QUEUES which are both really the number of TIDs. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/debugfs_sta.c')
-rw-r--r--net/mac80211/debugfs_sta.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
index 5ccec2c1e9f6..3d103929d41a 100644
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -131,10 +131,10 @@ STA_OPS(connected_time);
131static ssize_t sta_last_seq_ctrl_read(struct file *file, char __user *userbuf, 131static ssize_t sta_last_seq_ctrl_read(struct file *file, char __user *userbuf,
132 size_t count, loff_t *ppos) 132 size_t count, loff_t *ppos)
133{ 133{
134 char buf[15*NUM_RX_DATA_QUEUES], *p = buf; 134 char buf[15*IEEE80211_NUM_TIDS], *p = buf;
135 int i; 135 int i;
136 struct sta_info *sta = file->private_data; 136 struct sta_info *sta = file->private_data;
137 for (i = 0; i < NUM_RX_DATA_QUEUES; i++) 137 for (i = 0; i < IEEE80211_NUM_TIDS; i++)
138 p += scnprintf(p, sizeof(buf)+buf-p, "%x ", 138 p += scnprintf(p, sizeof(buf)+buf-p, "%x ",
139 le16_to_cpu(sta->last_seq_ctrl[i])); 139 le16_to_cpu(sta->last_seq_ctrl[i]));
140 p += scnprintf(p, sizeof(buf)+buf-p, "\n"); 140 p += scnprintf(p, sizeof(buf)+buf-p, "\n");
@@ -145,7 +145,7 @@ STA_OPS(last_seq_ctrl);
145static ssize_t sta_agg_status_read(struct file *file, char __user *userbuf, 145static ssize_t sta_agg_status_read(struct file *file, char __user *userbuf,
146 size_t count, loff_t *ppos) 146 size_t count, loff_t *ppos)
147{ 147{
148 char buf[71 + STA_TID_NUM * 40], *p = buf; 148 char buf[71 + IEEE80211_NUM_TIDS * 40], *p = buf;
149 int i; 149 int i;
150 struct sta_info *sta = file->private_data; 150 struct sta_info *sta = file->private_data;
151 struct tid_ampdu_rx *tid_rx; 151 struct tid_ampdu_rx *tid_rx;
@@ -158,7 +158,7 @@ static ssize_t sta_agg_status_read(struct file *file, char __user *userbuf,
158 p += scnprintf(p, sizeof(buf) + buf - p, 158 p += scnprintf(p, sizeof(buf) + buf - p,
159 "TID\t\tRX active\tDTKN\tSSN\t\tTX\tDTKN\tpending\n"); 159 "TID\t\tRX active\tDTKN\tSSN\t\tTX\tDTKN\tpending\n");
160 160
161 for (i = 0; i < STA_TID_NUM; i++) { 161 for (i = 0; i < IEEE80211_NUM_TIDS; i++) {
162 tid_rx = rcu_dereference(sta->ampdu_mlme.tid_rx[i]); 162 tid_rx = rcu_dereference(sta->ampdu_mlme.tid_rx[i]);
163 tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[i]); 163 tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[i]);
164 164
@@ -220,7 +220,7 @@ static ssize_t sta_agg_status_write(struct file *file, const char __user *userbu
220 220
221 tid = simple_strtoul(buf, NULL, 0); 221 tid = simple_strtoul(buf, NULL, 0);
222 222
223 if (tid >= STA_TID_NUM) 223 if (tid >= IEEE80211_NUM_TIDS)
224 return -EINVAL; 224 return -EINVAL;
225 225
226 if (tx) { 226 if (tx) {