aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlexander Beregalov <a.beregalov@gmail.com>2009-03-29 02:37:27 -0400
committerDavid S. Miller <davem@davemloft.net>2009-03-29 02:37:27 -0400
commit79f1bc06dbb05f222756d6df4a9ff95588c9cc06 (patch)
treea01af58082110c63c056ca265448cf6ecefa859b /drivers
parent0870352bc6e0dee485c86a0c99dd60e7089c8917 (diff)
ni5010: convert to net_device_ops
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ni5010.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/net/ni5010.c b/drivers/net/ni5010.c
index 539e18ab485c..2a8da476ab3d 100644
--- a/drivers/net/ni5010.c
+++ b/drivers/net/ni5010.c
@@ -189,6 +189,17 @@ static void __init trigger_irq(int ioaddr)
189 outb(MM_EN_XMT|MM_MUX, IE_MMODE); /* Start transmission */ 189 outb(MM_EN_XMT|MM_MUX, IE_MMODE); /* Start transmission */
190} 190}
191 191
192static const struct net_device_ops ni5010_netdev_ops = {
193 .ndo_open = ni5010_open,
194 .ndo_stop = ni5010_close,
195 .ndo_start_xmit = ni5010_send_packet,
196 .ndo_set_multicast_list = ni5010_set_multicast_list,
197 .ndo_tx_timeout = ni5010_timeout,
198 .ndo_validate_addr = eth_validate_addr,
199 .ndo_set_mac_address = eth_mac_addr,
200 .ndo_change_mtu = eth_change_mtu,
201};
202
192/* 203/*
193 * This is the real probe routine. Linux has a history of friendly device 204 * This is the real probe routine. Linux has a history of friendly device
194 * probes on the ISA bus. A good device probes avoids doing writes, and 205 * probes on the ISA bus. A good device probes avoids doing writes, and
@@ -328,13 +339,8 @@ static int __init ni5010_probe1(struct net_device *dev, int ioaddr)
328 outb(0, IE_RBUF); /* set buffer byte 0 to 0 again */ 339 outb(0, IE_RBUF); /* set buffer byte 0 to 0 again */
329 } 340 }
330 printk("-> bufsize rcv/xmt=%d/%d\n", bufsize_rcv, NI5010_BUFSIZE); 341 printk("-> bufsize rcv/xmt=%d/%d\n", bufsize_rcv, NI5010_BUFSIZE);
331 memset(netdev_priv(dev), 0, sizeof(struct ni5010_local));
332 342
333 dev->open = ni5010_open; 343 dev->netdev_ops = &ni5010_netdev_ops;
334 dev->stop = ni5010_close;
335 dev->hard_start_xmit = ni5010_send_packet;
336 dev->set_multicast_list = ni5010_set_multicast_list;
337 dev->tx_timeout = ni5010_timeout;
338 dev->watchdog_timeo = HZ/20; 344 dev->watchdog_timeo = HZ/20;
339 345
340 dev->flags &= ~IFF_MULTICAST; /* Multicast doesn't work */ 346 dev->flags &= ~IFF_MULTICAST; /* Multicast doesn't work */