netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next-2.6 PATCH 01/23] e1000e: check WoL mode is among set of supported modes
@ 2009-11-21  9:22 Jeff Kirsher
  2009-11-21  9:22 ` [net-next-2.6 PATCH 02/23] e1000e: add missing tests for 82583 in ethtool functions Jeff Kirsher
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: Jeff Kirsher @ 2009-11-21  9:22 UTC (permalink / raw)
  To: davem; +Cc: netdev, gospo, Bruce Allan, Jeff Kirsher

From: Bruce Allan <bruce.w.allan@intel.com>

When setting WoL feature, check the supplied modes are all supported rather
than checking for no support.  This way, if any new modes are added the
driver does not default to not complaining about it if we don't really
support it.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/e1000e/ethtool.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c
index c430dc8..3af5ee4 100644
--- a/drivers/net/e1000e/ethtool.c
+++ b/drivers/net/e1000e/ethtool.c
@@ -1777,12 +1777,11 @@ static int e1000_set_wol(struct net_device *netdev,
 {
 	struct e1000_adapter *adapter = netdev_priv(netdev);
 
-	if (wol->wolopts & WAKE_MAGICSECURE)
-		return -EOPNOTSUPP;
-
 	if (!(adapter->flags & FLAG_HAS_WOL) ||
-	    !device_can_wakeup(&adapter->pdev->dev))
-		return wol->wolopts ? -EOPNOTSUPP : 0;
+	    !device_can_wakeup(&adapter->pdev->dev) ||
+	    (wol->wolopts & ~(WAKE_UCAST | WAKE_MCAST | WAKE_BCAST |
+	                      WAKE_MAGIC | WAKE_PHY | WAKE_ARP)))
+		return -EOPNOTSUPP;
 
 	/* these settings will always override what we currently have */
 	adapter->wol = 0;


^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2009-11-21  9:29 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-21  9:22 [net-next-2.6 PATCH 01/23] e1000e: check WoL mode is among set of supported modes Jeff Kirsher
2009-11-21  9:22 ` [net-next-2.6 PATCH 02/23] e1000e: add missing tests for 82583 in ethtool functions Jeff Kirsher
2009-11-21  9:22 ` [net-next-2.6 PATCH 03/23] e1000e: clearing interrupt timers causes descriptors to get flushed Jeff Kirsher
2009-11-21  9:22 ` [net-next-2.6 PATCH 04/23] e1000e: function pointers for ethtool set/get offloads Jeff Kirsher
2009-11-21  9:23 ` [net-next-2.6 PATCH 05/23] e1000e: don't clean Rx ring while resetting Jeff Kirsher
2009-11-21  9:23 ` [net-next-2.6 PATCH 06/23] e1000e: link reporting problems Jeff Kirsher
2009-11-21  9:23 ` [net-next-2.6 PATCH 07/23] e1000e: improper return code signage Jeff Kirsher
2009-11-21  9:24 ` [net-next-2.6 PATCH 08/23] e1000e: disable K1 on PCH LOM when in PHY loopback mode Jeff Kirsher
2009-11-21  9:24 ` [net-next-2.6 PATCH 09/23] e1000e: Incorrect MII Link beat reporting Jeff Kirsher
2009-11-21  9:24 ` [net-next-2.6 PATCH 10/23] e1000e: cleanup redundant #include's Jeff Kirsher
2009-11-21  9:25 ` [net-next-2.6 PATCH 11/23] e1000e: consolidate two dbug macros into one simpler one Jeff Kirsher
2009-11-21  9:25 ` [net-next-2.6 PATCH 12/23] e1000e: cleanup ops function pointers Jeff Kirsher
2009-11-21  9:25 ` [net-next-2.6 PATCH 13/23] e1000e: update copyright information Jeff Kirsher
2009-11-21  9:26 ` [net-next-2.6 PATCH 14/23] e1000e: remove comments regarding a non-existent api module Jeff Kirsher
2009-11-21  9:26 ` [net-next-2.6 PATCH 15/23] e1000e: provide comment for 82571 workaround Jeff Kirsher
2009-11-21  9:26 ` [net-next-2.6 PATCH 16/23] e1000e: set bools to true/false instead of 1/0 Jeff Kirsher
2009-11-21  9:27 ` [net-next-2.6 PATCH 17/23] e1000e: cleanup - shift indentation left by exiting early in e1000_tso Jeff Kirsher
2009-11-21  9:27 ` [net-next-2.6 PATCH 18/23] e1000e: cleanup functions that clear hardware statistics Jeff Kirsher
2009-11-21  9:27 ` [net-next-2.6 PATCH 19/23] e1000e: set pm_qos DMA latency requirement per interface when needed Jeff Kirsher
2009-11-21  9:27 ` [net-next-2.6 PATCH 20/23] e1000e: do not error out on identification LED init failure Jeff Kirsher
2009-11-21  9:28 ` [net-next-2.6 PATCH 21/23] e1000e: remove redundant might_sleep() Jeff Kirsher
2009-11-21  9:28 ` [net-next-2.6 PATCH 22/23] e1000e: cosmetic - group local variables of the same type Jeff Kirsher
2009-11-21  9:28 ` [net-next-2.6 PATCH 23/23] e1000e: update Tx Unit hang detection message Jeff Kirsher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).