aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_mci.c4
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_mci.h4
-rw-r--r--drivers/net/wireless/ath/ath9k/mci.c12
3 files changed, 18 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mci.c b/drivers/net/wireless/ath/ath9k/ar9003_mci.c
index f6eb43ee87ee..8d8df4b2c386 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_mci.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_mci.c
@@ -1236,6 +1236,10 @@ u32 ar9003_mci_state(struct ath_hw *ah, u32 state_type)
1236 case MCI_STATE_NEED_FTP_STOMP: 1236 case MCI_STATE_NEED_FTP_STOMP:
1237 value = !(mci->config & ATH_MCI_CONFIG_DISABLE_FTP_STOMP); 1237 value = !(mci->config & ATH_MCI_CONFIG_DISABLE_FTP_STOMP);
1238 break; 1238 break;
1239 case MCI_STATE_NEED_FLUSH_BT_INFO:
1240 value = (!mci->unhalt_bt_gpm && mci->need_flush_btinfo) ? 1 : 0;
1241 mci->need_flush_btinfo = false;
1242 break;
1239 default: 1243 default:
1240 break; 1244 break;
1241 } 1245 }
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_mci.h b/drivers/net/wireless/ath/ath9k/ar9003_mci.h
index f3bef8d69edd..30acf2869aa4 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_mci.h
+++ b/drivers/net/wireless/ath/ath9k/ar9003_mci.h
@@ -200,6 +200,7 @@ enum mci_state_type {
200 MCI_STATE_RECOVER_RX, 200 MCI_STATE_RECOVER_RX,
201 MCI_STATE_NEED_FTP_STOMP, 201 MCI_STATE_NEED_FTP_STOMP,
202 MCI_STATE_DEBUG, 202 MCI_STATE_DEBUG,
203 MCI_STATE_NEED_FLUSH_BT_INFO,
203 MCI_STATE_MAX 204 MCI_STATE_MAX
204}; 205};
205 206
@@ -211,7 +212,8 @@ enum mci_gpm_coex_opcode {
211 MCI_GPM_COEX_WLAN_CHANNELS, 212 MCI_GPM_COEX_WLAN_CHANNELS,
212 MCI_GPM_COEX_BT_PROFILE_INFO, 213 MCI_GPM_COEX_BT_PROFILE_INFO,
213 MCI_GPM_COEX_BT_STATUS_UPDATE, 214 MCI_GPM_COEX_BT_STATUS_UPDATE,
214 MCI_GPM_COEX_BT_UPDATE_FLAGS 215 MCI_GPM_COEX_BT_UPDATE_FLAGS,
216 MCI_GPM_COEX_NOOP,
215}; 217};
216 218
217#define MCI_GPM_NOMORE 0 219#define MCI_GPM_NOMORE 0
diff --git a/drivers/net/wireless/ath/ath9k/mci.c b/drivers/net/wireless/ath/ath9k/mci.c
index 8f0e8d9c2054..3a400c83c077 100644
--- a/drivers/net/wireless/ath/ath9k/mci.c
+++ b/drivers/net/wireless/ath/ath9k/mci.c
@@ -80,6 +80,7 @@ void ath_mci_flush_profile(struct ath_mci_profile *mci)
80 struct ath_mci_profile_info *info, *tinfo; 80 struct ath_mci_profile_info *info, *tinfo;
81 81
82 mci->aggr_limit = 0; 82 mci->aggr_limit = 0;
83 mci->num_mgmt = 0;
83 84
84 if (list_empty(&mci->info)) 85 if (list_empty(&mci->info))
85 return; 86 return;
@@ -328,6 +329,13 @@ static void ath_mci_msg(struct ath_softc *sc, u8 opcode, u8 *rx_payload)
328 u8 major, minor; 329 u8 major, minor;
329 u32 seq_num; 330 u32 seq_num;
330 331
332 if (ar9003_mci_state(ah, MCI_STATE_NEED_FLUSH_BT_INFO) &&
333 ar9003_mci_state(ah, MCI_STATE_ENABLE)) {
334 ath_dbg(common, MCI, "(MCI) Need to flush BT profiles\n");
335 ath_mci_flush_profile(&sc->btcoex.mci);
336 ar9003_mci_state(ah, MCI_STATE_SEND_STATUS_QUERY);
337 }
338
331 switch (opcode) { 339 switch (opcode) {
332 case MCI_GPM_COEX_VERSION_QUERY: 340 case MCI_GPM_COEX_VERSION_QUERY:
333 ar9003_mci_state(ah, MCI_STATE_SEND_WLAN_COEX_VERSION); 341 ar9003_mci_state(ah, MCI_STATE_SEND_WLAN_COEX_VERSION);
@@ -568,9 +576,11 @@ void ath_mci_intr(struct ath_softc *sc)
568 } 576 }
569 577
570 if ((mci_int & AR_MCI_INTERRUPT_RX_INVALID_HDR) || 578 if ((mci_int & AR_MCI_INTERRUPT_RX_INVALID_HDR) ||
571 (mci_int & AR_MCI_INTERRUPT_CONT_INFO_TIMEOUT)) 579 (mci_int & AR_MCI_INTERRUPT_CONT_INFO_TIMEOUT)) {
572 mci_int &= ~(AR_MCI_INTERRUPT_RX_INVALID_HDR | 580 mci_int &= ~(AR_MCI_INTERRUPT_RX_INVALID_HDR |
573 AR_MCI_INTERRUPT_CONT_INFO_TIMEOUT); 581 AR_MCI_INTERRUPT_CONT_INFO_TIMEOUT);
582 ath_mci_msg(sc, MCI_GPM_COEX_NOOP, NULL);
583 }
574} 584}
575 585
576void ath_mci_enable(struct ath_softc *sc) 586void ath_mci_enable(struct ath_softc *sc)