]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
PCH_GbE : Fixed the issue of checksum judgment
authorToshiharu Okada <toshiharu-linux@dsn.okisemi.com>
Fri, 6 May 2011 02:53:56 +0000 (02:53 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sat, 21 May 2011 22:13:17 +0000 (15:13 -0700)
commit 5d05a04d283061b586e8dc819cfa6f4b8cfd5948 upstream.

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

This patch fixes the issue.

Signed-off-by: Toshiharu Okada <toshiharu-linux@dsn.okisemi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/pch_gbe/pch_gbe_main.c

index a2e7d63d7fd11c79be6df1ded7c99ce3c45156b6..bd3ef37fb51e8c6b77acb817282227655634f9be 100644 (file)
@@ -1493,12 +1493,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",