From 84efa0e7aab9f41451bdf4bff5e2414bb59c6a93 Mon Sep 17 00:00:00 2001 From: Sascha Silbe Date: Sat, 5 Jun 2010 13:30:12 +0200 Subject: libertas: Fix ethtool reporting no WOL options supported if WOL is not already active 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 Acked-by: Dan Williams Signed-off-by: John W. Linville --- drivers/net/wireless/libertas/ethtool.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/libertas/ethtool.c b/drivers/net/wireless/libertas/ethtool.c index 6a36c9956fd..0cf31bbf656 100644 --- a/drivers/net/wireless/libertas/ethtool.c +++ b/drivers/net/wireless/libertas/ethtool.c @@ -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) -- cgit v1.2.3