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

3c515: convert to net_device_ops

Signed-off-by: default avatarStephen Hemminger <shemminger@vyatta.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3186ae8f
...@@ -563,6 +563,20 @@ no_pnp: ...@@ -563,6 +563,20 @@ no_pnp:
return NULL; return NULL;
} }
static const struct net_device_ops netdev_ops = {
.ndo_open = corkscrew_open,
.ndo_stop = corkscrew_close,
.ndo_start_xmit = corkscrew_start_xmit,
.ndo_tx_timeout = corkscrew_timeout,
.ndo_get_stats = corkscrew_get_stats,
.ndo_set_multicast_list = set_rx_mode,
.ndo_change_mtu = eth_change_mtu,
.ndo_set_mac_address = eth_mac_addr,
.ndo_validate_addr = eth_validate_addr,
};
static int corkscrew_setup(struct net_device *dev, int ioaddr, static int corkscrew_setup(struct net_device *dev, int ioaddr,
struct pnp_dev *idev, int card_number) struct pnp_dev *idev, int card_number)
{ {
...@@ -681,13 +695,8 @@ static int corkscrew_setup(struct net_device *dev, int ioaddr, ...@@ -681,13 +695,8 @@ static int corkscrew_setup(struct net_device *dev, int ioaddr,
vp->full_bus_master_rx = (vp->capabilities & 0x20) ? 1 : 0; vp->full_bus_master_rx = (vp->capabilities & 0x20) ? 1 : 0;
/* The 3c51x-specific entries in the device structure. */ /* The 3c51x-specific entries in the device structure. */
dev->open = &corkscrew_open; dev->netdev_ops = &netdev_ops;
dev->hard_start_xmit = &corkscrew_start_xmit;
dev->tx_timeout = &corkscrew_timeout;
dev->watchdog_timeo = (400 * HZ) / 1000; dev->watchdog_timeo = (400 * HZ) / 1000;
dev->stop = &corkscrew_close;
dev->get_stats = &corkscrew_get_stats;
dev->set_multicast_list = &set_rx_mode;
dev->ethtool_ops = &netdev_ethtool_ops; dev->ethtool_ops = &netdev_ethtool_ops;
return register_netdev(dev); return register_netdev(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