aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/8139cp.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2008-11-20 01:09:07 -0500
committerDavid S. Miller <davem@davemloft.net>2008-11-20 01:42:46 -0500
commit48dfcde46ef23cfad1e0c0f13d4eae15c7f46efc (patch)
tree728264d7bbc3cbd92eab271b17979151fdc3fa7f /drivers/net/8139cp.c
parent8b4ab28dae8afa14f22d210c591046def2f4d742 (diff)
8139: 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>
Diffstat (limited to 'drivers/net/8139cp.c')
-rw-r--r--drivers/net/8139cp.c33
1 files changed, 20 insertions, 13 deletions
diff --git a/drivers/net/8139cp.c b/drivers/net/8139cp.c
index 664bd73645cb..13f75b67872d 100644
--- a/drivers/net/8139cp.c
+++ b/drivers/net/8139cp.c
@@ -1817,6 +1817,25 @@ static void cp_set_d3_state (struct cp_private *cp)
1817 pci_set_power_state (cp->pdev, PCI_D3hot); 1817 pci_set_power_state (cp->pdev, PCI_D3hot);
1818} 1818}
1819 1819
1820static const struct net_device_ops cp_netdev_ops = {
1821 .ndo_open = cp_open,
1822 .ndo_stop = cp_close,
1823 .ndo_validate_addr = eth_validate_addr,
1824 .ndo_set_multicast_list = cp_set_rx_mode,
1825 .ndo_get_stats = cp_get_stats,
1826 .ndo_do_ioctl = cp_ioctl,
1827 .ndo_tx_timeout = cp_tx_timeout,
1828#if CP_VLAN_TAG_USED
1829 .ndo_vlan_rx_register = cp_vlan_rx_register,
1830#endif
1831#ifdef BROKEN
1832 .ndo_change_mtu = cp_change_mtu,
1833#endif
1834#ifdef CONFIG_NET_POLL_CONTROLLER
1835 .ndo_poll_controller = cp_poll_controller,
1836#endif
1837};
1838
1820static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) 1839static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
1821{ 1840{
1822 struct net_device *dev; 1841 struct net_device *dev;
@@ -1929,26 +1948,14 @@ static int cp_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
1929 cpu_to_le16(read_eeprom (regs, i + 7, addr_len)); 1948 cpu_to_le16(read_eeprom (regs, i + 7, addr_len));
1930 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len); 1949 memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
1931 1950
1932 dev->open = cp_open; 1951 dev->netdev_ops = &cp_netdev_ops;
1933 dev->stop = cp_close;
1934 dev->set_multicast_list = cp_set_rx_mode;
1935 dev->hard_start_xmit = cp_start_xmit; 1952 dev->hard_start_xmit = cp_start_xmit;
1936 dev->get_stats = cp_get_stats;
1937 dev->do_ioctl = cp_ioctl;
1938#ifdef CONFIG_NET_POLL_CONTROLLER
1939 dev->poll_controller = cp_poll_controller;
1940#endif
1941 netif_napi_add(dev, &cp->napi, cp_rx_poll, 16); 1953 netif_napi_add(dev, &cp->napi, cp_rx_poll, 16);
1942#ifdef BROKEN
1943 dev->change_mtu = cp_change_mtu;
1944#endif
1945 dev->ethtool_ops = &cp_ethtool_ops; 1954 dev->ethtool_ops = &cp_ethtool_ops;
1946 dev->tx_timeout = cp_tx_timeout;
1947 dev->watchdog_timeo = TX_TIMEOUT; 1955 dev->watchdog_timeo = TX_TIMEOUT;
1948 1956
1949#if CP_VLAN_TAG_USED 1957#if CP_VLAN_TAG_USED
1950 dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; 1958 dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
1951 dev->vlan_rx_register = cp_vlan_rx_register;
1952#endif 1959#endif
1953 1960
1954 if (pci_using_dac) 1961 if (pci_using_dac)