aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMichał Mirosław <mirq-linux@rere.qmqm.pl>2011-04-16 20:15:47 -0400
committerDavid S. Miller <davem@davemloft.net>2011-04-17 20:47:36 -0400
commit5e4011e2b8032cd132d9482f016558f1b27569cd (patch)
tree68c587043a8122c42ea7d8c10e42c530be31f9c4 /drivers
parent131ae329702755d897c6072c7839086b0702fb10 (diff)
net: ibm_newemac: convert to hw_features
Side effect: allow toggling of TX offloads. Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ibm_newemac/core.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c
index 3bb990b6651a..079450fe5e96 100644
--- a/drivers/net/ibm_newemac/core.c
+++ b/drivers/net/ibm_newemac/core.c
@@ -2053,13 +2053,6 @@ static void emac_ethtool_get_pauseparam(struct net_device *ndev,
2053 mutex_unlock(&dev->link_lock); 2053 mutex_unlock(&dev->link_lock);
2054} 2054}
2055 2055
2056static u32 emac_ethtool_get_rx_csum(struct net_device *ndev)
2057{
2058 struct emac_instance *dev = netdev_priv(ndev);
2059
2060 return dev->tah_dev != NULL;
2061}
2062
2063static int emac_get_regs_len(struct emac_instance *dev) 2056static int emac_get_regs_len(struct emac_instance *dev)
2064{ 2057{
2065 if (emac_has_feature(dev, EMAC_FTR_EMAC4)) 2058 if (emac_has_feature(dev, EMAC_FTR_EMAC4))
@@ -2203,15 +2196,11 @@ static const struct ethtool_ops emac_ethtool_ops = {
2203 .get_ringparam = emac_ethtool_get_ringparam, 2196 .get_ringparam = emac_ethtool_get_ringparam,
2204 .get_pauseparam = emac_ethtool_get_pauseparam, 2197 .get_pauseparam = emac_ethtool_get_pauseparam,
2205 2198
2206 .get_rx_csum = emac_ethtool_get_rx_csum,
2207
2208 .get_strings = emac_ethtool_get_strings, 2199 .get_strings = emac_ethtool_get_strings,
2209 .get_sset_count = emac_ethtool_get_sset_count, 2200 .get_sset_count = emac_ethtool_get_sset_count,
2210 .get_ethtool_stats = emac_ethtool_get_ethtool_stats, 2201 .get_ethtool_stats = emac_ethtool_get_ethtool_stats,
2211 2202
2212 .get_link = ethtool_op_get_link, 2203 .get_link = ethtool_op_get_link,
2213 .get_tx_csum = ethtool_op_get_tx_csum,
2214 .get_sg = ethtool_op_get_sg,
2215}; 2204};
2216 2205
2217static int emac_ioctl(struct net_device *ndev, struct ifreq *rq, int cmd) 2206static int emac_ioctl(struct net_device *ndev, struct ifreq *rq, int cmd)
@@ -2859,8 +2848,10 @@ static int __devinit emac_probe(struct platform_device *ofdev)
2859 if (err != 0) 2848 if (err != 0)
2860 goto err_detach_tah; 2849 goto err_detach_tah;
2861 2850
2862 if (dev->tah_dev) 2851 if (dev->tah_dev) {
2863 ndev->features |= NETIF_F_IP_CSUM | NETIF_F_SG; 2852 ndev->hw_features = NETIF_F_IP_CSUM | NETIF_F_SG;
2853 ndev->features |= ndev->hw_features | NETIF_F_RXCSUM;
2854 }
2864 ndev->watchdog_timeo = 5 * HZ; 2855 ndev->watchdog_timeo = 5 * HZ;
2865 if (emac_phy_supports_gige(dev->phy_mode)) { 2856 if (emac_phy_supports_gige(dev->phy_mode)) {
2866 ndev->netdev_ops = &emac_gige_netdev_ops; 2857 ndev->netdev_ops = &emac_gige_netdev_ops;