aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pcnet32.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/pcnet32.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/pcnet32.c')
-rw-r--r--drivers/net/pcnet32.c32
1 files changed, 19 insertions, 13 deletions
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c
index 044b7b07f5f4..665a4286da39 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;
@@ -2276,7 +2282,7 @@ static int pcnet32_open(struct net_device *dev)
2276 if (lp->chip_version >= PCNET32_79C970A) { 2282 if (lp->chip_version >= PCNET32_79C970A) {
2277 /* Print the link status and start the watchdog */ 2283 /* Print the link status and start the watchdog */
2278 pcnet32_check_media(dev, 1); 2284 pcnet32_check_media(dev, 1);
2279 mod_timer(&(lp->watchdog_timer), PCNET32_WATCHDOG_TIMEOUT); 2285 mod_timer(&lp->watchdog_timer, PCNET32_WATCHDOG_TIMEOUT);
2280 } 2286 }
2281 2287
2282 i = 0; 2288 i = 0;
@@ -2911,7 +2917,7 @@ static void pcnet32_watchdog(struct net_device *dev)
2911 pcnet32_check_media(dev, 0); 2917 pcnet32_check_media(dev, 0);
2912 spin_unlock_irqrestore(&lp->lock, flags); 2918 spin_unlock_irqrestore(&lp->lock, flags);
2913 2919
2914 mod_timer(&(lp->watchdog_timer), PCNET32_WATCHDOG_TIMEOUT); 2920 mod_timer(&lp->watchdog_timer, round_jiffies(PCNET32_WATCHDOG_TIMEOUT));
2915} 2921}
2916 2922
2917static int pcnet32_pm_suspend(struct pci_dev *pdev, pm_message_t state) 2923static int pcnet32_pm_suspend(struct pci_dev *pdev, pm_message_t state)