Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 143413
b: refs/heads/master
c: d6c519e
h: refs/heads/master
i:
  143411: 2f09e51
v: v3
  • Loading branch information
Alexander Duyck authored and David S. Miller committed Apr 11, 2009
1 parent d56dd37 commit 8cafd41
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 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: 87c1201708381c2791caa78a2caf217778633277
refs/heads/master: d6c519e12984d26d96b91e4482280acbba0e0a22
24 changes: 23 additions & 1 deletion trunk/drivers/net/ixgbe/ixgbe_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -943,6 +943,24 @@ static void ixgbe_get_strings(struct net_device *netdev, u32 stringset,
}


static int ixgbe_wol_exclusion(struct ixgbe_adapter *adapter,
struct ethtool_wolinfo *wol)
{
struct ixgbe_hw *hw = &adapter->hw;
int retval = 1;

switch(hw->device_id) {
case IXGBE_DEV_ID_82599_KX4:
retval = 0;
break;
default:
wol->supported = 0;
retval = 0;
}

return retval;
}

static void ixgbe_get_wol(struct net_device *netdev,
struct ethtool_wolinfo *wol)
{
Expand All @@ -952,7 +970,8 @@ static void ixgbe_get_wol(struct net_device *netdev,
WAKE_BCAST | WAKE_MAGIC;
wol->wolopts = 0;

if (!device_can_wakeup(&adapter->pdev->dev))
if (ixgbe_wol_exclusion(adapter, wol) ||
!device_can_wakeup(&adapter->pdev->dev))
return;

if (adapter->wol & IXGBE_WUFC_EX)
Expand All @@ -974,6 +993,9 @@ static int ixgbe_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
if (wol->wolopts & (WAKE_PHY | WAKE_ARP | WAKE_MAGICSECURE))
return -EOPNOTSUPP;

if (ixgbe_wol_exclusion(adapter, wol))
return wol->wolopts ? -EOPNOTSUPP : 0;

adapter->wol = 0;

if (wol->wolopts & WAKE_UCAST)
Expand Down

0 comments on commit 8cafd41

Please sign in to comment.