diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2009-03-26 11:11:38 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-27 03:46:52 -0400 |
commit | 968804d9705a014f231eedf82ba9e33810898b68 (patch) | |
tree | 2c535b9fe7b01c39dcd2cec6b9e4bb5899106f08 /drivers/net/ewrk3.c | |
parent | 361bc03e180c4e27e8f21bc7ea3a8066886f78d5 (diff) |
netdev: convert ewrk3 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/ewrk3.c')
-rw-r--r-- | drivers/net/ewrk3.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/net/ewrk3.c b/drivers/net/ewrk3.c index b852303c9362..1a685a04d4b2 100644 --- a/drivers/net/ewrk3.c +++ b/drivers/net/ewrk3.c | |||
@@ -388,6 +388,18 @@ static int __init ewrk3_probe1(struct net_device *dev, u_long iobase, int irq) | |||
388 | return err; | 388 | return err; |
389 | } | 389 | } |
390 | 390 | ||
391 | static const struct net_device_ops ewrk3_netdev_ops = { | ||
392 | .ndo_open = ewrk3_open, | ||
393 | .ndo_start_xmit = ewrk3_queue_pkt, | ||
394 | .ndo_stop = ewrk3_close, | ||
395 | .ndo_set_multicast_list = set_multicast_list, | ||
396 | .ndo_do_ioctl = ewrk3_ioctl, | ||
397 | .ndo_tx_timeout = ewrk3_timeout, | ||
398 | .ndo_change_mtu = eth_change_mtu, | ||
399 | .ndo_set_mac_address = eth_mac_addr, | ||
400 | .ndo_validate_addr = eth_validate_addr, | ||
401 | }; | ||
402 | |||
391 | static int __init | 403 | static int __init |
392 | ewrk3_hw_init(struct net_device *dev, u_long iobase) | 404 | ewrk3_hw_init(struct net_device *dev, u_long iobase) |
393 | { | 405 | { |
@@ -603,16 +615,11 @@ ewrk3_hw_init(struct net_device *dev, u_long iobase) | |||
603 | printk(version); | 615 | printk(version); |
604 | } | 616 | } |
605 | /* The EWRK3-specific entries in the device structure. */ | 617 | /* The EWRK3-specific entries in the device structure. */ |
606 | dev->open = ewrk3_open; | 618 | dev->netdev_ops = &ewrk3_netdev_ops; |
607 | dev->hard_start_xmit = ewrk3_queue_pkt; | ||
608 | dev->stop = ewrk3_close; | ||
609 | dev->set_multicast_list = set_multicast_list; | ||
610 | dev->do_ioctl = ewrk3_ioctl; | ||
611 | if (lp->adapter_name[4] == '3') | 619 | if (lp->adapter_name[4] == '3') |
612 | SET_ETHTOOL_OPS(dev, ðtool_ops_203); | 620 | SET_ETHTOOL_OPS(dev, ðtool_ops_203); |
613 | else | 621 | else |
614 | SET_ETHTOOL_OPS(dev, ðtool_ops); | 622 | SET_ETHTOOL_OPS(dev, ðtool_ops); |
615 | dev->tx_timeout = ewrk3_timeout; | ||
616 | dev->watchdog_timeo = QUEUE_PKT_TIMEOUT; | 623 | dev->watchdog_timeo = QUEUE_PKT_TIMEOUT; |
617 | 624 | ||
618 | dev->mem_start = 0; | 625 | dev->mem_start = 0; |