aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaja Mani <rmani@qca.qualcomm.com>2011-11-07 15:52:46 -0500
committerKalle Valo <kvalo@qca.qualcomm.com>2011-11-11 06:00:00 -0500
commita918fb3cc6a58f918f36348c43c3170bb88bc599 (patch)
treeeeacc514e03652d9147917b3cdd2103c4cd60a53
parentd7c44e0ba5003c22a9ff3545fc2f51eaca8a95b1 (diff)
ath6kl: Perform WOW resume in RX path in case of SDIO IRQ wake up
The target triggers sdio data line to wake up the host when WOW pattern matches. This causes sdio irq handler is being executed in the host side which internally hits ath6kl's RX path. WOW resume should happen before start processing any data from the target. So it's required to perform WOW resume in RX path. This area needs bit rework to avoid WOW resume in RX path, As of now it's fine to have this model, rework will be done later. Signed-off-by: Raja Mani <rmani@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
-rw-r--r--drivers/net/wireless/ath/ath6kl/cfg80211.c28
-rw-r--r--drivers/net/wireless/ath/ath6kl/core.h1
-rw-r--r--drivers/net/wireless/ath/ath6kl/txrx.c2
3 files changed, 31 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index 0e3ecf814635..c981e137e1d1 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -1886,6 +1886,34 @@ static int __ath6kl_cfg80211_resume(struct wiphy *wiphy)
1886 1886
1887 return ath6kl_hif_resume(ar); 1887 return ath6kl_hif_resume(ar);
1888} 1888}
1889
1890/*
1891 * FIXME: WOW suspend mode is selected if the host sdio controller supports
1892 * both sdio irq wake up and keep power. The target pulls sdio data line to
1893 * wake up the host when WOW pattern matches. This causes sdio irq handler
1894 * is being called in the host side which internally hits ath6kl's RX path.
1895 *
1896 * Since sdio interrupt is not disabled, RX path executes even before
1897 * the host executes the actual resume operation from PM module.
1898 *
1899 * In the current scenario, WOW resume should happen before start processing
1900 * any data from the target. So It's required to perform WOW resume in RX path.
1901 * Ideally we should perform WOW resume only in the actual platform
1902 * resume path. This area needs bit rework to avoid WOW resume in RX path.
1903 *
1904 * ath6kl_check_wow_status() is called from ath6kl_rx().
1905 */
1906void ath6kl_check_wow_status(struct ath6kl *ar)
1907{
1908 if (ar->state == ATH6KL_STATE_WOW)
1909 ath6kl_cfg80211_resume(ar);
1910}
1911
1912#else
1913
1914void ath6kl_check_wow_status(struct ath6kl *ar)
1915{
1916}
1889#endif 1917#endif
1890 1918
1891static int ath6kl_set_channel(struct wiphy *wiphy, struct net_device *dev, 1919static int ath6kl_set_channel(struct wiphy *wiphy, struct net_device *dev,
diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h
index 9e8b8e3339cb..e7e095e536a7 100644
--- a/drivers/net/wireless/ath/ath6kl/core.h
+++ b/drivers/net/wireless/ath/ath6kl/core.h
@@ -678,5 +678,6 @@ struct ath6kl_vif *ath6kl_vif_first(struct ath6kl *ar);
678void ath6kl_cleanup_vif(struct ath6kl_vif *vif, bool wmi_ready); 678void ath6kl_cleanup_vif(struct ath6kl_vif *vif, bool wmi_ready);
679int ath6kl_init_hw_start(struct ath6kl *ar); 679int ath6kl_init_hw_start(struct ath6kl *ar);
680int ath6kl_init_hw_stop(struct ath6kl *ar); 680int ath6kl_init_hw_stop(struct ath6kl *ar);
681void ath6kl_check_wow_status(struct ath6kl *ar);
681 682
682#endif /* CORE_H */ 683#endif /* CORE_H */
diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c
index 06e4912f0321..6f1de4468a12 100644
--- a/drivers/net/wireless/ath/ath6kl/txrx.c
+++ b/drivers/net/wireless/ath/ath6kl/txrx.c
@@ -1134,6 +1134,8 @@ void ath6kl_rx(struct htc_target *target, struct htc_packet *packet)
1134 return; 1134 return;
1135 } 1135 }
1136 1136
1137 ath6kl_check_wow_status(ar);
1138
1137 if (ept == ar->ctrl_ep) { 1139 if (ept == ar->ctrl_ep) {
1138 ath6kl_wmi_control_rx(ar->wmi, skb); 1140 ath6kl_wmi_control_rx(ar->wmi, skb);
1139 return; 1141 return;