ieee80211: mark 802.11 related structs as being 2-byte aligned
authorFelix Fietkau <nbd@openwrt.org>
Fri, 22 Feb 2013 16:28:49 +0000 (17:28 +0100)
committerChristian Lamparter <chunkeey@googlemail.com>
Fri, 22 Mar 2013 23:13:23 +0000 (00:13 +0100)
commite882b8131559c1434b1deb981d65e70d9f2a8853
tree8c1eb5e11d024ef95d1ffb30ab0c7826b487fa5c
parent159041386daf775e24deefc1348288439e70c988
ieee80211: mark 802.11 related structs as being 2-byte aligned

Regardless of what header features they use, or if they align the IP
header or not, 802.11 packets from all drivers guarantee a 2-byte
alignment (and there's a debug WARN_ON in case they don't).

Annotate packet structs with __aligned(2) to allow the compiler to use
16-bit load/store operations on platforms with extremely inefficient
unaligned access (e.g. MIPS).

This reduces code size and improves performance on affected platforms
and causes no binary code change on others.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
include/linux/ieee80211.h