Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 278114
b: refs/heads/master
c: d7c44e0
h: refs/heads/master
v: v3
  • Loading branch information
Raja Mani authored and Kalle Valo committed Nov 11, 2011
1 parent f6226f7 commit 4784d6f
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 524441e3a7cadf12acbb409ad733d783ba1da459
refs/heads/master: d7c44e0ba5003c22a9ff3545fc2f51eaca8a95b1
28 changes: 28 additions & 0 deletions trunk/drivers/net/wireless/ath/ath6kl/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -1760,6 +1760,21 @@ int ath6kl_cfg80211_suspend(struct ath6kl *ar,
int ret;

switch (mode) {
case ATH6KL_CFG_SUSPEND_WOW:

ath6kl_dbg(ATH6KL_DBG_SUSPEND, "wow mode suspend\n");

/* Flush all non control pkts in TX path */
ath6kl_tx_data_cleanup(ar);

ret = ath6kl_wow_suspend(ar, wow);
if (ret) {
ath6kl_err("wow suspend failed: %d\n", ret);
return ret;
}
ar->state = ATH6KL_STATE_WOW;
break;

case ATH6KL_CFG_SUSPEND_DEEPSLEEP:

ath6kl_cfg80211_stop(ar);
Expand Down Expand Up @@ -1811,6 +1826,18 @@ int ath6kl_cfg80211_resume(struct ath6kl *ar)
int ret;

switch (ar->state) {
case ATH6KL_STATE_WOW:
ath6kl_dbg(ATH6KL_DBG_SUSPEND, "wow mode resume\n");

ret = ath6kl_wow_resume(ar);
if (ret) {
ath6kl_warn("wow mode resume failed: %d\n", ret);
return ret;
}

ar->state = ATH6KL_STATE_ON;
break;

case ATH6KL_STATE_DEEPSLEEP:
if (ar->wmi->pwr_mode != ar->wmi->saved_pwr_mode) {
ret = ath6kl_wmi_powermode_cmd(ar->wmi, 0,
Expand All @@ -1833,6 +1860,7 @@ int ath6kl_cfg80211_resume(struct ath6kl *ar)
ath6kl_warn("Failed to boot hw in resume: %d\n", ret);
return ret;
}
break;

default:
break;
Expand Down
20 changes: 20 additions & 0 deletions trunk/drivers/net/wireless/ath/ath6kl/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -798,6 +798,23 @@ static int ath6kl_sdio_suspend(struct ath6kl *ar, struct cfg80211_wowlan *wow)
return ret;
}

if ((flags & MMC_PM_WAKE_SDIO_IRQ) && wow) {
/*
* The host sdio controller is capable of keep power and
* sdio irq wake up at this point. It's fine to continue
* wow suspend operation.
*/
ret = ath6kl_cfg80211_suspend(ar, ATH6KL_CFG_SUSPEND_WOW, wow);
if (ret)
return ret;

ret = sdio_set_host_pm_flags(func, MMC_PM_WAKE_SDIO_IRQ);
if (ret)
ath6kl_err("set sdio wake irq flag failed: %d\n", ret);

return ret;
}

return ath6kl_cfg80211_suspend(ar, ATH6KL_CFG_SUSPEND_DEEPSLEEP, NULL);
}

Expand All @@ -820,6 +837,9 @@ static int ath6kl_sdio_resume(struct ath6kl *ar)

case ATH6KL_STATE_DEEPSLEEP:
break;

case ATH6KL_STATE_WOW:
break;
}

ath6kl_cfg80211_resume(ar);
Expand Down

0 comments on commit 4784d6f

Please sign in to comment.