diff options
author | Stephen Hemminger <shemminger@vyatta.com> | 2008-11-20 00:57:48 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-20 01:42:43 -0500 |
commit | 651c24669316b955c3c7797bd535cdaa4533cb16 (patch) | |
tree | 0918f7f1ee8eb73d7ed3489597f43c596855c982 /drivers/net/e1000e/netdev.c | |
parent | eb7cc59a038b4e1914ae991d313f35904924759f (diff) |
e1000e: convert to net_device_ops
Convert e1000e to network device ops.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Diffstat (limited to 'drivers/net/e1000e/netdev.c')
-rw-r--r-- | drivers/net/e1000e/netdev.c | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index 4f06641cd6d4..ced839e4cae8 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
@@ -4704,6 +4704,25 @@ static void e1000_eeprom_checks(struct e1000_adapter *adapter) | |||
4704 | } | 4704 | } |
4705 | } | 4705 | } |
4706 | 4706 | ||
4707 | static const struct net_device_ops e1000e_netdev_ops = { | ||
4708 | .ndo_open = e1000_open, | ||
4709 | .ndo_stop = e1000_close, | ||
4710 | .ndo_get_stats = e1000_get_stats, | ||
4711 | .ndo_set_multicast_list = e1000_set_multi, | ||
4712 | .ndo_set_mac_address = e1000_set_mac, | ||
4713 | .ndo_change_mtu = e1000_change_mtu, | ||
4714 | .ndo_do_ioctl = e1000_ioctl, | ||
4715 | .ndo_tx_timeout = e1000_tx_timeout, | ||
4716 | .ndo_validate_addr = eth_validate_addr, | ||
4717 | |||
4718 | .ndo_vlan_rx_register = e1000_vlan_rx_register, | ||
4719 | .ndo_vlan_rx_add_vid = e1000_vlan_rx_add_vid, | ||
4720 | .ndo_vlan_rx_kill_vid = e1000_vlan_rx_kill_vid, | ||
4721 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
4722 | .ndo_poll_controller = e1000_netpoll, | ||
4723 | #endif | ||
4724 | }; | ||
4725 | |||
4707 | /** | 4726 | /** |
4708 | * e1000_probe - Device Initialization Routine | 4727 | * e1000_probe - Device Initialization Routine |
4709 | * @pdev: PCI device information struct | 4728 | * @pdev: PCI device information struct |
@@ -4802,24 +4821,11 @@ static int __devinit e1000_probe(struct pci_dev *pdev, | |||
4802 | } | 4821 | } |
4803 | 4822 | ||
4804 | /* construct the net_device struct */ | 4823 | /* construct the net_device struct */ |
4805 | netdev->open = &e1000_open; | 4824 | netdev->netdev_ops = &e1000e_netdev_ops; |
4806 | netdev->stop = &e1000_close; | ||
4807 | netdev->hard_start_xmit = &e1000_xmit_frame; | 4825 | netdev->hard_start_xmit = &e1000_xmit_frame; |
4808 | netdev->get_stats = &e1000_get_stats; | ||
4809 | netdev->set_multicast_list = &e1000_set_multi; | ||
4810 | netdev->set_mac_address = &e1000_set_mac; | ||
4811 | netdev->change_mtu = &e1000_change_mtu; | ||
4812 | netdev->do_ioctl = &e1000_ioctl; | ||
4813 | e1000e_set_ethtool_ops(netdev); | 4826 | e1000e_set_ethtool_ops(netdev); |
4814 | netdev->tx_timeout = &e1000_tx_timeout; | ||
4815 | netdev->watchdog_timeo = 5 * HZ; | 4827 | netdev->watchdog_timeo = 5 * HZ; |
4816 | netif_napi_add(netdev, &adapter->napi, e1000_clean, 64); | 4828 | netif_napi_add(netdev, &adapter->napi, e1000_clean, 64); |
4817 | netdev->vlan_rx_register = e1000_vlan_rx_register; | ||
4818 | netdev->vlan_rx_add_vid = e1000_vlan_rx_add_vid; | ||
4819 | netdev->vlan_rx_kill_vid = e1000_vlan_rx_kill_vid; | ||
4820 | #ifdef CONFIG_NET_POLL_CONTROLLER | ||
4821 | netdev->poll_controller = e1000_netpoll; | ||
4822 | #endif | ||
4823 | strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1); | 4829 | strncpy(netdev->name, pci_name(pdev), sizeof(netdev->name) - 1); |
4824 | 4830 | ||
4825 | netdev->mem_start = mmio_start; | 4831 | netdev->mem_start = mmio_start; |