aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tg3.c
diff options
context:
space:
mode:
authorMichael Chan <mchan@broadcom.com>2006-03-21 01:28:27 -0500
committerDavid S. Miller <davem@davemloft.net>2006-03-21 01:28:27 -0500
commit9c27dbdf64cba05d0cacc343118a7fd01d4b82f7 (patch)
treef579329eab7d30f6016d52ab50bfcb2a540dd750 /drivers/net/tg3.c
parent5a6f3074c2ea5a7b4ff5b18f0e1fd9b1257e1a29 (diff)
[TG3]: Add ipv6 checksum support
Support ipv6 tx csum on 5787 by setting NETIF_F_HW_CSUM. Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r--drivers/net/tg3.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index d4035de6440e..5182a3be7f21 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -7871,10 +7871,10 @@ static int tg3_set_tx_csum(struct net_device *dev, u32 data)
7871 return 0; 7871 return 0;
7872 } 7872 }
7873 7873
7874 if (data) 7874 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787)
7875 dev->features |= NETIF_F_IP_CSUM; 7875 ethtool_op_set_tx_hw_csum(dev, data);
7876 else 7876 else
7877 dev->features &= ~NETIF_F_IP_CSUM; 7877 ethtool_op_set_tx_csum(dev, data);
7878 7878
7879 return 0; 7879 return 0;
7880} 7880}
@@ -11236,7 +11236,11 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
11236 * checksumming. 11236 * checksumming.
11237 */ 11237 */
11238 if ((tp->tg3_flags & TG3_FLAG_BROKEN_CHECKSUMS) == 0) { 11238 if ((tp->tg3_flags & TG3_FLAG_BROKEN_CHECKSUMS) == 0) {
11239 dev->features |= NETIF_F_SG | NETIF_F_IP_CSUM; 11239 if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5787)
11240 dev->features |= NETIF_F_HW_CSUM;
11241 else
11242 dev->features |= NETIF_F_IP_CSUM;
11243 dev->features |= NETIF_F_SG;
11240 tp->tg3_flags |= TG3_FLAG_RX_CHECKSUMS; 11244 tp->tg3_flags |= TG3_FLAG_RX_CHECKSUMS;
11241 } else 11245 } else
11242 tp->tg3_flags &= ~TG3_FLAG_RX_CHECKSUMS; 11246 tp->tg3_flags &= ~TG3_FLAG_RX_CHECKSUMS;