Commit 458228bc authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

wd: use net_device_ops

Another driver converted to net_device_ops; Compile tested only.
Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8884c092
...@@ -147,6 +147,20 @@ struct net_device * __init wd_probe(int unit) ...@@ -147,6 +147,20 @@ struct net_device * __init wd_probe(int unit)
} }
#endif #endif
static const struct net_device_ops wd_netdev_ops = {
.ndo_open = wd_open,
.ndo_stop = wd_close,
.ndo_start_xmit = ei_start_xmit,
.ndo_tx_timeout = ei_tx_timeout,
.ndo_get_stats = ei_get_stats,
.ndo_set_multicast_list = ei_set_multicast_list,
.ndo_validate_addr = eth_validate_addr,
.ndo_change_mtu = eth_change_mtu,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = ei_poll,
#endif
};
static int __init wd_probe1(struct net_device *dev, int ioaddr) static int __init wd_probe1(struct net_device *dev, int ioaddr)
{ {
int i; int i;
...@@ -331,11 +345,8 @@ static int __init wd_probe1(struct net_device *dev, int ioaddr) ...@@ -331,11 +345,8 @@ static int __init wd_probe1(struct net_device *dev, int ioaddr)
ei_status.block_input = &wd_block_input; ei_status.block_input = &wd_block_input;
ei_status.block_output = &wd_block_output; ei_status.block_output = &wd_block_output;
ei_status.get_8390_hdr = &wd_get_8390_hdr; ei_status.get_8390_hdr = &wd_get_8390_hdr;
dev->open = &wd_open;
dev->stop = &wd_close; dev->netdev_ops = &wd_netdev_ops;
#ifdef CONFIG_NET_POLL_CONTROLLER
dev->poll_controller = ei_poll;
#endif
NS8390_init(dev, 0); NS8390_init(dev, 0);
#if 1 #if 1
...@@ -365,8 +376,7 @@ wd_open(struct net_device *dev) ...@@ -365,8 +376,7 @@ wd_open(struct net_device *dev)
outb(ei_status.reg5, ioaddr+WD_CMDREG5); outb(ei_status.reg5, ioaddr+WD_CMDREG5);
outb(ei_status.reg0, ioaddr); /* WD_CMDREG */ outb(ei_status.reg0, ioaddr); /* WD_CMDREG */
ei_open(dev); return ei_open(dev);
return 0;
} }
static void static void
......
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