aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRajkumar Manoharan <rmanohar@qca.qualcomm.com>2012-07-01 10:23:53 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-07-09 16:36:19 -0400
commitb73f3e78047abdcc8bc33f97445ef6691ce3cc3d (patch)
tree1a16b95fca437fe67d2c4e95ddd8986ea0142f97 /drivers
parent54717e5330318d53180a1f3026f617509031ee68 (diff)
ath9k: fix fullsleep power consumption when BTCOEX is enabled
As soon as the interface brought up, btcoex timer starts running eventhough the interface is in idle state and WLAN chip is moved to full sleep mode. There is no point in running btcoex timer when the wlan interface is in sleep mode and also it might consumes more power on WLAN idle unassociated state. So lets stop the btcoex when wlan is idle state. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index e4e73f061a22..6ce012815ba6 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -666,8 +666,6 @@ static int ath9k_start(struct ieee80211_hw *hw)
666 666
667 spin_unlock_bh(&sc->sc_pcu_lock); 667 spin_unlock_bh(&sc->sc_pcu_lock);
668 668
669 ath9k_start_btcoex(sc);
670
671 if (ah->caps.pcie_lcr_extsync_en && common->bus_ops->extn_synch_en) 669 if (ah->caps.pcie_lcr_extsync_en && common->bus_ops->extn_synch_en)
672 common->bus_ops->extn_synch_en(common); 670 common->bus_ops->extn_synch_en(common);
673 671
@@ -774,8 +772,6 @@ static void ath9k_stop(struct ieee80211_hw *hw)
774 /* Ensure HW is awake when we try to shut it down. */ 772 /* Ensure HW is awake when we try to shut it down. */
775 ath9k_ps_wakeup(sc); 773 ath9k_ps_wakeup(sc);
776 774
777 ath9k_stop_btcoex(sc);
778
779 spin_lock_bh(&sc->sc_pcu_lock); 775 spin_lock_bh(&sc->sc_pcu_lock);
780 776
781 /* prevent tasklets to enable interrupts once we disable them */ 777 /* prevent tasklets to enable interrupts once we disable them */
@@ -1139,14 +1135,17 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
1139 1135
1140 if (changed & IEEE80211_CONF_CHANGE_IDLE) { 1136 if (changed & IEEE80211_CONF_CHANGE_IDLE) {
1141 sc->ps_idle = !!(conf->flags & IEEE80211_CONF_IDLE); 1137 sc->ps_idle = !!(conf->flags & IEEE80211_CONF_IDLE);
1142 if (sc->ps_idle) 1138 if (sc->ps_idle) {
1143 ath_cancel_work(sc); 1139 ath_cancel_work(sc);
1144 else 1140 ath9k_stop_btcoex(sc);
1141 } else {
1142 ath9k_start_btcoex(sc);
1145 /* 1143 /*
1146 * The chip needs a reset to properly wake up from 1144 * The chip needs a reset to properly wake up from
1147 * full sleep 1145 * full sleep
1148 */ 1146 */
1149 reset_channel = ah->chip_fullsleep; 1147 reset_channel = ah->chip_fullsleep;
1148 }
1150 } 1149 }
1151 1150
1152 /* 1151 /*