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

3c523: 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 f3701c2f
...@@ -403,6 +403,20 @@ static int elmc_getinfo(char *buf, int slot, void *d) ...@@ -403,6 +403,20 @@ static int elmc_getinfo(char *buf, int slot, void *d)
return len; return len;
} /* elmc_getinfo() */ } /* elmc_getinfo() */
static const struct net_device_ops netdev_ops = {
.ndo_open = elmc_open,
.ndo_stop = elmc_close,
.ndo_get_stats = elmc_get_stats,
.ndo_start_xmit = elmc_send_packet,
.ndo_tx_timeout = elmc_timeout,
#ifdef ELMC_MULTICAST
.ndo_set_multicast_list = set_multicast_list,
#endif
.ndo_change_mtu = eth_change_mtu,
.ndo_set_mac_address = eth_mac_addr,
.ndo_validate_addr = eth_validate_addr,
};
/*****************************************************************/ /*****************************************************************/
static int __init do_elmc_probe(struct net_device *dev) static int __init do_elmc_probe(struct net_device *dev)
...@@ -544,17 +558,8 @@ static int __init do_elmc_probe(struct net_device *dev) ...@@ -544,17 +558,8 @@ static int __init do_elmc_probe(struct net_device *dev)
printk(KERN_INFO "%s: hardware address %pM\n", printk(KERN_INFO "%s: hardware address %pM\n",
dev->name, dev->dev_addr); dev->name, dev->dev_addr);
dev->open = &elmc_open; dev->netdev_ops = &netdev_ops;
dev->stop = &elmc_close;
dev->get_stats = &elmc_get_stats;
dev->hard_start_xmit = &elmc_send_packet;
dev->tx_timeout = &elmc_timeout;
dev->watchdog_timeo = HZ; dev->watchdog_timeo = HZ;
#ifdef ELMC_MULTICAST
dev->set_multicast_list = &set_multicast_list;
#else
dev->set_multicast_list = NULL;
#endif
dev->ethtool_ops = &netdev_ethtool_ops; dev->ethtool_ops = &netdev_ethtool_ops;
/* note that we haven't actually requested the IRQ from the kernel. /* note that we haven't actually requested the IRQ from the kernel.
......
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