Commit 4a29e155 authored by Bruce Allan's avatar Bruce Allan Committed by Jeff Kirsher

e1000e: do not suggest the driver supports Wake-on-ARP

The driver doesn't support Wake-on-ARP, so don't advertise through ethtool
that it does.

Cleanup some coding style issues in the same functions.
Signed-off-by: default avatarBruce Allan <bruce.w.allan@intel.com>
Tested-by: default avatarJeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 23e4f061
...@@ -1799,8 +1799,7 @@ static void e1000_get_wol(struct net_device *netdev, ...@@ -1799,8 +1799,7 @@ static void e1000_get_wol(struct net_device *netdev,
return; return;
wol->supported = WAKE_UCAST | WAKE_MCAST | wol->supported = WAKE_UCAST | WAKE_MCAST |
WAKE_BCAST | WAKE_MAGIC | WAKE_BCAST | WAKE_MAGIC | WAKE_PHY;
WAKE_PHY | WAKE_ARP;
/* apply any specific unsupported masks here */ /* apply any specific unsupported masks here */
if (adapter->flags & FLAG_NO_WAKE_UCAST) { if (adapter->flags & FLAG_NO_WAKE_UCAST) {
...@@ -1821,19 +1820,16 @@ static void e1000_get_wol(struct net_device *netdev, ...@@ -1821,19 +1820,16 @@ static void e1000_get_wol(struct net_device *netdev,
wol->wolopts |= WAKE_MAGIC; wol->wolopts |= WAKE_MAGIC;
if (adapter->wol & E1000_WUFC_LNKC) if (adapter->wol & E1000_WUFC_LNKC)
wol->wolopts |= WAKE_PHY; wol->wolopts |= WAKE_PHY;
if (adapter->wol & E1000_WUFC_ARP)
wol->wolopts |= WAKE_ARP;
} }
static int e1000_set_wol(struct net_device *netdev, static int e1000_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
struct ethtool_wolinfo *wol)
{ {
struct e1000_adapter *adapter = netdev_priv(netdev); struct e1000_adapter *adapter = netdev_priv(netdev);
if (!(adapter->flags & FLAG_HAS_WOL) || if (!(adapter->flags & FLAG_HAS_WOL) ||
!device_can_wakeup(&adapter->pdev->dev) || !device_can_wakeup(&adapter->pdev->dev) ||
(wol->wolopts & ~(WAKE_UCAST | WAKE_MCAST | WAKE_BCAST | (wol->wolopts & ~(WAKE_UCAST | WAKE_MCAST | WAKE_BCAST |
WAKE_MAGIC | WAKE_PHY | WAKE_ARP))) WAKE_MAGIC | WAKE_PHY)))
return -EOPNOTSUPP; return -EOPNOTSUPP;
/* these settings will always override what we currently have */ /* these settings will always override what we currently have */
...@@ -1849,8 +1845,6 @@ static int e1000_set_wol(struct net_device *netdev, ...@@ -1849,8 +1845,6 @@ static int e1000_set_wol(struct net_device *netdev,
adapter->wol |= E1000_WUFC_MAG; adapter->wol |= E1000_WUFC_MAG;
if (wol->wolopts & WAKE_PHY) if (wol->wolopts & WAKE_PHY)
adapter->wol |= E1000_WUFC_LNKC; adapter->wol |= E1000_WUFC_LNKC;
if (wol->wolopts & WAKE_ARP)
adapter->wol |= E1000_WUFC_ARP;
device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol); device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment