Commit 5e4011e2 authored by Michał Mirosław's avatar Michał Mirosław Committed by David S. Miller

net: ibm_newemac: convert to hw_features

Side effect: allow toggling of TX offloads.
Signed-off-by: default avatarMichał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 131ae329
...@@ -2053,13 +2053,6 @@ static void emac_ethtool_get_pauseparam(struct net_device *ndev, ...@@ -2053,13 +2053,6 @@ static void emac_ethtool_get_pauseparam(struct net_device *ndev,
mutex_unlock(&dev->link_lock); mutex_unlock(&dev->link_lock);
} }
static u32 emac_ethtool_get_rx_csum(struct net_device *ndev)
{
struct emac_instance *dev = netdev_priv(ndev);
return dev->tah_dev != NULL;
}
static int emac_get_regs_len(struct emac_instance *dev) static int emac_get_regs_len(struct emac_instance *dev)
{ {
if (emac_has_feature(dev, EMAC_FTR_EMAC4)) if (emac_has_feature(dev, EMAC_FTR_EMAC4))
...@@ -2203,15 +2196,11 @@ static const struct ethtool_ops emac_ethtool_ops = { ...@@ -2203,15 +2196,11 @@ static const struct ethtool_ops emac_ethtool_ops = {
.get_ringparam = emac_ethtool_get_ringparam, .get_ringparam = emac_ethtool_get_ringparam,
.get_pauseparam = emac_ethtool_get_pauseparam, .get_pauseparam = emac_ethtool_get_pauseparam,
.get_rx_csum = emac_ethtool_get_rx_csum,
.get_strings = emac_ethtool_get_strings, .get_strings = emac_ethtool_get_strings,
.get_sset_count = emac_ethtool_get_sset_count, .get_sset_count = emac_ethtool_get_sset_count,
.get_ethtool_stats = emac_ethtool_get_ethtool_stats, .get_ethtool_stats = emac_ethtool_get_ethtool_stats,
.get_link = ethtool_op_get_link, .get_link = ethtool_op_get_link,
.get_tx_csum = ethtool_op_get_tx_csum,
.get_sg = ethtool_op_get_sg,
}; };
static int emac_ioctl(struct net_device *ndev, struct ifreq *rq, int cmd) static 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,8 +2848,10 @@ static int __devinit emac_probe(struct platform_device *ofdev)
if (err != 0) if (err != 0)
goto err_detach_tah; goto err_detach_tah;
if (dev->tah_dev) if (dev->tah_dev) {
ndev->features |= NETIF_F_IP_CSUM | NETIF_F_SG; ndev->hw_features = NETIF_F_IP_CSUM | NETIF_F_SG;
ndev->features |= ndev->hw_features | NETIF_F_RXCSUM;
}
ndev->watchdog_timeo = 5 * HZ; ndev->watchdog_timeo = 5 * HZ;
if (emac_phy_supports_gige(dev->phy_mode)) { if (emac_phy_supports_gige(dev->phy_mode)) {
ndev->netdev_ops = &emac_gige_netdev_ops; ndev->netdev_ops = &emac_gige_netdev_ops;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment