aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRajkumar Manoharan <rmanohar@qca.qualcomm.com>2012-11-20 08:00:00 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-11-21 14:16:01 -0500
commitb88083bfb37297330240a478bef76316ee3f1b9b (patch)
tree880c79adbc9e71b7e0b3e29af9761611983f92af
parentca90ef443cab31a5481d8a7f85514d28368fef44 (diff)
ath9k: Fix MCI reset in BT cal_req
This patch reverts the commit "ath9k_hw: Wait BT calibration to complete" and bail out from MCI interrupt routine for chip reset. The above commit stalls the WLAN TCP traffic while bringing up and down the BT interface iteratively. Fixing this properly by queueing up chip reset and bailing out properly from tasklet routine. Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_mci.c1
-rw-r--r--drivers/net/wireless/ath/ath9k/debug.c3
-rw-r--r--drivers/net/wireless/ath/ath9k/debug.h1
-rw-r--r--drivers/net/wireless/ath/ath9k/mci.c21
4 files changed, 7 insertions, 19 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mci.c b/drivers/net/wireless/ath/ath9k/ar9003_mci.c
index 42b4412d679..8dd069259e7 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_mci.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_mci.c
@@ -714,7 +714,6 @@ 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);
718 717
719int ar9003_mci_end_reset(struct ath_hw *ah, struct ath9k_channel *chan, 718int ar9003_mci_end_reset(struct ath_hw *ah, struct ath9k_channel *chan,
720 struct ath9k_hw_cal_data *caldata) 719 struct ath9k_hw_cal_data *caldata)
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
index 585aee47860..eed0b9ab8fe 100644
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -837,6 +837,9 @@ static ssize_t read_file_reset(struct file *file, char __user *user_buf,
837 len += snprintf(buf + len, sizeof(buf) - len, 837 len += snprintf(buf + len, sizeof(buf) - len,
838 "%17s: %2d\n", "PLL RX Hang", 838 "%17s: %2d\n", "PLL RX Hang",
839 sc->debug.stats.reset[RESET_TYPE_PLL_HANG]); 839 sc->debug.stats.reset[RESET_TYPE_PLL_HANG]);
840 len += snprintf(buf + len, sizeof(buf) - len,
841 "%17s: %2d\n", "MCI Reset",
842 sc->debug.stats.reset[RESET_TYPE_MCI]);
840 843
841 if (len > sizeof(buf)) 844 if (len > sizeof(buf))
842 len = sizeof(buf); 845 len = sizeof(buf);
diff --git a/drivers/net/wireless/ath/ath9k/debug.h b/drivers/net/wireless/ath/ath9k/debug.h
index 2ed9785a38f..61341cda131 100644
--- a/drivers/net/wireless/ath/ath9k/debug.h
+++ b/drivers/net/wireless/ath/ath9k/debug.h
@@ -41,6 +41,7 @@ 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,
44 __RESET_TYPE_MAX 45 __RESET_TYPE_MAX
45}; 46};
46 47
diff --git a/drivers/net/wireless/ath/ath9k/mci.c b/drivers/net/wireless/ath/ath9k/mci.c
index 0dd2cbb52d6..ece192d7735 100644
--- a/drivers/net/wireless/ath/ath9k/mci.c
+++ b/drivers/net/wireless/ath/ath9k/mci.c
@@ -207,23 +207,6 @@ skip_tuning:
207 ath9k_btcoex_timer_resume(sc); 207 ath9k_btcoex_timer_resume(sc);
208} 208}
209 209
210static void ath_mci_wait_btcal_done(struct ath_softc *sc)
211{
212 struct ath_hw *ah = sc->sc_ah;
213
214 /* Stop tx & rx */
215 ieee80211_stop_queues(sc->hw);
216 ath_stoprecv(sc);
217 ath_drain_all_txq(sc, false);
218
219 /* Wait for cal done */
220 ar9003_mci_start_reset(ah, ah->curchan);
221
222 /* Resume tx & rx */
223 ath_startrecv(sc);
224 ieee80211_wake_queues(sc->hw);
225}
226
227static void ath_mci_cal_msg(struct ath_softc *sc, u8 opcode, u8 *rx_payload) 210static void ath_mci_cal_msg(struct ath_softc *sc, u8 opcode, u8 *rx_payload)
228{ 211{
229 struct ath_hw *ah = sc->sc_ah; 212 struct ath_hw *ah = sc->sc_ah;
@@ -235,7 +218,7 @@ static void ath_mci_cal_msg(struct ath_softc *sc, u8 opcode, u8 *rx_payload)
235 case MCI_GPM_BT_CAL_REQ: 218 case MCI_GPM_BT_CAL_REQ:
236 if (mci_hw->bt_state == MCI_BT_AWAKE) { 219 if (mci_hw->bt_state == MCI_BT_AWAKE) {
237 mci_hw->bt_state = MCI_BT_CAL_START; 220 mci_hw->bt_state = MCI_BT_CAL_START;
238 ath_mci_wait_btcal_done(sc); 221 ath9k_queue_reset(sc, RESET_TYPE_MCI);
239 } 222 }
240 ath_dbg(common, MCI, "MCI State : %d\n", mci_hw->bt_state); 223 ath_dbg(common, MCI, "MCI State : %d\n", mci_hw->bt_state);
241 break; 224 break;
@@ -578,6 +561,8 @@ void ath_mci_intr(struct ath_softc *sc)
578 mci_int_rxmsg &= ~AR_MCI_INTERRUPT_RX_MSG_GPM; 561 mci_int_rxmsg &= ~AR_MCI_INTERRUPT_RX_MSG_GPM;
579 562
580 while (more_data == MCI_GPM_MORE) { 563 while (more_data == MCI_GPM_MORE) {
564 if (test_bit(SC_OP_HW_RESET, &sc->sc_flags))
565 return;
581 566
582 pgpm = mci->gpm_buf.bf_addr; 567 pgpm = mci->gpm_buf.bf_addr;
583 offset = ar9003_mci_get_next_gpm_offset(ah, false, 568 offset = ar9003_mci_get_next_gpm_offset(ah, false,