aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/forcedeth.c
diff options
context:
space:
mode:
authorTobias Diedrich <ranma+kernel@tdiedrich.de>2008-05-18 09:02:37 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-05-30 22:18:49 -0400
commitf735a2a1a4f2a0f5cd823ce323e82675990469e2 (patch)
treeff5c6351b31252903fbf318c283e9686c9a11aeb /drivers/net/forcedeth.c
parent2914f3efa7ef80f12ff798cb1aa46af57838f912 (diff)
[netdrvr] forcedeth: setup wake-on-lan before shutting down
When hibernating in 'shutdown' mode, after saving the image the suspend hook is not called again. However, if the device is in promiscous mode, wake-on-lan will not work. This adds a shutdown hook to setup wake-on-lan before the final shutdown. Signed-off-by: Tobias Diedrich <ranma+kernel@tdiedrich.de> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/forcedeth.c')
-rw-r--r--drivers/net/forcedeth.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index 9eca97fb0a54..215d27bbeffe 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -5827,8 +5827,23 @@ static int nv_resume(struct pci_dev *pdev)
5827out: 5827out:
5828 return rc; 5828 return rc;
5829} 5829}
5830
5831static void nv_shutdown(struct pci_dev *pdev)
5832{
5833 struct net_device *dev = pci_get_drvdata(pdev);
5834 struct fe_priv *np = netdev_priv(dev);
5835
5836 if (netif_running(dev))
5837 nv_close(dev);
5838
5839 pci_enable_wake(pdev, PCI_D3hot, np->wolenabled);
5840 pci_enable_wake(pdev, PCI_D3cold, np->wolenabled);
5841 pci_disable_device(pdev);
5842 pci_set_power_state(pdev, PCI_D3hot);
5843}
5830#else 5844#else
5831#define nv_suspend NULL 5845#define nv_suspend NULL
5846#define nv_shutdown NULL
5832#define nv_resume NULL 5847#define nv_resume NULL
5833#endif /* CONFIG_PM */ 5848#endif /* CONFIG_PM */
5834 5849
@@ -5999,6 +6014,7 @@ static struct pci_driver driver = {
5999 .remove = __devexit_p(nv_remove), 6014 .remove = __devexit_p(nv_remove),
6000 .suspend = nv_suspend, 6015 .suspend = nv_suspend,
6001 .resume = nv_resume, 6016 .resume = nv_resume,
6017 .shutdown = nv_shutdown,
6002}; 6018};
6003 6019
6004static int __init init_nic(void) 6020static int __init init_nic(void)