Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210811
b: refs/heads/master
c: 84176b7
h: refs/heads/master
i:
  210809: 5ab7302
  210807: bf1d083
v: v3
  • Loading branch information
Denis Kirjanov authored and David S. Miller committed Sep 15, 2010
1 parent 89535f3 commit ab21cd4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 01f83d69844d307be2aa6fea88b0e8fe5cbdb2f4
refs/heads/master: 84176b7b56704580e008e6cb820dd4ccf622a1fd
7 changes: 3 additions & 4 deletions trunk/drivers/net/3c59x.c
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,9 @@ struct vortex_private {
must_free_region:1, /* Flag: if zero, Cardbus owns the I/O region */
large_frames:1, /* accept large frames */
handling_irq:1; /* private in_irq indicator */
/* {get|set}_wol operations are already serialized by rtnl.
* no additional locking is required for the enable_wol and acpi_set_WOL()
*/
int drv_flags;
u16 status_enable;
u16 intr_enable;
Expand Down Expand Up @@ -2939,13 +2942,11 @@ 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)
Expand All @@ -2954,13 +2955,11 @@ static int vortex_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)
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;
}
Expand Down

0 comments on commit ab21cd4

Please sign in to comment.