diff options
author | David S. Miller <davem@davemloft.net> | 2010-10-04 20:56:38 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-10-04 20:56:38 +0200 |
commit | 21a180cda012e1f93e362dd4a9b0bfd3d8c92940 (patch) | |
tree | 0e0d10baa3fdcd8ffbc6881076ff1695808dad9d /drivers/net/3c59x.c | |
parent | net: introduce DST_NOCACHE flag (diff) | |
parent | sctp: Fix out-of-bounds reading in sctp_asoc_get_hmac() (diff) | |
download | linux-21a180cda012e1f93e362dd4a9b0bfd3d8c92940.tar.xz linux-21a180cda012e1f93e362dd4a9b0bfd3d8c92940.zip |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
net/ipv4/Kconfig
net/ipv4/tcp_timer.c
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 ed964964fe1f..e1da258bbfb7 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) { struct vortex_private *vp = netdev_priv(dev); + if (!VORTEX_PCI(vp)) + return; + wol->supported = WAKE_MAGIC; wol->wolopts = 0; @@ -2952,6 +2955,10 @@ static void vortex_get_wol(struct net_device *dev, struct ethtool_wolinfo *wol) static int vortex_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol) { struct vortex_private *vp = netdev_priv(dev); + + if (!VORTEX_PCI(vp)) + return -EOPNOTSUPP; + if (wol->wolopts & ~WAKE_MAGIC) return -EINVAL; @@ -3201,6 +3208,9 @@ static void acpi_set_WOL(struct net_device *dev) return; } + if (VORTEX_PCI(vp)->current_state < PCI_D3hot) + return; + /* Change the power state to D3; RxEnable doesn't take effect. */ pci_set_power_state(VORTEX_PCI(vp), PCI_D3hot); } |