aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/amd8111e.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-01-08 17:25:41 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-08 17:25:41 -0500
commit5fbbf5f648a9c4ef99276854f05b2255d1b004d3 (patch)
tree59c9ae762c3df2800e894001b3de58c5f1972486 /drivers/net/amd8111e.c
parentce279e6ec91c49f2c5f59f7492e19d39edbf8bbd (diff)
parent56cf391a9462a4897ea660a6af3662dda5ae8c84 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (84 commits) wimax: fix kernel-doc for debufs_dentry member of struct wimax_dev net: convert pegasus driver to net_device_ops bnx2x: Prevent eeprom set when driver is down net: switch kaweth driver to netdevops pcnet32: round off carrier watch timer i2400m/usb: wrap USB power saving in #ifdef CONFIG_PM wimax: testing for rfkill support should also test for CONFIG_RFKILL_MODULE wimax: fix kconfig interactions with rfkill and input layers wimax: fix '#ifndef CONFIG_BUG' layout to avoid warning r6040: bump release number to 0.20 r6040: warn about MAC address being unset r6040: check PHY status when bringing interface up r6040: make printks consistent with DRV_NAME gianfar: Fixup use of BUS_ID_SIZE mlx4_en: Returning real Max in get_ringparam mlx4_en: Consider inline packets on completion netdev: bfin_mac: enable bfin_mac net dev driver for BF51x qeth: convert to net_device_ops vlan: add neigh_setup dm9601: warn on invalid mac address ...
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);