Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 278010
b: refs/heads/master
c: aa6cffc
h: refs/heads/master
v: v3
  • Loading branch information
Chilam Ng authored and Kalle Valo committed Nov 11, 2011
1 parent 507df6b commit aeb3f5d
Show file tree
Hide file tree
Showing 7 changed files with 35 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: 4533d901a4a78542544b91ad620fffd3307ade04
refs/heads/master: aa6cffc1a275a9369ca83e13cebc4b09e4f23954
8 changes: 8 additions & 0 deletions trunk/drivers/net/wireless/ath/ath6kl/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -1421,6 +1421,13 @@ static int ar6k_cfg80211_suspend(struct wiphy *wiphy,

return ath6kl_hif_suspend(ar);
}

static int ar6k_cfg80211_resume(struct wiphy *wiphy)
{
struct ath6kl *ar = wiphy_priv(wiphy);

return ath6kl_hif_resume(ar);
}
#endif

static int ath6kl_set_channel(struct wiphy *wiphy, struct net_device *dev,
Expand Down Expand Up @@ -1832,6 +1839,7 @@ static struct cfg80211_ops ath6kl_cfg80211_ops = {
CFG80211_TESTMODE_CMD(ath6kl_tm_cmd)
#ifdef CONFIG_PM
.suspend = ar6k_cfg80211_suspend,
.resume = ar6k_cfg80211_resume,
#endif
.set_channel = ath6kl_set_channel,
.add_beacon = ath6kl_add_beacon,
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/net/wireless/ath/ath6kl/hif-ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,8 @@ static inline int ath6kl_hif_suspend(struct ath6kl *ar)
return ar->hif_ops->suspend(ar);
}

static inline int ath6kl_hif_resume(struct ath6kl *ar)
{
return ar->hif_ops->resume(ar);
}
#endif
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ath/ath6kl/hif.h
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ struct ath6kl_hif_ops {
struct hif_scatter_req *scat_req);
void (*cleanup_scatter)(struct ath6kl *ar);
int (*suspend)(struct ath6kl *ar);
int (*resume)(struct ath6kl *ar);
};

#endif
7 changes: 7 additions & 0 deletions trunk/drivers/net/wireless/ath/ath6kl/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,13 @@ void ath6kl_deep_sleep_enable(struct ath6kl *ar)
"during suspend\n");

ath6kl_cfg80211_scan_complete_event(ar, -ECANCELED);

/* save the current power mode before enabling power save */
ar->wmi->saved_pwr_mode = ar->wmi->pwr_mode;

if (ath6kl_wmi_powermode_cmd(ar->wmi, REC_POWER) != 0)
ath6kl_warn("ath6kl_deep_sleep_enable: "
"wmi_powermode_cmd failed\n");
}

/* WMI Event handlers */
Expand Down
13 changes: 13 additions & 0 deletions trunk/drivers/net/wireless/ath/ath6kl/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,18 @@ static int ath6kl_sdio_suspend(struct ath6kl *ar)
return 0;
}

static int ath6kl_sdio_resume(struct ath6kl *ar)
{
if (ar->wmi->pwr_mode != ar->wmi->saved_pwr_mode) {
if (ath6kl_wmi_powermode_cmd(ar->wmi,
ar->wmi->saved_pwr_mode) != 0)
ath6kl_warn("ath6kl_sdio_resume: "
"wmi_powermode_cmd failed\n");
}

return 0;
}

static const struct ath6kl_hif_ops ath6kl_sdio_ops = {
.read_write_sync = ath6kl_sdio_read_write_sync,
.write_async = ath6kl_sdio_write_async,
Expand All @@ -754,6 +766,7 @@ static const struct ath6kl_hif_ops ath6kl_sdio_ops = {
.scat_req_rw = ath6kl_sdio_async_rw_scatter,
.cleanup_scatter = ath6kl_sdio_cleanup_scatter,
.suspend = ath6kl_sdio_suspend,
.resume = ath6kl_sdio_resume,
};

static int ath6kl_sdio_probe(struct sdio_func *func,
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ath/ath6kl/wmi.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ struct wmi {

u8 *last_mgmt_tx_frame;
size_t last_mgmt_tx_frame_len;
u8 saved_pwr_mode;
};

struct host_app_area {
Expand Down

0 comments on commit aeb3f5d

Please sign in to comment.