summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/ar9003_mci.c
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2012-02-22 12:41:01 +0530
committerJohn W. Linville <linville@tuxdriver.com>2012-02-27 14:06:36 -0500
commitd1ca8b8ecd18d99cf3ae0c2a9b81d3a22b4141c1 (patch)
tree6324dfa489443e4a74866e0434b9280abeab6893 /drivers/net/wireless/ath/ath9k/ar9003_mci.c
parent5a1e273573d5e4a32aaa82a98a89b3fd711c74f0 (diff)
downloadblackbird-op-linux-d1ca8b8ecd18d99cf3ae0c2a9b81d3a22b4141c1.tar.gz
blackbird-op-linux-d1ca8b8ecd18d99cf3ae0c2a9b81d3a22b4141c1.zip
ath9k_hw: Handle MCI power state using a helper
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/ar9003_mci.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_mci.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mci.c b/drivers/net/wireless/ath/ath9k/ar9003_mci.c
index 1a01788ec103..a87d4ca1b547 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_mci.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_mci.c
@@ -365,6 +365,23 @@ static void ar9003_mci_prep_interface(struct ath_hw *ah)
REG_WRITE(ah, AR_MCI_INTERRUPT_EN, saved_mci_int_en);
}
+void ar9003_mci_set_full_sleep(struct ath_hw *ah)
+{
+ struct ath_common *common = ath9k_hw_common(ah);
+ struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci;
+
+ if (ar9003_mci_state(ah, MCI_STATE_ENABLE, NULL) &&
+ (mci->bt_state != MCI_BT_SLEEP) &&
+ !mci->halted_bt_gpm) {
+ ath_dbg(common, MCI,
+ "MCI halt BT GPM (full_sleep)\n");
+ ar9003_mci_send_coex_halt_bt_gpm(ah, true, true);
+ }
+
+ mci->ready = false;
+ REG_WRITE(ah, AR_RTC_KEEP_AWAKE, 0x2);
+}
+
void ar9003_mci_disable_interrupt(struct ath_hw *ah)
{
if (!ATH9K_HW_CAP_MCI)
OpenPOWER on IntegriCloud