Lines Matching refs:btcoex

144 	struct ath_btcoex *btcoex = &sc->btcoex;  in ath_detect_bt_priority()  local
148 btcoex->bt_priority_cnt++; in ath_detect_bt_priority()
150 if (time_after(jiffies, btcoex->bt_priority_time + in ath_detect_bt_priority()
152 clear_bit(BT_OP_PRIORITY_DETECTED, &btcoex->op_flags); in ath_detect_bt_priority()
153 clear_bit(BT_OP_SCAN, &btcoex->op_flags); in ath_detect_bt_priority()
155 if (btcoex->bt_priority_cnt >= ATH_BT_CNT_SCAN_THRESHOLD) { in ath_detect_bt_priority()
158 set_bit(BT_OP_PRIORITY_DETECTED, &btcoex->op_flags); in ath_detect_bt_priority()
159 set_bit(BT_OP_SCAN, &btcoex->op_flags); in ath_detect_bt_priority()
160 } else if (btcoex->bt_priority_cnt >= ATH_BT_CNT_THRESHOLD) { in ath_detect_bt_priority()
163 set_bit(BT_OP_PRIORITY_DETECTED, &btcoex->op_flags); in ath_detect_bt_priority()
166 btcoex->bt_priority_cnt = 0; in ath_detect_bt_priority()
167 btcoex->bt_priority_time = jiffies; in ath_detect_bt_priority()
173 struct ath_btcoex *btcoex = &sc->btcoex; in ath_mci_ftp_adjust() local
174 struct ath_mci_profile *mci = &btcoex->mci; in ath_mci_ftp_adjust()
177 if (btcoex->bt_wait_time > ATH_BTCOEX_RX_WAIT_TIME) { in ath_mci_ftp_adjust()
184 btcoex->bt_wait_time = 0; in ath_mci_ftp_adjust()
196 struct ath_softc *sc = from_timer(sc, t, btcoex.period_timer); in ath_btcoex_period_timer()
198 struct ath_btcoex *btcoex = &sc->btcoex; in ath_btcoex_period_timer() local
205 btcoex->bt_wait_time += btcoex->btcoex_period; in ath_btcoex_period_timer()
212 spin_lock_bh(&btcoex->btcoex_lock); in ath_btcoex_period_timer()
222 stomp_type = btcoex->bt_stomp_type; in ath_btcoex_period_timer()
223 timer_period = btcoex->btcoex_no_stomp; in ath_btcoex_period_timer()
226 if (test_bit(BT_OP_SCAN, &btcoex->op_flags)) { in ath_btcoex_period_timer()
228 timer_period = btcoex->btscan_no_stomp; in ath_btcoex_period_timer()
230 } else if (btcoex->stomp_audio >= 5) { in ath_btcoex_period_timer()
232 btcoex->stomp_audio = 0; in ath_btcoex_period_timer()
238 spin_unlock_bh(&btcoex->btcoex_lock); in ath_btcoex_period_timer()
240 if (btcoex->btcoex_period != btcoex->btcoex_no_stomp) in ath_btcoex_period_timer()
241 mod_timer(&btcoex->no_stomp_timer, in ath_btcoex_period_timer()
247 mod_timer(&btcoex->period_timer, in ath_btcoex_period_timer()
248 jiffies + msecs_to_jiffies(btcoex->btcoex_period)); in ath_btcoex_period_timer()
257 struct ath_softc *sc = from_timer(sc, t, btcoex.no_stomp_timer); in ath_btcoex_no_stomp_timer()
259 struct ath_btcoex *btcoex = &sc->btcoex; in ath_btcoex_no_stomp_timer() local
262 spin_lock_bh(&btcoex->btcoex_lock); in ath_btcoex_no_stomp_timer()
264 if (btcoex->bt_stomp_type == ATH_BTCOEX_STOMP_LOW || in ath_btcoex_no_stomp_timer()
266 test_bit(BT_OP_SCAN, &btcoex->op_flags))) in ath_btcoex_no_stomp_timer()
268 else if (btcoex->bt_stomp_type == ATH_BTCOEX_STOMP_ALL) in ath_btcoex_no_stomp_timer()
272 spin_unlock_bh(&btcoex->btcoex_lock); in ath_btcoex_no_stomp_timer()
278 struct ath_btcoex *btcoex = &sc->btcoex; in ath_init_btcoex_timer() local
280 btcoex->btcoex_period = ATH_BTCOEX_DEF_BT_PERIOD; in ath_init_btcoex_timer()
281 btcoex->btcoex_no_stomp = (100 - ATH_BTCOEX_DEF_DUTY_CYCLE) * in ath_init_btcoex_timer()
282 btcoex->btcoex_period / 100; in ath_init_btcoex_timer()
283 btcoex->btscan_no_stomp = (100 - ATH_BTCOEX_BTSCAN_DUTY_CYCLE) * in ath_init_btcoex_timer()
284 btcoex->btcoex_period / 100; in ath_init_btcoex_timer()
285 btcoex->bt_stomp_type = ATH_BTCOEX_STOMP_LOW; in ath_init_btcoex_timer()
287 timer_setup(&btcoex->period_timer, ath_btcoex_period_timer, 0); in ath_init_btcoex_timer()
288 timer_setup(&btcoex->no_stomp_timer, ath_btcoex_no_stomp_timer, 0); in ath_init_btcoex_timer()
290 spin_lock_init(&btcoex->btcoex_lock); in ath_init_btcoex_timer()
298 struct ath_btcoex *btcoex = &sc->btcoex; in ath9k_btcoex_timer_resume() local
308 del_timer_sync(&btcoex->no_stomp_timer); in ath9k_btcoex_timer_resume()
310 btcoex->bt_priority_cnt = 0; in ath9k_btcoex_timer_resume()
311 btcoex->bt_priority_time = jiffies; in ath9k_btcoex_timer_resume()
312 clear_bit(BT_OP_PRIORITY_DETECTED, &btcoex->op_flags); in ath9k_btcoex_timer_resume()
313 clear_bit(BT_OP_SCAN, &btcoex->op_flags); in ath9k_btcoex_timer_resume()
315 mod_timer(&btcoex->period_timer, jiffies); in ath9k_btcoex_timer_resume()
323 struct ath_btcoex *btcoex = &sc->btcoex; in ath9k_btcoex_timer_pause() local
332 del_timer_sync(&btcoex->period_timer); in ath9k_btcoex_timer_pause()
333 del_timer_sync(&btcoex->no_stomp_timer); in ath9k_btcoex_timer_pause()
338 struct ath_btcoex *btcoex = &sc->btcoex; in ath9k_btcoex_stop_gen_timer() local
340 del_timer_sync(&btcoex->no_stomp_timer); in ath9k_btcoex_stop_gen_timer()
345 struct ath_btcoex *btcoex = &sc->btcoex; in ath9k_btcoex_aggr_limit() local
346 struct ath_mci_profile *mci = &sc->btcoex.mci; in ath9k_btcoex_aggr_limit()
351 else if (test_bit(BT_OP_PRIORITY_DETECTED, &btcoex->op_flags)) in ath9k_btcoex_aggr_limit()
394 ath_mci_flush_profile(&sc->btcoex.mci); in ath9k_stop_btcoex()
435 sc->btcoex.duty_cycle = ATH_BTCOEX_DEF_DUTY_CYCLE; in ath9k_init_btcoex()
436 INIT_LIST_HEAD(&sc->btcoex.mci.info); in ath9k_init_btcoex()
454 struct ath_btcoex *btcoex = &sc->btcoex; in ath9k_dump_mci_btcoex() local
455 struct ath_mci_profile *mci = &btcoex->mci; in ath9k_dump_mci_btcoex()
470 ATH_DUMP_BTCOEX("Stomp Type", btcoex->bt_stomp_type); in ath9k_dump_mci_btcoex()
471 ATH_DUMP_BTCOEX("BTCoex Period (msec)", btcoex->btcoex_period); in ath9k_dump_mci_btcoex()
472 ATH_DUMP_BTCOEX("Duty Cycle", btcoex->duty_cycle); in ath9k_dump_mci_btcoex()
473 ATH_DUMP_BTCOEX("BT Wait time", btcoex->bt_wait_time); in ath9k_dump_mci_btcoex()
475 ATH_DUMP_BTCOEX("Concurrent RSSI cnt", btcoex->rssi_count); in ath9k_dump_mci_btcoex()
500 struct ath_btcoex *btcoex = &sc->btcoex; in ath9k_dump_legacy_btcoex() local
503 ATH_DUMP_BTCOEX("Stomp Type", btcoex->bt_stomp_type); in ath9k_dump_legacy_btcoex()
504 ATH_DUMP_BTCOEX("BTCoex Period (msec)", btcoex->btcoex_period); in ath9k_dump_legacy_btcoex()
505 ATH_DUMP_BTCOEX("Duty Cycle", btcoex->duty_cycle); in ath9k_dump_legacy_btcoex()
506 ATH_DUMP_BTCOEX("BT Wait time", btcoex->bt_wait_time); in ath9k_dump_legacy_btcoex()