aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/amd8111e.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-01-07 21:09:58 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-07 21:09:58 -0500
commit887e53d2d131fe0740326f66f1b417671fdfcf9a (patch)
treed37ad100bfe0a35da75bb8073c82994caff5bf9b /drivers/net/amd8111e.c
parentb1da683d17972fc851c46331a5efa801bddf9273 (diff)
amd8111e: convert 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/amd8111e.c')
-rw-r--r--drivers/net/amd8111e.c35
1 files changed, 21 insertions, 14 deletions
diff --git a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c
index 187ac6eb6e94..7709992bb6bf 100644
--- a/drivers/net/amd8111e.c
+++ b/drivers/net/amd8111e.c
@@ -1813,6 +1813,25 @@ static void __devinit amd8111e_probe_ext_phy(struct net_device* dev)
1813 lp->ext_phy_addr = 1; 1813 lp->ext_phy_addr = 1;
1814} 1814}
1815 1815
1816static const struct net_device_ops amd8111e_netdev_ops = {
1817 .ndo_open = amd8111e_open,
1818 .ndo_stop = amd8111e_close,
1819 .ndo_start_xmit = amd8111e_start_xmit,
1820 .ndo_tx_timeout = amd8111e_tx_timeout,
1821 .ndo_get_stats = amd8111e_get_stats,
1822 .ndo_set_multicast_list = amd8111e_set_multicast_list,
1823 .ndo_validate_addr = eth_validate_addr,
1824 .ndo_set_mac_address = amd8111e_set_mac_address,
1825 .ndo_do_ioctl = amd8111e_ioctl,
1826 .ndo_change_mtu = amd8111e_change_mtu,
1827#if AMD8111E_VLAN_TAG_USED
1828 .ndo_vlan_rx_register = amd8111e_vlan_rx_register,
1829#endif
1830#ifdef CONFIG_NET_POLL_CONTROLLER
1831 .ndo_poll_controller = amd8111e_poll,
1832#endif
1833};
1834
1816static int __devinit amd8111e_probe_one(struct pci_dev *pdev, 1835static int __devinit amd8111e_probe_one(struct pci_dev *pdev,
1817 const struct pci_device_id *ent) 1836 const struct pci_device_id *ent)
1818{ 1837{
@@ -1872,7 +1891,6 @@ static int __devinit amd8111e_probe_one(struct pci_dev *pdev,
1872 1891
1873#if AMD8111E_VLAN_TAG_USED 1892#if AMD8111E_VLAN_TAG_USED
1874 dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX ; 1893 dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX ;
1875 dev->vlan_rx_register =amd8111e_vlan_rx_register;
1876#endif 1894#endif
1877 1895
1878 lp = netdev_priv(dev); 1896 lp = netdev_priv(dev);
@@ -1901,27 +1919,16 @@ static int __devinit amd8111e_probe_one(struct pci_dev *pdev,
1901 if(dynamic_ipg[card_idx++]) 1919 if(dynamic_ipg[card_idx++])
1902 lp->options |= OPTION_DYN_IPG_ENABLE; 1920 lp->options |= OPTION_DYN_IPG_ENABLE;
1903 1921
1922
1904 /* Initialize driver entry points */ 1923 /* Initialize driver entry points */
1905 dev->open = amd8111e_open; 1924 dev->netdev_ops = &amd8111e_netdev_ops;
1906 dev->hard_start_xmit = amd8111e_start_xmit;
1907 dev->stop = amd8111e_close;
1908 dev->get_stats = amd8111e_get_stats;
1909 dev->set_multicast_list = amd8111e_set_multicast_list;
1910 dev->set_mac_address = amd8111e_set_mac_address;
1911 dev->do_ioctl = amd8111e_ioctl;
1912 dev->change_mtu = amd8111e_change_mtu;
1913 SET_ETHTOOL_OPS(dev, &ops); 1925 SET_ETHTOOL_OPS(dev, &ops);
1914 dev->irq =pdev->irq; 1926 dev->irq =pdev->irq;
1915 dev->tx_timeout = amd8111e_tx_timeout;
1916 dev->watchdog_timeo = AMD8111E_TX_TIMEOUT; 1927 dev->watchdog_timeo = AMD8111E_TX_TIMEOUT;
1917 netif_napi_add(dev, &lp->napi, amd8111e_rx_poll, 32); 1928 netif_napi_add(dev, &lp->napi, amd8111e_rx_poll, 32);
1918#ifdef CONFIG_NET_POLL_CONTROLLER
1919 dev->poll_controller = amd8111e_poll;
1920#endif
1921 1929
1922#if AMD8111E_VLAN_TAG_USED 1930#if AMD8111E_VLAN_TAG_USED
1923 dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; 1931 dev->features |= NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX;
1924 dev->vlan_rx_register =amd8111e_vlan_rx_register;
1925#endif 1932#endif
1926 /* Probe the external PHY */ 1933 /* Probe the external PHY */
1927 amd8111e_probe_ext_phy(dev); 1934 amd8111e_probe_ext_phy(dev);