diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2015-02-16 00:20:01 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-03-03 07:55:27 -0500 |
commit | 2f890caba6ddb8d72d485e94df74cfa7626ccb0f (patch) | |
tree | 006024d187a32e39ff0667cb1ee35705201798d6 | |
parent | ad1dc638725d7c5cc96a1b4556f456c303a553c7 (diff) |
ath9k: Mute BT properly
Set The BT/WLAN priority weights correctly and make sure
that MCI_LNA_TAKE is sent only for cards that share
PA/LNA.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_mci.c | 13 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/reg_mci.h | 5 |
2 files changed, 15 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mci.c b/drivers/net/wireless/ath/ath9k/ar9003_mci.c index 133b8674c920..bd169fae32a1 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_mci.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_mci.c | |||
@@ -771,8 +771,14 @@ exit: | |||
771 | 771 | ||
772 | static void ar9003_mci_mute_bt(struct ath_hw *ah) | 772 | static void ar9003_mci_mute_bt(struct ath_hw *ah) |
773 | { | 773 | { |
774 | struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; | ||
775 | |||
774 | /* disable all MCI messages */ | 776 | /* disable all MCI messages */ |
775 | REG_WRITE(ah, AR_MCI_MSG_ATTRIBUTES_TABLE, 0xffff0000); | 777 | REG_WRITE(ah, AR_MCI_MSG_ATTRIBUTES_TABLE, 0xffff0000); |
778 | REG_WRITE(ah, AR_BTCOEX_WL_WEIGHTS0, 0xffffffff); | ||
779 | REG_WRITE(ah, AR_BTCOEX_WL_WEIGHTS1, 0xffffffff); | ||
780 | REG_WRITE(ah, AR_BTCOEX_WL_WEIGHTS2, 0xffffffff); | ||
781 | REG_WRITE(ah, AR_BTCOEX_WL_WEIGHTS3, 0xffffffff); | ||
776 | REG_SET_BIT(ah, AR_MCI_TX_CTRL, AR_MCI_TX_CTRL_DISABLE_LNA_UPDATE); | 782 | REG_SET_BIT(ah, AR_MCI_TX_CTRL, AR_MCI_TX_CTRL_DISABLE_LNA_UPDATE); |
777 | 783 | ||
778 | /* wait pending HW messages to flush out */ | 784 | /* wait pending HW messages to flush out */ |
@@ -783,9 +789,10 @@ static void ar9003_mci_mute_bt(struct ath_hw *ah) | |||
783 | * 1. reset not after resuming from full sleep | 789 | * 1. reset not after resuming from full sleep |
784 | * 2. before reset MCI RX, to quiet BT and avoid MCI RX misalignment | 790 | * 2. before reset MCI RX, to quiet BT and avoid MCI RX misalignment |
785 | */ | 791 | */ |
786 | ar9003_mci_send_lna_take(ah, true); | 792 | if (MCI_ANT_ARCH_PA_LNA_SHARED(mci)) { |
787 | 793 | ar9003_mci_send_lna_take(ah, true); | |
788 | udelay(5); | 794 | udelay(5); |
795 | } | ||
789 | 796 | ||
790 | ar9003_mci_send_sys_sleeping(ah, true); | 797 | ar9003_mci_send_sys_sleeping(ah, true); |
791 | } | 798 | } |
diff --git a/drivers/net/wireless/ath/ath9k/reg_mci.h b/drivers/net/wireless/ath/ath9k/reg_mci.h index 3bd7c21ea6cf..6251310704e3 100644 --- a/drivers/net/wireless/ath/ath9k/reg_mci.h +++ b/drivers/net/wireless/ath/ath9k/reg_mci.h | |||
@@ -212,6 +212,11 @@ | |||
212 | #define AR_BTCOEX_CTRL_SPDT_POLARITY 0x80000000 | 212 | #define AR_BTCOEX_CTRL_SPDT_POLARITY 0x80000000 |
213 | #define AR_BTCOEX_CTRL_SPDT_POLARITY_S 31 | 213 | #define AR_BTCOEX_CTRL_SPDT_POLARITY_S 31 |
214 | 214 | ||
215 | #define AR_BTCOEX_WL_WEIGHTS0 0x18b0 | ||
216 | #define AR_BTCOEX_WL_WEIGHTS1 0x18b4 | ||
217 | #define AR_BTCOEX_WL_WEIGHTS2 0x18b8 | ||
218 | #define AR_BTCOEX_WL_WEIGHTS3 0x18bc | ||
219 | |||
215 | #define AR_BTCOEX_MAX_TXPWR(_x) (0x18c0 + ((_x) << 2)) | 220 | #define AR_BTCOEX_MAX_TXPWR(_x) (0x18c0 + ((_x) << 2)) |
216 | #define AR_BTCOEX_WL_LNA 0x1940 | 221 | #define AR_BTCOEX_WL_LNA 0x1940 |
217 | #define AR_BTCOEX_RFGAIN_CTRL 0x1944 | 222 | #define AR_BTCOEX_RFGAIN_CTRL 0x1944 |