From: Joe Perches <joe@perches.com>
Date: Thu, 19 Dec 2013 00:52:17 +0000 (-0800)
Subject: mac80211: align struct ps_data.tim to unsigned long
X-Git-Tag: firefly_0821_release~176^2~4570^2~3^2^2~42^2~42
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5fe2bb8688cad3608f9fe0d0875f9f6ff776ba51;p=firefly-linux-kernel-4.4.55.git

mac80211: align struct ps_data.tim to unsigned long

Its address is used as an unsigned long *, so make sure
that the tim u8 array is properly aligned.

Signed-off-by: Joe Perches <joe@perches.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---

diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index c56009c3589d..7785afbd222d 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -246,7 +246,8 @@ struct ps_data {
 	/* yes, this looks ugly, but guarantees that we can later use
 	 * bitmap_empty :)
 	 * NB: don't touch this bitmap, use sta_info_{set,clear}_tim_bit */
-	u8 tim[sizeof(unsigned long) * BITS_TO_LONGS(IEEE80211_MAX_AID + 1)];
+	u8 tim[sizeof(unsigned long) * BITS_TO_LONGS(IEEE80211_MAX_AID + 1)]
+			__aligned(__alignof__(unsigned long));
 	struct sk_buff_head bc_buf;
 	atomic_t num_sta_ps; /* number of stations in PS mode */
 	int dtim_count;