ath9k_hw: optimize all descriptor access functions
authorFelix Fietkau <nbd@openwrt.org>
Fri, 15 Oct 2010 23:01:48 +0000 (01:01 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 9 Nov 2010 21:13:25 +0000 (16:13 -0500)
commitada9f1cacb66b74a68254521bb5e3ca4eb8fa871
treeb8a256f5f4bd42c9ec37102638cc49e1a11eb242
parentf0e94b479c987abef17eb18e5c8e0ed178d00cd4
ath9k_hw: optimize all descriptor access functions

Because all of the descriptor data structures are marked as __packed, GCC
assumes the worst case wrt. alignment and generates unaligned load/store
instructions on MIPS for access to all fields.
Since descriptors always have to be 4-byte-aligned, we can just mark the
data structures with __aligned(4), which allows GCC to generate much more
efficient code.
Verified through disassembly and OProfile comparisons.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/ar9003_mac.h
drivers/net/wireless/ath/ath9k/mac.h