]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
mv643xx_eth: enable hardware TX checksumming with vlan tags
authorLennert Buytenhek <buytenh@wantstofly.org>
Thu, 24 Jul 2008 04:22:59 +0000 (06:22 +0200)
committerLennert Buytenhek <buytenh@marvell.com>
Thu, 24 Jul 2008 04:22:59 +0000 (06:22 +0200)
commite32b66175072d75bde1ddca4227a6723ca17e0af
treebdbd3342dd0575976f15114759a95c6ff07e95d2
parent2f7eb47a7b9f703d4f7dfdab358df6ff1f2a2204
mv643xx_eth: enable hardware TX checksumming with vlan tags

Although mv643xx_eth has no hardware support for inserting a vlan
tag by twiddling some bits in the TX descriptor, it does support
hardware TX checksumming on packets where the IP header starts {a
limited set of values other than 14} bytes into the packet.

This patch sets mv643xx_eth's ->vlan_features to NETIF_F_SG |
NETIF_F_IP_CSUM, which prevents the stack from checksumming vlan'ed
packets in software, and if vlan tags are present on a transmitted
packet, notifies the hardware of this fact by toggling the right
bits in the TX descriptor.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
drivers/net/mv643xx_eth.c