From: Hauke Mehrtens Date: Wed, 9 Oct 2013 09:13:41 +0000 (+0000) Subject: mac80211: rtlwifi: Align private space in rtl_priv struct X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b814661167a264a67bdc3f8a0180dc3b6592cba2;p=openwrt%2Fsvn-archive%2Fopenwrt.git mac80211: rtlwifi: Align private space in rtl_priv struct Signed-off-by: Hauke Mehrtens SVN-Revision: 38346 --- diff --git a/package/kernel/mac80211/patches/750-rtlwifi-Align-private-space-in-rtl_priv-struct.patch b/package/kernel/mac80211/patches/750-rtlwifi-Align-private-space-in-rtl_priv-struct.patch new file mode 100644 index 0000000000..050defaef0 --- /dev/null +++ b/package/kernel/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 +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 +Tested-by: Jason Andrews +Signed-off-by: Larry Finger +Cc: Stable +Signed-off-by: John W. Linville +--- +--- 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))