aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorRajkumar Manoharan <rmanohar@qca.qualcomm.com>2012-06-04 06:58:31 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-06-06 15:20:28 -0400
commit99922a45e96b22df387823ad5ecfe4dc26a96c9e (patch)
treedfb0b69d54b04236586c7a55e6f89b0942bffccb /drivers/net
parentc8b6fbe1f1d38aa19882263d6b0c644269e94244 (diff)
ath9k_hw: fix BT RF performance
When software rfkill is triggered, before put the chip in reset state, give LNA and SPDT control to BT to make sure BT can have good RF performance. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_mci.c16
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_mci.h1
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c3
3 files changed, 20 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mci.c b/drivers/net/wireless/ath/ath9k/ar9003_mci.c
index 854dff66a63f..8b09a8239c1c 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_mci.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_mci.c
@@ -1391,3 +1391,19 @@ u32 ar9003_mci_state(struct ath_hw *ah, u32 state_type, u32 *p_data)
1391 return value; 1391 return value;
1392} 1392}
1393EXPORT_SYMBOL(ar9003_mci_state); 1393EXPORT_SYMBOL(ar9003_mci_state);
1394
1395void ar9003_mci_bt_gain_ctrl(struct ath_hw *ah)
1396{
1397 struct ath_common *common = ath9k_hw_common(ah);
1398 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci;
1399
1400 ath_dbg(common, MCI, "Give LNA and SPDT control to BT\n");
1401
1402 REG_SET_BIT(ah, AR_PHY_GLB_CONTROL, AR_BTCOEX_CTRL_BT_OWN_SPDT_CTRL);
1403 mci->is_2g = false;
1404 mci->update_2g5g = true;
1405 ar9003_mci_send_2g5g_status(ah, true);
1406
1407 /* Force another 2g5g update at next scanning */
1408 mci->update_2g5g = true;
1409}
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mci.h b/drivers/net/wireless/ath/ath9k/ar9003_mci.h
index 652ab8c39e2b..f4a6a4450ba8 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_mci.h
+++ b/drivers/net/wireless/ath/ath9k/ar9003_mci.h
@@ -266,6 +266,7 @@ void ar9003_mci_setup(struct ath_hw *ah, u32 gpm_addr, void *gpm_buf,
266void ar9003_mci_cleanup(struct ath_hw *ah); 266void ar9003_mci_cleanup(struct ath_hw *ah);
267void ar9003_mci_get_interrupt(struct ath_hw *ah, u32 *raw_intr, 267void ar9003_mci_get_interrupt(struct ath_hw *ah, u32 *raw_intr,
268 u32 *rx_msg_intr); 268 u32 *rx_msg_intr);
269void ar9003_mci_bt_gain_ctrl(struct ath_hw *ah);
269 270
270/* 271/*
271 * These functions are used by ath9k_hw. 272 * These functions are used by ath9k_hw.
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 9f0f5f74f17a..98478fd5d284 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -2737,6 +2737,9 @@ EXPORT_SYMBOL(ath9k_hw_setrxfilter);
2737 2737
2738bool ath9k_hw_phy_disable(struct ath_hw *ah) 2738bool ath9k_hw_phy_disable(struct ath_hw *ah)
2739{ 2739{
2740 if (ath9k_hw_mci_is_enabled(ah))
2741 ar9003_mci_bt_gain_ctrl(ah);
2742
2740 if (!ath9k_hw_set_reset_reg(ah, ATH9K_RESET_WARM)) 2743 if (!ath9k_hw_set_reset_reg(ah, ATH9K_RESET_WARM))
2741 return false; 2744 return false;
2742 2745