Skip to contentSkip to conversation

PCH_GbE : Fixed the issue of checksum judgment

PATCH Applied Toshiharu Okada 2 participants 2 messages May 6, 2011 – May 9, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 2/2 PCH_GbE : Fixed the issue of checksum judgment

The checksum judgment was mistaken.
Judgment result
0:Correct 1:Wrong

This patch fixes the issue.

---
 drivers/net/pch_gbe/pch_gbe_main.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)
drivers/net/pch_gbe/pch_gbe_main.c +4 -5
index babe663..6f10361 100644
@@ -1494,12 +1494,11 @@ pch_gbe_clean_rx(struct pch_gbe_adapter *adapter,
 			/* Write meta date of skb */
 			skb_put(skb, length);
 			skb->protocol = eth_type_trans(skb, netdev);
-			if ((tcp_ip_status & PCH_GBE_RXD_ACC_STAT_TCPIPOK) ==
-			    PCH_GBE_RXD_ACC_STAT_TCPIPOK) {
-				skb->ip_summed = CHECKSUM_UNNECESSARY;
-			} else {
+			if (tcp_ip_status & PCH_GBE_RXD_ACC_STAT_TCPIPOK)
 				skb->ip_summed = CHECKSUM_NONE;
-			}
+			else
+				skb->ip_summed = CHECKSUM_UNNECESSARY;
+
 			napi_gro_receive(&adapter->napi, skb);
 			(*work_done)++;
 			pr_debug("Receive skb->ip_summed: %d length: %d\n",
Signature · 1 line
1.6.2.5