Lines Matching refs:btcoex
133 struct ath_btcoex *btcoex = &sc->btcoex; in ath_detect_bt_priority() local
137 btcoex->bt_priority_cnt++; in ath_detect_bt_priority()
139 if (time_after(jiffies, btcoex->bt_priority_time + in ath_detect_bt_priority()
141 clear_bit(BT_OP_PRIORITY_DETECTED, &btcoex->op_flags); in ath_detect_bt_priority()
142 clear_bit(BT_OP_SCAN, &btcoex->op_flags); in ath_detect_bt_priority()
144 if (btcoex->bt_priority_cnt >= ATH_BT_CNT_SCAN_THRESHOLD) { in ath_detect_bt_priority()
147 set_bit(BT_OP_PRIORITY_DETECTED, &btcoex->op_flags); in ath_detect_bt_priority()
148 set_bit(BT_OP_SCAN, &btcoex->op_flags); in ath_detect_bt_priority()
149 } else if (btcoex->bt_priority_cnt >= ATH_BT_CNT_THRESHOLD) { in ath_detect_bt_priority()
152 set_bit(BT_OP_PRIORITY_DETECTED, &btcoex->op_flags); in ath_detect_bt_priority()
155 btcoex->bt_priority_cnt = 0; in ath_detect_bt_priority()
156 btcoex->bt_priority_time = jiffies; in ath_detect_bt_priority()
162 struct ath_btcoex *btcoex = &sc->btcoex; in ath_mci_ftp_adjust() local
163 struct ath_mci_profile *mci = &btcoex->mci; in ath_mci_ftp_adjust()
166 if (btcoex->bt_wait_time > ATH_BTCOEX_RX_WAIT_TIME) { in ath_mci_ftp_adjust()
173 btcoex->bt_wait_time = 0; in ath_mci_ftp_adjust()
187 struct ath_btcoex *btcoex = &sc->btcoex; in ath_btcoex_period_timer() local
194 btcoex->bt_wait_time += btcoex->btcoex_period; in ath_btcoex_period_timer()
210 spin_lock_bh(&btcoex->btcoex_lock); in ath_btcoex_period_timer()
212 stomp_type = btcoex->bt_stomp_type; in ath_btcoex_period_timer()
213 timer_period = btcoex->btcoex_no_stomp; in ath_btcoex_period_timer()
216 if (test_bit(BT_OP_SCAN, &btcoex->op_flags)) { in ath_btcoex_period_timer()
218 timer_period = btcoex->btscan_no_stomp; in ath_btcoex_period_timer()
220 } else if (btcoex->stomp_audio >= 5) { in ath_btcoex_period_timer()
222 btcoex->stomp_audio = 0; in ath_btcoex_period_timer()
228 spin_unlock_bh(&btcoex->btcoex_lock); in ath_btcoex_period_timer()
230 if (btcoex->btcoex_period != btcoex->btcoex_no_stomp) in ath_btcoex_period_timer()
231 mod_timer(&btcoex->no_stomp_timer, in ath_btcoex_period_timer()
237 mod_timer(&btcoex->period_timer, in ath_btcoex_period_timer()
238 jiffies + msecs_to_jiffies(btcoex->btcoex_period)); in ath_btcoex_period_timer()
249 struct ath_btcoex *btcoex = &sc->btcoex; in ath_btcoex_no_stomp_timer() local
255 spin_lock_bh(&btcoex->btcoex_lock); in ath_btcoex_no_stomp_timer()
257 if (btcoex->bt_stomp_type == ATH_BTCOEX_STOMP_LOW || in ath_btcoex_no_stomp_timer()
259 test_bit(BT_OP_SCAN, &btcoex->op_flags))) in ath_btcoex_no_stomp_timer()
261 else if (btcoex->bt_stomp_type == ATH_BTCOEX_STOMP_ALL) in ath_btcoex_no_stomp_timer()
265 spin_unlock_bh(&btcoex->btcoex_lock); in ath_btcoex_no_stomp_timer()
271 struct ath_btcoex *btcoex = &sc->btcoex; in ath_init_btcoex_timer() local
273 btcoex->btcoex_period = ATH_BTCOEX_DEF_BT_PERIOD; in ath_init_btcoex_timer()
274 btcoex->btcoex_no_stomp = (100 - ATH_BTCOEX_DEF_DUTY_CYCLE) * in ath_init_btcoex_timer()
275 btcoex->btcoex_period / 100; in ath_init_btcoex_timer()
276 btcoex->btscan_no_stomp = (100 - ATH_BTCOEX_BTSCAN_DUTY_CYCLE) * in ath_init_btcoex_timer()
277 btcoex->btcoex_period / 100; in ath_init_btcoex_timer()
279 setup_timer(&btcoex->period_timer, ath_btcoex_period_timer, in ath_init_btcoex_timer()
281 setup_timer(&btcoex->no_stomp_timer, ath_btcoex_no_stomp_timer, in ath_init_btcoex_timer()
284 spin_lock_init(&btcoex->btcoex_lock); in ath_init_btcoex_timer()
294 struct ath_btcoex *btcoex = &sc->btcoex; in ath9k_btcoex_timer_resume() local
300 del_timer_sync(&btcoex->no_stomp_timer); in ath9k_btcoex_timer_resume()
302 btcoex->bt_priority_cnt = 0; in ath9k_btcoex_timer_resume()
303 btcoex->bt_priority_time = jiffies; in ath9k_btcoex_timer_resume()
304 clear_bit(BT_OP_PRIORITY_DETECTED, &btcoex->op_flags); in ath9k_btcoex_timer_resume()
305 clear_bit(BT_OP_SCAN, &btcoex->op_flags); in ath9k_btcoex_timer_resume()
307 mod_timer(&btcoex->period_timer, jiffies); in ath9k_btcoex_timer_resume()
316 struct ath_btcoex *btcoex = &sc->btcoex; in ath9k_btcoex_timer_pause() local
318 del_timer_sync(&btcoex->period_timer); in ath9k_btcoex_timer_pause()
319 del_timer_sync(&btcoex->no_stomp_timer); in ath9k_btcoex_timer_pause()
324 struct ath_btcoex *btcoex = &sc->btcoex; in ath9k_btcoex_stop_gen_timer() local
326 del_timer_sync(&btcoex->no_stomp_timer); in ath9k_btcoex_stop_gen_timer()
331 struct ath_btcoex *btcoex = &sc->btcoex; in ath9k_btcoex_aggr_limit() local
332 struct ath_mci_profile *mci = &sc->btcoex.mci; in ath9k_btcoex_aggr_limit()
337 else if (test_bit(BT_OP_PRIORITY_DETECTED, &btcoex->op_flags)) in ath9k_btcoex_aggr_limit()
379 ath_mci_flush_profile(&sc->btcoex.mci); in ath9k_stop_btcoex()
412 sc->btcoex.bt_stomp_type = ATH_BTCOEX_STOMP_LOW; in ath9k_init_btcoex()
414 sc->btcoex.duty_cycle = ATH_BTCOEX_DEF_DUTY_CYCLE; in ath9k_init_btcoex()
415 INIT_LIST_HEAD(&sc->btcoex.mci.info); in ath9k_init_btcoex()
435 struct ath_btcoex *btcoex = &sc->btcoex; in ath9k_dump_mci_btcoex() local
436 struct ath_mci_profile *mci = &btcoex->mci; in ath9k_dump_mci_btcoex()
451 ATH_DUMP_BTCOEX("Stomp Type", btcoex->bt_stomp_type); in ath9k_dump_mci_btcoex()
452 ATH_DUMP_BTCOEX("BTCoex Period (msec)", btcoex->btcoex_period); in ath9k_dump_mci_btcoex()
453 ATH_DUMP_BTCOEX("Duty Cycle", btcoex->duty_cycle); in ath9k_dump_mci_btcoex()
454 ATH_DUMP_BTCOEX("BT Wait time", btcoex->bt_wait_time); in ath9k_dump_mci_btcoex()
456 ATH_DUMP_BTCOEX("Concurrent RSSI cnt", btcoex->rssi_count); in ath9k_dump_mci_btcoex()
481 struct ath_btcoex *btcoex = &sc->btcoex; in ath9k_dump_legacy_btcoex() local
484 ATH_DUMP_BTCOEX("Stomp Type", btcoex->bt_stomp_type); in ath9k_dump_legacy_btcoex()
485 ATH_DUMP_BTCOEX("BTCoex Period (msec)", btcoex->btcoex_period); in ath9k_dump_legacy_btcoex()
486 ATH_DUMP_BTCOEX("Duty Cycle", btcoex->duty_cycle); in ath9k_dump_legacy_btcoex()
487 ATH_DUMP_BTCOEX("BT Wait time", btcoex->bt_wait_time); in ath9k_dump_legacy_btcoex()