diff options
Diffstat (limited to 'drivers/net/e1000e')
-rw-r--r-- | drivers/net/e1000e/defines.h | 1 | ||||
-rw-r--r-- | drivers/net/e1000e/ethtool.c | 13 |
2 files changed, 12 insertions, 2 deletions
diff --git a/drivers/net/e1000e/defines.h b/drivers/net/e1000e/defines.h index f2175ea46b83..6232c3e96689 100644 --- a/drivers/net/e1000e/defines.h +++ b/drivers/net/e1000e/defines.h | |||
@@ -63,6 +63,7 @@ | |||
63 | #define E1000_WUFC_EX 0x00000004 /* Directed Exact Wakeup Enable */ | 63 | #define E1000_WUFC_EX 0x00000004 /* Directed Exact Wakeup Enable */ |
64 | #define E1000_WUFC_MC 0x00000008 /* Directed Multicast Wakeup Enable */ | 64 | #define E1000_WUFC_MC 0x00000008 /* Directed Multicast Wakeup Enable */ |
65 | #define E1000_WUFC_BC 0x00000010 /* Broadcast Wakeup Enable */ | 65 | #define E1000_WUFC_BC 0x00000010 /* Broadcast Wakeup Enable */ |
66 | #define E1000_WUFC_ARP 0x00000020 /* ARP Request Packet Wakeup Enable */ | ||
66 | 67 | ||
67 | /* Extended Device Control */ | 68 | /* Extended Device Control */ |
68 | #define E1000_CTRL_EXT_SDP7_DATA 0x00000080 /* Value of SW Defineable Pin 7 */ | 69 | #define E1000_CTRL_EXT_SDP7_DATA 0x00000080 /* Value of SW Defineable Pin 7 */ |
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 | } |