Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 247653
b: refs/heads/master
c: 039bdb1
h: refs/heads/master
i:
  247651: 06f7ad7
v: v3
  • Loading branch information
Eliad Peller authored and Luciano Coelho committed May 13, 2011
1 parent 1887f8a commit 5e296eb
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 402e48616078c1e56f55a69d314b77f1d750d6ad
refs/heads/master: 039bdb1494d1d514987ce596a4898494021c7af2
29 changes: 28 additions & 1 deletion trunk/drivers/net/wireless/wl12xx/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,34 @@ static int wl1271_suspend(struct device *dev)
{
/* Tell MMC/SDIO core it's OK to power down the card
* (if it isn't already), but not to remove it completely */
return 0;
struct sdio_func *func = dev_to_sdio_func(dev);
struct wl1271 *wl = sdio_get_drvdata(func);
mmc_pm_flag_t sdio_flags;
int ret = 0;

wl1271_debug(DEBUG_MAC80211, "wl1271 suspend. wow_enabled: %d",
wl->wow_enabled);

/* check whether sdio should keep power */
if (wl->wow_enabled) {
sdio_flags = sdio_get_host_pm_caps(func);

if (!(sdio_flags & MMC_PM_KEEP_POWER)) {
wl1271_error("can't keep power while host "
"is suspended");
ret = -EINVAL;
goto out;
}

/* keep power while host suspended */
ret = sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER);
if (ret) {
wl1271_error("error while trying to keep power");
goto out;
}
}
out:
return ret;
}

static int wl1271_resume(struct device *dev)
Expand Down

0 comments on commit 5e296eb

Please sign in to comment.