aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-01-07 20:59:47 -0500
committerDavid S. Miller <davem@davemloft.net>2009-01-07 20:59:47 -0500
commit90d8743d03593520ceb5e8fd8cf3b86072518f83 (patch)
tree793491692cda8b06ea7ef44334d231c8afab00ae /drivers/net
parentf4266cf34d7b903e2e11b317f2e548a2acc4cd4e (diff)
de2104x: 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')
-rw-r--r--drivers/net/tulip/de2104x.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/net/tulip/de2104x.c b/drivers/net/tulip/de2104x.c
index 5166be930a52..d5d53b633cf8 100644
--- a/drivers/net/tulip/de2104x.c
+++ b/drivers/net/tulip/de2104x.c
@@ -1922,6 +1922,18 @@ bad_srom:
1922 goto fill_defaults; 1922 goto fill_defaults;
1923} 1923}
1924 1924
1925static const struct net_device_ops de_netdev_ops = {
1926 .ndo_open = de_open,
1927 .ndo_stop = de_close,
1928 .ndo_set_multicast_list = de_set_rx_mode,
1929 .ndo_start_xmit = de_start_xmit,
1930 .ndo_get_stats = de_get_stats,
1931 .ndo_tx_timeout = de_tx_timeout,
1932 .ndo_change_mtu = eth_change_mtu,
1933 .ndo_set_mac_address = eth_mac_addr,
1934 .ndo_validate_addr = eth_validate_addr,
1935};
1936
1925static int __devinit de_init_one (struct pci_dev *pdev, 1937static int __devinit de_init_one (struct pci_dev *pdev,
1926 const struct pci_device_id *ent) 1938 const struct pci_device_id *ent)
1927{ 1939{
@@ -1944,14 +1956,9 @@ static int __devinit de_init_one (struct pci_dev *pdev,
1944 if (!dev) 1956 if (!dev)
1945 return -ENOMEM; 1957 return -ENOMEM;
1946 1958
1959 dev->netdev_ops = &de_netdev_ops;
1947 SET_NETDEV_DEV(dev, &pdev->dev); 1960 SET_NETDEV_DEV(dev, &pdev->dev);
1948 dev->open = de_open;
1949 dev->stop = de_close;
1950 dev->set_multicast_list = de_set_rx_mode;
1951 dev->hard_start_xmit = de_start_xmit;
1952 dev->get_stats = de_get_stats;
1953 dev->ethtool_ops = &de_ethtool_ops; 1961 dev->ethtool_ops = &de_ethtool_ops;
1954 dev->tx_timeout = de_tx_timeout;
1955 dev->watchdog_timeo = TX_TIMEOUT; 1962 dev->watchdog_timeo = TX_TIMEOUT;
1956 1963
1957 de = netdev_priv(dev); 1964 de = netdev_priv(dev);