aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/sta_info.h
diff options
context:
space:
mode:
authorRon Rindjunsky <ron.rindjunsky@intel.com>2008-03-26 14:36:03 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-03-27 16:03:20 -0400
commitcee24a3e580f1062c8bb8b1692b95014d882bc7d (patch)
treee7df5e0f987a817ff0c9b14142a4efc583d39fa2 /net/mac80211/sta_info.h
parent6c507cd0400cb51dd2ee251c1b8756b9375a1128 (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/sta_info.h')
-rw-r--r--net/mac80211/sta_info.h44
1 files changed, 23 insertions, 21 deletions
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
index 5d6b43652e18..af5a791e21f3 100644
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
@@ -68,43 +68,37 @@ enum ieee80211_sta_info_flags {
68/** 68/**
69 * struct tid_ampdu_tx - TID aggregation information (Tx). 69 * struct tid_ampdu_tx - TID aggregation information (Tx).
70 * 70 *
71 * @state: TID's state in session state machine.
72 * @dialog_token: dialog token for aggregation session
73 * @ssn: Starting Sequence Number expected to be aggregated.
74 * @addba_resp_timer: timer for peer's response to addba request 71 * @addba_resp_timer: timer for peer's response to addba request
75 * @addba_req_num: number of times addBA request has been sent. 72 * @ssn: Starting Sequence Number expected to be aggregated.
73 * @dialog_token: dialog token for aggregation session
76 */ 74 */
77struct tid_ampdu_tx { 75struct tid_ampdu_tx {
78 u8 state;
79 u8 dialog_token;
80 u16 ssn;
81 struct timer_list addba_resp_timer; 76 struct timer_list addba_resp_timer;
82 u8 addba_req_num; 77 u16 ssn;
78 u8 dialog_token;
83}; 79};
84 80
85/** 81/**
86 * struct tid_ampdu_rx - TID aggregation information (Rx). 82 * struct tid_ampdu_rx - TID aggregation information (Rx).
87 * 83 *
88 * @state: TID's state in session state machine.
89 * @dialog_token: dialog token for aggregation session
90 * @ssn: Starting Sequence Number expected to be aggregated.
91 * @buf_size: buffer size for incoming A-MPDUs
92 * @timeout: reset timer value.
93 * @head_seq_num: head sequence number in reordering buffer. 84 * @head_seq_num: head sequence number in reordering buffer.
94 * @stored_mpdu_num: number of MPDUs in reordering buffer 85 * @stored_mpdu_num: number of MPDUs in reordering buffer
95 * @reorder_buf: buffer to reorder incoming aggregated MPDUs 86 * @reorder_buf: buffer to reorder incoming aggregated MPDUs
96 * @session_timer: check if peer keeps Tx-ing on the TID (by timeout value) 87 * @session_timer: check if peer keeps Tx-ing on the TID (by timeout value)
88 * @ssn: Starting Sequence Number expected to be aggregated.
89 * @buf_size: buffer size for incoming A-MPDUs
90 * @timeout: reset timer value.
91 * @dialog_token: dialog token for aggregation session
97 */ 92 */
98struct tid_ampdu_rx { 93struct tid_ampdu_rx {
99 u8 state;
100 u8 dialog_token;
101 u16 ssn;
102 u16 buf_size;
103 u16 timeout;
104 u16 head_seq_num; 94 u16 head_seq_num;
105 u16 stored_mpdu_num; 95 u16 stored_mpdu_num;
106 struct sk_buff **reorder_buf; 96 struct sk_buff **reorder_buf;
107 struct timer_list session_timer; 97 struct timer_list session_timer;
98 u16 ssn;
99 u16 buf_size;
100 u16 timeout;
101 u8 dialog_token;
108}; 102};
109 103
110/** 104/**
@@ -133,16 +127,24 @@ enum plink_state {
133/** 127/**
134 * struct sta_ampdu_mlme - STA aggregation information. 128 * struct sta_ampdu_mlme - STA aggregation information.
135 * 129 *
130 * @tid_state_rx: TID's state in Rx session state machine.
136 * @tid_rx: aggregation info for Rx per TID 131 * @tid_rx: aggregation info for Rx per TID
137 * @tid_tx: aggregation info for Tx per TID
138 * @ampdu_rx: for locking sections in aggregation Rx flow 132 * @ampdu_rx: for locking sections in aggregation Rx flow
133 * @tid_state_tx: TID's state in Tx session state machine.
134 * @tid_tx: aggregation info for Tx per TID
135 * @addba_req_num: number of times addBA request has been sent.
139 * @ampdu_tx: for locking sectionsi in aggregation Tx flow 136 * @ampdu_tx: for locking sectionsi in aggregation Tx flow
140 * @dialog_token_allocator: dialog token enumerator for each new session; 137 * @dialog_token_allocator: dialog token enumerator for each new session;
141 */ 138 */
142struct sta_ampdu_mlme { 139struct sta_ampdu_mlme {
143 struct tid_ampdu_rx tid_rx[STA_TID_NUM]; 140 /* rx */
144 struct tid_ampdu_tx tid_tx[STA_TID_NUM]; 141 u8 tid_state_rx[STA_TID_NUM];
142 struct tid_ampdu_rx *tid_rx[STA_TID_NUM];
145 spinlock_t ampdu_rx; 143 spinlock_t ampdu_rx;
144 /* tx */
145 u8 tid_state_tx[STA_TID_NUM];
146 struct tid_ampdu_tx *tid_tx[STA_TID_NUM];
147 u8 addba_req_num[STA_TID_NUM];
146 spinlock_t ampdu_tx; 148 spinlock_t ampdu_tx;
147 u8 dialog_token_allocator; 149 u8 dialog_token_allocator;
148}; 150};