]> git.karo-electronics.de Git - karo-tx-linux.git/commit
8139cp: fix checksum broken
authorShan Wei <shanwei@cn.fujitsu.com>
Wed, 17 Nov 2010 19:55:08 +0000 (11:55 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 7 Jan 2011 21:58:26 +0000 (13:58 -0800)
commited42d595284de87fd6bd4eba9be3f13163dc4546
tree0783f4fea27307c07f885b9303b4daf7715d65f4
parent2efb9908d6ac415d69b2688b684799c51eb844fd
8139cp: fix checksum broken

[ Upstream commit 24b7ea9f6c9787fad885442ed0cc010f1aa69cca ]

I am not family with RealTek RTL-8139C+ series 10/100 PCI Ethernet driver.
I try to guess the meaning of RxProtoIP and IPFail.
RxProtoIP stands for received IPv4 packet that upper protocol is not tcp and udp.
!(status & IPFail) is true means that driver correctly to check checksum in IPv4 header.

If these are right, driver will set ip_summed with CHECKSUM_UNNECESSARY for other
upper protocol, e.g. sctp, igmp protocol. This will cause protocol stack ignores
checksum check for packets with invalid checksum.

This patch is only compile-test.

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/8139cp.c