diff mbox

dm9000: Fix check for disabled wake on LAN

Message ID 1321897916-5030-1-git-send-email-broonie@opensource.wolfsonmicro.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Mark Brown Nov. 21, 2011, 5:51 p.m. UTC
We're trying to check if any options are defined which isn't wha the
existing code does due to confusing & and &&.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 drivers/net/ethernet/davicom/dm9000.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

David Miller Nov. 26, 2011, 8:58 p.m. UTC | #1
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
Date: Mon, 21 Nov 2011 17:51:56 +0000

> We're trying to check if any options are defined which isn't wha the
> existing code does due to confusing & and &&.
> 
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

Good catch, applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/ethernet/davicom/dm9000.c b/drivers/net/ethernet/davicom/dm9000.c
index 26be1df..f801754 100644
--- a/drivers/net/ethernet/davicom/dm9000.c
+++ b/drivers/net/ethernet/davicom/dm9000.c
@@ -614,7 +614,7 @@  static int dm9000_set_wol(struct net_device *dev, struct ethtool_wolinfo *w)
 
 		if (!dm->wake_state)
 			irq_set_irq_wake(dm->irq_wake, 1);
-		else if (dm->wake_state & !opts)
+		else if (dm->wake_state && !opts)
 			irq_set_irq_wake(dm->irq_wake, 0);
 	}