aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorRajkumar Manoharan <rmanohar@qca.qualcomm.com>2012-09-10 07:35:09 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-09-11 15:31:45 -0400
commit83ad49a96edaf139333be7f3f7ed261dd41e4ad3 (patch)
treec8be5ad246cb62751c63f13731b09ed7ef2b12cb /drivers/net
parentc1154431e3a9ca2ce073b0637a50946941db56a4 (diff)
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')
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_mci.c1
-rw-r--r--drivers/net/wireless/ath/ath9k/debug.h1
-rw-r--r--drivers/net/wireless/ath/ath9k/mci.c19
3 files changed, 19 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mci.c b/drivers/net/wireless/ath/ath9k/ar9003_mci.c
index ea49d6198d86..b2e39e8a21b5 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_mci.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_mci.c
@@ -714,6 +714,7 @@ bool ar9003_mci_start_reset(struct ath_hw *ah, struct ath9k_channel *chan)
714 714
715 return true; 715 return true;
716} 716}
717EXPORT_SYMBOL(ar9003_mci_start_reset);
717 718
718int ar9003_mci_end_reset(struct ath_hw *ah, struct ath9k_channel *chan, 719int ar9003_mci_end_reset(struct ath_hw *ah, struct ath9k_channel *chan,
719 struct ath9k_hw_cal_data *caldata) 720 struct ath9k_hw_cal_data *caldata)
diff --git a/drivers/net/wireless/ath/ath9k/debug.h b/drivers/net/wireless/ath/ath9k/debug.h
index 61341cda1313..2ed9785a38fa 100644
--- a/drivers/net/wireless/ath/ath9k/debug.h
+++ b/drivers/net/wireless/ath/ath9k/debug.h
@@ -41,7 +41,6 @@ enum ath_reset_type {
41 RESET_TYPE_PLL_HANG, 41 RESET_TYPE_PLL_HANG,
42 RESET_TYPE_MAC_HANG, 42 RESET_TYPE_MAC_HANG,
43 RESET_TYPE_BEACON_STUCK, 43 RESET_TYPE_BEACON_STUCK,
44 RESET_TYPE_MCI,
45 __RESET_TYPE_MAX 44 __RESET_TYPE_MAX
46}; 45};
47 46
diff --git a/drivers/net/wireless/ath/ath9k/mci.c b/drivers/net/wireless/ath/ath9k/mci.c
index 9ee1f89f4000..8f0e8d9c2054 100644
--- a/drivers/net/wireless/ath/ath9k/mci.c
+++ b/drivers/net/wireless/ath/ath9k/mci.c
@@ -191,6 +191,23 @@ skip_tuning:
191 ath9k_btcoex_timer_resume(sc); 191 ath9k_btcoex_timer_resume(sc);
192} 192}
193 193
194static void ath_mci_wait_btcal_done(struct ath_softc *sc)
195{
196 struct ath_hw *ah = sc->sc_ah;
197
198 /* Stop tx & rx */
199 ieee80211_stop_queues(sc->hw);
200 ath_stoprecv(sc);
201 ath_drain_all_txq(sc, false);
202
203 /* Wait for cal done */
204 ar9003_mci_start_reset(ah, ah->curchan);
205
206 /* Resume tx & rx */
207 ath_startrecv(sc);
208 ieee80211_wake_queues(sc->hw);
209}
210
194static void ath_mci_cal_msg(struct ath_softc *sc, u8 opcode, u8 *rx_payload) 211static void ath_mci_cal_msg(struct ath_softc *sc, u8 opcode, u8 *rx_payload)
195{ 212{
196 struct ath_hw *ah = sc->sc_ah; 213 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)
202 case MCI_GPM_BT_CAL_REQ: 219 case MCI_GPM_BT_CAL_REQ:
203 if (mci_hw->bt_state == MCI_BT_AWAKE) { 220 if (mci_hw->bt_state == MCI_BT_AWAKE) {
204 mci_hw->bt_state = MCI_BT_CAL_START; 221 mci_hw->bt_state = MCI_BT_CAL_START;
205 ath9k_queue_reset(sc, RESET_TYPE_MCI); 222 ath_mci_wait_btcal_done(sc);
206 } 223 }
207 ath_dbg(common, MCI, "MCI State : %d\n", mci_hw->bt_state); 224 ath_dbg(common, MCI, "MCI State : %d\n", mci_hw->bt_state);
208 break; 225 break;