Skip to content
  • Felix Fietkau's avatar
    ieee80211: mark 802.11 related structs as being 2-byte aligned · b8a31c9a
    Felix Fietkau authored
    
    
    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: default avatarFelix Fietkau <nbd@openwrt.org>
    Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    b8a31c9a