Skip to content

Commit

Permalink
libertas_usb: program OLPC EC wakeup mask for wake-on-WLAN
Browse files Browse the repository at this point in the history
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 <dsd@laptop.org>
Acked-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Daniel Drake authored and John W. Linville committed Aug 8, 2011
1 parent 9c204b4 commit dfb72c4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/net/wireless/libertas/if_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit dfb72c4

Please sign in to comment.