]> git.karo-electronics.de Git - linux-beck.git/commit
ehea: Fix TSO and hw checksums with non-accelerated vlan packets.
authorVlad Yasevich <vyasevich@gmail.com>
Mon, 25 Aug 2014 14:34:51 +0000 (10:34 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Aug 2014 00:27:09 +0000 (17:27 -0700)
commitbe1d1486122092f5a323539ee4cc328d06083f63
treedfe7d9cb87afb821b8de33d97539ef9f72943f91
parent1c53730a04fb651e35af0a12bd35f6a00481f53c
ehea: Fix TSO and hw checksums with non-accelerated vlan packets.

The driver claims that it can do TSO and IP checksums on vlan
devices and also allows user to control vlan acceleration offloading.
This makes it possible to push traffic to this driver that has TSO or
partial checksums set, but also have a non-accelearted vlan
header.  In this case, the driver will fail to correctly
identify such traffic and will not correctly perform
segmentation and checksum calculation.

Fix this by using vlan_get_protocol() helper instead of
assuming skb->protocol always has this information.

CC: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Signed-off-by: Vladislav Yasevich <vyasevic@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ibm/ehea/ehea_main.c