mac80211: reorder fields to make some structures smaller
Johannes Berg
maintainerPATCH 1/1 mac80211: reorder fields to make some structures smaller
This patch reorders some fields in various structures to have less padding within the structures, making them smaller. It doesn't yet make any type adjustments, but often size_t is used for example for IE lengths which is total overkill since size_t will be 8 bytes long on 64-bit yet the length can at most fill a u8.
Signed-off-by Johannes Berg <[email protected]>
--- net/mac80211/ieee80211_i.h | 50 ++++++++++++++++++++++++--------------------- net/mac80211/sta_info.h | 8 +++---- 2 files changed, 31 insertions(+), 27 deletions(-)
net/mac80211/sta_info.h +4 -4
@@ -74,10 +74,10 @@ enum ieee80211_sta_info_flags {* @addba_req_num: number of times addBA request has been sent. */ struct tid_ampdu_tx { +struct timer_list addba_resp_timer; +u16 ssn;u8 state;u8 dialog_token; -u16 ssn; -struct timer_list addba_resp_timer;u8 addba_req_num; };
@@ -95,6 +95,8 @@ struct tid_ampdu_tx {* @session_timer: check if peer keeps Tx-ing on the TID (by timeout value) */ struct tid_ampdu_rx { +struct sk_buff **reorder_buf; +struct timer_list session_timer;u8 state;u8 dialog_token;u16 ssn;
@@ -102,8 +104,6 @@ struct tid_ampdu_rx {u16 timeout;u16 head_seq_num;u16 stored_mpdu_num; -struct sk_buff **reorder_buf; -struct timer_list session_timer; };/**
net/mac80211/ieee80211_i.h +27 -23
157 lines not on this page · raw message