提交 b11d6213 编写于 作者: M Michael Chan 提交者: David S. Miller

[BNX2]: Add NETIF_F_TSO_ECN

Add NETIF_F_TSO_ECN feature for all bnx2 hardware.
Signed-off-by: NMichael Chan <mchan@broadcom.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 b0da8537
...@@ -5128,6 +5128,16 @@ bnx2_set_rx_csum(struct net_device *dev, u32 data) ...@@ -5128,6 +5128,16 @@ bnx2_set_rx_csum(struct net_device *dev, u32 data)
return 0; return 0;
} }
static int
bnx2_set_tso(struct net_device *dev, u32 data)
{
if (data)
dev->features |= NETIF_F_TSO | NETIF_F_TSO_ECN;
else
dev->features &= ~(NETIF_F_TSO | NETIF_F_TSO_ECN);
return 0;
}
#define BNX2_NUM_STATS 46 #define BNX2_NUM_STATS 46
static struct { static struct {
...@@ -5445,7 +5455,7 @@ static struct ethtool_ops bnx2_ethtool_ops = { ...@@ -5445,7 +5455,7 @@ static struct ethtool_ops bnx2_ethtool_ops = {
.set_sg = ethtool_op_set_sg, .set_sg = ethtool_op_set_sg,
#ifdef BCM_TSO #ifdef BCM_TSO
.get_tso = ethtool_op_get_tso, .get_tso = ethtool_op_get_tso,
.set_tso = ethtool_op_set_tso, .set_tso = bnx2_set_tso,
#endif #endif
.self_test_count = bnx2_self_test_count, .self_test_count = bnx2_self_test_count,
.self_test = bnx2_self_test, .self_test = bnx2_self_test,
...@@ -5926,7 +5936,7 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -5926,7 +5936,7 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
#endif #endif
#ifdef BCM_TSO #ifdef BCM_TSO
dev->features |= NETIF_F_TSO; dev->features |= NETIF_F_TSO | NETIF_F_TSO_ECN;
#endif #endif
netif_carrier_off(bp->dev); netif_carrier_off(bp->dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册