summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath9k/mci.c
diff options
context:
space:
mode:
authorRajkumar Manoharan <rmanohar@qca.qualcomm.com>2012-09-10 11:35:09 (GMT)
committerJohn W. Linville <linville@tuxdriver.com>2012-09-11 19:31:45 (GMT)
commit83ad49a96edaf139333be7f3f7ed261dd41e4ad3 (patch)
treec8be5ad246cb62751c63f13731b09ed7ef2b12cb /drivers/net/wireless/ath/ath9k/mci.c
parentc1154431e3a9ca2ce073b0637a50946941db56a4 (diff)
downloadlinux-83ad49a96edaf139333be7f3f7ed261dd41e4ad3.tar.xz
ath9k_hw: Wait BT calibration to complete
Whenever BT calibration requested, WLAN has to wait for the calibration to be completed. But right now we defer the waiting which might cause BT calibration to fail. Fix that. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/mci.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/mci.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/mci.c b/drivers/net/wireless/ath/ath9k/mci.c
index 9ee1f89..8f0e8d9 100644
--- a/drivers/net/wireless/ath/ath9k/mci.c
+++ b/drivers/net/wireless/ath/ath9k/mci.c
@@ -191,6 +191,23 @@ skip_tuning:
ath9k_btcoex_timer_resume(sc);
}
+static void ath_mci_wait_btcal_done(struct ath_softc *sc)
+{
+ struct ath_hw *ah = sc->sc_ah;
+
+ /* Stop tx & rx */
+ ieee80211_stop_queues(sc->hw);
+ ath_stoprecv(sc);
+ ath_drain_all_txq(sc, false);
+
+ /* Wait for cal done */
+ ar9003_mci_start_reset(ah, ah->curchan);
+
+ /* Resume tx & rx */
+ ath_startrecv(sc);
+ ieee80211_wake_queues(sc->hw);
+}
+
static void ath_mci_cal_msg(struct ath_softc *sc, u8 opcode, u8 *rx_payload)
{
struct ath_hw *ah = sc->sc_ah;
@@ -202,7 +219,7 @@ static void ath_mci_cal_msg(struct ath_softc *sc, u8 opcode, u8 *rx_payload)
case MCI_GPM_BT_CAL_REQ:
if (mci_hw->bt_state == MCI_BT_AWAKE) {
mci_hw->bt_state = MCI_BT_CAL_START;
- ath9k_queue_reset(sc, RESET_TYPE_MCI);
+ ath_mci_wait_btcal_done(sc);
}
ath_dbg(common, MCI, "MCI State : %d\n", mci_hw->bt_state);
break;