aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2009-03-26 11:11:24 -0400
committerDavid S. Miller <davem@davemloft.net>2009-03-27 03:46:44 -0400
commitf70d59492ed8bc1d74b364ebe2b97ef6705910b1 (patch)
treea8b1f1bc4bd007fc57780de8383ccdcf05fa58e9
parent79f8ae3aa27f2f17a50ad1deee1e16ff02be01bb (diff)
tokenring: convert smctr to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/tokenring/smctr.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/net/tokenring/smctr.c b/drivers/net/tokenring/smctr.c
index 9d7db2c8d661..a91d9c55d78e 100644
--- a/drivers/net/tokenring/smctr.c
+++ b/drivers/net/tokenring/smctr.c
@@ -124,7 +124,6 @@ static unsigned int smctr_get_num_rx_bdbs(struct net_device *dev);
124static int smctr_get_physical_drop_number(struct net_device *dev); 124static int smctr_get_physical_drop_number(struct net_device *dev);
125static __u8 *smctr_get_rx_pointer(struct net_device *dev, short queue); 125static __u8 *smctr_get_rx_pointer(struct net_device *dev, short queue);
126static int smctr_get_station_id(struct net_device *dev); 126static int smctr_get_station_id(struct net_device *dev);
127static struct net_device_stats *smctr_get_stats(struct net_device *dev);
128static FCBlock *smctr_get_tx_fcb(struct net_device *dev, __u16 queue, 127static FCBlock *smctr_get_tx_fcb(struct net_device *dev, __u16 queue,
129 __u16 bytes_count); 128 __u16 bytes_count);
130static int smctr_get_upstream_neighbor_addr(struct net_device *dev); 129static int smctr_get_upstream_neighbor_addr(struct net_device *dev);
@@ -3633,6 +3632,14 @@ out:
3633 return ERR_PTR(err); 3632 return ERR_PTR(err);
3634} 3633}
3635 3634
3635static const struct net_device_ops smctr_netdev_ops = {
3636 .ndo_open = smctr_open,
3637 .ndo_stop = smctr_close,
3638 .ndo_start_xmit = smctr_send_packet,
3639 .ndo_tx_timeout = smctr_timeout,
3640 .ndo_get_stats = smctr_get_stats,
3641 .ndo_set_multicast_list = smctr_set_multicast_list,
3642};
3636 3643
3637static int __init smctr_probe1(struct net_device *dev, int ioaddr) 3644static int __init smctr_probe1(struct net_device *dev, int ioaddr)
3638{ 3645{
@@ -3683,13 +3690,8 @@ static int __init smctr_probe1(struct net_device *dev, int ioaddr)
3683 (unsigned int)dev->base_addr, 3690 (unsigned int)dev->base_addr,
3684 dev->irq, tp->rom_base, tp->ram_base); 3691 dev->irq, tp->rom_base, tp->ram_base);
3685 3692
3686 dev->open = smctr_open; 3693 dev->netdev_ops = &smctr_netdev_ops;
3687 dev->stop = smctr_close;
3688 dev->hard_start_xmit = smctr_send_packet;
3689 dev->tx_timeout = smctr_timeout;
3690 dev->watchdog_timeo = HZ; 3694 dev->watchdog_timeo = HZ;
3691 dev->get_stats = smctr_get_stats;
3692 dev->set_multicast_list = &smctr_set_multicast_list;
3693 return (0); 3695 return (0);
3694 3696
3695out: 3697out: