ath9k: add some cleanups and minor fixes
[openwrt/svn-archive/archive.git] / package / kernel / mac80211 / patches / 750-rtlwifi-Align-private-space-in-rtl_priv-struct.patch
1 From 60ce314d1750fef843e9db70050e09e49f838b69 Mon Sep 17 00:00:00 2001
2 From: Larry Finger <Larry.Finger@lwfinger.net>
3 Date: Thu, 19 Sep 2013 02:21:35 +0000
4 Subject: rtlwifi: Align private space in rtl_priv struct
5
6 The private array at the end of the rtl_priv struct is not aligned.
7 On ARM architecture, this causes an alignment trap and is fixed by aligning
8 that array with __align(sizeof(void *)). That should properly align that
9 space according to the requirements of all architectures.
10
11 Reported-by: Jason Andrews <jasona@cadence.com>
12 Tested-by: Jason Andrews <jasona@cadence.com>
13 Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
14 Cc: Stable <stable@vger.kernel.org>
15 Signed-off-by: John W. Linville <linville@tuxdriver.com>
16 ---
17 --- a/drivers/net/wireless/rtlwifi/wifi.h
18 +++ b/drivers/net/wireless/rtlwifi/wifi.h
19 @@ -2057,7 +2057,7 @@ struct rtl_priv {
20 that it points to the data allocated
21 beyond this structure like:
22 rtl_pci_priv or rtl_usb_priv */
23 - u8 priv[0];
24 + u8 priv[0] __aligned(sizeof(void *));
25 };
26
27 #define rtl_priv(hw) (((struct rtl_priv *)(hw)->priv))