Patchwork [net,2/2] be2net: Fix to show wol disabled/enabled state correctly.

login
register
mail settings
Submitter Sarveshwar Bandi
Date April 25, 2013, 10:56 a.m.
Message ID <197de4df-d32f-410d-9d5c-f4beec269ce8@CMEXHTCAS1.ad.emulex.com>
Download mbox | patch
Permalink /patch/239490/
State Accepted
Delegated to: David Miller
Headers show

Comments

Sarveshwar Bandi - April 25, 2013, 10:56 a.m.
From: Sarveshwar Bandi <sarveshwar.bandi@emulex.com>

Signed-off-by: Sarveshwar Bandi <sarveshwar.bandi@emulex.com>
---
 drivers/net/ethernet/emulex/benet/be_ethtool.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
David Miller - April 29, 2013, 4:34 p.m.
From: <sarveshwar.bandi@emulex.com>
Date: Thu, 25 Apr 2013 16:26:56 +0530

> From: Sarveshwar Bandi <sarveshwar.bandi@emulex.com>
> 
> Signed-off-by: Sarveshwar Bandi <sarveshwar.bandi@emulex.com>

Applied.
--
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

Patch

diff --git a/drivers/net/ethernet/emulex/benet/be_ethtool.c b/drivers/net/ethernet/emulex/benet/be_ethtool.c
index 76b302f..1b7233c 100644
--- a/drivers/net/ethernet/emulex/benet/be_ethtool.c
+++ b/drivers/net/ethernet/emulex/benet/be_ethtool.c
@@ -680,7 +680,8 @@  be_get_wol(struct net_device *netdev, struct ethtool_wolinfo *wol)
 
 	if (be_is_wol_supported(adapter)) {
 		wol->supported |= WAKE_MAGIC;
-		wol->wolopts |= WAKE_MAGIC;
+		if (adapter->wol)
+			wol->wolopts |= WAKE_MAGIC;
 	} else
 		wol->wolopts = 0;
 	memset(&wol->sopass, 0, sizeof(wol->sopass));