diff options
Diffstat (limited to 'drivers/net/3c59x.c')
-rw-r--r-- | drivers/net/3c59x.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/3c59x.c b/drivers/net/3c59x.c index fa42103b287..179871d9e71 100644 --- a/drivers/net/3c59x.c +++ b/drivers/net/3c59x.c | |||
@@ -2942,6 +2942,9 @@ static void vortex_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) | |||
2942 | { | 2942 | { |
2943 | struct vortex_private *vp = netdev_priv(dev); | 2943 | struct vortex_private *vp = netdev_priv(dev); |
2944 | 2944 | ||
2945 | if (!VORTEX_PCI(vp)) | ||
2946 | return; | ||
2947 | |||
2945 | wol->supported = WAKE_MAGIC; | 2948 | wol->supported = WAKE_MAGIC; |
2946 | 2949 | ||
2947 | wol->wolopts = 0; | 2950 | wol->wolopts = 0; |
@@ -2952,6 +2955,10 @@ static void vortex_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) | |||
2952 | static int vortex_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) | 2955 | static int vortex_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) |
2953 | { | 2956 | { |
2954 | struct vortex_private *vp = netdev_priv(dev); | 2957 | struct vortex_private *vp = netdev_priv(dev); |
2958 | |||
2959 | if (!VORTEX_PCI(vp)) | ||
2960 | return -EOPNOTSUPP; | ||
2961 | |||
2955 | if (wol->wolopts & ~WAKE_MAGIC) | 2962 | if (wol->wolopts & ~WAKE_MAGIC) |
2956 | return -EINVAL; | 2963 | return -EINVAL; |
2957 | 2964 | ||
@@ -3201,6 +3208,9 @@ static void acpi_set_WOL(struct net_device *dev) | |||
3201 | return; | 3208 | return; |
3202 | } | 3209 | } |
3203 | 3210 | ||
3211 | if (VORTEX_PCI(vp)->current_state < PCI_D3hot) | ||
3212 | return; | ||
3213 | |||
3204 | /* Change the power state to D3; RxEnable doesn't take effect. */ | 3214 | /* Change the power state to D3; RxEnable doesn't take effect. */ |
3205 | pci_set_power_state(VORTEX_PCI(vp), PCI_D3hot); | 3215 | pci_set_power_state(VORTEX_PCI(vp), PCI_D3hot); |
3206 | } | 3216 | } |