diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2009-01-07 21:13:49 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-07 21:13:49 -0500 |
commit | d9d6f46b42294754f8d4ed743124ae8bb8e01fba (patch) | |
tree | 899870a0592eed154a07f13b935ce467ba97f55e /drivers/net/hp100.c | |
parent | 403413e50d6fc88dada28bf41262a3d0e3627827 (diff) |
hp100: update 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/hp100.c')
-rw-r--r-- | drivers/net/hp100.c | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/drivers/net/hp100.c b/drivers/net/hp100.c index ebe7651fcb86..ad8be7e78290 100644 --- a/drivers/net/hp100.c +++ b/drivers/net/hp100.c | |||
@@ -425,6 +425,28 @@ struct net_device * __init hp100_probe(int unit) | |||
425 | } | 425 | } |
426 | #endif /* !MODULE && CONFIG_ISA */ | 426 | #endif /* !MODULE && CONFIG_ISA */ |
427 | 427 | ||
428 | static const struct net_device_ops hp100_bm_netdev_ops = { | ||
429 | .ndo_open = hp100_open, | ||
430 | .ndo_stop = hp100_close, | ||
431 | .ndo_start_xmit = hp100_start_xmit_bm, | ||
432 | .ndo_get_stats = hp100_get_stats, | ||
433 | .ndo_set_multicast_list = hp100_set_multicast_list, | ||
434 | .ndo_change_mtu = eth_change_mtu, | ||
435 | .ndo_set_mac_address = eth_mac_addr, | ||
436 | .ndo_validate_addr = eth_validate_addr, | ||
437 | }; | ||
438 | |||
439 | static const struct net_device_ops hp100_netdev_ops = { | ||
440 | .ndo_open = hp100_open, | ||
441 | .ndo_stop = hp100_close, | ||
442 | .ndo_start_xmit = hp100_start_xmit, | ||
443 | .ndo_get_stats = hp100_get_stats, | ||
444 | .ndo_set_multicast_list = hp100_set_multicast_list, | ||
445 | .ndo_change_mtu = eth_change_mtu, | ||
446 | .ndo_set_mac_address = eth_mac_addr, | ||
447 | .ndo_validate_addr = eth_validate_addr, | ||
448 | }; | ||
449 | |||
428 | static int __devinit hp100_probe1(struct net_device *dev, int ioaddr, | 450 | static int __devinit hp100_probe1(struct net_device *dev, int ioaddr, |
429 | u_char bus, struct pci_dev *pci_dev) | 451 | u_char bus, struct pci_dev *pci_dev) |
430 | { | 452 | { |
@@ -657,16 +679,10 @@ static int __devinit hp100_probe1(struct net_device *dev, int ioaddr, | |||
657 | lp->virt_memory_size = virt_memory_size; | 679 | lp->virt_memory_size = virt_memory_size; |
658 | lp->rx_ratio = hp100_rx_ratio; /* can be conf'd with insmod */ | 680 | lp->rx_ratio = hp100_rx_ratio; /* can be conf'd with insmod */ |
659 | 681 | ||
660 | dev->open = hp100_open; | ||
661 | dev->stop = hp100_close; | ||
662 | |||
663 | if (lp->mode == 1) /* busmaster */ | 682 | if (lp->mode == 1) /* busmaster */ |
664 | dev->hard_start_xmit = hp100_start_xmit_bm; | 683 | dev->netdev_ops = &hp100_bm_netdev_ops; |
665 | else | 684 | else |
666 | dev->hard_start_xmit = hp100_start_xmit; | 685 | dev->netdev_ops = &hp100_netdev_ops; |
667 | |||
668 | dev->get_stats = hp100_get_stats; | ||
669 | dev->set_multicast_list = &hp100_set_multicast_list; | ||
670 | 686 | ||
671 | /* Ask the card for which IRQ line it is configured */ | 687 | /* Ask the card for which IRQ line it is configured */ |
672 | if (bus == HP100_BUS_PCI) { | 688 | if (bus == HP100_BUS_PCI) { |