aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r--drivers/net/bnx2.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index ee7b75b976b5..c416c18007da 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -39,12 +39,9 @@
39#include <linux/if_vlan.h> 39#include <linux/if_vlan.h>
40#define BCM_VLAN 1 40#define BCM_VLAN 1
41#endif 41#endif
42#ifdef NETIF_F_TSO
43#include <net/ip.h> 42#include <net/ip.h>
44#include <net/tcp.h> 43#include <net/tcp.h>
45#include <net/checksum.h> 44#include <net/checksum.h>
46#define BCM_TSO 1
47#endif
48#include <linux/workqueue.h> 45#include <linux/workqueue.h>
49#include <linux/crc32.h> 46#include <linux/crc32.h>
50#include <linux/prefetch.h> 47#include <linux/prefetch.h>
@@ -1728,7 +1725,7 @@ bnx2_tx_int(struct bnx2 *bp)
1728 1725
1729 tx_buf = &bp->tx_buf_ring[sw_ring_cons]; 1726 tx_buf = &bp->tx_buf_ring[sw_ring_cons];
1730 skb = tx_buf->skb; 1727 skb = tx_buf->skb;
1731#ifdef BCM_TSO 1728
1732 /* partial BD completions possible with TSO packets */ 1729 /* partial BD completions possible with TSO packets */
1733 if (skb_is_gso(skb)) { 1730 if (skb_is_gso(skb)) {
1734 u16 last_idx, last_ring_idx; 1731 u16 last_idx, last_ring_idx;
@@ -1744,7 +1741,7 @@ bnx2_tx_int(struct bnx2 *bp)
1744 break; 1741 break;
1745 } 1742 }
1746 } 1743 }
1747#endif 1744
1748 pci_unmap_single(bp->pdev, pci_unmap_addr(tx_buf, mapping), 1745 pci_unmap_single(bp->pdev, pci_unmap_addr(tx_buf, mapping),
1749 skb_headlen(skb), PCI_DMA_TODEVICE); 1746 skb_headlen(skb), PCI_DMA_TODEVICE);
1750 1747
@@ -4514,7 +4511,6 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev)
4514 vlan_tag_flags |= 4511 vlan_tag_flags |=
4515 (TX_BD_FLAGS_VLAN_TAG | (vlan_tx_tag_get(skb) << 16)); 4512 (TX_BD_FLAGS_VLAN_TAG | (vlan_tx_tag_get(skb) << 16));
4516 } 4513 }
4517#ifdef BCM_TSO
4518 if ((mss = skb_shinfo(skb)->gso_size) && 4514 if ((mss = skb_shinfo(skb)->gso_size) &&
4519 (skb->len > (bp->dev->mtu + ETH_HLEN))) { 4515 (skb->len > (bp->dev->mtu + ETH_HLEN))) {
4520 u32 tcp_opt_len, ip_tcp_len; 4516 u32 tcp_opt_len, ip_tcp_len;
@@ -4547,7 +4543,6 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev)
4547 } 4543 }
4548 } 4544 }
4549 else 4545 else
4550#endif
4551 { 4546 {
4552 mss = 0; 4547 mss = 0;
4553 } 4548 }
@@ -5544,10 +5539,8 @@ static const struct ethtool_ops bnx2_ethtool_ops = {
5544 .set_tx_csum = ethtool_op_set_tx_csum, 5539 .set_tx_csum = ethtool_op_set_tx_csum,
5545 .get_sg = ethtool_op_get_sg, 5540 .get_sg = ethtool_op_get_sg,
5546 .set_sg = ethtool_op_set_sg, 5541 .set_sg = ethtool_op_set_sg,
5547#ifdef BCM_TSO
5548 .get_tso = ethtool_op_get_tso, 5542 .get_tso = ethtool_op_get_tso,
5549 .set_tso = bnx2_set_tso, 5543 .set_tso = bnx2_set_tso,
5550#endif
5551 .self_test_count = bnx2_self_test_count, 5544 .self_test_count = bnx2_self_test_count,
5552 .self_test = bnx2_self_test, 5545 .self_test = bnx2_self_test,
5553 .get_strings = bnx2_get_strings, 5546 .get_strings = bnx2_get_strings,
@@ -6104,9 +6097,7 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
6104#ifdef BCM_VLAN 6097#ifdef BCM_VLAN
6105 dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; 6098 dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
6106#endif 6099#endif
6107#ifdef BCM_TSO
6108 dev->features |= NETIF_F_TSO | NETIF_F_TSO_ECN; 6100 dev->features |= NETIF_F_TSO | NETIF_F_TSO_ECN;
6109#endif
6110 6101
6111 netif_carrier_off(bp->dev); 6102 netif_carrier_off(bp->dev);
6112 6103