Lines Matching refs:coex_stat
41 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_limited_tx() local
48 if (coex_stat->wl_tx_limit_en == tx_limit_en && in rtw_coex_limited_tx()
49 coex_stat->wl_ampdu_limit_en == ampdu_limit_en) in rtw_coex_limited_tx()
52 if (!coex_stat->wl_tx_limit_en) { in rtw_coex_limited_tx()
53 coex_stat->darfrc = rtw_read32(rtwdev, REG_DARFRC); in rtw_coex_limited_tx()
54 coex_stat->darfrch = rtw_read32(rtwdev, REG_DARFRCH); in rtw_coex_limited_tx()
55 coex_stat->retry_limit = rtw_read16(rtwdev, REG_RETRY_LIMIT); in rtw_coex_limited_tx()
58 if (!coex_stat->wl_ampdu_limit_en) in rtw_coex_limited_tx()
59 coex_stat->ampdu_max_time = in rtw_coex_limited_tx()
62 coex_stat->wl_tx_limit_en = tx_limit_en; in rtw_coex_limited_tx()
63 coex_stat->wl_ampdu_limit_en = ampdu_limit_en; in rtw_coex_limited_tx()
85 rtw_write16(rtwdev, REG_RETRY_LIMIT, coex_stat->retry_limit); in rtw_coex_limited_tx()
86 rtw_write32(rtwdev, REG_DARFRC, coex_stat->darfrc); in rtw_coex_limited_tx()
87 rtw_write32(rtwdev, REG_DARFRCH, coex_stat->darfrch); in rtw_coex_limited_tx()
94 coex_stat->ampdu_max_time); in rtw_coex_limited_tx()
116 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_freerun_check() local
121 if (coex_stat->bt_disabled) in rtw_coex_freerun_check()
124 if (efuse->share_ant || ant_distance <= 5 || !coex_stat->wl_gl_busy) in rtw_coex_freerun_check()
127 if (ant_distance >= 40 || coex_stat->bt_hid_pair_num >= 2) in rtw_coex_freerun_check()
135 if (coex_stat->wl_tput_dir == COEX_WL_TPUT_TX) in rtw_coex_freerun_check()
142 coex_stat->cnt_wl[COEX_CNT_WL_SCANAP] <= 5) in rtw_coex_freerun_check()
151 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_wl_slot_extend() local
160 coex_stat->cnt_wl[COEX_CNT_WL_5MS_NOEXTEND] = 0; in rtw_coex_wl_slot_extend()
162 coex_stat->wl_slot_extend = enable; in rtw_coex_wl_slot_extend()
169 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_wl_ccklock_action() local
175 if (coex_stat->tdma_timer_base == 3 && coex_stat->wl_slot_extend) { in rtw_coex_wl_ccklock_action()
182 if (coex_stat->wl_slot_extend && coex_stat->wl_force_lps_ctrl && in rtw_coex_wl_ccklock_action()
183 !coex_stat->wl_cck_lock_ever) { in rtw_coex_wl_ccklock_action()
184 if (coex_stat->wl_fw_dbg_info[7] <= 5) in rtw_coex_wl_ccklock_action()
185 coex_stat->cnt_wl[COEX_CNT_WL_5MS_NOEXTEND]++; in rtw_coex_wl_ccklock_action()
187 coex_stat->cnt_wl[COEX_CNT_WL_5MS_NOEXTEND] = 0; in rtw_coex_wl_ccklock_action()
191 coex_stat->cnt_wl[COEX_CNT_WL_5MS_NOEXTEND]); in rtw_coex_wl_ccklock_action()
193 if (coex_stat->cnt_wl[COEX_CNT_WL_5MS_NOEXTEND] == 7) { in rtw_coex_wl_ccklock_action()
198 } else if (!coex_stat->wl_slot_extend && coex_stat->wl_cck_lock) { in rtw_coex_wl_ccklock_action()
209 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_wl_ccklock_detect() local
214 if (coex_stat->wl_coex_mode != COEX_WLINK_2G1PORT && in rtw_coex_wl_ccklock_detect()
215 coex_stat->wl_coex_mode != COEX_WLINK_2GFREE) in rtw_coex_wl_ccklock_detect()
219 coex_stat->bt_setup_link) { in rtw_coex_wl_ccklock_detect()
220 coex_stat->wl_cck_lock = false; in rtw_coex_wl_ccklock_detect()
221 coex_stat->wl_cck_lock_pre = false; in rtw_coex_wl_ccklock_detect()
225 if (coex_stat->wl_rx_rate <= COEX_CCK_2 || in rtw_coex_wl_ccklock_detect()
226 coex_stat->wl_rts_rx_rate <= COEX_CCK_2) in rtw_coex_wl_ccklock_detect()
229 if (coex_stat->wl_connected && coex_stat->wl_gl_busy && in rtw_coex_wl_ccklock_detect()
235 coex_stat->wl_cck_lock = true; in rtw_coex_wl_ccklock_detect()
241 coex_stat->wl_cck_lock = false; in rtw_coex_wl_ccklock_detect()
247 coex_stat->wl_cck_lock = false; in rtw_coex_wl_ccklock_detect()
251 if (coex_stat->wl_cck_lock && !coex_stat->wl_cck_lock_pre) in rtw_coex_wl_ccklock_detect()
255 coex_stat->wl_cck_lock_pre = coex_stat->wl_cck_lock; in rtw_coex_wl_ccklock_detect()
261 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_wl_noisy_detect() local
269 if (!coex_stat->wl_gl_busy && !wl_cck_lock) { in rtw_coex_wl_noisy_detect()
271 if (coex_stat->cnt_wl[COEX_CNT_WL_NOISY2] < 5) in rtw_coex_wl_noisy_detect()
272 coex_stat->cnt_wl[COEX_CNT_WL_NOISY2]++; in rtw_coex_wl_noisy_detect()
274 if (coex_stat->cnt_wl[COEX_CNT_WL_NOISY2] == 5) { in rtw_coex_wl_noisy_detect()
275 coex_stat->cnt_wl[COEX_CNT_WL_NOISY0] = 0; in rtw_coex_wl_noisy_detect()
276 coex_stat->cnt_wl[COEX_CNT_WL_NOISY1] = 0; in rtw_coex_wl_noisy_detect()
279 if (coex_stat->cnt_wl[COEX_CNT_WL_NOISY0] < 5) in rtw_coex_wl_noisy_detect()
280 coex_stat->cnt_wl[COEX_CNT_WL_NOISY0]++; in rtw_coex_wl_noisy_detect()
282 if (coex_stat->cnt_wl[COEX_CNT_WL_NOISY0] == 5) { in rtw_coex_wl_noisy_detect()
283 coex_stat->cnt_wl[COEX_CNT_WL_NOISY1] = 0; in rtw_coex_wl_noisy_detect()
284 coex_stat->cnt_wl[COEX_CNT_WL_NOISY2] = 0; in rtw_coex_wl_noisy_detect()
287 if (coex_stat->cnt_wl[COEX_CNT_WL_NOISY1] < 5) in rtw_coex_wl_noisy_detect()
288 coex_stat->cnt_wl[COEX_CNT_WL_NOISY1]++; in rtw_coex_wl_noisy_detect()
290 if (coex_stat->cnt_wl[COEX_CNT_WL_NOISY1] == 5) { in rtw_coex_wl_noisy_detect()
291 coex_stat->cnt_wl[COEX_CNT_WL_NOISY0] = 0; in rtw_coex_wl_noisy_detect()
292 coex_stat->cnt_wl[COEX_CNT_WL_NOISY2] = 0; in rtw_coex_wl_noisy_detect()
296 if (coex_stat->cnt_wl[COEX_CNT_WL_NOISY2] == 5) in rtw_coex_wl_noisy_detect()
297 coex_stat->wl_noisy_level = 2; in rtw_coex_wl_noisy_detect()
298 else if (coex_stat->cnt_wl[COEX_CNT_WL_NOISY1] == 5) in rtw_coex_wl_noisy_detect()
299 coex_stat->wl_noisy_level = 1; in rtw_coex_wl_noisy_detect()
301 coex_stat->wl_noisy_level = 0; in rtw_coex_wl_noisy_detect()
304 coex_stat->wl_noisy_level); in rtw_coex_wl_noisy_detect()
311 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_tdma_timer_base() local
314 u16 tbtt_interval = coex_stat->wl_beacon_interval; in rtw_coex_tdma_timer_base()
316 if (coex_stat->tdma_timer_base == type) in rtw_coex_tdma_timer_base()
319 coex_stat->tdma_timer_base = type; in rtw_coex_tdma_timer_base()
351 if (coex_stat->tdma_timer_base == 3) in rtw_coex_tdma_timer_base()
370 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_write_scbd() local
376 val |= coex_stat->score_board; in rtw_coex_write_scbd()
393 if (val != coex_stat->score_board) { in rtw_coex_write_scbd()
394 coex_stat->score_board = val; in rtw_coex_write_scbd()
415 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_check_rfk() local
422 coex_stat->bt_iqk_state != 0xff) { in rtw_coex_check_rfk()
445 coex_stat->bt_iqk_state = 0xff; in rtw_coex_check_rfk()
452 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_query_bt_info() local
454 if (coex_stat->bt_disabled) in rtw_coex_query_bt_info()
470 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_monitor_bt_ctr() local
474 coex_stat->hi_pri_tx = FIELD_GET(MASKLWORD, tmp); in rtw_coex_monitor_bt_ctr()
475 coex_stat->hi_pri_rx = FIELD_GET(MASKHWORD, tmp); in rtw_coex_monitor_bt_ctr()
478 coex_stat->lo_pri_tx = FIELD_GET(MASKLWORD, tmp); in rtw_coex_monitor_bt_ctr()
479 coex_stat->lo_pri_rx = FIELD_GET(MASKHWORD, tmp); in rtw_coex_monitor_bt_ctr()
486 coex_stat->hi_pri_rx, coex_stat->hi_pri_tx, in rtw_coex_monitor_bt_ctr()
487 coex_stat->lo_pri_rx, coex_stat->lo_pri_tx); in rtw_coex_monitor_bt_ctr()
494 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_monitor_bt_enable() local
504 if (coex_stat->bt_disabled != bt_disabled) { in rtw_coex_monitor_bt_enable()
507 coex_stat->bt_disabled, bt_disabled); in rtw_coex_monitor_bt_enable()
509 coex_stat->bt_disabled = bt_disabled; in rtw_coex_monitor_bt_enable()
510 coex_stat->bt_ble_scan_type = 0; in rtw_coex_monitor_bt_enable()
513 if (!coex_stat->bt_disabled) { in rtw_coex_monitor_bt_enable()
514 coex_stat->bt_reenable = true; in rtw_coex_monitor_bt_enable()
519 coex_stat->bt_mailbox_reply = false; in rtw_coex_monitor_bt_enable()
520 coex_stat->bt_reenable = false; in rtw_coex_monitor_bt_enable()
529 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_update_wl_link_info() local
541 coex_stat->wl_connected = !!rtwdev->sta_cnt; in rtw_coex_update_wl_link_info()
544 if (wl_busy != coex_stat->wl_gl_busy) { in rtw_coex_update_wl_link_info()
546 coex_stat->wl_gl_busy = true; in rtw_coex_update_wl_link_info()
554 coex_stat->wl_tput_dir = COEX_WL_TPUT_TX; in rtw_coex_update_wl_link_info()
556 coex_stat->wl_tput_dir = COEX_WL_TPUT_RX; in rtw_coex_update_wl_link_info()
560 coex_stat->wl_linkscan_proc = true; in rtw_coex_update_wl_link_info()
562 coex_stat->wl_linkscan_proc = false; in rtw_coex_update_wl_link_info()
575 if (coex_stat->wl_linkscan_proc || coex_stat->wl_hi_pri_task1 || in rtw_coex_update_wl_link_info()
576 coex_stat->wl_hi_pri_task2 || coex_stat->wl_gl_busy) in rtw_coex_update_wl_link_info()
710 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_update_bt_link_info() local
721 rssi = coex_stat->bt_rssi; in rtw_coex_update_bt_link_info()
727 if (coex_stat->bt_ble_scan_en && in rtw_coex_update_bt_link_info()
728 coex_stat->cnt_bt[COEX_CNT_BT_INFOUPDATE] % 3 == 0) { in rtw_coex_update_bt_link_info()
732 coex_stat->bt_ble_scan_type = scan_type; in rtw_coex_update_bt_link_info()
733 if ((coex_stat->bt_ble_scan_type & 0x1) == 0x1) in rtw_coex_update_bt_link_info()
734 coex_stat->bt_init_scan = true; in rtw_coex_update_bt_link_info()
736 coex_stat->bt_init_scan = false; in rtw_coex_update_bt_link_info()
740 coex_stat->bt_profile_num = 0; in rtw_coex_update_bt_link_info()
743 if (!(coex_stat->bt_info_lb2 & COEX_INFO_CONNECTION)) { in rtw_coex_update_bt_link_info()
744 coex_stat->bt_link_exist = false; in rtw_coex_update_bt_link_info()
745 coex_stat->bt_pan_exist = false; in rtw_coex_update_bt_link_info()
746 coex_stat->bt_a2dp_exist = false; in rtw_coex_update_bt_link_info()
747 coex_stat->bt_hid_exist = false; in rtw_coex_update_bt_link_info()
748 coex_stat->bt_hfp_exist = false; in rtw_coex_update_bt_link_info()
751 coex_stat->bt_link_exist = true; in rtw_coex_update_bt_link_info()
752 if (coex_stat->bt_info_lb2 & COEX_INFO_FTP) { in rtw_coex_update_bt_link_info()
753 coex_stat->bt_pan_exist = true; in rtw_coex_update_bt_link_info()
754 coex_stat->bt_profile_num++; in rtw_coex_update_bt_link_info()
756 coex_stat->bt_pan_exist = false; in rtw_coex_update_bt_link_info()
759 if (coex_stat->bt_info_lb2 & COEX_INFO_A2DP) { in rtw_coex_update_bt_link_info()
760 coex_stat->bt_a2dp_exist = true; in rtw_coex_update_bt_link_info()
761 coex_stat->bt_profile_num++; in rtw_coex_update_bt_link_info()
763 coex_stat->bt_a2dp_exist = false; in rtw_coex_update_bt_link_info()
766 if (coex_stat->bt_info_lb2 & COEX_INFO_HID) { in rtw_coex_update_bt_link_info()
767 coex_stat->bt_hid_exist = true; in rtw_coex_update_bt_link_info()
768 coex_stat->bt_profile_num++; in rtw_coex_update_bt_link_info()
770 coex_stat->bt_hid_exist = false; in rtw_coex_update_bt_link_info()
773 if (coex_stat->bt_info_lb2 & COEX_INFO_SCO_ESCO) { in rtw_coex_update_bt_link_info()
774 coex_stat->bt_hfp_exist = true; in rtw_coex_update_bt_link_info()
775 coex_stat->bt_profile_num++; in rtw_coex_update_bt_link_info()
777 coex_stat->bt_hfp_exist = false; in rtw_coex_update_bt_link_info()
781 if (coex_stat->bt_info_lb2 & COEX_INFO_INQ_PAGE) { in rtw_coex_update_bt_link_info()
783 } else if (!(coex_stat->bt_info_lb2 & COEX_INFO_CONNECTION)) { in rtw_coex_update_bt_link_info()
785 coex_stat->bt_multi_link_remain = false; in rtw_coex_update_bt_link_info()
786 } else if (coex_stat->bt_info_lb2 == COEX_INFO_CONNECTION) { in rtw_coex_update_bt_link_info()
788 } else if ((coex_stat->bt_info_lb2 & COEX_INFO_SCO_ESCO) || in rtw_coex_update_bt_link_info()
789 (coex_stat->bt_info_lb2 & COEX_INFO_SCO_BUSY)) { in rtw_coex_update_bt_link_info()
790 if (coex_stat->bt_info_lb2 & COEX_INFO_ACL_BUSY) in rtw_coex_update_bt_link_info()
794 } else if (coex_stat->bt_info_lb2 & COEX_INFO_ACL_BUSY) { in rtw_coex_update_bt_link_info()
800 coex_stat->cnt_bt[COEX_CNT_BT_INFOUPDATE]++; in rtw_coex_update_bt_link_info()
811 struct rtw_coex_stat *coex_stat = &rtwdev->coex.stat; in rtw_coex_update_wl_ch_info() local
824 coex_stat->wl_coex_mode != COEX_WLINK_2GFREE)) { in rtw_coex_update_wl_ch_info()
894 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_set_rf_para() local
897 if (coex->freerun && coex_stat->cnt_wl[COEX_CNT_WL_SCANAP] <= 5) in rtw_coex_set_rf_para()
965 struct rtw_coex_stat *coex_stat = &rtwdev->coex.stat; in rtw_coex_mimo_ps() local
967 if (!force && state == coex_stat->wl_mimo_ps) in rtw_coex_mimo_ps()
970 coex_stat->wl_mimo_ps = state; in rtw_coex_mimo_ps()
974 rtw_coex_update_wl_ch_info(rtwdev, (u8)coex_stat->wl_connected); in rtw_coex_mimo_ps()
1019 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_btc_wltoggle_table_b() local
1030 coex_stat->wl_toggle_interval = interval; in rtw_btc_wltoggle_table_b()
1033 coex_stat->wl_toggle_para[i] = cur_h2c_para[i]; in rtw_btc_wltoggle_table_b()
1071 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_table() local
1089 if (coex_stat->wl_slot_toggle_change) in rtw_coex_table()
1107 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_power_save_state() local
1115 coex_stat->wl_force_lps_ctrl = false; in rtw_coex_power_save_state()
1121 coex_stat->wl_force_lps_ctrl = true; in rtw_coex_power_save_state()
1140 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_set_tdma() local
1157 coex_stat->wl_coex_mode == COEX_WLINK_2GFREE) { in rtw_coex_set_tdma()
1185 coex_stat->wl_slot_toggle = true; in rtw_coex_set_tdma()
1186 coex_stat->wl_slot_toggle_change = false; in rtw_coex_set_tdma()
1188 coex_stat->wl_slot_toggle_change = coex_stat->wl_slot_toggle; in rtw_coex_set_tdma()
1189 coex_stat->wl_slot_toggle = false; in rtw_coex_set_tdma()
1198 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_tdma() local
1224 if ((coex_stat->bt_a2dp_exist && in rtw_coex_tdma()
1225 (coex_stat->bt_inq_remain || coex_stat->bt_multi_link)) || in rtw_coex_tdma()
1262 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_set_ant_path() local
1278 coex_stat->bt_disabled); in rtw_coex_set_ant_path()
1285 if (coex_stat->bt_disabled) in rtw_coex_set_ant_path()
1296 if (coex_stat->bt_disabled) { in rtw_coex_set_ant_path()
1462 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_algorithm() local
1466 if (coex_stat->bt_hfp_exist) in rtw_coex_algorithm()
1468 if (coex_stat->bt_hid_exist) in rtw_coex_algorithm()
1470 if (coex_stat->bt_a2dp_exist) in rtw_coex_algorithm()
1472 if (coex_stat->bt_pan_exist) in rtw_coex_algorithm()
1505 if (coex_stat->bt_multi_link) { in rtw_coex_algorithm()
1506 if (coex_stat->bt_hid_pair_num > 0) in rtw_coex_algorithm()
1553 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_action_freerun() local
1585 if (coex_stat->wl_tput_dir == COEX_WL_TPUT_TX) in rtw_coex_action_freerun()
1648 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_action_bt_relink() local
1659 if (coex_stat->wl_gl_busy) { in rtw_coex_action_bt_relink()
1661 if (coex_stat->bt_hid_exist && in rtw_coex_action_bt_relink()
1662 coex_stat->bt_profile_num == 1) { in rtw_coex_action_bt_relink()
1673 if (coex_stat->wl_gl_busy) in rtw_coex_action_bt_relink()
1688 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_action_bt_idle() local
1701 coex_stat->wl_gl_busy) { in rtw_coex_action_bt_idle()
1719 if (!coex_stat->wl_gl_busy) { in rtw_coex_action_bt_idle()
1725 if (coex_stat->lo_pri_rx + coex_stat->lo_pri_tx > 250) in rtw_coex_action_bt_idle()
1735 if (!coex_stat->wl_gl_busy) { in rtw_coex_action_bt_idle()
1738 } else if ((coex_stat->bt_ble_scan_type & 0x2) && in rtw_coex_action_bt_idle()
1757 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_action_bt_inquiry() local
1767 if (coex_stat->wl_linkscan_proc || coex_stat->wl_hi_pri_task1 || in rtw_coex_action_bt_inquiry()
1768 coex_stat->wl_hi_pri_task2) in rtw_coex_action_bt_inquiry()
1778 if (coex_stat->bt_profile_num > 0) in rtw_coex_action_bt_inquiry()
1780 else if (coex_stat->wl_hi_pri_task1) in rtw_coex_action_bt_inquiry()
1782 else if (!coex_stat->bt_page) in rtw_coex_action_bt_inquiry()
1786 } else if (coex_stat->wl_gl_busy) { in rtw_coex_action_bt_inquiry()
1789 if (coex_stat->bt_profile_num == 0) { in rtw_coex_action_bt_inquiry()
1792 } else if (coex_stat->bt_profile_num == 1 && in rtw_coex_action_bt_inquiry()
1793 !coex_stat->bt_a2dp_exist) { in rtw_coex_action_bt_inquiry()
1802 } else if (coex_stat->wl_connected) { in rtw_coex_action_bt_inquiry()
1820 if (coex_stat->bt_profile_num > 0) in rtw_coex_action_bt_inquiry()
1822 else if (coex_stat->wl_hi_pri_task1) in rtw_coex_action_bt_inquiry()
1824 else if (!coex_stat->bt_page) in rtw_coex_action_bt_inquiry()
1828 } else if (coex_stat->wl_gl_busy) { in rtw_coex_action_bt_inquiry()
1833 } else if (coex_stat->wl_connected) { in rtw_coex_action_bt_inquiry()
1847 wl_hi_pri, coex_stat->bt_page); in rtw_coex_action_bt_inquiry()
1857 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_action_bt_game_hid() local
1866 coex_stat->wl_coex_mode = COEX_WLINK_2GFREE; in rtw_coex_action_bt_game_hid()
1867 if (coex_stat->bt_whck_test) in rtw_coex_action_bt_game_hid()
1869 else if (coex_stat->wl_linkscan_proc || coex_stat->bt_hid_exist) in rtw_coex_action_bt_game_hid()
1871 else if (coex_stat->bt_setup_link || coex_stat->bt_inq_page) in rtw_coex_action_bt_game_hid()
1873 else if (coex_stat->bt_a2dp_exist) in rtw_coex_action_bt_game_hid()
1888 if (coex_stat->wl_coex_mode == COEX_WLINK_2GFREE) { in rtw_coex_action_bt_game_hid()
1889 if (coex_stat->wl_tput_dir == COEX_WL_TPUT_TX) in rtw_coex_action_bt_game_hid()
1905 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_action_bt_hfp() local
1919 if (coex_stat->bt_multi_link) { in rtw_coex_action_bt_hfp()
1936 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_action_bt_hid() local
1948 if (coex_stat->bt_ble_exist) { in rtw_coex_action_bt_hid()
1950 if (coex_stat->cnt_wl[COEX_CNT_WL_SCANAP] > 5) { in rtw_coex_action_bt_hid()
1959 if (coex_stat->bt_profile_num == 1 && in rtw_coex_action_bt_hid()
1960 (coex_stat->bt_multi_link || in rtw_coex_action_bt_hid()
1961 (coex_stat->lo_pri_rx + in rtw_coex_action_bt_hid()
1962 coex_stat->lo_pri_tx > 360) || in rtw_coex_action_bt_hid()
1963 coex_stat->bt_slave || in rtw_coex_action_bt_hid()
1968 } else if (coex_stat->bt_a2dp_active) { in rtw_coex_action_bt_hid()
1971 } else if (coex_stat->bt_418_hid_exist && in rtw_coex_action_bt_hid()
1972 coex_stat->wl_gl_busy) { in rtw_coex_action_bt_hid()
1977 } else if (coex_stat->bt_ble_hid_exist && in rtw_coex_action_bt_hid()
1978 coex_stat->wl_gl_busy) { in rtw_coex_action_bt_hid()
1988 if (coex_stat->bt_ble_exist) { in rtw_coex_action_bt_hid()
1990 if (coex_stat->cnt_wl[COEX_CNT_WL_SCANAP] > 5) { in rtw_coex_action_bt_hid()
1997 } else if (coex_stat->bt_a2dp_active) { in rtw_coex_action_bt_hid()
2019 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_action_bt_a2dp() local
2034 if (coex_stat->wl_gl_busy && coex_stat->wl_noisy_level == 0) in rtw_coex_action_bt_a2dp()
2039 if (coex_stat->wl_connecting || !coex_stat->wl_gl_busy) in rtw_coex_action_bt_a2dp()
2061 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_action_bt_a2dpsink() local
2075 } else if (coex_stat->wl_gl_busy) { in rtw_coex_action_bt_a2dpsink()
2100 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_action_bt_pan() local
2110 if (coex_stat->wl_gl_busy && coex_stat->wl_noisy_level == 0) in rtw_coex_action_bt_pan()
2115 if (coex_stat->wl_gl_busy) in rtw_coex_action_bt_pan()
2123 if (coex_stat->wl_gl_busy) in rtw_coex_action_bt_pan()
2137 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_action_bt_a2dp_hid() local
2152 if (coex_stat->bt_ble_exist) { in rtw_coex_action_bt_a2dp_hid()
2154 } else if (coex_stat->bt_418_hid_exist) { in rtw_coex_action_bt_a2dp_hid()
2161 if (coex_stat->wl_connecting || !coex_stat->wl_gl_busy) { in rtw_coex_action_bt_a2dp_hid()
2163 } else if (coex_stat->bt_418_hid_exist) { in rtw_coex_action_bt_a2dp_hid()
2171 if (coex_stat->bt_ble_exist) in rtw_coex_action_bt_a2dp_hid()
2194 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_action_bt_a2dp_pan() local
2204 if (coex_stat->wl_gl_busy && in rtw_coex_action_bt_a2dp_pan()
2205 coex_stat->wl_noisy_level == 0) in rtw_coex_action_bt_a2dp_pan()
2210 if (coex_stat->wl_gl_busy) in rtw_coex_action_bt_a2dp_pan()
2218 if (coex_stat->wl_gl_busy) in rtw_coex_action_bt_a2dp_pan()
2233 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_action_bt_pan_hid() local
2246 if (coex_stat->wl_gl_busy) in rtw_coex_action_bt_pan_hid()
2254 if (coex_stat->wl_gl_busy) in rtw_coex_action_bt_pan_hid()
2268 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_action_bt_a2dp_pan_hid() local
2280 if (coex_stat->wl_gl_busy) in rtw_coex_action_bt_a2dp_pan_hid()
2288 if (coex_stat->wl_gl_busy) in rtw_coex_action_bt_a2dp_pan_hid()
2303 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_action_wl_under5g() local
2313 if (coex_stat->bt_game_hid_exist && coex_stat->wl_linkscan_proc) in rtw_coex_action_wl_under5g()
2314 coex_stat->wl_coex_mode = COEX_WLINK_2GFREE; in rtw_coex_action_wl_under5g()
2359 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_action_wl_native_lps() local
2379 if (coex_stat->bt_game_hid_exist) { in rtw_coex_action_wl_native_lps()
2380 coex_stat->wl_coex_mode = COEX_WLINK_2GFREE; in rtw_coex_action_wl_native_lps()
2381 if (coex_stat->wl_tput_dir == COEX_WL_TPUT_TX) in rtw_coex_action_wl_native_lps()
2397 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_action_wl_linkscan() local
2407 if (coex_stat->bt_a2dp_exist) { in rtw_coex_action_wl_linkscan()
2410 if (coex_stat->wl_gl_busy) in rtw_coex_action_wl_linkscan()
2419 if (coex_stat->bt_a2dp_exist) { in rtw_coex_action_wl_linkscan()
2460 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_action_wl_connected() local
2480 else if (coex_stat->bt_a2dp_sink) in rtw_coex_action_wl_connected()
2515 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_run_coex() local
2545 if (coex_stat->wl_under_ips) { in rtw_coex_run_coex()
2552 !coex_stat->bt_setup_link) { in rtw_coex_run_coex()
2558 coex_stat->cnt_wl[COEX_CNT_WL_COEXRUN]++; in rtw_coex_run_coex()
2563 coex_stat->wl_coex_mode = COEX_WLINK_5G; in rtw_coex_run_coex()
2569 coex_stat->wl_coex_mode = COEX_WLINK_2G1PORT; in rtw_coex_run_coex()
2571 if (coex_stat->bt_disabled) { in rtw_coex_run_coex()
2572 if (coex_stat->wl_connected && rf4ce_en) in rtw_coex_run_coex()
2574 else if (!coex_stat->wl_connected) in rtw_coex_run_coex()
2581 if (coex_stat->wl_under_lps && !coex_stat->wl_force_lps_ctrl) { in rtw_coex_run_coex()
2586 if (coex_stat->bt_game_hid_exist && coex_stat->wl_connected) { in rtw_coex_run_coex()
2591 if (coex_stat->bt_whck_test) { in rtw_coex_run_coex()
2596 if (coex_stat->bt_setup_link) { in rtw_coex_run_coex()
2601 if (coex_stat->bt_inq_page) { in rtw_coex_run_coex()
2608 coex_stat->wl_connected) { in rtw_coex_run_coex()
2613 if (coex_stat->wl_linkscan_proc && !coex->freerun) { in rtw_coex_run_coex()
2618 if (coex_stat->wl_connected) { in rtw_coex_run_coex()
2629 if (coex_stat->wl_coex_mode == COEX_WLINK_2GFREE) { in rtw_coex_run_coex()
2639 rtw_coex_gnt_workaround(rtwdev, false, coex_stat->wl_coex_mode); in rtw_coex_run_coex()
2646 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_init_coex_var() local
2651 memset(coex_stat, 0, sizeof(*coex_stat)); in rtw_coex_init_coex_var()
2654 coex_stat->cnt_wl[i] = 0; in rtw_coex_init_coex_var()
2657 coex_stat->cnt_bt[i] = 0; in rtw_coex_init_coex_var()
2665 coex_stat->wl_coex_mode = COEX_WLINK_MAX; in rtw_coex_init_coex_var()
2666 coex_stat->wl_rx_rate = DESC_RATE5_5M; in rtw_coex_init_coex_var()
2667 coex_stat->wl_rts_rx_rate = DESC_RATE5_5M; in rtw_coex_init_coex_var()
2673 struct rtw_coex_stat *coex_stat = &coex->stat; in __rtw_coex_init_hw_config() local
2679 coex_stat->kt_ver = u8_get_bits(rtw_read8(rtwdev, 0xf1), GENMASK(7, 4)); in __rtw_coex_init_hw_config()
2682 rtw_coex_wl_slot_extend(rtwdev, coex_stat->wl_slot_extend); in __rtw_coex_init_hw_config()
2764 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_ips_notify() local
2772 coex_stat->wl_under_ips = true; in rtw_coex_ips_notify()
2786 coex_stat->wl_under_ips = false; in rtw_coex_ips_notify()
2793 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_lps_notify() local
2801 coex_stat->wl_under_lps = true; in rtw_coex_lps_notify()
2803 if (coex_stat->wl_force_lps_ctrl) { in rtw_coex_lps_notify()
2816 coex_stat->wl_under_lps = false; in rtw_coex_lps_notify()
2821 if (!coex_stat->wl_force_lps_ctrl) in rtw_coex_lps_notify()
2831 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_scan_notify() local
2849 coex_stat->wl_hi_pri_task2 = true; in rtw_coex_scan_notify()
2855 coex_stat->cnt_wl[COEX_CNT_WL_SCANAP] = 30; /* To do */ in rtw_coex_scan_notify()
2859 coex_stat->cnt_wl[COEX_CNT_WL_SCANAP]); in rtw_coex_scan_notify()
2861 coex_stat->wl_hi_pri_task2 = false; in rtw_coex_scan_notify()
2895 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_connect_notify() local
2915 coex_stat->wl_hi_pri_task1 = true; in rtw_coex_connect_notify()
2916 coex_stat->wl_connecting = true; in rtw_coex_connect_notify()
2917 coex_stat->cnt_wl[COEX_CNT_WL_CONNPKT] = 2; in rtw_coex_connect_notify()
2918 coex_stat->wl_connecting = true; in rtw_coex_connect_notify()
2936 coex_stat->wl_hi_pri_task1 = false; in rtw_coex_connect_notify()
2938 coex_stat->wl_connecting = false; in rtw_coex_connect_notify()
2949 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_media_status_notify() local
2964 coex_stat->wl_connecting = false; in rtw_coex_media_status_notify()
2988 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_bt_info_notify() local
2997 coex_stat->cnt_bt_info_c2h[rsp_source]++; in rtw_coex_bt_info_notify()
3000 coex_stat->bt_iqk_state = buf[1]; in rtw_coex_bt_info_notify()
3001 if (coex_stat->bt_iqk_state == 0) in rtw_coex_bt_info_notify()
3002 coex_stat->cnt_bt[COEX_CNT_BT_IQK]++; in rtw_coex_bt_info_notify()
3003 else if (coex_stat->bt_iqk_state == 2) in rtw_coex_bt_info_notify()
3004 coex_stat->cnt_bt[COEX_CNT_BT_IQKFAIL]++; in rtw_coex_bt_info_notify()
3019 if (coex_stat->bt_disabled != coex_stat->bt_disabled_pre) { in rtw_coex_bt_info_notify()
3020 coex_stat->bt_disabled_pre = coex_stat->bt_disabled; in rtw_coex_bt_info_notify()
3046 if (coex_stat->bt_disabled) { in rtw_coex_bt_info_notify()
3047 coex_stat->bt_disabled = false; in rtw_coex_bt_info_notify()
3048 coex_stat->bt_reenable = true; in rtw_coex_bt_info_notify()
3069 coex_stat->bt_info_c2h[rsp_source][i] = buf[i]; in rtw_coex_bt_info_notify()
3072 if (coex_stat->bt_info_c2h[rsp_source][1] == coex_stat->bt_info_lb2 && in rtw_coex_bt_info_notify()
3073 coex_stat->bt_info_c2h[rsp_source][2] == coex_stat->bt_info_lb3 && in rtw_coex_bt_info_notify()
3074 coex_stat->bt_info_c2h[rsp_source][3] == coex_stat->bt_info_hb0 && in rtw_coex_bt_info_notify()
3075 coex_stat->bt_info_c2h[rsp_source][4] == coex_stat->bt_info_hb1 && in rtw_coex_bt_info_notify()
3076 coex_stat->bt_info_c2h[rsp_source][5] == coex_stat->bt_info_hb2 && in rtw_coex_bt_info_notify()
3077 coex_stat->bt_info_c2h[rsp_source][6] == coex_stat->bt_info_hb3) { in rtw_coex_bt_info_notify()
3083 coex_stat->bt_info_lb2 = coex_stat->bt_info_c2h[rsp_source][1]; in rtw_coex_bt_info_notify()
3084 coex_stat->bt_info_lb3 = coex_stat->bt_info_c2h[rsp_source][2]; in rtw_coex_bt_info_notify()
3085 coex_stat->bt_info_hb0 = coex_stat->bt_info_c2h[rsp_source][3]; in rtw_coex_bt_info_notify()
3086 coex_stat->bt_info_hb1 = coex_stat->bt_info_c2h[rsp_source][4]; in rtw_coex_bt_info_notify()
3087 coex_stat->bt_info_hb2 = coex_stat->bt_info_c2h[rsp_source][5]; in rtw_coex_bt_info_notify()
3088 coex_stat->bt_info_hb3 = coex_stat->bt_info_c2h[rsp_source][6]; in rtw_coex_bt_info_notify()
3091 coex_stat->bt_whck_test = (coex_stat->bt_info_lb2 == 0xff); in rtw_coex_bt_info_notify()
3093 inq_page = ((coex_stat->bt_info_lb2 & BIT(2)) == BIT(2)); in rtw_coex_bt_info_notify()
3095 if (inq_page != coex_stat->bt_inq_page) { in rtw_coex_bt_info_notify()
3097 coex_stat->bt_inq_page = inq_page; in rtw_coex_bt_info_notify()
3100 coex_stat->bt_inq_remain = true; in rtw_coex_bt_info_notify()
3106 coex_stat->bt_acl_busy = ((coex_stat->bt_info_lb2 & BIT(3)) == BIT(3)); in rtw_coex_bt_info_notify()
3108 if (coex_stat->bt_info_lb2 & BIT(5)) { in rtw_coex_bt_info_notify()
3109 if (coex_stat->bt_info_hb1 & BIT(0)) { in rtw_coex_bt_info_notify()
3111 coex_stat->bt_ble_hid_exist = true; in rtw_coex_bt_info_notify()
3113 coex_stat->bt_ble_hid_exist = false; in rtw_coex_bt_info_notify()
3115 coex_stat->bt_ble_exist = false; in rtw_coex_bt_info_notify()
3116 } else if (coex_stat->bt_info_hb1 & BIT(0)) { in rtw_coex_bt_info_notify()
3118 coex_stat->bt_ble_hid_exist = false; in rtw_coex_bt_info_notify()
3119 coex_stat->bt_ble_exist = true; in rtw_coex_bt_info_notify()
3121 coex_stat->bt_ble_hid_exist = false; in rtw_coex_bt_info_notify()
3122 coex_stat->bt_ble_exist = false; in rtw_coex_bt_info_notify()
3125 if (coex_stat->bt_info_hb1 & BIT(0)) { in rtw_coex_bt_info_notify()
3126 if (coex_stat->bt_hid_slot == 1 && in rtw_coex_bt_info_notify()
3127 coex_stat->hi_pri_rx + 100 < coex_stat->hi_pri_tx && in rtw_coex_bt_info_notify()
3128 coex_stat->hi_pri_rx < 100) { in rtw_coex_bt_info_notify()
3129 coex_stat->bt_ble_hid_exist = true; in rtw_coex_bt_info_notify()
3130 coex_stat->bt_ble_exist = false; in rtw_coex_bt_info_notify()
3132 coex_stat->bt_ble_hid_exist = false; in rtw_coex_bt_info_notify()
3133 coex_stat->bt_ble_exist = true; in rtw_coex_bt_info_notify()
3136 coex_stat->bt_ble_hid_exist = false; in rtw_coex_bt_info_notify()
3137 coex_stat->bt_ble_exist = false; in rtw_coex_bt_info_notify()
3141 coex_stat->cnt_bt[COEX_CNT_BT_RETRY] = coex_stat->bt_info_lb3 & 0xf; in rtw_coex_bt_info_notify()
3142 if (coex_stat->cnt_bt[COEX_CNT_BT_RETRY] >= 1) in rtw_coex_bt_info_notify()
3143 coex_stat->cnt_bt[COEX_CNT_BT_POPEVENT]++; in rtw_coex_bt_info_notify()
3145 coex_stat->bt_fix_2M = ((coex_stat->bt_info_lb3 & BIT(4)) == BIT(4)); in rtw_coex_bt_info_notify()
3146 coex_stat->bt_inq = ((coex_stat->bt_info_lb3 & BIT(5)) == BIT(5)); in rtw_coex_bt_info_notify()
3147 if (coex_stat->bt_inq) in rtw_coex_bt_info_notify()
3148 coex_stat->cnt_bt[COEX_CNT_BT_INQ]++; in rtw_coex_bt_info_notify()
3150 coex_stat->bt_page = ((coex_stat->bt_info_lb3 & BIT(7)) == BIT(7)); in rtw_coex_bt_info_notify()
3151 if (coex_stat->bt_page) in rtw_coex_bt_info_notify()
3152 coex_stat->cnt_bt[COEX_CNT_BT_PAGE]++; in rtw_coex_bt_info_notify()
3156 coex_stat->bt_rssi = coex_stat->bt_info_hb0 * 2 + 10; in rtw_coex_bt_info_notify()
3158 if (coex_stat->bt_info_hb0 <= 127) in rtw_coex_bt_info_notify()
3159 coex_stat->bt_rssi = 100; in rtw_coex_bt_info_notify()
3160 else if (256 - coex_stat->bt_info_hb0 <= 100) in rtw_coex_bt_info_notify()
3161 coex_stat->bt_rssi = 100 - (256 - coex_stat->bt_info_hb0); in rtw_coex_bt_info_notify()
3163 coex_stat->bt_rssi = 0; in rtw_coex_bt_info_notify()
3166 if (coex_stat->bt_info_hb1 & BIT(1)) in rtw_coex_bt_info_notify()
3167 coex_stat->cnt_bt[COEX_CNT_BT_REINIT]++; in rtw_coex_bt_info_notify()
3169 if (coex_stat->bt_info_hb1 & BIT(2)) { in rtw_coex_bt_info_notify()
3170 coex_stat->cnt_bt[COEX_CNT_BT_SETUPLINK]++; in rtw_coex_bt_info_notify()
3171 coex_stat->bt_setup_link = true; in rtw_coex_bt_info_notify()
3172 if (coex_stat->bt_reenable) in rtw_coex_bt_info_notify()
3185 if (coex_stat->bt_info_hb1 & BIT(3)) in rtw_coex_bt_info_notify()
3186 coex_stat->cnt_bt[COEX_CNT_BT_IGNWLANACT]++; in rtw_coex_bt_info_notify()
3188 coex_stat->bt_ble_voice = ((coex_stat->bt_info_hb1 & BIT(4)) == BIT(4)); in rtw_coex_bt_info_notify()
3189 coex_stat->bt_ble_scan_en = ((coex_stat->bt_info_hb1 & BIT(5)) == BIT(5)); in rtw_coex_bt_info_notify()
3190 if (coex_stat->bt_info_hb1 & BIT(6)) in rtw_coex_bt_info_notify()
3191 coex_stat->cnt_bt[COEX_CNT_BT_ROLESWITCH]++; in rtw_coex_bt_info_notify()
3193 coex_stat->bt_multi_link = ((coex_stat->bt_info_hb1 & BIT(7)) == BIT(7)); in rtw_coex_bt_info_notify()
3196 if (!coex_stat->bt_multi_link && coex_stat->bt_multi_link_pre) { in rtw_coex_bt_info_notify()
3197 coex_stat->bt_multi_link_remain = true; in rtw_coex_bt_info_notify()
3202 coex_stat->bt_multi_link_pre = coex_stat->bt_multi_link; in rtw_coex_bt_info_notify()
3205 if (coex_stat->bt_info_hb1 & BIT(1)) { in rtw_coex_bt_info_notify()
3209 if (coex_stat->wl_connected) in rtw_coex_bt_info_notify()
3217 if ((coex_stat->bt_info_hb1 & BIT(3)) && in rtw_coex_bt_info_notify()
3218 (!(coex_stat->bt_info_hb1 & BIT(2)))) { in rtw_coex_bt_info_notify()
3224 coex_stat->bt_opp_exist = ((coex_stat->bt_info_hb2 & BIT(0)) == BIT(0)); in rtw_coex_bt_info_notify()
3225 if (coex_stat->bt_info_hb2 & BIT(1)) in rtw_coex_bt_info_notify()
3226 coex_stat->cnt_bt[COEX_CNT_BT_AFHUPDATE]++; in rtw_coex_bt_info_notify()
3228 coex_stat->bt_a2dp_active = (coex_stat->bt_info_hb2 & BIT(2)) == BIT(2); in rtw_coex_bt_info_notify()
3229 coex_stat->bt_slave = ((coex_stat->bt_info_hb2 & BIT(3)) == BIT(3)); in rtw_coex_bt_info_notify()
3230 coex_stat->bt_hid_slot = (coex_stat->bt_info_hb2 & 0x30) >> 4; in rtw_coex_bt_info_notify()
3231 coex_stat->bt_hid_pair_num = (coex_stat->bt_info_hb2 & 0xc0) >> 6; in rtw_coex_bt_info_notify()
3232 if (coex_stat->bt_hid_pair_num > 0 && coex_stat->bt_hid_slot >= 2) in rtw_coex_bt_info_notify()
3233 coex_stat->bt_418_hid_exist = true; in rtw_coex_bt_info_notify()
3234 else if (coex_stat->bt_hid_pair_num == 0 || coex_stat->bt_hid_slot == 1) in rtw_coex_bt_info_notify()
3235 coex_stat->bt_418_hid_exist = false; in rtw_coex_bt_info_notify()
3237 if ((coex_stat->bt_info_lb2 & 0x49) == 0x49) in rtw_coex_bt_info_notify()
3238 coex_stat->bt_a2dp_bitpool = (coex_stat->bt_info_hb3 & 0x7f); in rtw_coex_bt_info_notify()
3240 coex_stat->bt_a2dp_bitpool = 0; in rtw_coex_bt_info_notify()
3242 coex_stat->bt_a2dp_sink = ((coex_stat->bt_info_hb3 & BIT(7)) == BIT(7)); in rtw_coex_bt_info_notify()
3256 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_bt_hid_info_notify() local
3272 hl = &coex_stat->hid_handle_list; in rtw_coex_bt_hid_info_notify()
3276 coex_stat->hid_handle_list = *bhl; in rtw_coex_bt_hid_info_notify()
3277 memset(&coex_stat->hid_info, 0, sizeof(coex_stat->hid_info)); in rtw_coex_bt_hid_info_notify()
3279 hidinfo = &coex_stat->hid_info[i]; in rtw_coex_bt_hid_info_notify()
3289 hidinfo = &coex_stat->hid_info[i]; in rtw_coex_bt_hid_info_notify()
3301 hidinfo = &coex_stat->hid_info[i]; in rtw_coex_bt_hid_info_notify()
3333 if (cur_game_hid_exist != coex_stat->bt_game_hid_exist) { in rtw_coex_bt_hid_info_notify()
3334 coex_stat->bt_game_hid_exist = cur_game_hid_exist; in rtw_coex_bt_hid_info_notify()
3337 coex_stat->bt_game_hid_exist); in rtw_coex_bt_hid_info_notify()
3346 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_query_bt_hid_list() local
3351 if (!chip->wl_mimo_ps_support || coex_stat->wl_under_ips || in rtw_coex_query_bt_hid_list()
3352 (coex_stat->wl_under_lps && !coex_stat->wl_force_lps_ctrl)) in rtw_coex_query_bt_hid_list()
3355 if (!coex_stat->bt_hid_exist && in rtw_coex_query_bt_hid_list()
3356 !((coex_stat->bt_info_lb2 & COEX_INFO_CONNECTION) && in rtw_coex_query_bt_hid_list()
3357 (coex_stat->hi_pri_tx + coex_stat->hi_pri_rx > in rtw_coex_query_bt_hid_list()
3364 hidinfo = &coex_stat->hid_info[i]; in rtw_coex_query_bt_hid_list()
3380 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_wl_fwdbginfo_notify() local
3394 val = coex_stat->wl_fw_dbg_info_pre[i]; in rtw_coex_wl_fwdbginfo_notify()
3396 coex_stat->wl_fw_dbg_info[i] = buf[i] - val; in rtw_coex_wl_fwdbginfo_notify()
3398 coex_stat->wl_fw_dbg_info[i] = 255 - val + buf[i]; in rtw_coex_wl_fwdbginfo_notify()
3400 coex_stat->wl_fw_dbg_info_pre[i] = buf[i]; in rtw_coex_wl_fwdbginfo_notify()
3403 coex_stat->cnt_wl[COEX_CNT_WL_FW_NOTIFY]++; in rtw_coex_wl_fwdbginfo_notify()
3415 struct rtw_coex_stat *coex_stat = &rtwdev->coex.stat; in rtw_coex_wl_status_check() local
3417 if ((coex_stat->wl_under_lps && !coex_stat->wl_force_lps_ctrl) || in rtw_coex_wl_status_check()
3418 coex_stat->wl_under_ips) in rtw_coex_wl_status_check()
3428 struct rtw_coex_stat *coex_stat = &rtwdev->coex.stat; in rtw_coex_bt_relink_work() local
3431 coex_stat->bt_setup_link = false; in rtw_coex_bt_relink_work()
3440 struct rtw_coex_stat *coex_stat = &rtwdev->coex.stat; in rtw_coex_bt_reenable_work() local
3443 coex_stat->bt_reenable = false; in rtw_coex_bt_reenable_work()
3452 struct rtw_coex_stat *coex_stat = &rtwdev->coex.stat; in rtw_coex_defreeze_work() local
3456 coex_stat->wl_hi_pri_task1 = false; in rtw_coex_defreeze_work()
3465 struct rtw_coex_stat *coex_stat = &rtwdev->coex.stat; in rtw_coex_wl_remain_work() local
3468 coex_stat->wl_gl_busy = test_bit(RTW_FLAG_BUSY_TRAFFIC, rtwdev->flags); in rtw_coex_wl_remain_work()
3477 struct rtw_coex_stat *coex_stat = &rtwdev->coex.stat; in rtw_coex_bt_remain_work() local
3480 coex_stat->bt_inq_remain = coex_stat->bt_inq_page; in rtw_coex_bt_remain_work()
3489 struct rtw_coex_stat *coex_stat = &rtwdev->coex.stat; in rtw_coex_wl_connecting_work() local
3492 coex_stat->wl_connecting = false; in rtw_coex_wl_connecting_work()
3502 struct rtw_coex_stat *coex_stat = &rtwdev->coex.stat; in rtw_coex_bt_multi_link_remain_work() local
3505 coex_stat->bt_multi_link_remain = false; in rtw_coex_bt_multi_link_remain_work()
3513 struct rtw_coex_stat *coex_stat = &rtwdev->coex.stat; in rtw_coex_wl_ccklock_work() local
3516 coex_stat->wl_cck_lock = false; in rtw_coex_wl_ccklock_work()
3897 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_display_coex_info() local
3911 score_board_WB = coex_stat->score_board; in rtw_coex_display_coex_info()
3922 if (!coex_stat->wl_under_ips && in rtw_coex_display_coex_info()
3923 (!coex_stat->wl_under_lps || coex_stat->wl_force_lps_ctrl) && in rtw_coex_display_coex_info()
3924 !coex_stat->bt_disabled && !coex_stat->bt_mailbox_reply) { in rtw_coex_display_coex_info()
3926 &coex_stat->bt_supported_version); in rtw_coex_display_coex_info()
3927 rtw_coex_get_bt_patch_version(rtwdev, &coex_stat->patch_ver); in rtw_coex_display_coex_info()
3929 &coex_stat->bt_supported_feature); in rtw_coex_display_coex_info()
3930 rtw_coex_get_bt_reg(rtwdev, 3, 0xae, &coex_stat->bt_reg_vendor_ae); in rtw_coex_display_coex_info()
3931 rtw_coex_get_bt_reg(rtwdev, 3, 0xac, &coex_stat->bt_reg_vendor_ac); in rtw_coex_display_coex_info()
3933 if (coex_stat->patch_ver != 0) in rtw_coex_display_coex_info()
3934 coex_stat->bt_mailbox_reply = true; in rtw_coex_display_coex_info()
3962 coex_stat->bt_supported_version, in rtw_coex_display_coex_info()
3963 coex_stat->bt_disabled ? "(BT disabled)" : in rtw_coex_display_coex_info()
3964 coex_stat->bt_supported_version >= chip->bt_desired_ver ? in rtw_coex_display_coex_info()
3968 coex_stat->bt_slave ? "Slave" : "Master", in rtw_coex_display_coex_info()
3969 coex_stat->cnt_bt[COEX_CNT_BT_ROLESWITCH], in rtw_coex_display_coex_info()
3974 coex_stat->patch_ver, in rtw_coex_display_coex_info()
3975 chip->wl_fw_desired_ver, coex_stat->kt_ver + 65); in rtw_coex_display_coex_info()
3989 coex_stat->bt_rssi - 100, in rtw_coex_display_coex_info()
3990 coex_stat->cnt_bt[COEX_CNT_BT_RETRY], in rtw_coex_display_coex_info()
3991 coex_stat->cnt_bt[COEX_CNT_BT_POPEVENT]); in rtw_coex_display_coex_info()
3994 coex_stat->bt_a2dp_exist ? (coex_stat->bt_a2dp_sink ? in rtw_coex_display_coex_info()
3996 coex_stat->bt_hfp_exist ? "HFP," : "", in rtw_coex_display_coex_info()
3997 coex_stat->bt_hid_exist ? in rtw_coex_display_coex_info()
3998 (coex_stat->bt_ble_exist ? "HID(RCU)," : in rtw_coex_display_coex_info()
3999 coex_stat->bt_hid_slot >= 2 ? "HID(4/18)" : in rtw_coex_display_coex_info()
4000 coex_stat->bt_ble_hid_exist ? "HID(BLE)" : in rtw_coex_display_coex_info()
4002 coex_stat->bt_pan_exist ? coex_stat->bt_opp_exist ? in rtw_coex_display_coex_info()
4004 coex_stat->bt_ble_voice ? "Voice," : "", in rtw_coex_display_coex_info()
4005 coex_stat->bt_multi_link); in rtw_coex_display_coex_info()
4008 coex_stat->cnt_bt[COEX_CNT_BT_REINIT], in rtw_coex_display_coex_info()
4009 coex_stat->cnt_bt[COEX_CNT_BT_SETUPLINK], in rtw_coex_display_coex_info()
4010 coex_stat->cnt_bt[COEX_CNT_BT_IGNWLANACT], in rtw_coex_display_coex_info()
4011 coex_stat->bt_supported_feature); in rtw_coex_display_coex_info()
4014 coex_stat->cnt_bt[COEX_CNT_BT_PAGE], in rtw_coex_display_coex_info()
4015 coex_stat->cnt_bt[COEX_CNT_BT_INQ], in rtw_coex_display_coex_info()
4016 coex_stat->cnt_bt[COEX_CNT_BT_IQK], in rtw_coex_display_coex_info()
4017 coex_stat->cnt_bt[COEX_CNT_BT_IQKFAIL]); in rtw_coex_display_coex_info()
4020 coex_stat->bt_reg_vendor_ae, in rtw_coex_display_coex_info()
4021 coex_stat->bt_reg_vendor_ac, in rtw_coex_display_coex_info()
4025 coex_stat->hi_pri_tx, coex_stat->hi_pri_rx, in rtw_coex_display_coex_info()
4026 coex_stat->lo_pri_tx, coex_stat->lo_pri_rx); in rtw_coex_display_coex_info()
4030 coex_stat->bt_info_c2h[i]); in rtw_coex_display_coex_info()
4039 coex_stat->wl_gl_busy, in rtw_coex_display_coex_info()
4070 rtw_coex_get_wl_coex_mode(coex_stat->wl_coex_mode), in rtw_coex_display_coex_info()
4072 coex_stat->tdma_timer_base); in rtw_coex_display_coex_info()
4081 coex_stat->cnt_wl[COEX_CNT_WL_COEXRUN], in rtw_coex_display_coex_info()
4088 coex_stat->wl_force_lps_ctrl ? "On" : "Off", in rtw_coex_display_coex_info()
4089 coex_stat->wl_gl_busy); in rtw_coex_display_coex_info()
4092 coex_stat->wl_fw_dbg_info[1], coex_stat->wl_fw_dbg_info[2], in rtw_coex_display_coex_info()
4093 coex_stat->wl_fw_dbg_info[3], coex_stat->wl_fw_dbg_info[4], in rtw_coex_display_coex_info()
4094 coex_stat->wl_fw_dbg_info[5]); in rtw_coex_display_coex_info()
4097 coex_stat->wl_fw_dbg_info[6], in rtw_coex_display_coex_info()
4098 coex_stat->wl_fw_dbg_info[7], in rtw_coex_display_coex_info()
4099 coex_stat->wl_slot_extend ? "Yes" : "No", in rtw_coex_display_coex_info()
4100 coex_stat->cnt_wl[COEX_CNT_WL_FW_NOTIFY]); in rtw_coex_display_coex_info()
4135 coex_stat->wl_hi_pri_task1 ? "Y" : "N", in rtw_coex_display_coex_info()
4136 coex_stat->wl_cck_lock ? "Y" : "N", in rtw_coex_display_coex_info()
4137 coex_stat->wl_cck_lock_ever ? "Y" : "N", in rtw_coex_display_coex_info()
4138 coex_stat->wl_noisy_level); in rtw_coex_display_coex_info()