diff options
author | Michał Mirosław <mirq-linux@rere.qmqm.pl> | 2011-04-09 23:13:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-04-10 21:55:21 -0400 |
commit | f593fe363268e7354b3a7f3907170de1ac4de7e7 (patch) | |
tree | 82e50d49821753e2f60cc614ac05f762b2f5f8fa /drivers/net/via-velocity.c | |
parent | e6a46416d4233c99a041ca35c1f692ecae9f942d (diff) |
net: via-velocity: convert to hw_features
Trivial conversion.
This also enables toggling TX VLAN offload and fixes TX checksumming
race with offload changes.
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/via-velocity.c')
-rw-r--r-- | drivers/net/via-velocity.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/via-velocity.c b/drivers/net/via-velocity.c index 0d6fec6b7d93..77315ad1e7e2 100644 --- a/drivers/net/via-velocity.c +++ b/drivers/net/via-velocity.c | |||
@@ -2600,8 +2600,7 @@ static netdev_tx_t velocity_xmit(struct sk_buff *skb, | |||
2600 | /* | 2600 | /* |
2601 | * Handle hardware checksum | 2601 | * Handle hardware checksum |
2602 | */ | 2602 | */ |
2603 | if ((dev->features & NETIF_F_IP_CSUM) && | 2603 | if (skb->ip_summed == CHECKSUM_PARTIAL) { |
2604 | (skb->ip_summed == CHECKSUM_PARTIAL)) { | ||
2605 | const struct iphdr *ip = ip_hdr(skb); | 2604 | const struct iphdr *ip = ip_hdr(skb); |
2606 | if (ip->protocol == IPPROTO_TCP) | 2605 | if (ip->protocol == IPPROTO_TCP) |
2607 | td_ptr->tdesc1.TCR |= TCR0_TCPCK; | 2606 | td_ptr->tdesc1.TCR |= TCR0_TCPCK; |
@@ -2841,6 +2840,7 @@ static int __devinit velocity_found1(struct pci_dev *pdev, const struct pci_devi | |||
2841 | dev->ethtool_ops = &velocity_ethtool_ops; | 2840 | dev->ethtool_ops = &velocity_ethtool_ops; |
2842 | netif_napi_add(dev, &vptr->napi, velocity_poll, VELOCITY_NAPI_WEIGHT); | 2841 | netif_napi_add(dev, &vptr->napi, velocity_poll, VELOCITY_NAPI_WEIGHT); |
2843 | 2842 | ||
2843 | dev->hw_features = NETIF_F_IP_CSUM | NETIF_F_SG | NETIF_F_HW_VLAN_TX; | ||
2844 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_FILTER | | 2844 | dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_FILTER | |
2845 | NETIF_F_HW_VLAN_RX | NETIF_F_IP_CSUM; | 2845 | NETIF_F_HW_VLAN_RX | NETIF_F_IP_CSUM; |
2846 | 2846 | ||
@@ -3457,13 +3457,10 @@ static const struct ethtool_ops velocity_ethtool_ops = { | |||
3457 | .get_settings = velocity_get_settings, | 3457 | .get_settings = velocity_get_settings, |
3458 | .set_settings = velocity_set_settings, | 3458 | .set_settings = velocity_set_settings, |
3459 | .get_drvinfo = velocity_get_drvinfo, | 3459 | .get_drvinfo = velocity_get_drvinfo, |
3460 | .set_tx_csum = ethtool_op_set_tx_csum, | ||
3461 | .get_tx_csum = ethtool_op_get_tx_csum, | ||
3462 | .get_wol = velocity_ethtool_get_wol, | 3460 | .get_wol = velocity_ethtool_get_wol, |
3463 | .set_wol = velocity_ethtool_set_wol, | 3461 | .set_wol = velocity_ethtool_set_wol, |
3464 | .get_msglevel = velocity_get_msglevel, | 3462 | .get_msglevel = velocity_get_msglevel, |
3465 | .set_msglevel = velocity_set_msglevel, | 3463 | .set_msglevel = velocity_set_msglevel, |
3466 | .set_sg = ethtool_op_set_sg, | ||
3467 | .get_link = velocity_get_link, | 3464 | .get_link = velocity_get_link, |
3468 | .get_coalesce = velocity_get_coalesce, | 3465 | .get_coalesce = velocity_get_coalesce, |
3469 | .set_coalesce = velocity_set_coalesce, | 3466 | .set_coalesce = velocity_set_coalesce, |