aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/pcnet32.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c
index 044b7b07f5f4..c1bef953bf07 100644
--- a/drivers/net/pcnet32.c
+++ b/drivers/net/pcnet32.c
@@ -1568,6 +1568,22 @@ pcnet32_probe_pci(struct pci_dev *pdev, const struct pci_device_id *ent)
1568 return err; 1568 return err;
1569} 1569}
1570 1570
1571static const struct net_device_ops pcnet32_netdev_ops = {
1572 .ndo_open = pcnet32_open,
1573 .ndo_stop = pcnet32_close,
1574 .ndo_start_xmit = pcnet32_start_xmit,
1575 .ndo_tx_timeout = pcnet32_tx_timeout,
1576 .ndo_get_stats = pcnet32_get_stats,
1577 .ndo_set_multicast_list = pcnet32_set_multicast_list,
1578 .ndo_do_ioctl = pcnet32_ioctl,
1579 .ndo_change_mtu = eth_change_mtu,
1580 .ndo_set_mac_address = eth_mac_addr,
1581 .ndo_validate_addr = eth_validate_addr,
1582#ifdef CONFIG_NET_POLL_CONTROLLER
1583 .ndo_poll_controller = pcnet32_poll_controller,
1584#endif
1585};
1586
1571/* pcnet32_probe1 1587/* pcnet32_probe1
1572 * Called from both pcnet32_probe_vlbus and pcnet_probe_pci. 1588 * Called from both pcnet32_probe_vlbus and pcnet_probe_pci.
1573 * pdev will be NULL when called from pcnet32_probe_vlbus. 1589 * pdev will be NULL when called from pcnet32_probe_vlbus.
@@ -1934,20 +1950,10 @@ pcnet32_probe1(unsigned long ioaddr, int shared, struct pci_dev *pdev)
1934 lp->watchdog_timer.function = (void *)&pcnet32_watchdog; 1950 lp->watchdog_timer.function = (void *)&pcnet32_watchdog;
1935 1951
1936 /* The PCNET32-specific entries in the device structure. */ 1952 /* The PCNET32-specific entries in the device structure. */
1937 dev->open = &pcnet32_open; 1953 dev->netdev_ops = &pcnet32_netdev_ops;
1938 dev->hard_start_xmit = &pcnet32_start_xmit;
1939 dev->stop = &pcnet32_close;
1940 dev->get_stats = &pcnet32_get_stats;
1941 dev->set_multicast_list = &pcnet32_set_multicast_list;
1942 dev->do_ioctl = &pcnet32_ioctl;
1943 dev->ethtool_ops = &pcnet32_ethtool_ops; 1954 dev->ethtool_ops = &pcnet32_ethtool_ops;
1944 dev->tx_timeout = pcnet32_tx_timeout;
1945 dev->watchdog_timeo = (5 * HZ); 1955 dev->watchdog_timeo = (5 * HZ);
1946 1956
1947#ifdef CONFIG_NET_POLL_CONTROLLER
1948 dev->poll_controller = pcnet32_poll_controller;
1949#endif
1950
1951 /* Fill in the generic fields of the device structure. */ 1957 /* Fill in the generic fields of the device structure. */
1952 if (register_netdev(dev)) 1958 if (register_netdev(dev))
1953 goto err_free_ring; 1959 goto err_free_ring;