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>
This commit is contained in:
committed by
John W. Linville
parent
6c507cd040
commit
cee24a3e58
@@ -68,43 +68,37 @@ enum ieee80211_sta_info_flags {
|
||||
/**
|
||||
* struct tid_ampdu_tx - TID aggregation information (Tx).
|
||||
*
|
||||
* @state: TID's state in session state machine.
|
||||
* @dialog_token: dialog token for aggregation session
|
||||
* @ssn: Starting Sequence Number expected to be aggregated.
|
||||
* @addba_resp_timer: timer for peer's response to addba request
|
||||
* @addba_req_num: number of times addBA request has been sent.
|
||||
* @ssn: Starting Sequence Number expected to be aggregated.
|
||||
* @dialog_token: dialog token for aggregation session
|
||||
*/
|
||||
struct tid_ampdu_tx {
|
||||
u8 state;
|
||||
u8 dialog_token;
|
||||
u16 ssn;
|
||||
struct timer_list addba_resp_timer;
|
||||
u8 addba_req_num;
|
||||
u16 ssn;
|
||||
u8 dialog_token;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct tid_ampdu_rx - TID aggregation information (Rx).
|
||||
*
|
||||
* @state: TID's state in session state machine.
|
||||
* @dialog_token: dialog token for aggregation session
|
||||
* @ssn: Starting Sequence Number expected to be aggregated.
|
||||
* @buf_size: buffer size for incoming A-MPDUs
|
||||
* @timeout: reset timer value.
|
||||
* @head_seq_num: head sequence number in reordering buffer.
|
||||
* @stored_mpdu_num: number of MPDUs in reordering buffer
|
||||
* @reorder_buf: buffer to reorder incoming aggregated MPDUs
|
||||
* @session_timer: check if peer keeps Tx-ing on the TID (by timeout value)
|
||||
* @ssn: Starting Sequence Number expected to be aggregated.
|
||||
* @buf_size: buffer size for incoming A-MPDUs
|
||||
* @timeout: reset timer value.
|
||||
* @dialog_token: dialog token for aggregation session
|
||||
*/
|
||||
struct tid_ampdu_rx {
|
||||
u8 state;
|
||||
u8 dialog_token;
|
||||
u16 ssn;
|
||||
u16 buf_size;
|
||||
u16 timeout;
|
||||
u16 head_seq_num;
|
||||
u16 stored_mpdu_num;
|
||||
struct sk_buff **reorder_buf;
|
||||
struct timer_list session_timer;
|
||||
u16 ssn;
|
||||
u16 buf_size;
|
||||
u16 timeout;
|
||||
u8 dialog_token;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -133,16 +127,24 @@ enum plink_state {
|
||||
/**
|
||||
* struct sta_ampdu_mlme - STA aggregation information.
|
||||
*
|
||||
* @tid_state_rx: TID's state in Rx session state machine.
|
||||
* @tid_rx: aggregation info for Rx per TID
|
||||
* @tid_tx: aggregation info for Tx per TID
|
||||
* @ampdu_rx: for locking sections in aggregation Rx flow
|
||||
* @tid_state_tx: TID's state in Tx session state machine.
|
||||
* @tid_tx: aggregation info for Tx per TID
|
||||
* @addba_req_num: number of times addBA request has been sent.
|
||||
* @ampdu_tx: for locking sectionsi in aggregation Tx flow
|
||||
* @dialog_token_allocator: dialog token enumerator for each new session;
|
||||
*/
|
||||
struct sta_ampdu_mlme {
|
||||
struct tid_ampdu_rx tid_rx[STA_TID_NUM];
|
||||
struct tid_ampdu_tx tid_tx[STA_TID_NUM];
|
||||
/* rx */
|
||||
u8 tid_state_rx[STA_TID_NUM];
|
||||
struct tid_ampdu_rx *tid_rx[STA_TID_NUM];
|
||||
spinlock_t ampdu_rx;
|
||||
/* tx */
|
||||
u8 tid_state_tx[STA_TID_NUM];
|
||||
struct tid_ampdu_tx *tid_tx[STA_TID_NUM];
|
||||
u8 addba_req_num[STA_TID_NUM];
|
||||
spinlock_t ampdu_tx;
|
||||
u8 dialog_token_allocator;
|
||||
};
|
||||
|
Reference in New Issue
Block a user