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 76b302f30c8727fe638a8e9783f8246c037f1db6..1b7233c11af3e0eebf47f4e6a11c786998b16d97 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));