aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/znet.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@linux-foundation.org>2009-01-09 08:01:27 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-21 17:02:31 -0500
commitbc0443fc38f802c5b7a7489b4a31577f1fadd4e4 (patch)
tree9893e4f84c2bc3addc13a08fb53cc3c94ecf9fe2 /drivers/net/znet.c
parent69d651692f16c5e883f6af3d0eb36bdac5438f9c (diff)
znet: convert 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/znet.c')
-rw-r--r--drivers/net/znet.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/net/znet.c b/drivers/net/znet.c
index f0b15c9347d0..0a6992d8611b 100644
--- a/drivers/net/znet.c
+++ b/drivers/net/znet.c
@@ -358,6 +358,17 @@ static void znet_set_multicast_list (struct net_device *dev)
358 * multicast address configured isn't equal to IFF_ALLMULTI */ 358 * multicast address configured isn't equal to IFF_ALLMULTI */
359} 359}
360 360
361static const struct net_device_ops znet_netdev_ops = {
362 .ndo_open = znet_open,
363 .ndo_stop = znet_close,
364 .ndo_start_xmit = znet_send_packet,
365 .ndo_set_multicast_list = znet_set_multicast_list,
366 .ndo_tx_timeout = znet_tx_timeout,
367 .ndo_change_mtu = eth_change_mtu,
368 .ndo_set_mac_address = eth_mac_addr,
369 .ndo_validate_addr = eth_validate_addr,
370};
371
361/* The Z-Note probe is pretty easy. The NETIDBLK exists in the safe-to-probe 372/* The Z-Note probe is pretty easy. The NETIDBLK exists in the safe-to-probe
362 BIOS area. We just scan for the signature, and pull the vital parameters 373 BIOS area. We just scan for the signature, and pull the vital parameters
363 out of the structure. */ 374 out of the structure. */
@@ -440,11 +451,7 @@ static int __init znet_probe (void)
440 znet->tx_end = znet->tx_start + znet->tx_buf_len; 451 znet->tx_end = znet->tx_start + znet->tx_buf_len;
441 452
442 /* The ZNET-specific entries in the device structure. */ 453 /* The ZNET-specific entries in the device structure. */
443 dev->open = &znet_open; 454 dev->netdev_ops = &znet_netdev_ops;
444 dev->hard_start_xmit = &znet_send_packet;
445 dev->stop = &znet_close;
446 dev->set_multicast_list = &znet_set_multicast_list;
447 dev->tx_timeout = znet_tx_timeout;
448 dev->watchdog_timeo = TX_TIMEOUT; 455 dev->watchdog_timeo = TX_TIMEOUT;
449 err = register_netdev(dev); 456 err = register_netdev(dev);
450 if (err) 457 if (err)