be2net: Fix to show wol disabled/enabled state correctly.
authorSarveshwar Bandi <sarveshwar.bandi@emulex.com>
Thu, 25 Apr 2013 00:56:56 +0000 (00:56 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Apr 2013 16:33:47 +0000 (12:33 -0400)
Signed-off-by: Sarveshwar Bandi <sarveshwar.bandi@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/emulex/benet/be_ethtool.c

index 76b302f..1b7233c 100644 (file)
@@ -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));