diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2008-11-20 01:21:53 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-20 01:42:54 -0500 |
commit | acc784263b0c46f3052fb4f155fdfe39b7001c98 (patch) | |
tree | 294d08f910a8449e79b8177ed28de6c59efe59a1 /drivers | |
parent | 2e5c69228ef52b8fe6b3d38caf45f03b22fda7bd (diff) |
e100: convert to net_device_ops
Convert to new network device ops interface. Compile tested only.
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/e100.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/drivers/net/e100.c b/drivers/net/e100.c index c9c707980865..5894716de19f 100644 --- a/drivers/net/e100.c +++ b/drivers/net/e100.c | |||
@@ -2612,6 +2612,20 @@ static int e100_close(struct net_device *netdev) | |||
2612 | return 0; | 2612 | return 0; |
2613 | } | 2613 | } |
2614 | 2614 | ||
2615 | static const struct net_device_ops e100_netdev_ops = { | ||
2616 | .ndo_open = e100_open, | ||
2617 | .ndo_stop = e100_close, | ||
2618 | .ndo_validate_addr = eth_validate_addr, | ||
2619 | .ndo_set_multicast_list = e100_set_multicast_list, | ||
2620 | .ndo_set_mac_address = e100_set_mac_address, | ||
2621 | .ndo_change_mtu = e100_change_mtu, | ||
2622 | .ndo_do_ioctl = e100_do_ioctl, | ||
2623 | .ndo_tx_timeout = e100_tx_timeout, | ||
2624 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
2625 | .ndo_poll_controller = e100_netpoll, | ||
2626 | #endif | ||
2627 | }; | ||
2628 | |||
2615 | static int __devinit e100_probe(struct pci_dev *pdev, | 2629 | static int __devinit e100_probe(struct pci_dev *pdev, |
2616 | const struct pci_device_id *ent) | 2630 | const struct pci_device_id *ent) |
2617 | { | 2631 | { |
@@ -2625,19 +2639,10 @@ static int __devinit e100_probe(struct pci_dev *pdev, | |||
2625 | return -ENOMEM; | 2639 | return -ENOMEM; |
2626 | } | 2640 | } |
2627 | 2641 | ||
2628 | netdev->open = e100_open; | 2642 | netdev->netdev_ops = &e100_netdev_ops; |
2629 | netdev->stop = e100_close; | ||
2630 | netdev->hard_start_xmit = e100_xmit_frame; | 2643 | netdev->hard_start_xmit = e100_xmit_frame; |
2631 | netdev->set_multicast_list = e100_set_multicast_list; | ||
2632 | netdev->set_mac_address = e100_set_mac_address; | ||
2633 | netdev->change_mtu = e100_change_mtu; | ||
2634 | netdev->do_ioctl = e100_do_ioctl; | ||
2635 | SET_ETHTOOL_OPS(netdev, &e100_ethtool_ops); | 2644 | SET_ETHTOOL_OPS(netdev, &e100_ethtool_ops); |
2636 | netdev->tx_timeout = e100_tx_timeout; | ||
2637 | netdev->watchdog_timeo = E100_WATCHDOG_PERIOD; | 2645 | netdev->watchdog_timeo = E100_WATCHDOG_PERIOD; |
2638 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
2639 | netdev->poll_controller = e100_netpoll; | ||
2640 | #endif | ||
2641 | strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1); | 2646 | strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1); |
2642 | 2647 | ||
2643 | nic = netdev_priv(netdev); | 2648 | nic = netdev_priv(netdev); |
@@ -2845,7 +2850,7 @@ static pci_ers_result_t e100_io_error_detected(struct pci_dev *pdev, pci_channel | |||
2845 | struct nic *nic = netdev_priv(netdev); | 2850 | struct nic *nic = netdev_priv(netdev); |
2846 | 2851 | ||
2847 | /* Similar to calling e100_down(), but avoids adapter I/O. */ | 2852 | /* Similar to calling e100_down(), but avoids adapter I/O. */ |
2848 | netdev->stop(netdev); | 2853 | e100_close(netdev); |
2849 | 2854 | ||
2850 | /* Detach; put netif into a state similar to hotplug unplug. */ | 2855 | /* Detach; put netif into a state similar to hotplug unplug. */ |
2851 | napi_enable(&nic->napi); | 2856 | napi_enable(&nic->napi); |