8139cp: fix checksum broken
commit4fef93a724a0294bc372e3f0049b5f9dfa09e44e
authorShan Wei <shanwei@cn.fujitsu.com>
Wed, 17 Nov 2010 19:55:08 +0000 (17 11:55 -0800)
committerAK <andi@firstfloor.org>
Sun, 6 Feb 2011 19:03:35 +0000 (6 11:03 -0800)
treee04566e79dea4a73fe7dd1f93a05fe6b15016f45
parent5f8d6ba121ac7b0651396e8ce71c6fea4befca45
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>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
drivers/net/8139cp.c