igb: cleanup incorrect comment and set IP Checksum Enable
authorAlexander Duyck <[email protected]>
Thu, 12 Feb 2009 18:17:42 +0000 (18:17 +0000)
committerDavid S. Miller <[email protected]>
Mon, 16 Feb 2009 07:56:00 +0000 (23:56 -0800)
IP Checksum enable doesn't need packet split in order to function.  It only
requires the use of advanced descriptors which the current igb driver does.
So we can enable it always without any issues.

Signed-off-by: Alexander Duyck <[email protected]>
Acked-by: Peter P Waskiewicz Jr <[email protected]>
Signed-off-by: Jeff Kirsher <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
drivers/net/igb/igb_main.c

index 86782f9218a786d08a21aa6997109f3366751fa0..c259013fe7b2425aef3287d94a19cade7f89aaca 100644 (file)
@@ -2059,17 +2059,11 @@ static void igb_configure_rx(struct igb_adapter *adapter)
        } else {
                /* Enable Receive Checksum Offload for TCP and UDP */
                rxcsum = rd32(E1000_RXCSUM);
-               if (adapter->rx_csum) {
-                       rxcsum |= E1000_RXCSUM_TUOFL;
+               if (adapter->rx_csum)
+                       rxcsum |= E1000_RXCSUM_TUOFL | E1000_RXCSUM_IPPCSE;
+               else
+                       rxcsum &= ~(E1000_RXCSUM_TUOFL | E1000_RXCSUM_IPPCSE);
 
-                       /* Enable IPv4 payload checksum for UDP fragments
-                        * Must be used in conjunction with packet-split. */
-                       if (adapter->rx_ps_hdr_size)
-                               rxcsum |= E1000_RXCSUM_IPPCSE;
-               } else {
-                       rxcsum &= ~E1000_RXCSUM_TUOFL;
-                       /* don't need to clear IPPCSE as it defaults to 0 */
-               }
                wr32(E1000_RXCSUM, rxcsum);
        }