Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 211122
b: refs/heads/master
c: 3fd6c88
h: refs/heads/master
v: v3
  • Loading branch information
Jan Beulich authored and David S. Miller committed Sep 27, 2010
1 parent d6e85a7 commit 7e20174
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2cc6d2bf3d6195fabcf0febc192c01f99519a8f3
refs/heads/master: 3fd6c88ef875a14740801ebfc6b6e4e064a1cdd4
10 changes: 10 additions & 0 deletions trunk/drivers/net/3c59x.c
Original file line number Diff line number Diff line change
Expand Up @@ -2942,6 +2942,9 @@ static void vortex_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
{
struct vortex_private *vp = netdev_priv(dev);

if (!VORTEX_PCI(vp))
return;

wol->supported = WAKE_MAGIC;

wol->wolopts = 0;
Expand All @@ -2952,6 +2955,10 @@ static void vortex_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
static int vortex_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
{
struct vortex_private *vp = netdev_priv(dev);

if (!VORTEX_PCI(vp))
return -EOPNOTSUPP;

if (wol->wolopts & ~WAKE_MAGIC)
return -EINVAL;

Expand Down Expand Up @@ -3201,6 +3208,9 @@ static void acpi_set_WOL(struct net_device *dev)
return;
}

if (VORTEX_PCI(vp)->current_state < PCI_D3hot)
return;

/* Change the power state to D3; RxEnable doesn't take effect. */
pci_set_power_state(VORTEX_PCI(vp), PCI_D3hot);
}
Expand Down

0 comments on commit 7e20174

Please sign in to comment.