Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 291475
b: refs/heads/master
c: 1e9a905
h: refs/heads/master
i:
  291473: bd7aab9
  291471: 47efa0b
v: v3
  • Loading branch information
Raja Mani authored and Kalle Valo committed Mar 7, 2012
1 parent 3a48893 commit c4525cc
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 9 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: 068a4633bf42501db3ec934beff07cd50c1b7e9d
refs/heads/master: 1e9a905d9afd289bf19f02092a56660c2bcc50db
5 changes: 2 additions & 3 deletions trunk/drivers/net/wireless/ath/ath6kl/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -2046,10 +2046,9 @@ int ath6kl_cfg80211_suspend(struct ath6kl *ar,
ath6kl_tx_data_cleanup(ar);

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

ar->state = ATH6KL_STATE_WOW;
break;

Expand Down
9 changes: 9 additions & 0 deletions trunk/drivers/net/wireless/ath/ath6kl/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,14 @@

unsigned int debug_mask;
static unsigned int suspend_mode;
static unsigned int wow_mode;
static unsigned int uart_debug;
static unsigned int ath6kl_p2p;
static unsigned int testmode;

module_param(debug_mask, uint, 0644);
module_param(suspend_mode, uint, 0644);
module_param(wow_mode, uint, 0644);
module_param(uart_debug, uint, 0644);
module_param(ath6kl_p2p, uint, 0644);
module_param(testmode, uint, 0644);
Expand Down Expand Up @@ -119,6 +121,13 @@ int ath6kl_core_init(struct ath6kl *ar)
else
ar->suspend_mode = 0;

if (suspend_mode == WLAN_POWER_STATE_WOW &&
(wow_mode == WLAN_POWER_STATE_CUT_PWR ||
wow_mode == WLAN_POWER_STATE_DEEP_SLEEP))
ar->wow_suspend_mode = wow_mode;
else
ar->wow_suspend_mode = 0;

if (uart_debug)
ar->conf_flags |= ATH6KL_CONF_UART_DEBUG;

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ath/ath6kl/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,7 @@ struct ath6kl {

u16 conf_flags;
u16 suspend_mode;
u16 wow_suspend_mode;
wait_queue_head_t event_wq;
struct ath6kl_mbox_info mbox_info;

Expand Down
18 changes: 13 additions & 5 deletions trunk/drivers/net/wireless/ath/ath6kl/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,7 @@ static int ath6kl_sdio_suspend(struct ath6kl *ar, struct cfg80211_wowlan *wow)
struct ath6kl_sdio *ar_sdio = ath6kl_sdio_priv(ar);
struct sdio_func *func = ar_sdio->func;
mmc_pm_flag_t flags;
bool try_deepsleep = false;
int ret;

if (ar->state == ATH6KL_STATE_SCHED_SCAN) {
Expand All @@ -862,14 +863,21 @@ static int ath6kl_sdio_suspend(struct ath6kl *ar, struct cfg80211_wowlan *wow)
goto cut_pwr;

ret = ath6kl_cfg80211_suspend(ar, ATH6KL_CFG_SUSPEND_WOW, wow);
if (ret)
goto cut_pwr;

return 0;
if (ret && ret != -ENOTCONN)
ath6kl_err("wow suspend failed: %d\n", ret);

if (ret && (!ar->wow_suspend_mode ||
ar->wow_suspend_mode == WLAN_POWER_STATE_DEEP_SLEEP))
try_deepsleep = true;
else if (ret &&
ar->wow_suspend_mode == WLAN_POWER_STATE_CUT_PWR)
goto cut_pwr;
if (!ret)
return 0;
}

if (ar->suspend_mode == WLAN_POWER_STATE_DEEP_SLEEP ||
!ar->suspend_mode) {
!ar->suspend_mode || try_deepsleep) {

flags = sdio_get_host_pm_caps(func);
if (!(flags & MMC_PM_KEEP_POWER))
Expand Down

0 comments on commit c4525cc

Please sign in to comment.