diff options
Diffstat (limited to 'drivers/net/e1000e/ethtool.c')
-rw-r--r-- | drivers/net/e1000e/ethtool.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c index 6d9c27fd0b53..9fab44463573 100644 --- a/drivers/net/e1000e/ethtool.c +++ b/drivers/net/e1000e/ethtool.c | |||
@@ -1632,7 +1632,8 @@ static void e1000_get_wol(struct net_device *netdev, | |||
1632 | return; | 1632 | return; |
1633 | 1633 | ||
1634 | wol->supported = WAKE_UCAST | WAKE_MCAST | | 1634 | wol->supported = WAKE_UCAST | WAKE_MCAST | |
1635 | WAKE_BCAST | WAKE_MAGIC; | 1635 | WAKE_BCAST | WAKE_MAGIC | |
1636 | WAKE_PHY | WAKE_ARP; | ||
1636 | 1637 | ||
1637 | /* apply any specific unsupported masks here */ | 1638 | /* apply any specific unsupported masks here */ |
1638 | if (adapter->flags & FLAG_NO_WAKE_UCAST) { | 1639 | if (adapter->flags & FLAG_NO_WAKE_UCAST) { |
@@ -1651,6 +1652,10 @@ static void e1000_get_wol(struct net_device *netdev, | |||
1651 | wol->wolopts |= WAKE_BCAST; | 1652 | wol->wolopts |= WAKE_BCAST; |
1652 | if (adapter->wol & E1000_WUFC_MAG) | 1653 | if (adapter->wol & E1000_WUFC_MAG) |
1653 | wol->wolopts |= WAKE_MAGIC; | 1654 | wol->wolopts |= WAKE_MAGIC; |
1655 | if (adapter->wol & E1000_WUFC_LNKC) | ||
1656 | wol->wolopts |= WAKE_PHY; | ||
1657 | if (adapter->wol & E1000_WUFC_ARP) | ||
1658 | wol->wolopts |= WAKE_ARP; | ||
1654 | } | 1659 | } |
1655 | 1660 | ||
1656 | static int e1000_set_wol(struct net_device *netdev, | 1661 | static int e1000_set_wol(struct net_device *netdev, |
@@ -1658,7 +1663,7 @@ static int e1000_set_wol(struct net_device *netdev, | |||
1658 | { | 1663 | { |
1659 | struct e1000_adapter *adapter = netdev_priv(netdev); | 1664 | struct e1000_adapter *adapter = netdev_priv(netdev); |
1660 | 1665 | ||
1661 | if (wol->wolopts & (WAKE_PHY | WAKE_ARP | WAKE_MAGICSECURE)) | 1666 | if (wol->wolopts & WAKE_MAGICSECURE) |
1662 | return -EOPNOTSUPP; | 1667 | return -EOPNOTSUPP; |
1663 | 1668 | ||
1664 | if (!(adapter->flags & FLAG_HAS_WOL)) | 1669 | if (!(adapter->flags & FLAG_HAS_WOL)) |
@@ -1675,6 +1680,10 @@ static int e1000_set_wol(struct net_device *netdev, | |||
1675 | adapter->wol |= E1000_WUFC_BC; | 1680 | adapter->wol |= E1000_WUFC_BC; |
1676 | if (wol->wolopts & WAKE_MAGIC) | 1681 | if (wol->wolopts & WAKE_MAGIC) |
1677 | adapter->wol |= E1000_WUFC_MAG; | 1682 | adapter->wol |= E1000_WUFC_MAG; |
1683 | if (wol->wolopts & WAKE_PHY) | ||
1684 | adapter->wol |= E1000_WUFC_LNKC; | ||
1685 | if (wol->wolopts & WAKE_ARP) | ||
1686 | adapter->wol |= E1000_WUFC_ARP; | ||
1678 | 1687 | ||
1679 | return 0; | 1688 | return 0; |
1680 | } | 1689 | } |