aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@openwrt.org>2013-10-09 09:14:46 +0000
committerHauke Mehrtens <hauke@openwrt.org>2013-10-09 09:14:46 +0000
commitc6857dabc05c10eeb64da1835f63b880f7f1c33c (patch)
tree519fec8f3cd277596ea7831a21f071a2e9ecd764
parenteb06ee48465370e5e0723d265da173e721216203 (diff)
downloadupstream-c6857dabc05c10eeb64da1835f63b880f7f1c33c.tar.gz
upstream-c6857dabc05c10eeb64da1835f63b880f7f1c33c.tar.bz2
upstream-c6857dabc05c10eeb64da1835f63b880f7f1c33c.zip
AA: mac80211: rtlwifi: Align private space in rtl_priv struct
Backport of r38346 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> git-svn-id: svn://svn.openwrt.org/openwrt/branches/attitude_adjustment@38347 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/mac80211/patches/750-rtlwifi-Align-private-space-in-rtl_priv-struct.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/package/mac80211/patches/750-rtlwifi-Align-private-space-in-rtl_priv-struct.patch b/package/mac80211/patches/750-rtlwifi-Align-private-space-in-rtl_priv-struct.patch
new file mode 100644
index 0000000000..050defaef0
--- /dev/null
+++ b/package/mac80211/patches/750-rtlwifi-Align-private-space-in-rtl_priv-struct.patch
@@ -0,0 +1,27 @@
+From 60ce314d1750fef843e9db70050e09e49f838b69 Mon Sep 17 00:00:00 2001
+From: Larry Finger <Larry.Finger@lwfinger.net>
+Date: Thu, 19 Sep 2013 02:21:35 +0000
+Subject: rtlwifi: Align private space in rtl_priv struct
+
+The private array at the end of the rtl_priv struct is not aligned.
+On ARM architecture, this causes an alignment trap and is fixed by aligning
+that array with __align(sizeof(void *)). That should properly align that
+space according to the requirements of all architectures.
+
+Reported-by: Jason Andrews <jasona@cadence.com>
+Tested-by: Jason Andrews <jasona@cadence.com>
+Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
+Cc: Stable <stable@vger.kernel.org>
+Signed-off-by: John W. Linville <linville@tuxdriver.com>
+---
+--- a/drivers/net/wireless/rtlwifi/wifi.h
++++ b/drivers/net/wireless/rtlwifi/wifi.h
+@@ -2057,7 +2057,7 @@ struct rtl_priv {
+ that it points to the data allocated
+ beyond this structure like:
+ rtl_pci_priv or rtl_usb_priv */
+- u8 priv[0];
++ u8 priv[0] __aligned(sizeof(void *));
+ };
+
+ #define rtl_priv(hw) (((struct rtl_priv *)(hw)->priv))