Commit d53bc2df authored by Alexander Beregalov's avatar Alexander Beregalov Committed by David S. Miller

meth: convert to net_device_ops

Signed-off-by: default avatarAlexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0d3936a8
...@@ -769,9 +769,17 @@ static int meth_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) ...@@ -769,9 +769,17 @@ static int meth_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
} }
} }
/* static const struct net_device_ops meth_netdev_ops = {
* Return statistics to the caller .ndo_open = meth_open,
*/ .ndo_stop = meth_release,
.ndo_start_xmit = meth_tx,
.ndo_do_ioctl = meth_ioctl,
.ndo_tx_timeout = meth_tx_timeout,
.ndo_change_mtu = eth_change_mtu,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_mac_address = eth_mac_addr,
};
/* /*
* The init function. * The init function.
*/ */
...@@ -785,16 +793,10 @@ static int __init meth_probe(struct platform_device *pdev) ...@@ -785,16 +793,10 @@ static int __init meth_probe(struct platform_device *pdev)
if (!dev) if (!dev)
return -ENOMEM; return -ENOMEM;
dev->open = meth_open; dev->netdev_ops = &meth_netdev_ops;
dev->stop = meth_release; dev->watchdog_timeo = timeout;
dev->hard_start_xmit = meth_tx; dev->irq = MACE_ETHERNET_IRQ;
dev->do_ioctl = meth_ioctl; dev->base_addr = (unsigned long)&mace->eth;
#ifdef HAVE_TX_TIMEOUT
dev->tx_timeout = meth_tx_timeout;
dev->watchdog_timeo = timeout;
#endif
dev->irq = MACE_ETHERNET_IRQ;
dev->base_addr = (unsigned long)&mace->eth;
memcpy(dev->dev_addr, o2meth_eaddr, 6); memcpy(dev->dev_addr, o2meth_eaddr, 6);
priv = netdev_priv(dev); priv = netdev_priv(dev);
......
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