diff options
author | Ron Rindjunsky <ron.rindjunsky@intel.com> | 2008-03-26 14:36:03 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-03-27 16:03:20 -0400 |
commit | cee24a3e580f1062c8bb8b1692b95014d882bc7d (patch) | |
tree | e7df5e0f987a817ff0c9b14142a4efc583d39fa2 /net/mac80211/debugfs_sta.c | |
parent | 6c507cd0400cb51dd2ee251c1b8756b9375a1128 (diff) |
mac80211: A-MPDU MLME use dynamic allocation
This patch alters the A-MPDU MLME in sta_info to use dynamic allocation,
thus drastically improving memory usage - from a constant ~2 Kbyte in
the previous (static) allocation to a lower limit of ~200 Byte and an upper
limit of ~2 Kbyte.
Signed-off-by: Ron Rindjunsky <ron.rindjunsky@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@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.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c index 62354de0199f..256ea880d28b 100644 --- a/net/mac80211/debugfs_sta.c +++ b/net/mac80211/debugfs_sta.c | |||
@@ -169,27 +169,30 @@ static ssize_t sta_agg_status_read(struct file *file, char __user *userbuf, | |||
169 | p += scnprintf(p, sizeof(buf)+buf-p, "\n RX :"); | 169 | p += scnprintf(p, sizeof(buf)+buf-p, "\n RX :"); |
170 | for (i = 0; i < STA_TID_NUM; i++) | 170 | for (i = 0; i < STA_TID_NUM; i++) |
171 | p += scnprintf(p, sizeof(buf)+buf-p, "%5d", | 171 | p += scnprintf(p, sizeof(buf)+buf-p, "%5d", |
172 | sta->ampdu_mlme.tid_rx[i].state); | 172 | sta->ampdu_mlme.tid_state_rx[i]); |
173 | 173 | ||
174 | p += scnprintf(p, sizeof(buf)+buf-p, "\n DTKN:"); | 174 | p += scnprintf(p, sizeof(buf)+buf-p, "\n DTKN:"); |
175 | for (i = 0; i < STA_TID_NUM; i++) | 175 | for (i = 0; i < STA_TID_NUM; i++) |
176 | p += scnprintf(p, sizeof(buf)+buf-p, "%5d", | 176 | p += scnprintf(p, sizeof(buf)+buf-p, "%5d", |
177 | sta->ampdu_mlme.tid_rx[i].dialog_token); | 177 | sta->ampdu_mlme.tid_state_rx[i]? |
178 | sta->ampdu_mlme.tid_rx[i]->dialog_token : 0); | ||
178 | 179 | ||
179 | p += scnprintf(p, sizeof(buf)+buf-p, "\n TX :"); | 180 | p += scnprintf(p, sizeof(buf)+buf-p, "\n TX :"); |
180 | for (i = 0; i < STA_TID_NUM; i++) | 181 | for (i = 0; i < STA_TID_NUM; i++) |
181 | p += scnprintf(p, sizeof(buf)+buf-p, "%5d", | 182 | p += scnprintf(p, sizeof(buf)+buf-p, "%5d", |
182 | sta->ampdu_mlme.tid_tx[i].state); | 183 | sta->ampdu_mlme.tid_state_tx[i]); |
183 | 184 | ||
184 | p += scnprintf(p, sizeof(buf)+buf-p, "\n DTKN:"); | 185 | p += scnprintf(p, sizeof(buf)+buf-p, "\n DTKN:"); |
185 | for (i = 0; i < STA_TID_NUM; i++) | 186 | for (i = 0; i < STA_TID_NUM; i++) |
186 | p += scnprintf(p, sizeof(buf)+buf-p, "%5d", | 187 | p += scnprintf(p, sizeof(buf)+buf-p, "%5d", |
187 | sta->ampdu_mlme.tid_tx[i].dialog_token); | 188 | sta->ampdu_mlme.tid_state_tx[i]? |
189 | sta->ampdu_mlme.tid_tx[i]->dialog_token : 0); | ||
188 | 190 | ||
189 | p += scnprintf(p, sizeof(buf)+buf-p, "\n SSN :"); | 191 | p += scnprintf(p, sizeof(buf)+buf-p, "\n SSN :"); |
190 | for (i = 0; i < STA_TID_NUM; i++) | 192 | for (i = 0; i < STA_TID_NUM; i++) |
191 | p += scnprintf(p, sizeof(buf)+buf-p, "%5d", | 193 | p += scnprintf(p, sizeof(buf)+buf-p, "%5d", |
192 | sta->ampdu_mlme.tid_tx[i].ssn); | 194 | sta->ampdu_mlme.tid_state_tx[i]? |
195 | sta->ampdu_mlme.tid_tx[i]->ssn : 0); | ||
193 | 196 | ||
194 | p += scnprintf(p, sizeof(buf)+buf-p, "\n"); | 197 | p += scnprintf(p, sizeof(buf)+buf-p, "\n"); |
195 | 198 | ||
@@ -230,12 +233,12 @@ static ssize_t sta_agg_status_write(struct file *file, | |||
230 | strcpy(state, "off "); | 233 | strcpy(state, "off "); |
231 | ieee80211_sta_stop_rx_ba_session(dev, da, tid_num, 0, | 234 | ieee80211_sta_stop_rx_ba_session(dev, da, tid_num, 0, |
232 | WLAN_REASON_QSTA_REQUIRE_SETUP); | 235 | WLAN_REASON_QSTA_REQUIRE_SETUP); |
233 | sta->ampdu_mlme.tid_rx[tid_num].state |= | 236 | sta->ampdu_mlme.tid_state_rx[tid_num] |= |
234 | HT_AGG_STATE_DEBUGFS_CTL; | 237 | HT_AGG_STATE_DEBUGFS_CTL; |
235 | tid_static_rx[tid_num] = 0; | 238 | tid_static_rx[tid_num] = 0; |
236 | } else { | 239 | } else { |
237 | strcpy(state, "on "); | 240 | strcpy(state, "on "); |
238 | sta->ampdu_mlme.tid_rx[tid_num].state &= | 241 | sta->ampdu_mlme.tid_state_rx[tid_num] &= |
239 | ~HT_AGG_STATE_DEBUGFS_CTL; | 242 | ~HT_AGG_STATE_DEBUGFS_CTL; |
240 | tid_static_rx[tid_num] = 1; | 243 | tid_static_rx[tid_num] = 1; |
241 | } | 244 | } |