diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/mci.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/mci.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath/ath9k/mci.c b/drivers/net/wireless/ath/ath9k/mci.c index 61a68e856049..156454892588 100644 --- a/drivers/net/wireless/ath/ath9k/mci.c +++ b/drivers/net/wireless/ath/ath9k/mci.c | |||
@@ -195,20 +195,16 @@ static void ath_mci_cal_msg(struct ath_softc *sc, u8 opcode, u8 *rx_payload) | |||
195 | { | 195 | { |
196 | struct ath_hw *ah = sc->sc_ah; | 196 | struct ath_hw *ah = sc->sc_ah; |
197 | struct ath_common *common = ath9k_hw_common(ah); | 197 | struct ath_common *common = ath9k_hw_common(ah); |
198 | struct ath9k_hw_mci *mci_hw = &ah->btcoex_hw.mci; | ||
198 | u32 payload[4] = {0, 0, 0, 0}; | 199 | u32 payload[4] = {0, 0, 0, 0}; |
199 | 200 | ||
200 | switch (opcode) { | 201 | switch (opcode) { |
201 | case MCI_GPM_BT_CAL_REQ: | 202 | case MCI_GPM_BT_CAL_REQ: |
202 | if (ar9003_mci_state(ah, MCI_STATE_BT) == MCI_BT_AWAKE) { | 203 | if (mci_hw->bt_state == MCI_BT_AWAKE) { |
203 | ar9003_mci_state(ah, MCI_STATE_SET_BT_CAL_START); | 204 | ar9003_mci_state(ah, MCI_STATE_SET_BT_CAL_START); |
204 | ieee80211_queue_work(sc->hw, &sc->hw_reset_work); | 205 | ieee80211_queue_work(sc->hw, &sc->hw_reset_work); |
205 | } else { | ||
206 | ath_dbg(common, MCI, "MCI State mismatch: %d\n", | ||
207 | ar9003_mci_state(ah, MCI_STATE_BT)); | ||
208 | } | 206 | } |
209 | break; | 207 | ath_dbg(common, MCI, "MCI State : %d\n", mci_hw->bt_state); |
210 | case MCI_GPM_BT_CAL_DONE: | ||
211 | ar9003_mci_state(ah, MCI_STATE_BT); | ||
212 | break; | 208 | break; |
213 | case MCI_GPM_BT_CAL_GRANT: | 209 | case MCI_GPM_BT_CAL_GRANT: |
214 | MCI_GPM_SET_CAL_TYPE(payload, MCI_GPM_WLAN_CAL_DONE); | 210 | MCI_GPM_SET_CAL_TYPE(payload, MCI_GPM_WLAN_CAL_DONE); |
@@ -407,6 +403,7 @@ void ath_mci_intr(struct ath_softc *sc) | |||
407 | struct ath_mci_coex *mci = &sc->mci_coex; | 403 | struct ath_mci_coex *mci = &sc->mci_coex; |
408 | struct ath_hw *ah = sc->sc_ah; | 404 | struct ath_hw *ah = sc->sc_ah; |
409 | struct ath_common *common = ath9k_hw_common(ah); | 405 | struct ath_common *common = ath9k_hw_common(ah); |
406 | struct ath9k_hw_mci *mci_hw = &ah->btcoex_hw.mci; | ||
410 | u32 mci_int, mci_int_rxmsg; | 407 | u32 mci_int, mci_int_rxmsg; |
411 | u32 offset, subtype, opcode; | 408 | u32 offset, subtype, opcode; |
412 | u32 *pgpm; | 409 | u32 *pgpm; |
@@ -446,7 +443,7 @@ void ath_mci_intr(struct ath_softc *sc) | |||
446 | if (mci_int_rxmsg & AR_MCI_INTERRUPT_RX_MSG_SYS_WAKING) { | 443 | if (mci_int_rxmsg & AR_MCI_INTERRUPT_RX_MSG_SYS_WAKING) { |
447 | mci_int_rxmsg &= ~AR_MCI_INTERRUPT_RX_MSG_SYS_WAKING; | 444 | mci_int_rxmsg &= ~AR_MCI_INTERRUPT_RX_MSG_SYS_WAKING; |
448 | 445 | ||
449 | if ((ar9003_mci_state(ah, MCI_STATE_BT) == MCI_BT_SLEEP) && | 446 | if ((mci_hw->bt_state == MCI_BT_SLEEP) && |
450 | (ar9003_mci_state(ah, MCI_STATE_REMOTE_SLEEP) != | 447 | (ar9003_mci_state(ah, MCI_STATE_REMOTE_SLEEP) != |
451 | MCI_BT_SLEEP)) | 448 | MCI_BT_SLEEP)) |
452 | ar9003_mci_state(ah, MCI_STATE_SET_BT_AWAKE); | 449 | ar9003_mci_state(ah, MCI_STATE_SET_BT_AWAKE); |
@@ -455,7 +452,7 @@ void ath_mci_intr(struct ath_softc *sc) | |||
455 | if (mci_int_rxmsg & AR_MCI_INTERRUPT_RX_MSG_SYS_SLEEPING) { | 452 | if (mci_int_rxmsg & AR_MCI_INTERRUPT_RX_MSG_SYS_SLEEPING) { |
456 | mci_int_rxmsg &= ~AR_MCI_INTERRUPT_RX_MSG_SYS_SLEEPING; | 453 | mci_int_rxmsg &= ~AR_MCI_INTERRUPT_RX_MSG_SYS_SLEEPING; |
457 | 454 | ||
458 | if ((ar9003_mci_state(ah, MCI_STATE_BT) == MCI_BT_AWAKE) && | 455 | if ((mci_hw->bt_state == MCI_BT_AWAKE) && |
459 | (ar9003_mci_state(ah, MCI_STATE_REMOTE_SLEEP) != | 456 | (ar9003_mci_state(ah, MCI_STATE_REMOTE_SLEEP) != |
460 | MCI_BT_AWAKE)) | 457 | MCI_BT_AWAKE)) |
461 | ar9003_mci_state(ah, MCI_STATE_SET_BT_SLEEP); | 458 | ar9003_mci_state(ah, MCI_STATE_SET_BT_SLEEP); |