From dfb72c4fda54b11efe0afbb4e4081af1dfa4c14f Mon Sep 17 00:00:00 2001 From: Daniel Drake Date: Wed, 27 Jul 2011 17:19:00 +0100 Subject: [PATCH] libertas_usb: program OLPC EC wakeup mask for wake-on-WLAN OLPC power management code has recently gone upstream. This piece completes the puzzle for libertas_usb, which now programs the OLPC EC for wlan wakeups when they have been requested. Signed-off-by: Daniel Drake Acked-by: Dan Williams Signed-off-by: John W. Linville --- drivers/net/wireless/libertas/if_usb.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c index e368b2922ff1..ca6e0a411e9c 100644 --- a/drivers/net/wireless/libertas/if_usb.c +++ b/drivers/net/wireless/libertas/if_usb.c @@ -1112,6 +1112,15 @@ static int if_usb_suspend(struct usb_interface *intf, pm_message_t message) if (priv->psstate != PS_STATE_FULL_POWER) return -1; +#ifdef CONFIG_OLPC + if (machine_is_olpc()) { + if (priv->wol_criteria == EHS_REMOVE_WAKEUP) + olpc_ec_wakeup_clear(EC_SCI_SRC_WLAN); + else + olpc_ec_wakeup_set(EC_SCI_SRC_WLAN); + } +#endif + ret = lbs_suspend(priv); if (ret) goto out; -- 2.39.5