aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211/patches/304-mac80211-fix-fast_tx-header-alignment.patch
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2016-06-22 16:16:03 +0200
committerZoltan HERPAI <wigyori@uid0.hu>2016-06-22 16:16:03 +0200
commitb3d5688efcf2eae338b83452406164a4ebc1e4c7 (patch)
tree3bc19f9346230d34269bec03682ab15d40808ff6 /package/kernel/mac80211/patches/304-mac80211-fix-fast_tx-header-alignment.patch
parent4b13ab42410fb19014bc7444855f27a0bcb2ae0c (diff)
downloadmaster-187ad058-b3d5688efcf2eae338b83452406164a4ebc1e4c7.tar.gz
master-187ad058-b3d5688efcf2eae338b83452406164a4ebc1e4c7.tar.bz2
master-187ad058-b3d5688efcf2eae338b83452406164a4ebc1e4c7.zip
mac80211: fix unaligned accesses in the tx path
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/kernel/mac80211/patches/304-mac80211-fix-fast_tx-header-alignment.patch')
-rw-r--r--package/kernel/mac80211/patches/304-mac80211-fix-fast_tx-header-alignment.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/304-mac80211-fix-fast_tx-header-alignment.patch b/package/kernel/mac80211/patches/304-mac80211-fix-fast_tx-header-alignment.patch
new file mode 100644
index 0000000000..6316d81729
--- /dev/null
+++ b/package/kernel/mac80211/patches/304-mac80211-fix-fast_tx-header-alignment.patch
@@ -0,0 +1,25 @@
+From: Felix Fietkau <nbd@nbd.name>
+Date: Thu, 19 May 2016 17:32:13 +0200
+Subject: [PATCH] mac80211: fix fast_tx header alignment
+
+The header field is defined as u8[] but also accessed as struct
+ieee80211_hdr. Enforce an alignment of 2 to prevent unnecessary
+unaligned accesses, which can be very harmful for performance on many
+platforms.
+
+Fixes: e495c24731a2 ("mac80211: extend fast-xmit for more ciphers")
+Cc: stable@vger.kernel.org
+Signed-off-by: Felix Fietkau <nbd@nbd.name>
+---
+
+--- a/net/mac80211/sta_info.h
++++ b/net/mac80211/sta_info.h
+@@ -280,7 +280,7 @@ struct ieee80211_fast_tx {
+ u8 sa_offs, da_offs, pn_offs;
+ u8 band;
+ u8 hdr[30 + 2 + IEEE80211_FAST_XMIT_MAX_IV +
+- sizeof(rfc1042_header)];
++ sizeof(rfc1042_header)] __aligned(2);
+
+ struct rcu_head rcu_head;
+ };