aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/sta_info.h
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2016-05-19 17:34:38 +0200
committerJohannes Berg <johannes.berg@intel.com>2016-05-31 12:14:04 +0200
commit6fe04128f158c5ad27e7504bfdf1b12e63331bc9 (patch)
tree294d109c5107cae1833804802886c829352f7149 /net/mac80211/sta_info.h
parentmac80211: mesh: flush mesh paths unconditionally (diff)
downloadlinux-dev-6fe04128f158c5ad27e7504bfdf1b12e63331bc9.tar.xz
linux-dev-6fe04128f158c5ad27e7504bfdf1b12e63331bc9.zip
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> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/sta_info.h')
-rw-r--r--net/mac80211/sta_info.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h
index c8b8ccc370eb..78b0ef32dddd 100644
--- 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;
};