Lines Matching full:mci

66 		ath_dbg(common, MCI,  in ar9003_mci_wait_for_interrupt()
67 "MCI Wait for Reg 0x%08x = 0x%08x timeout\n", in ar9003_mci_wait_for_interrupt()
69 ath_dbg(common, MCI, in ar9003_mci_wait_for_interrupt()
70 "MCI INT_RAW = 0x%08x, RX_MSG_RAW = 0x%08x\n", in ar9003_mci_wait_for_interrupt()
127 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; in ar9003_mci_send_coex_version_query() local
130 if (mci->bt_version_known || in ar9003_mci_send_coex_version_query()
131 (mci->bt_state == MCI_BT_SLEEP)) in ar9003_mci_send_coex_version_query()
142 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; in ar9003_mci_send_coex_version_response() local
148 mci->wlan_ver_major; in ar9003_mci_send_coex_version_response()
150 mci->wlan_ver_minor; in ar9003_mci_send_coex_version_response()
157 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; in ar9003_mci_send_coex_wlan_channels() local
158 u32 *payload = &mci->wlan_channels[0]; in ar9003_mci_send_coex_wlan_channels()
160 if (!mci->wlan_channels_update || in ar9003_mci_send_coex_wlan_channels()
161 (mci->bt_state == MCI_BT_SLEEP)) in ar9003_mci_send_coex_wlan_channels()
173 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; in ar9003_mci_send_coex_bt_status_query() local
177 if (mci->bt_state == MCI_BT_SLEEP) in ar9003_mci_send_coex_bt_status_query()
194 mci->need_flush_btinfo = true; in ar9003_mci_send_coex_bt_status_query()
198 mci->query_bt = false; in ar9003_mci_send_coex_bt_status_query()
204 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; in ar9003_mci_send_coex_halt_bt_gpm() local
211 mci->query_bt = true; in ar9003_mci_send_coex_halt_bt_gpm()
213 mci->unhalt_bt_gpm = true; in ar9003_mci_send_coex_halt_bt_gpm()
214 mci->need_flush_btinfo = true; in ar9003_mci_send_coex_halt_bt_gpm()
227 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; in ar9003_mci_prep_interface() local
231 mci->bt_state = MCI_BT_SLEEP; in ar9003_mci_prep_interface()
247 mci->bt_state = MCI_BT_AWAKE; in ar9003_mci_prep_interface()
256 * that remote_reset will still clean up BT MCI RX, in ar9003_mci_prep_interface()
288 if (mci->is_2g && MCI_ANT_ARCH_PA_LNA_SHARED(mci)) { in ar9003_mci_prep_interface()
293 if (mci->is_2g && !mci->update_2g5g && MCI_ANT_ARCH_PA_LNA_SHARED(mci)) { in ar9003_mci_prep_interface()
298 ath_dbg(common, MCI, in ar9003_mci_prep_interface()
299 "MCI WLAN has control over the LNA & BT obeys it\n"); in ar9003_mci_prep_interface()
301 ath_dbg(common, MCI, in ar9003_mci_prep_interface()
302 "MCI BT didn't respond to LNA_TRANS\n"); in ar9003_mci_prep_interface()
307 if ((mci->bt_state == MCI_BT_AWAKE) && in ar9003_mci_prep_interface()
323 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; in ar9003_mci_set_full_sleep() local
326 (mci->bt_state != MCI_BT_SLEEP) && in ar9003_mci_set_full_sleep()
327 !mci->halted_bt_gpm) { in ar9003_mci_set_full_sleep()
331 mci->ready = false; in ar9003_mci_set_full_sleep()
358 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; in ar9003_mci_get_interrupt() local
360 *raw_intr = mci->raw_intr; in ar9003_mci_get_interrupt()
361 *rx_msg_intr = mci->rx_msg_intr; in ar9003_mci_get_interrupt()
364 mci->raw_intr = 0; in ar9003_mci_get_interrupt()
365 mci->rx_msg_intr = 0; in ar9003_mci_get_interrupt()
372 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; in ar9003_mci_get_isr() local
379 ath_dbg(common, MCI, in ar9003_mci_get_isr()
380 "MCI gets 0xdeadbeef during int processing\n"); in ar9003_mci_get_isr()
382 mci->rx_msg_intr |= rx_msg_intr; in ar9003_mci_get_isr()
383 mci->raw_intr |= raw_intr; in ar9003_mci_get_isr()
387 mci->cont_status = REG_READ(ah, AR_MCI_CONT_STATUS); in ar9003_mci_get_isr()
396 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; in ar9003_mci_2g5g_changed() local
398 if (!mci->update_2g5g && in ar9003_mci_2g5g_changed()
399 (mci->is_2g != is_2g)) in ar9003_mci_2g5g_changed()
400 mci->update_2g5g = true; in ar9003_mci_2g5g_changed()
402 mci->is_2g = is_2g; in ar9003_mci_2g5g_changed()
407 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; in ar9003_mci_is_gpm_valid() local
416 payload = (u32 *)(mci->gpm_buf + offset); in ar9003_mci_is_gpm_valid()
427 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; in ar9003_mci_observation_set_up() local
429 if (mci->config & ATH_MCI_CONFIG_MCI_OBS_MCI) { in ar9003_mci_observation_set_up()
438 } else if (mci->config & ATH_MCI_CONFIG_MCI_OBS_TXRX) { in ar9003_mci_observation_set_up()
449 } else if (mci->config & ATH_MCI_CONFIG_MCI_OBS_BT) { in ar9003_mci_observation_set_up()
498 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; in ar9003_mci_sync_bt_state() local
503 if (mci->bt_state != cur_bt_state) in ar9003_mci_sync_bt_state()
504 mci->bt_state = cur_bt_state; in ar9003_mci_sync_bt_state()
506 if (mci->bt_state != MCI_BT_SLEEP) { in ar9003_mci_sync_bt_state()
511 if (mci->unhalt_bt_gpm == true) in ar9003_mci_sync_bt_state()
518 struct ath9k_hw_mci *mci_hw = &ah->btcoex_hw.mci; in ar9003_mci_check_bt()
540 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; in ar9003_mci_process_gpm_extra() local
548 ath_dbg(common, MCI, "MCI Recv GPM COEX Version Query\n"); in ar9003_mci_process_gpm_extra()
552 ath_dbg(common, MCI, "MCI Recv GPM COEX Version Response\n"); in ar9003_mci_process_gpm_extra()
553 mci->bt_ver_major = in ar9003_mci_process_gpm_extra()
555 mci->bt_ver_minor = in ar9003_mci_process_gpm_extra()
557 mci->bt_version_known = true; in ar9003_mci_process_gpm_extra()
558 ath_dbg(common, MCI, "MCI BT Coex version: %d.%d\n", in ar9003_mci_process_gpm_extra()
559 mci->bt_ver_major, mci->bt_ver_minor); in ar9003_mci_process_gpm_extra()
562 ath_dbg(common, MCI, in ar9003_mci_process_gpm_extra()
563 "MCI Recv GPM COEX Status Query = 0x%02X\n", in ar9003_mci_process_gpm_extra()
565 mci->wlan_channels_update = true; in ar9003_mci_process_gpm_extra()
569 mci->query_bt = true; in ar9003_mci_process_gpm_extra()
570 ath_dbg(common, MCI, "MCI Recv GPM COEX BT_Profile_Info\n"); in ar9003_mci_process_gpm_extra()
573 mci->query_bt = true; in ar9003_mci_process_gpm_extra()
574 ath_dbg(common, MCI, in ar9003_mci_process_gpm_extra()
575 "MCI Recv GPM COEX BT_Status_Update SEQ=%d (drop&query)\n", in ar9003_mci_process_gpm_extra()
587 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; in ar9003_mci_wait_for_gpm() local
615 p_gpm = (u32 *) (mci->gpm_buf + offset); in ar9003_mci_wait_for_gpm()
657 ath_dbg(common, MCI, "MCI GPM subtype not match 0x%x\n", in ar9003_mci_wait_for_gpm()
677 p_gpm = (u32 *) (mci->gpm_buf + offset); in ar9003_mci_wait_for_gpm()
694 struct ath9k_hw_mci *mci_hw = &ah->btcoex_hw.mci; in ar9003_mci_start_reset()
705 * MCI FIX: disable mci interrupt here. This is to avoid in ar9003_mci_start_reset()
719 ath_dbg(common, MCI, "MCI BT_CAL_DONE received\n"); in ar9003_mci_start_reset()
721 ath_dbg(common, MCI, in ar9003_mci_start_reset()
722 "MCI BT_CAL_DONE not received\n"); in ar9003_mci_start_reset()
725 /* MCI FIX: enable mci interrupt here */ in ar9003_mci_start_reset()
734 struct ath9k_hw_mci *mci_hw = &ah->btcoex_hw.mci; in ar9003_mci_end_reset()
787 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; in ar9003_mci_mute_bt() local
789 /* disable all MCI messages */ in ar9003_mci_mute_bt()
803 * 2. before reset MCI RX, to quiet BT and avoid MCI RX misalignment in ar9003_mci_mute_bt()
805 if (MCI_ANT_ARCH_PA_LNA_SHARED(mci)) { in ar9003_mci_mute_bt()
815 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; in ar9003_mci_osla_setup() local
830 if (!(mci->config & ATH_MCI_CONFIG_DISABLE_AGGR_THRESH)) { in ar9003_mci_osla_setup()
831 thresh = MS(mci->config, ATH_MCI_CONFIG_AGGR_THRESH); in ar9003_mci_osla_setup()
846 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; in ar9003_mci_stat_setup() local
851 if (mci->config & ATH_MCI_CONFIG_MCI_STAT_DBG) { in ar9003_mci_stat_setup()
922 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; in ar9003_mci_reset() local
925 ath_dbg(common, MCI, "MCI Reset (full_sleep = %d, is_2g = %d)\n", in ar9003_mci_reset()
933 /* Program MCI DMA related registers */ in ar9003_mci_reset()
934 REG_WRITE(ah, AR_MCI_GPM_0, mci->gpm_addr); in ar9003_mci_reset()
935 REG_WRITE(ah, AR_MCI_GPM_1, mci->gpm_len); in ar9003_mci_reset()
936 REG_WRITE(ah, AR_MCI_SCHD_TABLE_0, mci->sched_addr); in ar9003_mci_reset()
939 * To avoid MCI state machine be affected by incoming remote MCI msgs, in ar9003_mci_reset()
940 * MCI mode will be enabled later, right before reset the MCI TX and RX. in ar9003_mci_reset()
943 u8 ant = MS(mci->config, ATH_MCI_CONFIG_ANT_ARCH); in ar9003_mci_reset()
953 if (is_2g && !(mci->config & ATH_MCI_CONFIG_DISABLE_OSLA)) in ar9003_mci_reset()
970 if (mci->config & ATH_MCI_CONFIG_CONCUR_TX) { in ar9003_mci_reset()
981 regval = MS(mci->config, ATH_MCI_CONFIG_CLK_DIV); in ar9003_mci_reset()
985 /* Resetting the Rx and Tx paths of MCI */ in ar9003_mci_reset()
1000 /* Check pending GPM msg before MCI Reset Rx */ in ar9003_mci_reset()
1009 /* Init GPM offset after MCI Reset Rx */ in ar9003_mci_reset()
1016 if (MCI_ANT_ARCH_PA_LNA_SHARED(mci)) in ar9003_mci_reset()
1025 mci->ready = true; in ar9003_mci_reset()
1040 struct ath9k_hw_mci *mci_hw = &ah->btcoex_hw.mci; in ar9003_mci_stop_bt()
1056 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; in ar9003_mci_send_2g5g_status() local
1059 if (!mci->update_2g5g || (mci->bt_state == MCI_BT_SLEEP)) in ar9003_mci_send_2g5g_status()
1062 if (mci->is_2g) { in ar9003_mci_send_2g5g_status()
1083 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; in ar9003_mci_queue_unsent_gpm() local
1102 mci->update_2g5g = queue; in ar9003_mci_queue_unsent_gpm()
1106 mci->wlan_channels_update = queue; in ar9003_mci_queue_unsent_gpm()
1111 mci->unhalt_bt_gpm = queue; in ar9003_mci_queue_unsent_gpm()
1114 mci->halted_bt_gpm = false; in ar9003_mci_queue_unsent_gpm()
1120 mci->halted_bt_gpm = !queue; in ar9003_mci_queue_unsent_gpm()
1131 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; in ar9003_mci_2g5g_switch() local
1133 if (!mci->update_2g5g && !force) in ar9003_mci_2g5g_switch()
1136 if (mci->is_2g) { in ar9003_mci_2g5g_switch()
1146 if (!(mci->config & ATH_MCI_CONFIG_DISABLE_OSLA)) in ar9003_mci_2g5g_switch()
1170 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; in ar9003_mci_send_message() local
1180 ath_dbg(common, MCI, in ar9003_mci_send_message()
1181 "MCI Not sending 0x%x. MCI is not enabled. full_sleep = %d\n", in ar9003_mci_send_message()
1185 } else if (check_bt && (mci->bt_state == MCI_BT_SLEEP)) { in ar9003_mci_send_message()
1186 ath_dbg(common, MCI, in ar9003_mci_send_message()
1187 "MCI Don't send message 0x%x. BT is in sleep state\n", in ar9003_mci_send_message()
1233 struct ath9k_hw_mci *mci_hw = &ah->btcoex_hw.mci; in ar9003_mci_init_cal_req()
1246 ath_dbg(common, MCI, "MCI BT_CAL_GRANT received\n"); in ar9003_mci_init_cal_req()
1249 ath_dbg(common, MCI, "MCI BT_CAL_GRANT not received\n"); in ar9003_mci_init_cal_req()
1255 struct ath9k_hw_mci *mci_hw = &ah->btcoex_hw.mci; in ar9003_mci_init_cal_done()
1270 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; in ar9003_mci_setup() local
1272 mci->gpm_addr = gpm_addr; in ar9003_mci_setup()
1273 mci->gpm_buf = gpm_buf; in ar9003_mci_setup()
1274 mci->gpm_len = len; in ar9003_mci_setup()
1275 mci->sched_addr = sched_addr; in ar9003_mci_setup()
1283 /* Turn off MCI and Jupiter mode. */ in ar9003_mci_cleanup()
1291 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; in ar9003_mci_state() local
1297 if (mci->ready) { in ar9003_mci_state()
1308 if (value < mci->gpm_len) in ar9003_mci_state()
1309 mci->gpm_idx = value; in ar9003_mci_state()
1311 mci->gpm_idx = 0; in ar9003_mci_state()
1325 mci->bt_state = MCI_BT_AWAKE; in ar9003_mci_state()
1329 if (mci->unhalt_bt_gpm) in ar9003_mci_state()
1336 mci->update_2g5g = true; in ar9003_mci_state()
1338 if (mci->config & ATH_MCI_CONFIG_MCI_OBS_MASK) { in ar9003_mci_state()
1359 if ((tsf - mci->last_recovery) <= MCI_RECOVERY_DUR_TSF) { in ar9003_mci_state()
1360 ath_dbg(ath9k_hw_common(ah), MCI, in ar9003_mci_state()
1361 "(MCI) ignore Rx recovery\n"); in ar9003_mci_state()
1364 ath_dbg(ath9k_hw_common(ah), MCI, "(MCI) RECOVER RX\n"); in ar9003_mci_state()
1365 mci->last_recovery = tsf; in ar9003_mci_state()
1367 mci->query_bt = true; in ar9003_mci_state()
1368 mci->need_flush_btinfo = true; in ar9003_mci_state()
1373 value = !(mci->config & ATH_MCI_CONFIG_DISABLE_FTP_STOMP); in ar9003_mci_state()
1376 value = (!mci->unhalt_bt_gpm && mci->need_flush_btinfo) ? 1 : 0; in ar9003_mci_state()
1377 mci->need_flush_btinfo = false; in ar9003_mci_state()
1406 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; in ar9003_mci_bt_gain_ctrl() local
1408 ath_dbg(common, MCI, "Give LNA and SPDT control to BT\n"); in ar9003_mci_bt_gain_ctrl()
1414 mci->is_2g = false; in ar9003_mci_bt_gain_ctrl()
1415 mci->update_2g5g = true; in ar9003_mci_bt_gain_ctrl()
1419 mci->update_2g5g = true; in ar9003_mci_bt_gain_ctrl()
1459 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; in ar9003_mci_check_gpm_offset() local
1463 * This should only be called before "MAC Warm Reset" or "MCI Reset Rx". in ar9003_mci_check_gpm_offset()
1466 if (mci->gpm_idx == offset) in ar9003_mci_check_gpm_offset()
1468 ath_dbg(common, MCI, "GPM cached write pointer mismatch %d %d\n", in ar9003_mci_check_gpm_offset()
1469 mci->gpm_idx, offset); in ar9003_mci_check_gpm_offset()
1470 mci->query_bt = true; in ar9003_mci_check_gpm_offset()
1471 mci->need_flush_btinfo = true; in ar9003_mci_check_gpm_offset()
1472 mci->gpm_idx = 0; in ar9003_mci_check_gpm_offset()
1477 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; in ar9003_mci_get_next_gpm_offset() local
1496 offset = mci->gpm_len - 1; in ar9003_mci_get_next_gpm_offset()
1497 else if (offset >= mci->gpm_len) { in ar9003_mci_get_next_gpm_offset()
1504 if ((offset == 0xFFFF) || (gpm_ptr == mci->gpm_idx)) { in ar9003_mci_get_next_gpm_offset()
1514 if (offset != mci->gpm_idx) in ar9003_mci_get_next_gpm_offset()
1519 temp_index = mci->gpm_idx; in ar9003_mci_get_next_gpm_offset()
1521 if (temp_index >= mci->gpm_len) in ar9003_mci_get_next_gpm_offset()
1524 mci->gpm_idx++; in ar9003_mci_get_next_gpm_offset()
1526 if (mci->gpm_idx >= mci->gpm_len) in ar9003_mci_get_next_gpm_offset()
1527 mci->gpm_idx = 0; in ar9003_mci_get_next_gpm_offset()
1552 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; in ar9003_mci_set_bt_version() local
1554 mci->bt_ver_major = major; in ar9003_mci_set_bt_version()
1555 mci->bt_ver_minor = minor; in ar9003_mci_set_bt_version()
1556 mci->bt_version_known = true; in ar9003_mci_set_bt_version()
1557 ath_dbg(ath9k_hw_common(ah), MCI, "MCI BT version set: %d.%d\n", in ar9003_mci_set_bt_version()
1558 mci->bt_ver_major, mci->bt_ver_minor); in ar9003_mci_set_bt_version()
1564 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; in ar9003_mci_send_wlan_channels() local
1566 mci->wlan_channels_update = true; in ar9003_mci_send_wlan_channels()
1573 if (!ah->btcoex_hw.mci.concur_tx) in ar9003_mci_get_max_txpower()