aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/3c59x.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-09-27 04:03:03 -0400
committerDavid S. Miller <davem@davemloft.net>2010-09-27 04:03:03 -0400
commite40051d134f7ee95c8c1f7a3471e84eafc9ab326 (patch)
tree88eb44e49a75721ae926665a2c42f08badac9d07 /drivers/net/3c59x.c
parent42099d7a3941d4aaf853caac92b3ae76149fc6e7 (diff)
parent2cc6d2bf3d6195fabcf0febc192c01f99519a8f3 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/qlcnic/qlcnic_init.c net/ipv4/ip_output.c
Diffstat (limited to 'drivers/net/3c59x.c')
-rw-r--r--drivers/net/3c59x.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c
index e31a6d1919c6..ed964964fe1f 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
2951static int vortex_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) 2952static 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}