linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mac80211: optimize ieee80211_rx_status struct layout
@ 2012-07-10  9:11 Johannes Berg
  2012-07-10  9:13 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2012-07-10  9:11 UTC (permalink / raw)
  To: linux-wireless; +Cc: Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

We waste a lot of space in this struct because it uses
int values where smaller ones would be sufficient. The
upcoming A-MPDU information needs some space, optimize
the struct now.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 include/net/mac80211.h |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index c5dbb46..7300cb5 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -709,13 +709,13 @@ enum mac80211_rx_flags {
  */
 struct ieee80211_rx_status {
 	u64 mactime;
-	enum ieee80211_band band;
-	int freq;
-	int signal;
-	int antenna;
-	int rate_idx;
-	int flag;
-	unsigned int rx_flags;
+	u16 flag;
+	u16 freq;
+	u8 rate_idx;
+	u8 rx_flags;
+	u8 band;
+	u8 antenna;
+	s8 signal;
 };
 
 /**
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mac80211: optimize ieee80211_rx_status struct layout
  2012-07-10  9:11 [PATCH] mac80211: optimize ieee80211_rx_status struct layout Johannes Berg
@ 2012-07-10  9:13 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2012-07-10  9:13 UTC (permalink / raw)
  To: linux-wireless

On Tue, 2012-07-10 at 11:11 +0200, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
> 
> We waste a lot of space in this struct because it uses
> int values where smaller ones would be sufficient. The
> upcoming A-MPDU information needs some space, optimize
> the struct now.

It'll be a few weeks until the A-MPDU stuff is adopted in radiotap, but
I figured this could still go upstream already. The previous patch (time
sync) was based on it (and accidentally the A-MPDU stuff, so it won't
apply as is, but I've fixed that)

johannes


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-10  9:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-10  9:11 [PATCH] mac80211: optimize ieee80211_rx_status struct layout Johannes Berg
2012-07-10  9:13 ` Johannes Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).