diff options
Diffstat (limited to 'drivers/net/3c59x.c')
| -rw-r--r-- | drivers/net/3c59x.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c index 85671adae455..fa42103b2874 100644 --- a/drivers/net/3c59x.c +++ b/drivers/net/3c59x.c | |||
| @@ -635,6 +635,9 @@ struct vortex_private { | |||
| 635 | must_free_region:1, /* Flag: if zero, Cardbus owns the I/O region */ | 635 | must_free_region:1, /* Flag: if zero, Cardbus owns the I/O region */ |
| 636 | large_frames:1, /* accept large frames */ | 636 | large_frames:1, /* accept large frames */ |
| 637 | handling_irq:1; /* private in_irq indicator */ | 637 | handling_irq:1; /* private in_irq indicator */ |
| 638 | /* {get|set}_wol operations are already serialized by rtnl. | ||
| 639 | * no additional locking is required for the enable_wol and acpi_set_WOL() | ||
| 640 | */ | ||
| 638 | int drv_flags; | 641 | int drv_flags; |
| 639 | u16 status_enable; | 642 | u16 status_enable; |
| 640 | u16 intr_enable; | 643 | u16 intr_enable; |
| @@ -2939,13 +2942,11 @@ static void vortex_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) | |||
| 2939 | { | 2942 | { |
| 2940 | struct vortex_private *vp = netdev_priv(dev); | 2943 | struct vortex_private *vp = netdev_priv(dev); |
| 2941 | 2944 | ||
| 2942 | spin_lock_irq(&vp->lock); | ||
| 2943 | wol->supported = WAKE_MAGIC; | 2945 | wol->supported = WAKE_MAGIC; |
| 2944 | 2946 | ||
| 2945 | wol->wolopts = 0; | 2947 | wol->wolopts = 0; |
| 2946 | if (vp->enable_wol) | 2948 | if (vp->enable_wol) |
| 2947 | wol->wolopts |= WAKE_MAGIC; | 2949 | wol->wolopts |= WAKE_MAGIC; |
| 2948 | spin_unlock_irq(&vp->lock); | ||
| 2949 | } | 2950 | } |
| 2950 | 2951 | ||
| 2951 | static int vortex_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) | 2952 | static int vortex_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) |
| @@ -2954,13 +2955,11 @@ static int vortex_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) | |||
| 2954 | if (wol->wolopts & ~WAKE_MAGIC) | 2955 | if (wol->wolopts & ~WAKE_MAGIC) |
| 2955 | return -EINVAL; | 2956 | return -EINVAL; |
| 2956 | 2957 | ||
| 2957 | spin_lock_irq(&vp->lock); | ||
| 2958 | if (wol->wolopts & WAKE_MAGIC) | 2958 | if (wol->wolopts & WAKE_MAGIC) |
| 2959 | vp->enable_wol = 1; | 2959 | vp->enable_wol = 1; |
| 2960 | else | 2960 | else |
| 2961 | vp->enable_wol = 0; | 2961 | vp->enable_wol = 0; |
| 2962 | acpi_set_WOL(dev); | 2962 | acpi_set_WOL(dev); |
| 2963 | spin_unlock_irq(&vp->lock); | ||
| 2964 | 2963 | ||
| 2965 | return 0; | 2964 | return 0; |
| 2966 | } | 2965 | } |
