summaryrefslogtreecommitdiff
path: root/drivers/net/ni52.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2009-03-26 15:11:39 +0000
committerDavid S. Miller <davem@davemloft.net>2009-03-27 00:46:53 -0700
commit2c7669e3a9f748dd35743f06cbdaf4340263c3bf (patch)
treed09763c8aee84081f5841885264e6c92896243ad /drivers/net/ni52.c
parent968804d9705a014f231eedf82ba9e33810898b68 (diff)
netdev: convert ni52 to net_device_ops
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ni52.c')
-rw-r--r--drivers/net/ni52.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/net/ni52.c b/drivers/net/ni52.c
index a8bcc00c330..77d44a06170 100644
--- a/drivers/net/ni52.c
+++ b/drivers/net/ni52.c
@@ -441,6 +441,18 @@ out:
return ERR_PTR(err);
}
+static const struct net_device_ops ni52_netdev_ops = {
+ .ndo_open = ni52_open,
+ .ndo_stop = ni52_close,
+ .ndo_get_stats = ni52_get_stats,
+ .ndo_tx_timeout = ni52_timeout,
+ .ndo_start_xmit = ni52_send_packet,
+ .ndo_set_multicast_list = set_multicast_list,
+ .ndo_change_mtu = eth_change_mtu,
+ .ndo_set_mac_address = eth_mac_addr,
+ .ndo_validate_addr = eth_validate_addr,
+};
+
static int __init ni52_probe1(struct net_device *dev, int ioaddr)
{
int i, size, retval;
@@ -561,15 +573,8 @@ static int __init ni52_probe1(struct net_device *dev, int ioaddr)
printk("IRQ %d (assigned and not checked!).\n", dev->irq);
}
- dev->open = ni52_open;
- dev->stop = ni52_close;
- dev->get_stats = ni52_get_stats;
- dev->tx_timeout = ni52_timeout;
+ dev->netdev_ops = &ni52_netdev_ops;
dev->watchdog_timeo = HZ/20;
- dev->hard_start_xmit = ni52_send_packet;
- dev->set_multicast_list = set_multicast_list;
-
- dev->if_port = 0;
return 0;
out: