Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203747
b: refs/heads/master
c: 690a1f2
h: refs/heads/master
i:
  203745: 8890c02
  203743: 11b84a5
v: v3
  • Loading branch information
Andrew O. Shadoura authored and David S. Miller committed Jul 25, 2010
1 parent 460ed28 commit b75cf05
Show file tree
Hide file tree
Showing 2 changed files with 33 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: 57e46248a71bfcafb3937a7a5ed8ad324c9fc4f0
refs/heads/master: 690a1f2002a3091bd18a501f46c9530f10481463
32 changes: 32 additions & 0 deletions trunk/drivers/net/3c59x.c
Original file line number Diff line number Diff line change
Expand Up @@ -2918,6 +2918,36 @@ static void vortex_get_drvinfo(struct net_device *dev,
}
}

static void vortex_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
{
struct vortex_private *vp = netdev_priv(dev);

spin_lock_irq(&vp->lock);
wol->supported = WAKE_MAGIC;

wol->wolopts = 0;
if (vp->enable_wol)
wol->wolopts |= WAKE_MAGIC;
spin_unlock_irq(&vp->lock);
}

static int vortex_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
{
struct vortex_private *vp = netdev_priv(dev);
if (wol->wolopts & ~WAKE_MAGIC)
return -EINVAL;

spin_lock_irq(&vp->lock);
if (wol->wolopts & WAKE_MAGIC)
vp->enable_wol = 1;
else
vp->enable_wol = 0;
acpi_set_WOL(dev);
spin_unlock_irq(&vp->lock);

return 0;
}

static const struct ethtool_ops vortex_ethtool_ops = {
.get_drvinfo = vortex_get_drvinfo,
.get_strings = vortex_get_strings,
Expand All @@ -2929,6 +2959,8 @@ static const struct ethtool_ops vortex_ethtool_ops = {
.set_settings = vortex_set_settings,
.get_link = ethtool_op_get_link,
.nway_reset = vortex_nway_reset,
.get_wol = vortex_get_wol,
.set_wol = vortex_set_wol,
};

#ifdef CONFIG_PCI
Expand Down

0 comments on commit b75cf05

Please sign in to comment.