]> git.baikalelectronics.ru Git - kernel.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)
commit0ecad37d15abda00255cc6e2ea92f3278c6bc055
treedfe7d9cb87afb821b8de33d97539ef9f72943f91
parentb32d4d3a72c3962dfbe6f3cfdc2471ea121a0fb0
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