Linux wireless drivers development
 help / color / mirror / Atom feed
From: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
To: <linville@tuxdriver.com>
Cc: <linux-wireless@vger.kernel.org>,
	Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Subject: [PATCH 06/10] ath9k_hw: fix BT RF performance
Date: Fri, 18 May 2012 19:37:29 +0530	[thread overview]
Message-ID: <1337350053-15491-6-git-send-email-rmanohar@qca.qualcomm.com> (raw)
In-Reply-To: <1337350053-15491-1-git-send-email-rmanohar@qca.qualcomm.com>

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>
---
 drivers/net/wireless/ath/ath9k/ar9003_mci.c |   16 ++++++++++++++++
 drivers/net/wireless/ath/ath9k/ar9003_mci.h |    1 +
 drivers/net/wireless/ath/ath9k/hw.c         |    3 +++
 3 files changed, 20 insertions(+)

diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mci.c b/drivers/net/wireless/ath/ath9k/ar9003_mci.c
index 4ebe4a2..e31461b 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)
 	return value;
 }
 EXPORT_SYMBOL(ar9003_mci_state);
+
+void ar9003_mci_bt_gain_ctrl(struct ath_hw *ah)
+{
+	struct ath_common *common = ath9k_hw_common(ah);
+	struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci;
+
+	ath_dbg(common, MCI, "Give LNA and SPDT control to BT\n");
+
+	REG_SET_BIT(ah, AR_PHY_GLB_CONTROL, AR_BTCOEX_CTRL_BT_OWN_SPDT_CTRL);
+	mci->is_2g = false;
+	mci->update_2g5g = true;
+	ar9003_mci_send_2g5g_status(ah, true);
+
+	/* Force another 2g5g update at next scanning */
+	mci->update_2g5g = true;
+}
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mci.h b/drivers/net/wireless/ath/ath9k/ar9003_mci.h
index 652ab8c..f4a6a44 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,
 void ar9003_mci_cleanup(struct ath_hw *ah);
 void ar9003_mci_get_interrupt(struct ath_hw *ah, u32 *raw_intr,
 			      u32 *rx_msg_intr);
+void ar9003_mci_bt_gain_ctrl(struct ath_hw *ah);
 
 /*
  * 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 53c5dea..245dec5 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -2734,6 +2734,9 @@ EXPORT_SYMBOL(ath9k_hw_setrxfilter);
 
 bool ath9k_hw_phy_disable(struct ath_hw *ah)
 {
+	if (AR_SREV_9462(ah))
+		ar9003_mci_bt_gain_ctrl(ah);
+
 	if (!ath9k_hw_set_reset_reg(ah, ATH9K_RESET_WARM))
 		return false;
 
-- 
1.7.10.2


  parent reply	other threads:[~2012-05-18 14:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-18 14:07 [PATCH 01/10] ath9k_hw: update ar9462 initval table to fix rx nfcal Rajkumar Manoharan
2012-05-18 14:07 ` [PATCH 02/10] ath9k: cleanup MCI indentation Rajkumar Manoharan
2012-05-18 14:07 ` [PATCH 03/10] ath9k_hw: fix IQ calibration chain index Rajkumar Manoharan
2012-05-18 14:07 ` [PATCH 04/10] ath9k_hw: program BT to control SPDT Rajkumar Manoharan
2012-05-18 14:07 ` [PATCH 05/10] ath9k_hw: add AR9462 initval for Global WLAN, BT settings Rajkumar Manoharan
2012-05-18 15:48   ` Sujith Manoharan
2012-05-18 14:07 ` Rajkumar Manoharan [this message]
2012-05-18 15:50   ` [PATCH 06/10] ath9k_hw: fix BT RF performance Sujith Manoharan
2012-05-18 14:07 ` [PATCH 07/10] ath9k: BT coex performance tuning for AR9462 Rajkumar Manoharan
2012-05-18 14:07 ` [PATCH 08/10] ath: do not update cycle counters with sleep mode results Rajkumar Manoharan
2012-05-18 14:07 ` [PATCH 09/10] ath9k: always perform ani calibration at poll interval Rajkumar Manoharan
2012-05-18 14:07 ` [PATCH 10/10] ath9k_hw: fix power state for MCI Rajkumar Manoharan
2012-05-18 15:45 ` [PATCH 01/10] ath9k_hw: update ar9462 initval table to fix rx nfcal Sujith Manoharan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1337350053-15491-6-git-send-email-rmanohar@qca.qualcomm.com \
    --to=rmanohar@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox