diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2011-03-04 04:07:01 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2011-03-11 05:24:15 -0500 |
commit | 4a29e15515ea56b8ec78ebb77529b1ad5c268bb9 (patch) | |
tree | de83f15c260c4d3c5abdae208cef03b340f8c6fa /drivers | |
parent | 23e4f061306798dfb1941bd2f399949b705822c6 (diff) |
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: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/e1000e/ethtool.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c index 8e276dc4b848..07f09e96e453 100644 --- a/drivers/net/e1000e/ethtool.c +++ b/drivers/net/e1000e/ethtool.c | |||
@@ -1799,8 +1799,7 @@ static void e1000_get_wol(struct net_device *netdev, | |||
1799 | return; | 1799 | return; |
1800 | 1800 | ||
1801 | wol->supported = WAKE_UCAST | WAKE_MCAST | | 1801 | wol->supported = WAKE_UCAST | WAKE_MCAST | |
1802 | WAKE_BCAST | WAKE_MAGIC | | 1802 | WAKE_BCAST | WAKE_MAGIC | WAKE_PHY; |
1803 | WAKE_PHY | WAKE_ARP; | ||
1804 | 1803 | ||
1805 | /* apply any specific unsupported masks here */ | 1804 | /* apply any specific unsupported masks here */ |
1806 | if (adapter->flags & FLAG_NO_WAKE_UCAST) { | 1805 | if (adapter->flags & FLAG_NO_WAKE_UCAST) { |
@@ -1821,19 +1820,16 @@ static void e1000_get_wol(struct net_device *netdev, | |||
1821 | wol->wolopts |= WAKE_MAGIC; | 1820 | wol->wolopts |= WAKE_MAGIC; |
1822 | if (adapter->wol & E1000_WUFC_LNKC) | 1821 | if (adapter->wol & E1000_WUFC_LNKC) |
1823 | wol->wolopts |= WAKE_PHY; | 1822 | wol->wolopts |= WAKE_PHY; |
1824 | if (adapter->wol & E1000_WUFC_ARP) | ||
1825 | wol->wolopts |= WAKE_ARP; | ||
1826 | } | 1823 | } |
1827 | 1824 | ||
1828 | static int e1000_set_wol(struct net_device *netdev, | 1825 | static int e1000_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) |
1829 | struct ethtool_wolinfo *wol) | ||
1830 | { | 1826 | { |
1831 | struct e1000_adapter *adapter = netdev_priv(netdev); | 1827 | struct e1000_adapter *adapter = netdev_priv(netdev); |
1832 | 1828 | ||
1833 | if (!(adapter->flags & FLAG_HAS_WOL) || | 1829 | if (!(adapter->flags & FLAG_HAS_WOL) || |
1834 | !device_can_wakeup(&adapter->pdev->dev) || | 1830 | !device_can_wakeup(&adapter->pdev->dev) || |
1835 | (wol->wolopts & ~(WAKE_UCAST | WAKE_MCAST | WAKE_BCAST | | 1831 | (wol->wolopts & ~(WAKE_UCAST | WAKE_MCAST | WAKE_BCAST | |
1836 | WAKE_MAGIC | WAKE_PHY | WAKE_ARP))) | 1832 | WAKE_MAGIC | WAKE_PHY))) |
1837 | return -EOPNOTSUPP; | 1833 | return -EOPNOTSUPP; |
1838 | 1834 | ||
1839 | /* these settings will always override what we currently have */ | 1835 | /* these settings will always override what we currently have */ |
@@ -1849,8 +1845,6 @@ static int e1000_set_wol(struct net_device *netdev, | |||
1849 | adapter->wol |= E1000_WUFC_MAG; | 1845 | adapter->wol |= E1000_WUFC_MAG; |
1850 | if (wol->wolopts & WAKE_PHY) | 1846 | if (wol->wolopts & WAKE_PHY) |
1851 | adapter->wol |= E1000_WUFC_LNKC; | 1847 | adapter->wol |= E1000_WUFC_LNKC; |
1852 | if (wol->wolopts & WAKE_ARP) | ||
1853 | adapter->wol |= E1000_WUFC_ARP; | ||
1854 | 1848 | ||
1855 | device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol); | 1849 | device_set_wakeup_enable(&adapter->pdev->dev, adapter->wol); |
1856 | 1850 | ||