b44: fix misalignment and wasted space in rx handling
authorFelix Fietkau <nbd@openwrt.org>
Fri, 9 Jan 2009 02:39:57 +0000 (02:39 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 11 Jan 2009 08:04:12 +0000 (00:04 -0800)
commit4ca857958c129781b46870ec1d2d13c50aafb8c5
tree4046e0a5a973ec383935ae07d577bd237e40f909
parent9498c05820580afbf03a317b0b5bdb0ca0e27e40
b44: fix misalignment and wasted space in rx handling

Broadcom 4400 puts a header of configurable size (apparently needs
to be at least 28 bytes) in front of received packets. When handling
this, the previous code accidentally added the offset 30 *twice* for
the software and once for the hardware, thereby cancelling out the
IP alignment effect of the 30 byte padding and wasting an additional
30 bytes of memory per packet.

This patch fixes this problem and improves routing throughput by
about 30% on MIPS, where unaligned access is expensive.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/b44.c