From e14fc9c95eec9a5d0aa1614f6dba4ad0f7c2e699 Mon Sep 17 00:00:00 2001 From: Raja Mani Date: Mon, 7 Nov 2011 22:52:46 +0200 Subject: [PATCH] --- yaml --- r: 278115 b: refs/heads/master c: a918fb3cc6a58f918f36348c43c3170bb88bc599 h: refs/heads/master i: 278113: f6226f7b7c8a7379c2b93471a2ae56ba8dd1586b 278111: 55132937859ef90192a1be7e37610f92dd93e78c v: v3 --- [refs] | 2 +- .../net/wireless/ath/ath6kl/cfg80211.c | 28 +++++++++++++++++++ trunk/drivers/net/wireless/ath/ath6kl/core.h | 1 + trunk/drivers/net/wireless/ath/ath6kl/txrx.c | 2 ++ 4 files changed, 32 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 18f192737371..5af2c7368fe8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d7c44e0ba5003c22a9ff3545fc2f51eaca8a95b1 +refs/heads/master: a918fb3cc6a58f918f36348c43c3170bb88bc599 diff --git a/trunk/drivers/net/wireless/ath/ath6kl/cfg80211.c b/trunk/drivers/net/wireless/ath/ath6kl/cfg80211.c index 0e3ecf814635..c981e137e1d1 100644 --- a/trunk/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/trunk/drivers/net/wireless/ath/ath6kl/cfg80211.c @@ -1886,6 +1886,34 @@ static int __ath6kl_cfg80211_resume(struct wiphy *wiphy) return ath6kl_hif_resume(ar); } + +/* + * FIXME: WOW suspend mode is selected if the host sdio controller supports + * both sdio irq wake up and keep power. The target pulls sdio data line to + * wake up the host when WOW pattern matches. This causes sdio irq handler + * is being called in the host side which internally hits ath6kl's RX path. + * + * Since sdio interrupt is not disabled, RX path executes even before + * the host executes the actual resume operation from PM module. + * + * In the current scenario, WOW resume should happen before start processing + * any data from the target. So It's required to perform WOW resume in RX path. + * Ideally we should perform WOW resume only in the actual platform + * resume path. This area needs bit rework to avoid WOW resume in RX path. + * + * ath6kl_check_wow_status() is called from ath6kl_rx(). + */ +void ath6kl_check_wow_status(struct ath6kl *ar) +{ + if (ar->state == ATH6KL_STATE_WOW) + ath6kl_cfg80211_resume(ar); +} + +#else + +void ath6kl_check_wow_status(struct ath6kl *ar) +{ +} #endif static int ath6kl_set_channel(struct wiphy *wiphy, struct net_device *dev, diff --git a/trunk/drivers/net/wireless/ath/ath6kl/core.h b/trunk/drivers/net/wireless/ath/ath6kl/core.h index 9e8b8e3339cb..e7e095e536a7 100644 --- a/trunk/drivers/net/wireless/ath/ath6kl/core.h +++ b/trunk/drivers/net/wireless/ath/ath6kl/core.h @@ -678,5 +678,6 @@ struct ath6kl_vif *ath6kl_vif_first(struct ath6kl *ar); void ath6kl_cleanup_vif(struct ath6kl_vif *vif, bool wmi_ready); int ath6kl_init_hw_start(struct ath6kl *ar); int ath6kl_init_hw_stop(struct ath6kl *ar); +void ath6kl_check_wow_status(struct ath6kl *ar); #endif /* CORE_H */ diff --git a/trunk/drivers/net/wireless/ath/ath6kl/txrx.c b/trunk/drivers/net/wireless/ath/ath6kl/txrx.c index 06e4912f0321..6f1de4468a12 100644 --- a/trunk/drivers/net/wireless/ath/ath6kl/txrx.c +++ b/trunk/drivers/net/wireless/ath/ath6kl/txrx.c @@ -1134,6 +1134,8 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet) return; } + ath6kl_check_wow_status(ar); + if (ept == ar->ctrl_ep) { ath6kl_wmi_control_rx(ar->wmi, skb); return;