diff options
Diffstat (limited to 'drivers/net/qlcnic/qlcnic_main.c')
-rw-r--r-- | drivers/net/qlcnic/qlcnic_main.c | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c index e9e9ba6efc5..6e619514fee 100644 --- a/drivers/net/qlcnic/qlcnic_main.c +++ b/drivers/net/qlcnic/qlcnic_main.c | |||
@@ -328,6 +328,8 @@ static const struct net_device_ops qlcnic_netdev_ops = { | |||
328 | .ndo_set_multicast_list = qlcnic_set_multi, | 328 | .ndo_set_multicast_list = qlcnic_set_multi, |
329 | .ndo_set_mac_address = qlcnic_set_mac, | 329 | .ndo_set_mac_address = qlcnic_set_mac, |
330 | .ndo_change_mtu = qlcnic_change_mtu, | 330 | .ndo_change_mtu = qlcnic_change_mtu, |
331 | .ndo_fix_features = qlcnic_fix_features, | ||
332 | .ndo_set_features = qlcnic_set_features, | ||
331 | .ndo_tx_timeout = qlcnic_tx_timeout, | 333 | .ndo_tx_timeout = qlcnic_tx_timeout, |
332 | .ndo_vlan_rx_add_vid = qlcnic_vlan_rx_add, | 334 | .ndo_vlan_rx_add_vid = qlcnic_vlan_rx_add, |
333 | .ndo_vlan_rx_kill_vid = qlcnic_vlan_rx_del, | 335 | .ndo_vlan_rx_kill_vid = qlcnic_vlan_rx_del, |
@@ -764,7 +766,7 @@ qlcnic_set_netdev_features(struct qlcnic_adapter *adapter, | |||
764 | struct net_device *netdev = adapter->netdev; | 766 | struct net_device *netdev = adapter->netdev; |
765 | unsigned long features, vlan_features; | 767 | unsigned long features, vlan_features; |
766 | 768 | ||
767 | features = (NETIF_F_SG | NETIF_F_IP_CSUM | | 769 | features = (NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_RXCSUM | |
768 | NETIF_F_IPV6_CSUM | NETIF_F_GRO); | 770 | NETIF_F_IPV6_CSUM | NETIF_F_GRO); |
769 | vlan_features = (NETIF_F_SG | NETIF_F_IP_CSUM | | 771 | vlan_features = (NETIF_F_SG | NETIF_F_IP_CSUM | |
770 | NETIF_F_IPV6_CSUM | NETIF_F_HW_VLAN_FILTER); | 772 | NETIF_F_IPV6_CSUM | NETIF_F_HW_VLAN_FILTER); |
@@ -779,14 +781,12 @@ qlcnic_set_netdev_features(struct qlcnic_adapter *adapter, | |||
779 | 781 | ||
780 | if (esw_cfg->offload_flags & BIT_0) { | 782 | if (esw_cfg->offload_flags & BIT_0) { |
781 | netdev->features |= features; | 783 | netdev->features |= features; |
782 | adapter->rx_csum = 1; | ||
783 | if (!(esw_cfg->offload_flags & BIT_1)) | 784 | if (!(esw_cfg->offload_flags & BIT_1)) |
784 | netdev->features &= ~NETIF_F_TSO; | 785 | netdev->features &= ~NETIF_F_TSO; |
785 | if (!(esw_cfg->offload_flags & BIT_2)) | 786 | if (!(esw_cfg->offload_flags & BIT_2)) |
786 | netdev->features &= ~NETIF_F_TSO6; | 787 | netdev->features &= ~NETIF_F_TSO6; |
787 | } else { | 788 | } else { |
788 | netdev->features &= ~features; | 789 | netdev->features &= ~features; |
789 | adapter->rx_csum = 0; | ||
790 | } | 790 | } |
791 | 791 | ||
792 | netdev->vlan_features = (features & vlan_features); | 792 | netdev->vlan_features = (features & vlan_features); |
@@ -1436,7 +1436,6 @@ qlcnic_setup_netdev(struct qlcnic_adapter *adapter, | |||
1436 | int err; | 1436 | int err; |
1437 | struct pci_dev *pdev = adapter->pdev; | 1437 | struct pci_dev *pdev = adapter->pdev; |
1438 | 1438 | ||
1439 | adapter->rx_csum = 1; | ||
1440 | adapter->mc_enabled = 0; | 1439 | adapter->mc_enabled = 0; |
1441 | adapter->max_mc_count = 38; | 1440 | adapter->max_mc_count = 38; |
1442 | 1441 | ||
@@ -1447,26 +1446,24 @@ qlcnic_setup_netdev(struct qlcnic_adapter *adapter, | |||
1447 | 1446 | ||
1448 | SET_ETHTOOL_OPS(netdev, &qlcnic_ethtool_ops); | 1447 | SET_ETHTOOL_OPS(netdev, &qlcnic_ethtool_ops); |
1449 | 1448 | ||
1450 | netdev->features |= (NETIF_F_SG | NETIF_F_IP_CSUM | | 1449 | netdev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | |
1451 | NETIF_F_IPV6_CSUM | NETIF_F_GRO | NETIF_F_HW_VLAN_RX); | 1450 | NETIF_F_IPV6_CSUM | NETIF_F_RXCSUM; |
1452 | netdev->vlan_features |= (NETIF_F_SG | NETIF_F_IP_CSUM | | ||
1453 | NETIF_F_IPV6_CSUM | NETIF_F_HW_VLAN_FILTER); | ||
1454 | 1451 | ||
1455 | if (adapter->capabilities & QLCNIC_FW_CAPABILITY_TSO) { | 1452 | if (adapter->capabilities & QLCNIC_FW_CAPABILITY_TSO) |
1456 | netdev->features |= (NETIF_F_TSO | NETIF_F_TSO6); | 1453 | netdev->hw_features |= NETIF_F_TSO | NETIF_F_TSO6; |
1457 | netdev->vlan_features |= (NETIF_F_TSO | NETIF_F_TSO6); | 1454 | if (pci_using_dac) |
1458 | } | 1455 | netdev->hw_features |= NETIF_F_HIGHDMA; |
1459 | 1456 | ||
1460 | if (pci_using_dac) { | 1457 | netdev->vlan_features = netdev->hw_features; |
1461 | netdev->features |= NETIF_F_HIGHDMA; | ||
1462 | netdev->vlan_features |= NETIF_F_HIGHDMA; | ||
1463 | } | ||
1464 | 1458 | ||
1465 | if (adapter->capabilities & QLCNIC_FW_CAPABILITY_FVLANTX) | 1459 | if (adapter->capabilities & QLCNIC_FW_CAPABILITY_FVLANTX) |
1466 | netdev->features |= (NETIF_F_HW_VLAN_TX); | 1460 | netdev->hw_features |= NETIF_F_HW_VLAN_TX; |
1467 | |||
1468 | if (adapter->capabilities & QLCNIC_FW_CAPABILITY_HW_LRO) | 1461 | if (adapter->capabilities & QLCNIC_FW_CAPABILITY_HW_LRO) |
1469 | netdev->features |= NETIF_F_LRO; | 1462 | netdev->hw_features |= NETIF_F_LRO; |
1463 | |||
1464 | netdev->features |= netdev->hw_features | | ||
1465 | NETIF_F_HW_VLAN_RX | NETIF_F_HW_VLAN_FILTER; | ||
1466 | |||
1470 | netdev->irq = adapter->msix_entries[0].vector; | 1467 | netdev->irq = adapter->msix_entries[0].vector; |
1471 | 1468 | ||
1472 | netif_carrier_off(netdev); | 1469 | netif_carrier_off(netdev); |