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)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 6 Mar 2013 15:35:45 +0000 (16:35 +0100)
commitb8a31c9a5afff257cc5dd637cda5fef03e12d67b
tree0b8555a584440f1c194b05680339d04b8c0a5107
parent9a886586c82aa02cb49f8c85e961595716884545
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>
include/linux/ieee80211.h