libertas: Fix ethtool reporting no WOL options supported if WOL is not already active
authorSascha Silbe <sascha-pgp@silbe.org>
Sat, 5 Jun 2010 11:30:12 +0000 (13:30 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Tue, 8 Jun 2010 13:31:20 +0000 (09:31 -0400)
This patch fixes the libertas driver incorrectly reporting that Wake-on-LAN
is not supported if Wake-on-LAN is currently disabled.

Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/libertas/ethtool.c

index 6a36c9956fdca32a5ad437d92441ed4efc239bca..0cf31bbf6567b52923245e9a3dfdf935a8d64f7d 100644 (file)
@@ -69,14 +69,11 @@ static void lbs_ethtool_get_wol(struct net_device *dev,
 {
        struct lbs_private *priv = dev->ml_priv;
 
-       if (priv->wol_criteria == 0xffffffff) {
-               /* Interface driver didn't configure wake */
-               wol->supported = wol->wolopts = 0;
-               return;
-       }
-
        wol->supported = WAKE_UCAST|WAKE_MCAST|WAKE_BCAST|WAKE_PHY;
 
+       if (priv->wol_criteria == EHS_REMOVE_WAKEUP)
+               return;
+
        if (priv->wol_criteria & EHS_WAKE_ON_UNICAST_DATA)
                wol->wolopts |= WAKE_UCAST;
        if (priv->wol_criteria & EHS_WAKE_ON_MULTICAST_DATA)