aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/atlx
diff options
context:
space:
mode:
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>2011-04-07 03:32:18 -0400
committerDavid S. Miller <davem@davemloft.net>2011-04-07 23:19:01 -0400
commit782d640afd15af7a1faf01cfe566ca4ac511319d (patch)
treefdf50de5e124d1ee61c7dd20a6fef1c585e53b0e /drivers/net/atlx
parentdc668910f4eaa233c241d43d96ed6b0b9258cc43 (diff)
net: atl*: convert to hw_features
Things left as they were: - atl1: is RX checksum really enabled? - atl2: copy-paste from atl1, with-errors-on-modify I presume - atl1c: there's a bug: MTU can't be changed if device is not up 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/atlx')
-rw-r--r--drivers/net/atlx/atl1.c15
-rw-r--r--drivers/net/atlx/atl2.c14
2 files changed, 6 insertions, 23 deletions
diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
index e973d056dc8f..98334a1f0c5c 100644
--- a/drivers/net/atlx/atl1.c
+++ b/drivers/net/atlx/atl1.c
@@ -2986,6 +2986,11 @@ static int __devinit atl1_probe(struct pci_dev *pdev,
2986 netdev->features |= NETIF_F_SG; 2986 netdev->features |= NETIF_F_SG;
2987 netdev->features |= (NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX); 2987 netdev->features |= (NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX);
2988 2988
2989 netdev->hw_features = NETIF_F_HW_CSUM | NETIF_F_SG | NETIF_F_TSO;
2990
2991 /* is this valid? see atl1_setup_mac_ctrl() */
2992 netdev->features |= NETIF_F_RXCSUM;
2993
2989 /* 2994 /*
2990 * patch for some L1 of old version, 2995 * patch for some L1 of old version,
2991 * the final version of L1 may not need these 2996 * the final version of L1 may not need these
@@ -3595,12 +3600,6 @@ static int atl1_set_pauseparam(struct net_device *netdev,
3595 return 0; 3600 return 0;
3596} 3601}
3597 3602
3598/* FIXME: is this right? -- CHS */
3599static u32 atl1_get_rx_csum(struct net_device *netdev)
3600{
3601 return 1;
3602}
3603
3604static void atl1_get_strings(struct net_device *netdev, u32 stringset, 3603static void atl1_get_strings(struct net_device *netdev, u32 stringset,
3605 u8 *data) 3604 u8 *data)
3606{ 3605{
@@ -3668,13 +3667,9 @@ static const struct ethtool_ops atl1_ethtool_ops = {
3668 .set_ringparam = atl1_set_ringparam, 3667 .set_ringparam = atl1_set_ringparam,
3669 .get_pauseparam = atl1_get_pauseparam, 3668 .get_pauseparam = atl1_get_pauseparam,
3670 .set_pauseparam = atl1_set_pauseparam, 3669 .set_pauseparam = atl1_set_pauseparam,
3671 .get_rx_csum = atl1_get_rx_csum,
3672 .set_tx_csum = ethtool_op_set_tx_hw_csum,
3673 .get_link = ethtool_op_get_link, 3670 .get_link = ethtool_op_get_link,
3674 .set_sg = ethtool_op_set_sg,
3675 .get_strings = atl1_get_strings, 3671 .get_strings = atl1_get_strings,
3676 .nway_reset = atl1_nway_reset, 3672 .nway_reset = atl1_nway_reset,
3677 .get_ethtool_stats = atl1_get_ethtool_stats, 3673 .get_ethtool_stats = atl1_get_ethtool_stats,
3678 .get_sset_count = atl1_get_sset_count, 3674 .get_sset_count = atl1_get_sset_count,
3679 .set_tso = ethtool_op_set_tso,
3680}; 3675};
diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c
index 937ef1afa5db..02761dd23fb8 100644
--- a/drivers/net/atlx/atl2.c
+++ b/drivers/net/atlx/atl2.c
@@ -1411,9 +1411,8 @@ static int __devinit atl2_probe(struct pci_dev *pdev,
1411 1411
1412 err = -EIO; 1412 err = -EIO;
1413 1413
1414#ifdef NETIF_F_HW_VLAN_TX 1414 netdev->hw_features = NETIF_F_SG;
1415 netdev->features |= (NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX); 1415 netdev->features |= (NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX);
1416#endif
1417 1416
1418 /* Init PHY as early as possible due to power saving issue */ 1417 /* Init PHY as early as possible due to power saving issue */
1419 atl2_phy_init(&adapter->hw); 1418 atl2_phy_init(&adapter->hw);
@@ -1840,11 +1839,6 @@ static int atl2_set_settings(struct net_device *netdev,
1840 return 0; 1839 return 0;
1841} 1840}
1842 1841
1843static u32 atl2_get_tx_csum(struct net_device *netdev)
1844{
1845 return (netdev->features & NETIF_F_HW_CSUM) != 0;
1846}
1847
1848static u32 atl2_get_msglevel(struct net_device *netdev) 1842static u32 atl2_get_msglevel(struct net_device *netdev)
1849{ 1843{
1850 return 0; 1844 return 0;
@@ -2112,12 +2106,6 @@ static const struct ethtool_ops atl2_ethtool_ops = {
2112 .get_eeprom_len = atl2_get_eeprom_len, 2106 .get_eeprom_len = atl2_get_eeprom_len,
2113 .get_eeprom = atl2_get_eeprom, 2107 .get_eeprom = atl2_get_eeprom,
2114 .set_eeprom = atl2_set_eeprom, 2108 .set_eeprom = atl2_set_eeprom,
2115 .get_tx_csum = atl2_get_tx_csum,
2116 .get_sg = ethtool_op_get_sg,
2117 .set_sg = ethtool_op_set_sg,
2118#ifdef NETIF_F_TSO
2119 .get_tso = ethtool_op_get_tso,
2120#endif
2121}; 2109};
2122 2110
2123static void atl2_set_ethtool_ops(struct net_device *netdev) 2111static void atl2_set_ethtool_ops(struct net_device *netdev)