Lines Matching full:mci

21 #include "mci.h"
26 ath_mci_find_profile(struct ath_mci_profile *mci, in ath_mci_find_profile() argument
31 if (list_empty(&mci->info)) in ath_mci_find_profile()
34 list_for_each_entry(entry, &mci->info, list) { in ath_mci_find_profile()
42 struct ath_mci_profile *mci, in ath_mci_add_profile() argument
48 if ((mci->num_sco == ATH_MCI_MAX_SCO_PROFILE) && in ath_mci_add_profile()
52 if (((NUM_PROF(mci) - mci->num_sco) == ATH_MCI_MAX_ACL_PROFILE) && in ath_mci_add_profile()
61 INC_PROF(mci, info); in ath_mci_add_profile()
62 list_add_tail(&entry->list, &mci->info); in ath_mci_add_profile()
65 mci->voice_priority = voice_priority[info->voice_type]; in ath_mci_add_profile()
67 mci->voice_priority = 110; in ath_mci_add_profile()
74 struct ath_mci_profile *mci, in ath_mci_del_profile() argument
80 DEC_PROF(mci, entry); in ath_mci_del_profile()
85 void ath_mci_flush_profile(struct ath_mci_profile *mci) in ath_mci_flush_profile() argument
89 mci->aggr_limit = 0; in ath_mci_flush_profile()
90 mci->num_mgmt = 0; in ath_mci_flush_profile()
92 if (list_empty(&mci->info)) in ath_mci_flush_profile()
95 list_for_each_entry_safe(info, tinfo, &mci->info, list) { in ath_mci_flush_profile()
97 DEC_PROF(mci, info); in ath_mci_flush_profile()
104 struct ath_mci_profile *mci = &btcoex->mci; in ath_mci_adjust_aggr_limit() local
115 (!mci->aggr_limit || (mci->aggr_limit > (2 * wlan_airtime)))) in ath_mci_adjust_aggr_limit()
116 mci->aggr_limit = 2 * wlan_airtime; in ath_mci_adjust_aggr_limit()
123 struct ath_mci_profile *mci = &btcoex->mci; in ath_mci_update_scheme() local
124 struct ath9k_hw_mci *mci_hw = &sc->sc_ah->btcoex_hw.mci; in ath_mci_update_scheme()
126 u32 num_profile = NUM_PROF(mci); in ath_mci_update_scheme()
131 mci->aggr_limit = 0; in ath_mci_update_scheme()
134 if (NUM_PROF(mci)) in ath_mci_update_scheme()
137 btcoex->bt_stomp_type = mci->num_mgmt ? ATH_BTCOEX_STOMP_ALL : in ath_mci_update_scheme()
141 info = list_first_entry(&mci->info, in ath_mci_update_scheme()
144 if (mci->num_sco) { in ath_mci_update_scheme()
146 mci->aggr_limit = 8; in ath_mci_update_scheme()
148 mci->aggr_limit = 6; in ath_mci_update_scheme()
151 mci->aggr_limit = 6; in ath_mci_update_scheme()
152 ath_dbg(common, MCI, in ath_mci_update_scheme()
154 mci->aggr_limit); in ath_mci_update_scheme()
155 } else if (mci->num_pan || mci->num_other_acl) { in ath_mci_update_scheme()
162 ath_dbg(common, MCI, in ath_mci_update_scheme()
165 } else if (mci->num_hid) { in ath_mci_update_scheme()
167 mci->aggr_limit = 6; in ath_mci_update_scheme()
168 ath_dbg(common, MCI, in ath_mci_update_scheme()
173 if (mci->num_hid == 2) in ath_mci_update_scheme()
175 mci->aggr_limit = 6; in ath_mci_update_scheme()
176 ath_dbg(common, MCI, in ath_mci_update_scheme()
180 mci->aggr_limit = 4; in ath_mci_update_scheme()
181 ath_dbg(common, MCI, in ath_mci_update_scheme()
199 btcoex->duty_cycle += (mci->num_bdr ? ATH_MCI_BDR_DUTY_CYCLE : 0); in ath_mci_update_scheme()
214 struct ath9k_hw_mci *mci_hw = &ah->btcoex_hw.mci; in ath_mci_cal_msg()
223 ath_dbg(common, MCI, "MCI State : %d\n", mci_hw->bt_state); in ath_mci_cal_msg()
231 ath_dbg(common, MCI, "Unknown GPM CAL message\n"); in ath_mci_cal_msg()
259 struct ath_mci_profile *mci = &btcoex->mci; in ath_mci_set_concur_txprio() local
263 if (mci->num_mgmt) { in ath_mci_set_concur_txprio()
265 if (!mci->num_pan && !mci->num_other_acl) in ath_mci_set_concur_txprio()
276 if (mci->num_sco) in ath_mci_set_concur_txprio()
277 ath_mci_update_stomp_txprio(mci->voice_priority, in ath_mci_set_concur_txprio()
279 if (mci->num_other_acl) in ath_mci_set_concur_txprio()
281 if (mci->num_a2dp) in ath_mci_set_concur_txprio()
283 if (mci->num_hid) in ath_mci_set_concur_txprio()
285 if (mci->num_pan) in ath_mci_set_concur_txprio()
302 struct ath_mci_profile *mci = &btcoex->mci; in ath_mci_process_profile() local
305 entry = ath_mci_find_profile(mci, info); in ath_mci_process_profile()
308 * Two MCI interrupts are generated while connecting to in ath_mci_process_profile()
309 * headset and A2DP profile, but only one MCI interrupt in ath_mci_process_profile()
316 DEC_PROF(mci, entry); in ath_mci_process_profile()
317 INC_PROF(mci, info); in ath_mci_process_profile()
323 if (!entry && !ath_mci_add_profile(common, mci, info)) in ath_mci_process_profile()
326 ath_mci_del_profile(common, mci, entry); in ath_mci_process_profile()
336 struct ath_mci_profile *mci = &btcoex->mci; in ath_mci_process_status() local
338 int i = 0, old_num_mgmt = mci->num_mgmt; in ath_mci_process_status()
345 if (ath_mci_find_profile(mci, &info)) in ath_mci_process_status()
352 __set_bit(status->conn_handle, mci->status); in ath_mci_process_status()
354 __clear_bit(status->conn_handle, mci->status); in ath_mci_process_status()
356 mci->num_mgmt = 0; in ath_mci_process_status()
358 if (test_bit(i, mci->status)) in ath_mci_process_status()
359 mci->num_mgmt++; in ath_mci_process_status()
363 if (old_num_mgmt != mci->num_mgmt) in ath_mci_process_status()
380 ath_dbg(common, MCI, "(MCI) Need to flush BT profiles\n"); in ath_mci_msg()
381 ath_mci_flush_profile(&sc->btcoex.mci); in ath_mci_msg()
403 ath_dbg(common, MCI, in ath_mci_msg()
421 ath_dbg(common, MCI, in ath_mci_msg()
429 ath_dbg(common, MCI, "Unknown GPM COEX message = 0x%02x\n", opcode); in ath_mci_msg()
439 struct ath_mci_coex *mci = &sc->mci_coex; in ath_mci_setup() local
440 struct ath_mci_buf *buf = &mci->sched_buf; in ath_mci_setup()
448 ath_dbg(common, FATAL, "MCI buffer alloc failed\n"); in ath_mci_setup()
455 mci->sched_buf.bf_len = ATH_MCI_SCHED_BUF_SIZE; in ath_mci_setup()
457 mci->gpm_buf.bf_len = ATH_MCI_GPM_BUF_SIZE; in ath_mci_setup()
458 mci->gpm_buf.bf_addr = mci->sched_buf.bf_addr + mci->sched_buf.bf_len; in ath_mci_setup()
459 mci->gpm_buf.bf_paddr = mci->sched_buf.bf_paddr + mci->sched_buf.bf_len; in ath_mci_setup()
461 ret = ar9003_mci_setup(sc->sc_ah, mci->gpm_buf.bf_paddr, in ath_mci_setup()
462 mci->gpm_buf.bf_addr, (mci->gpm_buf.bf_len >> 4), in ath_mci_setup()
463 mci->sched_buf.bf_paddr); in ath_mci_setup()
465 ath_err(common, "Failed to initialize MCI\n"); in ath_mci_setup()
470 ath_dbg(common, MCI, "MCI Initialized\n"); in ath_mci_setup()
482 ath_dbg(common, MCI, "MCI De-Initialized\n"); in ath_mci_cleanup()
487 struct ath_mci_coex *mci = &sc->mci_coex; in ath_mci_intr() local
490 struct ath9k_hw_mci *mci_hw = &ah->btcoex_hw.mci; in ath_mci_intr()
511 * recovery method to reset BT MCI's RX alignment. in ath_mci_intr()
563 pgpm = mci->gpm_buf.bf_addr; in ath_mci_intr()
610 ath_dbg(common, MCI, in ath_mci_intr()
611 "MCI CONT_INFO: (%s) pri = %d pwr = %d dBm\n", in ath_mci_intr()
647 struct ath9k_hw_mci *mci = &ah->btcoex_hw.mci; in ath9k_mci_update_wlan_channels() local
679 ath_dbg(ath9k_hw_common(ah), MCI, in ath9k_mci_update_wlan_channels()
689 mci->wlan_channels[i] = channelmap[i]; in ath9k_mci_update_wlan_channels()
698 struct ath9k_hw_mci *mci_hw = &sc->sc_ah->btcoex_hw.mci; in ath9k_mci_set_txpower()
731 struct ath_mci_profile *mci = &btcoex->mci; in ath9k_mci_stomp_audio() local
733 if (!mci->num_sco && !mci->num_a2dp) in ath9k_mci_stomp_audio()
747 struct ath9k_hw_mci *mci_hw = &sc->sc_ah->btcoex_hw.mci; in ath9k_mci_update_rssi()