diff options
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_mci.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_mci.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/mci.c | 15 |
3 files changed, 6 insertions, 13 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mci.c b/drivers/net/wireless/ath/ath9k/ar9003_mci.c index d6e90f5effd0..1508500e73be 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_mci.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_mci.c | |||
@@ -1200,9 +1200,6 @@ u32 ar9003_mci_state(struct ath_hw *ah, u32 state_type) | |||
1200 | case MCI_STATE_CONT_TXRX: | 1200 | case MCI_STATE_CONT_TXRX: |
1201 | value = MS(mci->cont_status, AR_MCI_CONT_TXRX); | 1201 | value = MS(mci->cont_status, AR_MCI_CONT_TXRX); |
1202 | break; | 1202 | break; |
1203 | case MCI_STATE_BT: | ||
1204 | value = mci->bt_state; | ||
1205 | break; | ||
1206 | case MCI_STATE_SET_BT_SLEEP: | 1203 | case MCI_STATE_SET_BT_SLEEP: |
1207 | mci->bt_state = MCI_BT_SLEEP; | 1204 | mci->bt_state = MCI_BT_SLEEP; |
1208 | break; | 1205 | break; |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mci.h b/drivers/net/wireless/ath/ath9k/ar9003_mci.h index 697a56c3599e..0c02bd86597b 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_mci.h +++ b/drivers/net/wireless/ath/ath9k/ar9003_mci.h | |||
@@ -189,7 +189,6 @@ enum mci_bt_state { | |||
189 | /* Type of state query */ | 189 | /* Type of state query */ |
190 | enum mci_state_type { | 190 | enum mci_state_type { |
191 | MCI_STATE_ENABLE, | 191 | MCI_STATE_ENABLE, |
192 | MCI_STATE_BT, | ||
193 | MCI_STATE_SET_BT_SLEEP, | 192 | MCI_STATE_SET_BT_SLEEP, |
194 | MCI_STATE_SET_BT_AWAKE, | 193 | MCI_STATE_SET_BT_AWAKE, |
195 | MCI_STATE_SET_BT_CAL_START, | 194 | MCI_STATE_SET_BT_CAL_START, |
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); |