diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2009-01-09 08:01:27 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-21 17:02:31 -0500 |
commit | bc0443fc38f802c5b7a7489b4a31577f1fadd4e4 (patch) | |
tree | 9893e4f84c2bc3addc13a08fb53cc3c94ecf9fe2 /drivers | |
parent | 69d651692f16c5e883f6af3d0eb36bdac5438f9c (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')
-rw-r--r-- | drivers/net/znet.c | 17 |
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 | ||
361 | static 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) |