diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2008-11-20 01:18:22 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-20 01:42:50 -0500 |
commit | 0e7614bc3df034e2f92e0d424cc6f81dcdb7af65 (patch) | |
tree | 9fda1192b7bc30e8c36e6cfc23ae7cb5999da270 | |
parent | 80ff32b76f7969bf62206840c4e1d04674e41df9 (diff) |
e1000: convert to net_device_ops
Convert to new network device ops interface.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index dd8343244378..debbba390d40 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -888,6 +888,25 @@ static int e1000_is_need_ioport(struct pci_dev *pdev) | |||
888 | } | 888 | } |
889 | } | 889 | } |
890 | 890 | ||
891 | static const struct net_device_ops e1000_netdev_ops = { | ||
892 | .ndo_open = e1000_open, | ||
893 | .ndo_stop = e1000_close, | ||
894 | .ndo_get_stats = e1000_get_stats, | ||
895 | .ndo_set_rx_mode = e1000_set_rx_mode, | ||
896 | .ndo_set_mac_address = e1000_set_mac, | ||
897 | .ndo_tx_timeout = e1000_tx_timeout, | ||
898 | .ndo_change_mtu = e1000_change_mtu, | ||
899 | .ndo_do_ioctl = e1000_ioctl, | ||
900 | .ndo_validate_addr = eth_validate_addr, | ||
901 | |||
902 | .ndo_vlan_rx_register = e1000_vlan_rx_register, | ||
903 | .ndo_vlan_rx_add_vid = e1000_vlan_rx_add_vid, | ||
904 | .ndo_vlan_rx_kill_vid = e1000_vlan_rx_kill_vid, | ||
905 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
906 | .ndo_poll_controller = e1000_netpoll, | ||
907 | #endif | ||
908 | }; | ||
909 | |||
891 | /** | 910 | /** |
892 | * e1000_probe - Device Initialization Routine | 911 | * e1000_probe - Device Initialization Routine |
893 | * @pdev: PCI device information struct | 912 | * @pdev: PCI device information struct |
@@ -981,24 +1000,12 @@ static int __devinit e1000_probe(struct pci_dev *pdev, | |||
981 | } | 1000 | } |
982 | } | 1001 | } |
983 | 1002 | ||
984 | netdev->open = &e1000_open; | 1003 | netdev->netdev_ops = &e1000_netdev_ops; |
985 | netdev->stop = &e1000_close; | ||
986 | netdev->hard_start_xmit = &e1000_xmit_frame; | 1004 | netdev->hard_start_xmit = &e1000_xmit_frame; |
987 | netdev->get_stats = &e1000_get_stats; | ||
988 | netdev->set_rx_mode = &e1000_set_rx_mode; | ||
989 | netdev->set_mac_address = &e1000_set_mac; | ||
990 | netdev->change_mtu = &e1000_change_mtu; | ||
991 | netdev->do_ioctl = &e1000_ioctl; | ||
992 | e1000_set_ethtool_ops(netdev); | 1005 | e1000_set_ethtool_ops(netdev); |
993 | netdev->tx_timeout = &e1000_tx_timeout; | ||
994 | netdev->watchdog_timeo = 5 * HZ; | 1006 | netdev->watchdog_timeo = 5 * HZ; |
995 | netif_napi_add(netdev, &adapter->napi, e1000_clean, 64); | 1007 | netif_napi_add(netdev, &adapter->napi, e1000_clean, 64); |
996 | netdev->vlan_rx_register = e1000_vlan_rx_register; | 1008 | |
997 | netdev->vlan_rx_add_vid = e1000_vlan_rx_add_vid; | ||
998 | netdev->vlan_rx_kill_vid = e1000_vlan_rx_kill_vid; | ||
999 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
1000 | netdev->poll_controller = e1000_netpoll; | ||
1001 | #endif | ||
1002 | strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1); | 1009 | strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1); |
1003 | 1010 | ||
1004 | adapter->bd_number = cards_found; | 1011 | adapter->bd_number = cards_found; |