]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.6.5/mac80211-fix-fast_tx-header-alignment.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 4.6.5 / mac80211-fix-fast_tx-header-alignment.patch
1 From 6fe04128f158c5ad27e7504bfdf1b12e63331bc9 Mon Sep 17 00:00:00 2001
2 From: Felix Fietkau <nbd@nbd.name>
3 Date: Thu, 19 May 2016 17:34:38 +0200
4 Subject: mac80211: fix fast_tx header alignment
5
6 From: Felix Fietkau <nbd@nbd.name>
7
8 commit 6fe04128f158c5ad27e7504bfdf1b12e63331bc9 upstream.
9
10 The header field is defined as u8[] but also accessed as struct
11 ieee80211_hdr. Enforce an alignment of 2 to prevent unnecessary
12 unaligned accesses, which can be very harmful for performance on many
13 platforms.
14
15 Fixes: e495c24731a2 ("mac80211: extend fast-xmit for more ciphers")
16 Signed-off-by: Felix Fietkau <nbd@nbd.name>
17 Signed-off-by: Johannes Berg <johannes.berg@intel.com>
18 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
19
20 ---
21 net/mac80211/sta_info.h | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
23
24 --- a/net/mac80211/sta_info.h
25 +++ b/net/mac80211/sta_info.h
26 @@ -275,7 +275,7 @@ struct ieee80211_fast_tx {
27 u8 sa_offs, da_offs, pn_offs;
28 u8 band;
29 u8 hdr[30 + 2 + IEEE80211_FAST_XMIT_MAX_IV +
30 - sizeof(rfc1042_header)];
31 + sizeof(rfc1042_header)] __aligned(2);
32
33 struct rcu_head rcu_head;
34 };