diff options
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r-- | drivers/net/bnx2.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index b70cc99962fc..cec1b1746ae0 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -8023,6 +8023,13 @@ static const struct net_device_ops bnx2_netdev_ops = { | |||
8023 | #endif | 8023 | #endif |
8024 | }; | 8024 | }; |
8025 | 8025 | ||
8026 | static void inline vlan_features_add(struct net_device *dev, unsigned long flags) | ||
8027 | { | ||
8028 | #ifdef BCM_VLAN | ||
8029 | dev->vlan_features |= flags; | ||
8030 | #endif | ||
8031 | } | ||
8032 | |||
8026 | static int __devinit | 8033 | static int __devinit |
8027 | bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | 8034 | bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) |
8028 | { | 8035 | { |
@@ -8064,16 +8071,20 @@ bnx2_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
8064 | memcpy(dev->perm_addr, bp->mac_addr, 6); | 8071 | memcpy(dev->perm_addr, bp->mac_addr, 6); |
8065 | 8072 | ||
8066 | dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG; | 8073 | dev->features |= NETIF_F_IP_CSUM | NETIF_F_SG; |
8067 | if (CHIP_NUM(bp) == CHIP_NUM_5709) | 8074 | vlan_features_add(dev, NETIF_F_IP_CSUM | NETIF_F_SG); |
8075 | if (CHIP_NUM(bp) == CHIP_NUM_5709) { | ||
8068 | dev->features |= NETIF_F_IPV6_CSUM; | 8076 | dev->features |= NETIF_F_IPV6_CSUM; |
8069 | 8077 | vlan_features_add(dev, NETIF_F_IPV6_CSUM); | |
8078 | } | ||
8070 | #ifdef BCM_VLAN | 8079 | #ifdef BCM_VLAN |
8071 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; | 8080 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; |
8072 | #endif | 8081 | #endif |
8073 | dev->features |= NETIF_F_TSO | NETIF_F_TSO_ECN; | 8082 | dev->features |= NETIF_F_TSO | NETIF_F_TSO_ECN; |
8074 | if (CHIP_NUM(bp) == CHIP_NUM_5709) | 8083 | vlan_features_add(dev, NETIF_F_TSO | NETIF_F_TSO_ECN); |
8084 | if (CHIP_NUM(bp) == CHIP_NUM_5709) { | ||
8075 | dev->features |= NETIF_F_TSO6; | 8085 | dev->features |= NETIF_F_TSO6; |
8076 | 8086 | vlan_features_add(dev, NETIF_F_TSO6); | |
8087 | } | ||
8077 | if ((rc = register_netdev(dev))) { | 8088 | if ((rc = register_netdev(dev))) { |
8078 | dev_err(&pdev->dev, "Cannot register net device\n"); | 8089 | dev_err(&pdev->dev, "Cannot register net device\n"); |
8079 | goto error; | 8090 | goto error; |