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

declance: 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 149da651
...@@ -1010,6 +1010,17 @@ static void lance_set_multicast_retry(unsigned long _opaque) ...@@ -1010,6 +1010,17 @@ static void lance_set_multicast_retry(unsigned long _opaque)
lance_set_multicast(dev); lance_set_multicast(dev);
} }
static const struct net_device_ops lance_netdev_ops = {
.ndo_open = lance_open,
.ndo_stop = lance_close,
.ndo_start_xmit = lance_start_xmit,
.ndo_tx_timeout = lance_tx_timeout,
.ndo_set_multicast_list = lance_set_multicast,
.ndo_change_mtu = eth_change_mtu,
.ndo_validate_addr = eth_validate_addr,
.ndo_set_mac_address = eth_mac_addr,
};
static int __init dec_lance_probe(struct device *bdev, const int type) static int __init dec_lance_probe(struct device *bdev, const int type)
{ {
static unsigned version_printed; static unsigned version_printed;
...@@ -1223,12 +1234,8 @@ static int __init dec_lance_probe(struct device *bdev, const int type) ...@@ -1223,12 +1234,8 @@ static int __init dec_lance_probe(struct device *bdev, const int type)
printk(", addr = %pM, irq = %d\n", dev->dev_addr, dev->irq); printk(", addr = %pM, irq = %d\n", dev->dev_addr, dev->irq);
dev->open = &lance_open; dev->netdev_ops = &lance_netdev_ops;
dev->stop = &lance_close;
dev->hard_start_xmit = &lance_start_xmit;
dev->tx_timeout = &lance_tx_timeout;
dev->watchdog_timeo = 5*HZ; dev->watchdog_timeo = 5*HZ;
dev->set_multicast_list = &lance_set_multicast;
/* lp->ll is the location of the registers for lance card */ /* lp->ll is the location of the registers for lance card */
lp->ll = ll; lp->ll = ll;
......
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