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()
528 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
722 rssi = coex_stat->bt_rssi; in rtw_coex_update_bt_link_info()
728 if (coex_stat->bt_ble_scan_en && in rtw_coex_update_bt_link_info()
729 coex_stat->cnt_bt[COEX_CNT_BT_INFOUPDATE] % 3 == 0) { in rtw_coex_update_bt_link_info()
733 coex_stat->bt_ble_scan_type = scan_type; in rtw_coex_update_bt_link_info()
734 if ((coex_stat->bt_ble_scan_type & 0x1) == 0x1) in rtw_coex_update_bt_link_info()
735 coex_stat->bt_init_scan = true; in rtw_coex_update_bt_link_info()
737 coex_stat->bt_init_scan = false; in rtw_coex_update_bt_link_info()
741 coex_stat->bt_profile_num = 0; in rtw_coex_update_bt_link_info()
744 if (!(coex_stat->bt_info_lb2 & COEX_INFO_CONNECTION)) { in rtw_coex_update_bt_link_info()
745 coex_stat->bt_link_exist = false; in rtw_coex_update_bt_link_info()
746 coex_stat->bt_pan_exist = false; in rtw_coex_update_bt_link_info()
747 coex_stat->bt_a2dp_exist = false; in rtw_coex_update_bt_link_info()
748 coex_stat->bt_hid_exist = false; in rtw_coex_update_bt_link_info()
749 coex_stat->bt_hfp_exist = false; in rtw_coex_update_bt_link_info()
752 coex_stat->bt_link_exist = true; in rtw_coex_update_bt_link_info()
753 if (coex_stat->bt_info_lb2 & COEX_INFO_FTP) { in rtw_coex_update_bt_link_info()
754 coex_stat->bt_pan_exist = true; in rtw_coex_update_bt_link_info()
755 coex_stat->bt_profile_num++; in rtw_coex_update_bt_link_info()
757 coex_stat->bt_pan_exist = false; in rtw_coex_update_bt_link_info()
760 if (coex_stat->bt_info_lb2 & COEX_INFO_A2DP) { in rtw_coex_update_bt_link_info()
761 coex_stat->bt_a2dp_exist = true; in rtw_coex_update_bt_link_info()
762 coex_stat->bt_profile_num++; in rtw_coex_update_bt_link_info()
764 coex_stat->bt_a2dp_exist = false; in rtw_coex_update_bt_link_info()
767 if (coex_stat->bt_info_lb2 & COEX_INFO_HID) { in rtw_coex_update_bt_link_info()
768 coex_stat->bt_hid_exist = true; in rtw_coex_update_bt_link_info()
769 coex_stat->bt_profile_num++; in rtw_coex_update_bt_link_info()
771 coex_stat->bt_hid_exist = false; in rtw_coex_update_bt_link_info()
774 if (coex_stat->bt_info_lb2 & COEX_INFO_SCO_ESCO) { in rtw_coex_update_bt_link_info()
775 coex_stat->bt_hfp_exist = true; in rtw_coex_update_bt_link_info()
776 coex_stat->bt_profile_num++; in rtw_coex_update_bt_link_info()
778 coex_stat->bt_hfp_exist = false; in rtw_coex_update_bt_link_info()
782 if (coex_stat->bt_info_lb2 & COEX_INFO_INQ_PAGE) { in rtw_coex_update_bt_link_info()
784 } else if (!(coex_stat->bt_info_lb2 & COEX_INFO_CONNECTION)) { in rtw_coex_update_bt_link_info()
786 coex_stat->bt_multi_link_remain = false; in rtw_coex_update_bt_link_info()
787 } else if (coex_stat->bt_info_lb2 == COEX_INFO_CONNECTION) { in rtw_coex_update_bt_link_info()
789 } else if ((coex_stat->bt_info_lb2 & COEX_INFO_SCO_ESCO) || in rtw_coex_update_bt_link_info()
790 (coex_stat->bt_info_lb2 & COEX_INFO_SCO_BUSY)) { in rtw_coex_update_bt_link_info()
791 if (coex_stat->bt_info_lb2 & COEX_INFO_ACL_BUSY) in rtw_coex_update_bt_link_info()
795 } else if (coex_stat->bt_info_lb2 & COEX_INFO_ACL_BUSY) { in rtw_coex_update_bt_link_info()
801 coex_stat->cnt_bt[COEX_CNT_BT_INFOUPDATE]++; in rtw_coex_update_bt_link_info()
812 struct rtw_coex_stat *coex_stat = &rtwdev->coex.stat; in rtw_coex_update_wl_ch_info() local
825 coex_stat->wl_coex_mode != COEX_WLINK_2GFREE)) { in rtw_coex_update_wl_ch_info()
895 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_set_rf_para() local
898 if (coex->freerun && coex_stat->cnt_wl[COEX_CNT_WL_SCANAP] <= 5) in rtw_coex_set_rf_para()
966 struct rtw_coex_stat *coex_stat = &rtwdev->coex.stat; in rtw_coex_mimo_ps() local
968 if (!force && state == coex_stat->wl_mimo_ps) in rtw_coex_mimo_ps()
971 coex_stat->wl_mimo_ps = state; in rtw_coex_mimo_ps()
975 rtw_coex_update_wl_ch_info(rtwdev, (u8)coex_stat->wl_connected); in rtw_coex_mimo_ps()
1020 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_btc_wltoggle_table_b() local
1031 coex_stat->wl_toggle_interval = interval; in rtw_btc_wltoggle_table_b()
1034 coex_stat->wl_toggle_para[i] = cur_h2c_para[i]; in rtw_btc_wltoggle_table_b()
1072 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_table() local
1090 if (coex_stat->wl_slot_toggle_change) in rtw_coex_table()
1108 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_power_save_state() local
1116 coex_stat->wl_force_lps_ctrl = false; in rtw_coex_power_save_state()
1122 coex_stat->wl_force_lps_ctrl = true; in rtw_coex_power_save_state()
1141 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_set_tdma() local
1158 coex_stat->wl_coex_mode == COEX_WLINK_2GFREE) { in rtw_coex_set_tdma()
1186 coex_stat->wl_slot_toggle = true; in rtw_coex_set_tdma()
1187 coex_stat->wl_slot_toggle_change = false; in rtw_coex_set_tdma()
1189 coex_stat->wl_slot_toggle_change = coex_stat->wl_slot_toggle; in rtw_coex_set_tdma()
1190 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
1225 if ((coex_stat->bt_a2dp_exist && in rtw_coex_tdma()
1226 (coex_stat->bt_inq_remain || coex_stat->bt_multi_link)) || in rtw_coex_tdma()
1263 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_set_ant_path() local
1279 coex_stat->bt_disabled); in rtw_coex_set_ant_path()
1286 if (coex_stat->bt_disabled) in rtw_coex_set_ant_path()
1297 if (coex_stat->bt_disabled) { in rtw_coex_set_ant_path()
1463 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_algorithm() local
1467 if (coex_stat->bt_hfp_exist) in rtw_coex_algorithm()
1469 if (coex_stat->bt_hid_exist) in rtw_coex_algorithm()
1471 if (coex_stat->bt_a2dp_exist) in rtw_coex_algorithm()
1473 if (coex_stat->bt_pan_exist) in rtw_coex_algorithm()
1506 if (coex_stat->bt_multi_link) { in rtw_coex_algorithm()
1507 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
1586 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
1660 if (coex_stat->wl_gl_busy) { in rtw_coex_action_bt_relink()
1662 if (coex_stat->bt_hid_exist && in rtw_coex_action_bt_relink()
1663 coex_stat->bt_profile_num == 1) { in rtw_coex_action_bt_relink()
1674 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
1702 coex_stat->wl_gl_busy) { in rtw_coex_action_bt_idle()
1720 if (!coex_stat->wl_gl_busy) { in rtw_coex_action_bt_idle()
1726 if (coex_stat->lo_pri_rx + coex_stat->lo_pri_tx > 250) in rtw_coex_action_bt_idle()
1736 if (!coex_stat->wl_gl_busy) { in rtw_coex_action_bt_idle()
1739 } 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
1768 if (coex_stat->wl_linkscan_proc || coex_stat->wl_hi_pri_task1 || in rtw_coex_action_bt_inquiry()
1769 coex_stat->wl_hi_pri_task2) in rtw_coex_action_bt_inquiry()
1779 if (coex_stat->bt_profile_num > 0) in rtw_coex_action_bt_inquiry()
1781 else if (coex_stat->wl_hi_pri_task1) in rtw_coex_action_bt_inquiry()
1783 else if (!coex_stat->bt_page) in rtw_coex_action_bt_inquiry()
1787 } else if (coex_stat->wl_gl_busy) { in rtw_coex_action_bt_inquiry()
1790 if (coex_stat->bt_profile_num == 0) { in rtw_coex_action_bt_inquiry()
1793 } else if (coex_stat->bt_profile_num == 1 && in rtw_coex_action_bt_inquiry()
1794 !coex_stat->bt_a2dp_exist) { in rtw_coex_action_bt_inquiry()
1803 } else if (coex_stat->wl_connected) { in rtw_coex_action_bt_inquiry()
1821 if (coex_stat->bt_profile_num > 0) in rtw_coex_action_bt_inquiry()
1823 else if (coex_stat->wl_hi_pri_task1) in rtw_coex_action_bt_inquiry()
1825 else if (!coex_stat->bt_page) in rtw_coex_action_bt_inquiry()
1829 } else if (coex_stat->wl_gl_busy) { in rtw_coex_action_bt_inquiry()
1834 } else if (coex_stat->wl_connected) { in rtw_coex_action_bt_inquiry()
1848 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
1867 coex_stat->wl_coex_mode = COEX_WLINK_2GFREE; in rtw_coex_action_bt_game_hid()
1868 if (coex_stat->bt_whck_test) in rtw_coex_action_bt_game_hid()
1870 else if (coex_stat->wl_linkscan_proc || coex_stat->bt_hid_exist) in rtw_coex_action_bt_game_hid()
1872 else if (coex_stat->bt_setup_link || coex_stat->bt_inq_page) in rtw_coex_action_bt_game_hid()
1874 else if (coex_stat->bt_a2dp_exist) in rtw_coex_action_bt_game_hid()
1889 if (coex_stat->wl_coex_mode == COEX_WLINK_2GFREE) { in rtw_coex_action_bt_game_hid()
1890 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
1920 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
1949 if (coex_stat->bt_ble_exist) { in rtw_coex_action_bt_hid()
1951 if (coex_stat->cnt_wl[COEX_CNT_WL_SCANAP] > 5) { in rtw_coex_action_bt_hid()
1960 if (coex_stat->bt_profile_num == 1 && in rtw_coex_action_bt_hid()
1961 (coex_stat->bt_multi_link || in rtw_coex_action_bt_hid()
1962 (coex_stat->lo_pri_rx + in rtw_coex_action_bt_hid()
1963 coex_stat->lo_pri_tx > 360) || in rtw_coex_action_bt_hid()
1964 coex_stat->bt_slave || in rtw_coex_action_bt_hid()
1969 } else if (coex_stat->bt_a2dp_active) { in rtw_coex_action_bt_hid()
1972 } else if (coex_stat->bt_418_hid_exist && in rtw_coex_action_bt_hid()
1973 coex_stat->wl_gl_busy) { in rtw_coex_action_bt_hid()
1978 } else if (coex_stat->bt_ble_hid_exist && in rtw_coex_action_bt_hid()
1979 coex_stat->wl_gl_busy) { in rtw_coex_action_bt_hid()
1989 if (coex_stat->bt_ble_exist) { in rtw_coex_action_bt_hid()
1991 if (coex_stat->cnt_wl[COEX_CNT_WL_SCANAP] > 5) { in rtw_coex_action_bt_hid()
1998 } 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
2035 if (coex_stat->wl_gl_busy && coex_stat->wl_noisy_level == 0) in rtw_coex_action_bt_a2dp()
2040 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
2076 } 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
2111 if (coex_stat->wl_gl_busy && coex_stat->wl_noisy_level == 0) in rtw_coex_action_bt_pan()
2116 if (coex_stat->wl_gl_busy) in rtw_coex_action_bt_pan()
2124 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
2153 if (coex_stat->bt_ble_exist) { in rtw_coex_action_bt_a2dp_hid()
2155 } else if (coex_stat->bt_418_hid_exist) { in rtw_coex_action_bt_a2dp_hid()
2162 if (coex_stat->wl_connecting || !coex_stat->wl_gl_busy) { in rtw_coex_action_bt_a2dp_hid()
2164 } else if (coex_stat->bt_418_hid_exist) { in rtw_coex_action_bt_a2dp_hid()
2172 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
2207 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()
2219 coex_stat->wl_noisy_level == 0) in rtw_coex_action_bt_a2dp_pan()
2224 if (coex_stat->wl_gl_busy) in rtw_coex_action_bt_a2dp_pan()
2233 if (coex_stat->wl_gl_busy) in rtw_coex_action_bt_a2dp_pan()
2251 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_action_bt_pan_hid() local
2265 if (coex_stat->wl_gl_busy) in rtw_coex_action_bt_pan_hid()
2273 if (coex_stat->wl_gl_busy) in rtw_coex_action_bt_pan_hid()
2286 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_action_bt_a2dp_pan_hid() local
2299 if (coex_stat->wl_gl_busy) in rtw_coex_action_bt_a2dp_pan_hid()
2307 if (coex_stat->wl_gl_busy) in rtw_coex_action_bt_a2dp_pan_hid()
2322 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_action_wl_under5g() local
2332 if (coex_stat->bt_game_hid_exist && coex_stat->wl_linkscan_proc) in rtw_coex_action_wl_under5g()
2333 coex_stat->wl_coex_mode = COEX_WLINK_2GFREE; in rtw_coex_action_wl_under5g()
2378 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_action_wl_native_lps() local
2398 if (coex_stat->bt_game_hid_exist) { in rtw_coex_action_wl_native_lps()
2399 coex_stat->wl_coex_mode = COEX_WLINK_2GFREE; in rtw_coex_action_wl_native_lps()
2400 if (coex_stat->wl_tput_dir == COEX_WL_TPUT_TX) in rtw_coex_action_wl_native_lps()
2415 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_action_wl_linkscan() local
2426 if (coex_stat->bt_a2dp_exist) { in rtw_coex_action_wl_linkscan()
2429 if (coex_stat->wl_gl_busy) in rtw_coex_action_wl_linkscan()
2438 if (coex_stat->bt_a2dp_exist) { in rtw_coex_action_wl_linkscan()
2479 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_action_wl_connected() local
2499 else if (coex_stat->bt_a2dp_sink) in rtw_coex_action_wl_connected()
2534 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_run_coex() local
2564 if (coex_stat->wl_under_ips) { in rtw_coex_run_coex()
2571 !coex_stat->bt_setup_link) { in rtw_coex_run_coex()
2577 coex_stat->cnt_wl[COEX_CNT_WL_COEXRUN]++; in rtw_coex_run_coex()
2582 coex_stat->wl_coex_mode = COEX_WLINK_5G; in rtw_coex_run_coex()
2588 coex_stat->wl_coex_mode = COEX_WLINK_2G1PORT; in rtw_coex_run_coex()
2590 if (coex_stat->bt_disabled) { in rtw_coex_run_coex()
2591 if (coex_stat->wl_connected && rf4ce_en) in rtw_coex_run_coex()
2593 else if (!coex_stat->wl_connected) in rtw_coex_run_coex()
2600 if (coex_stat->wl_under_lps && !coex_stat->wl_force_lps_ctrl) { in rtw_coex_run_coex()
2605 if (coex_stat->bt_game_hid_exist && coex_stat->wl_connected) { in rtw_coex_run_coex()
2610 if (coex_stat->bt_whck_test) { in rtw_coex_run_coex()
2615 if (coex_stat->bt_setup_link) { in rtw_coex_run_coex()
2620 if (coex_stat->bt_inq_page) { in rtw_coex_run_coex()
2627 coex_stat->wl_connected) { in rtw_coex_run_coex()
2632 if (coex_stat->wl_linkscan_proc && !coex->freerun) { in rtw_coex_run_coex()
2637 if (coex_stat->wl_connected) { in rtw_coex_run_coex()
2648 if (coex_stat->wl_coex_mode == COEX_WLINK_2GFREE) { in rtw_coex_run_coex()
2658 rtw_coex_gnt_workaround(rtwdev, false, coex_stat->wl_coex_mode); in rtw_coex_run_coex()
2665 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_init_coex_var() local
2670 memset(coex_stat, 0, sizeof(*coex_stat)); in rtw_coex_init_coex_var()
2673 coex_stat->cnt_wl[i] = 0; in rtw_coex_init_coex_var()
2676 coex_stat->cnt_bt[i] = 0; in rtw_coex_init_coex_var()
2684 coex_stat->wl_coex_mode = COEX_WLINK_MAX; in rtw_coex_init_coex_var()
2685 coex_stat->wl_rx_rate = DESC_RATE5_5M; in rtw_coex_init_coex_var()
2686 coex_stat->wl_rts_rx_rate = DESC_RATE5_5M; in rtw_coex_init_coex_var()
2692 struct rtw_coex_stat *coex_stat = &coex->stat; in __rtw_coex_init_hw_config() local
2698 coex_stat->kt_ver = u8_get_bits(rtw_read8(rtwdev, 0xf1), GENMASK(7, 4)); in __rtw_coex_init_hw_config()
2701 rtw_coex_wl_slot_extend(rtwdev, coex_stat->wl_slot_extend); in __rtw_coex_init_hw_config()
2783 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_ips_notify() local
2791 coex_stat->wl_under_ips = true; in rtw_coex_ips_notify()
2805 coex_stat->wl_under_ips = false; in rtw_coex_ips_notify()
2812 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_lps_notify() local
2820 coex_stat->wl_under_lps = true; in rtw_coex_lps_notify()
2822 if (coex_stat->wl_force_lps_ctrl) { in rtw_coex_lps_notify()
2835 coex_stat->wl_under_lps = false; in rtw_coex_lps_notify()
2840 if (!coex_stat->wl_force_lps_ctrl) in rtw_coex_lps_notify()
2850 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_scan_notify() local
2868 coex_stat->wl_hi_pri_task2 = true; in rtw_coex_scan_notify()
2874 coex_stat->cnt_wl[COEX_CNT_WL_SCANAP] = 30; /* To do */ in rtw_coex_scan_notify()
2878 coex_stat->cnt_wl[COEX_CNT_WL_SCANAP]); in rtw_coex_scan_notify()
2880 coex_stat->wl_hi_pri_task2 = false; in rtw_coex_scan_notify()
2914 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_connect_notify() local
2934 coex_stat->wl_hi_pri_task1 = true; in rtw_coex_connect_notify()
2935 coex_stat->wl_connecting = true; in rtw_coex_connect_notify()
2936 coex_stat->cnt_wl[COEX_CNT_WL_CONNPKT] = 2; in rtw_coex_connect_notify()
2937 coex_stat->wl_connecting = true; in rtw_coex_connect_notify()
2955 coex_stat->wl_hi_pri_task1 = false; in rtw_coex_connect_notify()
2957 coex_stat->wl_connecting = false; in rtw_coex_connect_notify()
2968 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_media_status_notify() local
2983 coex_stat->wl_connecting = false; in rtw_coex_media_status_notify()
3006 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_bt_info_notify() local
3016 coex_stat->cnt_bt_info_c2h[rsp_source]++; in rtw_coex_bt_info_notify()
3019 coex_stat->bt_iqk_state = buf[1]; in rtw_coex_bt_info_notify()
3020 if (coex_stat->bt_iqk_state == 0) in rtw_coex_bt_info_notify()
3021 coex_stat->cnt_bt[COEX_CNT_BT_IQK]++; in rtw_coex_bt_info_notify()
3022 else if (coex_stat->bt_iqk_state == 2) in rtw_coex_bt_info_notify()
3023 coex_stat->cnt_bt[COEX_CNT_BT_IQKFAIL]++; in rtw_coex_bt_info_notify()
3038 if (coex_stat->bt_disabled != coex_stat->bt_disabled_pre) { in rtw_coex_bt_info_notify()
3039 coex_stat->bt_disabled_pre = coex_stat->bt_disabled; in rtw_coex_bt_info_notify()
3065 if (coex_stat->bt_disabled) { in rtw_coex_bt_info_notify()
3066 coex_stat->bt_disabled = false; in rtw_coex_bt_info_notify()
3067 coex_stat->bt_reenable = true; in rtw_coex_bt_info_notify()
3088 coex_stat->bt_info_c2h[rsp_source][i] = buf[i]; in rtw_coex_bt_info_notify()
3091 if (coex_stat->bt_info_c2h[rsp_source][1] == coex_stat->bt_info_lb2 && in rtw_coex_bt_info_notify()
3092 coex_stat->bt_info_c2h[rsp_source][2] == coex_stat->bt_info_lb3 && in rtw_coex_bt_info_notify()
3093 coex_stat->bt_info_c2h[rsp_source][3] == coex_stat->bt_info_hb0 && in rtw_coex_bt_info_notify()
3094 coex_stat->bt_info_c2h[rsp_source][4] == coex_stat->bt_info_hb1 && in rtw_coex_bt_info_notify()
3095 coex_stat->bt_info_c2h[rsp_source][5] == coex_stat->bt_info_hb2 && in rtw_coex_bt_info_notify()
3096 coex_stat->bt_info_c2h[rsp_source][6] == coex_stat->bt_info_hb3) { in rtw_coex_bt_info_notify()
3102 coex_stat->bt_info_lb2 = coex_stat->bt_info_c2h[rsp_source][1]; in rtw_coex_bt_info_notify()
3103 coex_stat->bt_info_lb3 = coex_stat->bt_info_c2h[rsp_source][2]; in rtw_coex_bt_info_notify()
3104 coex_stat->bt_info_hb0 = coex_stat->bt_info_c2h[rsp_source][3]; in rtw_coex_bt_info_notify()
3105 coex_stat->bt_info_hb1 = coex_stat->bt_info_c2h[rsp_source][4]; in rtw_coex_bt_info_notify()
3106 coex_stat->bt_info_hb2 = coex_stat->bt_info_c2h[rsp_source][5]; in rtw_coex_bt_info_notify()
3107 coex_stat->bt_info_hb3 = coex_stat->bt_info_c2h[rsp_source][6]; in rtw_coex_bt_info_notify()
3110 coex_stat->bt_whck_test = (coex_stat->bt_info_lb2 == 0xff); in rtw_coex_bt_info_notify()
3112 inq_page = ((coex_stat->bt_info_lb2 & BIT(2)) == BIT(2)); in rtw_coex_bt_info_notify()
3114 if (inq_page != coex_stat->bt_inq_page) { in rtw_coex_bt_info_notify()
3116 coex_stat->bt_inq_page = inq_page; in rtw_coex_bt_info_notify()
3119 coex_stat->bt_inq_remain = true; in rtw_coex_bt_info_notify()
3125 coex_stat->bt_acl_busy = ((coex_stat->bt_info_lb2 & BIT(3)) == BIT(3)); in rtw_coex_bt_info_notify()
3127 if (coex_stat->bt_info_lb2 & BIT(5)) { in rtw_coex_bt_info_notify()
3128 if (coex_stat->bt_info_hb1 & BIT(0)) { in rtw_coex_bt_info_notify()
3130 coex_stat->bt_ble_hid_exist = true; in rtw_coex_bt_info_notify()
3132 coex_stat->bt_ble_hid_exist = false; in rtw_coex_bt_info_notify()
3134 coex_stat->bt_ble_exist = false; in rtw_coex_bt_info_notify()
3135 } else if (coex_stat->bt_info_hb1 & BIT(0)) { in rtw_coex_bt_info_notify()
3137 coex_stat->bt_ble_hid_exist = false; in rtw_coex_bt_info_notify()
3138 coex_stat->bt_ble_exist = true; in rtw_coex_bt_info_notify()
3140 coex_stat->bt_ble_hid_exist = false; in rtw_coex_bt_info_notify()
3141 coex_stat->bt_ble_exist = false; in rtw_coex_bt_info_notify()
3144 if (coex_stat->bt_info_hb1 & BIT(0)) { in rtw_coex_bt_info_notify()
3145 if (coex_stat->bt_hid_slot == 1 && in rtw_coex_bt_info_notify()
3146 coex_stat->hi_pri_rx + 100 < coex_stat->hi_pri_tx && in rtw_coex_bt_info_notify()
3147 coex_stat->hi_pri_rx < 100) { in rtw_coex_bt_info_notify()
3148 coex_stat->bt_ble_hid_exist = true; in rtw_coex_bt_info_notify()
3149 coex_stat->bt_ble_exist = false; in rtw_coex_bt_info_notify()
3151 coex_stat->bt_ble_hid_exist = false; in rtw_coex_bt_info_notify()
3152 coex_stat->bt_ble_exist = true; in rtw_coex_bt_info_notify()
3155 coex_stat->bt_ble_hid_exist = false; in rtw_coex_bt_info_notify()
3156 coex_stat->bt_ble_exist = false; in rtw_coex_bt_info_notify()
3160 coex_stat->cnt_bt[COEX_CNT_BT_RETRY] = coex_stat->bt_info_lb3 & 0xf; in rtw_coex_bt_info_notify()
3161 if (coex_stat->cnt_bt[COEX_CNT_BT_RETRY] >= 1) in rtw_coex_bt_info_notify()
3162 coex_stat->cnt_bt[COEX_CNT_BT_POPEVENT]++; in rtw_coex_bt_info_notify()
3164 coex_stat->bt_fix_2M = ((coex_stat->bt_info_lb3 & BIT(4)) == BIT(4)); in rtw_coex_bt_info_notify()
3165 coex_stat->bt_inq = ((coex_stat->bt_info_lb3 & BIT(5)) == BIT(5)); in rtw_coex_bt_info_notify()
3166 if (coex_stat->bt_inq) in rtw_coex_bt_info_notify()
3167 coex_stat->cnt_bt[COEX_CNT_BT_INQ]++; in rtw_coex_bt_info_notify()
3169 coex_stat->bt_page = ((coex_stat->bt_info_lb3 & BIT(7)) == BIT(7)); in rtw_coex_bt_info_notify()
3170 if (coex_stat->bt_page) in rtw_coex_bt_info_notify()
3171 coex_stat->cnt_bt[COEX_CNT_BT_PAGE]++; in rtw_coex_bt_info_notify()
3175 coex_stat->bt_rssi = coex_stat->bt_info_hb0 * 2 + 10; in rtw_coex_bt_info_notify()
3177 if (coex_stat->bt_info_hb0 <= 127) in rtw_coex_bt_info_notify()
3178 coex_stat->bt_rssi = 100; in rtw_coex_bt_info_notify()
3179 else if (256 - coex_stat->bt_info_hb0 <= 100) in rtw_coex_bt_info_notify()
3180 coex_stat->bt_rssi = 100 - (256 - coex_stat->bt_info_hb0); in rtw_coex_bt_info_notify()
3182 coex_stat->bt_rssi = 0; in rtw_coex_bt_info_notify()
3185 if (coex_stat->bt_info_hb1 & BIT(1)) in rtw_coex_bt_info_notify()
3186 coex_stat->cnt_bt[COEX_CNT_BT_REINIT]++; in rtw_coex_bt_info_notify()
3188 if (coex_stat->bt_info_hb1 & BIT(2)) { in rtw_coex_bt_info_notify()
3189 coex_stat->cnt_bt[COEX_CNT_BT_SETUPLINK]++; in rtw_coex_bt_info_notify()
3190 coex_stat->bt_setup_link = true; in rtw_coex_bt_info_notify()
3191 if (coex_stat->bt_reenable) in rtw_coex_bt_info_notify()
3204 if (coex_stat->bt_info_hb1 & BIT(3)) in rtw_coex_bt_info_notify()
3205 coex_stat->cnt_bt[COEX_CNT_BT_IGNWLANACT]++; in rtw_coex_bt_info_notify()
3207 coex_stat->bt_ble_voice = ((coex_stat->bt_info_hb1 & BIT(4)) == BIT(4)); in rtw_coex_bt_info_notify()
3208 coex_stat->bt_ble_scan_en = ((coex_stat->bt_info_hb1 & BIT(5)) == BIT(5)); in rtw_coex_bt_info_notify()
3209 if (coex_stat->bt_info_hb1 & BIT(6)) in rtw_coex_bt_info_notify()
3210 coex_stat->cnt_bt[COEX_CNT_BT_ROLESWITCH]++; in rtw_coex_bt_info_notify()
3212 coex_stat->bt_multi_link = ((coex_stat->bt_info_hb1 & BIT(7)) == BIT(7)); in rtw_coex_bt_info_notify()
3215 if (!coex_stat->bt_multi_link && coex_stat->bt_multi_link_pre) { in rtw_coex_bt_info_notify()
3216 coex_stat->bt_multi_link_remain = true; in rtw_coex_bt_info_notify()
3221 coex_stat->bt_multi_link_pre = coex_stat->bt_multi_link; in rtw_coex_bt_info_notify()
3224 if (coex_stat->bt_info_hb1 & BIT(1)) { in rtw_coex_bt_info_notify()
3228 if (coex_stat->wl_connected) in rtw_coex_bt_info_notify()
3236 if ((coex_stat->bt_info_hb1 & BIT(3)) && in rtw_coex_bt_info_notify()
3237 (!(coex_stat->bt_info_hb1 & BIT(2)))) { in rtw_coex_bt_info_notify()
3243 coex_stat->bt_opp_exist = ((coex_stat->bt_info_hb2 & BIT(0)) == BIT(0)); in rtw_coex_bt_info_notify()
3244 if (coex_stat->bt_info_hb2 & BIT(1)) in rtw_coex_bt_info_notify()
3245 coex_stat->cnt_bt[COEX_CNT_BT_AFHUPDATE]++; in rtw_coex_bt_info_notify()
3247 coex_stat->bt_a2dp_active = (coex_stat->bt_info_hb2 & BIT(2)) == BIT(2); in rtw_coex_bt_info_notify()
3248 coex_stat->bt_slave = ((coex_stat->bt_info_hb2 & BIT(3)) == BIT(3)); in rtw_coex_bt_info_notify()
3249 coex_stat->bt_hid_slot = (coex_stat->bt_info_hb2 & 0x30) >> 4; in rtw_coex_bt_info_notify()
3250 coex_stat->bt_hid_pair_num = (coex_stat->bt_info_hb2 & 0xc0) >> 6; in rtw_coex_bt_info_notify()
3251 if (coex_stat->bt_hid_pair_num > 0 && coex_stat->bt_hid_slot >= 2) in rtw_coex_bt_info_notify()
3252 coex_stat->bt_418_hid_exist = true; in rtw_coex_bt_info_notify()
3253 else if (coex_stat->bt_hid_pair_num == 0 || coex_stat->bt_hid_slot == 1) in rtw_coex_bt_info_notify()
3254 coex_stat->bt_418_hid_exist = false; in rtw_coex_bt_info_notify()
3256 if ((coex_stat->bt_info_lb2 & 0x49) == 0x49) in rtw_coex_bt_info_notify()
3257 coex_stat->bt_a2dp_bitpool = (coex_stat->bt_info_hb3 & 0x7f); in rtw_coex_bt_info_notify()
3259 coex_stat->bt_a2dp_bitpool = 0; in rtw_coex_bt_info_notify()
3261 coex_stat->bt_a2dp_sink = ((coex_stat->bt_info_hb3 & BIT(7)) == BIT(7)); in rtw_coex_bt_info_notify()
3275 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_bt_hid_info_notify() local
3291 hl = &coex_stat->hid_handle_list; in rtw_coex_bt_hid_info_notify()
3295 coex_stat->hid_handle_list = *bhl; in rtw_coex_bt_hid_info_notify()
3296 memset(&coex_stat->hid_info, 0, sizeof(coex_stat->hid_info)); in rtw_coex_bt_hid_info_notify()
3298 hidinfo = &coex_stat->hid_info[i]; in rtw_coex_bt_hid_info_notify()
3308 hidinfo = &coex_stat->hid_info[i]; in rtw_coex_bt_hid_info_notify()
3320 hidinfo = &coex_stat->hid_info[i]; in rtw_coex_bt_hid_info_notify()
3352 if (cur_game_hid_exist != coex_stat->bt_game_hid_exist) { in rtw_coex_bt_hid_info_notify()
3353 coex_stat->bt_game_hid_exist = cur_game_hid_exist; in rtw_coex_bt_hid_info_notify()
3356 coex_stat->bt_game_hid_exist); in rtw_coex_bt_hid_info_notify()
3365 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_query_bt_hid_list() local
3370 if (!chip->wl_mimo_ps_support || coex_stat->wl_under_ips || in rtw_coex_query_bt_hid_list()
3371 (coex_stat->wl_under_lps && !coex_stat->wl_force_lps_ctrl)) in rtw_coex_query_bt_hid_list()
3374 if (!coex_stat->bt_hid_exist && in rtw_coex_query_bt_hid_list()
3375 !((coex_stat->bt_info_lb2 & COEX_INFO_CONNECTION) && in rtw_coex_query_bt_hid_list()
3376 (coex_stat->hi_pri_tx + coex_stat->hi_pri_rx > in rtw_coex_query_bt_hid_list()
3383 hidinfo = &coex_stat->hid_info[i]; in rtw_coex_query_bt_hid_list()
3399 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_wl_fwdbginfo_notify() local
3413 val = coex_stat->wl_fw_dbg_info_pre[i]; in rtw_coex_wl_fwdbginfo_notify()
3415 coex_stat->wl_fw_dbg_info[i] = buf[i] - val; in rtw_coex_wl_fwdbginfo_notify()
3417 coex_stat->wl_fw_dbg_info[i] = 255 - val + buf[i]; in rtw_coex_wl_fwdbginfo_notify()
3419 coex_stat->wl_fw_dbg_info_pre[i] = buf[i]; in rtw_coex_wl_fwdbginfo_notify()
3422 coex_stat->cnt_wl[COEX_CNT_WL_FW_NOTIFY]++; in rtw_coex_wl_fwdbginfo_notify()
3434 struct rtw_coex_stat *coex_stat = &rtwdev->coex.stat; in rtw_coex_wl_status_check() local
3436 if ((coex_stat->wl_under_lps && !coex_stat->wl_force_lps_ctrl) || in rtw_coex_wl_status_check()
3437 coex_stat->wl_under_ips) in rtw_coex_wl_status_check()
3447 struct rtw_coex_stat *coex_stat = &rtwdev->coex.stat; in rtw_coex_bt_relink_work() local
3450 coex_stat->bt_setup_link = false; in rtw_coex_bt_relink_work()
3459 struct rtw_coex_stat *coex_stat = &rtwdev->coex.stat; in rtw_coex_bt_reenable_work() local
3462 coex_stat->bt_reenable = false; in rtw_coex_bt_reenable_work()
3471 struct rtw_coex_stat *coex_stat = &rtwdev->coex.stat; in rtw_coex_defreeze_work() local
3475 coex_stat->wl_hi_pri_task1 = false; in rtw_coex_defreeze_work()
3484 struct rtw_coex_stat *coex_stat = &rtwdev->coex.stat; in rtw_coex_wl_remain_work() local
3487 coex_stat->wl_gl_busy = test_bit(RTW_FLAG_BUSY_TRAFFIC, rtwdev->flags); in rtw_coex_wl_remain_work()
3496 struct rtw_coex_stat *coex_stat = &rtwdev->coex.stat; in rtw_coex_bt_remain_work() local
3499 coex_stat->bt_inq_remain = coex_stat->bt_inq_page; in rtw_coex_bt_remain_work()
3508 struct rtw_coex_stat *coex_stat = &rtwdev->coex.stat; in rtw_coex_wl_connecting_work() local
3511 coex_stat->wl_connecting = false; in rtw_coex_wl_connecting_work()
3521 struct rtw_coex_stat *coex_stat = &rtwdev->coex.stat; in rtw_coex_bt_multi_link_remain_work() local
3524 coex_stat->bt_multi_link_remain = false; in rtw_coex_bt_multi_link_remain_work()
3532 struct rtw_coex_stat *coex_stat = &rtwdev->coex.stat; in rtw_coex_wl_ccklock_work() local
3535 coex_stat->wl_cck_lock = false; in rtw_coex_wl_ccklock_work()
3916 struct rtw_coex_stat *coex_stat = &coex->stat; in rtw_coex_display_coex_info() local
3930 score_board_WB = coex_stat->score_board; in rtw_coex_display_coex_info()
3941 if (!coex_stat->bt_disabled && !coex_stat->bt_mailbox_reply) { in rtw_coex_display_coex_info()
3943 &coex_stat->bt_supported_version); in rtw_coex_display_coex_info()
3944 rtw_coex_get_bt_patch_version(rtwdev, &coex_stat->patch_ver); in rtw_coex_display_coex_info()
3946 &coex_stat->bt_supported_feature); in rtw_coex_display_coex_info()
3947 rtw_coex_get_bt_reg(rtwdev, 3, 0xae, &coex_stat->bt_reg_vendor_ae); in rtw_coex_display_coex_info()
3948 rtw_coex_get_bt_reg(rtwdev, 3, 0xac, &coex_stat->bt_reg_vendor_ac); in rtw_coex_display_coex_info()
3950 if (coex_stat->patch_ver != 0) in rtw_coex_display_coex_info()
3951 coex_stat->bt_mailbox_reply = true; in rtw_coex_display_coex_info()
3979 coex_stat->bt_supported_version, in rtw_coex_display_coex_info()
3980 coex_stat->bt_disabled ? "(BT disabled)" : in rtw_coex_display_coex_info()
3981 coex_stat->bt_supported_version >= chip->bt_desired_ver ? in rtw_coex_display_coex_info()
3985 coex_stat->bt_slave ? "Slave" : "Master", in rtw_coex_display_coex_info()
3986 coex_stat->cnt_bt[COEX_CNT_BT_ROLESWITCH], in rtw_coex_display_coex_info()
3991 coex_stat->patch_ver, in rtw_coex_display_coex_info()
3992 chip->wl_fw_desired_ver, coex_stat->kt_ver + 65); in rtw_coex_display_coex_info()
4006 coex_stat->bt_rssi - 100, in rtw_coex_display_coex_info()
4007 coex_stat->cnt_bt[COEX_CNT_BT_RETRY], in rtw_coex_display_coex_info()
4008 coex_stat->cnt_bt[COEX_CNT_BT_POPEVENT]); in rtw_coex_display_coex_info()
4011 coex_stat->bt_a2dp_exist ? (coex_stat->bt_a2dp_sink ? in rtw_coex_display_coex_info()
4013 coex_stat->bt_hfp_exist ? "HFP," : "", in rtw_coex_display_coex_info()
4014 coex_stat->bt_hid_exist ? in rtw_coex_display_coex_info()
4015 (coex_stat->bt_ble_exist ? "HID(RCU)," : in rtw_coex_display_coex_info()
4016 coex_stat->bt_hid_slot >= 2 ? "HID(4/18)" : in rtw_coex_display_coex_info()
4017 coex_stat->bt_ble_hid_exist ? "HID(BLE)" : in rtw_coex_display_coex_info()
4019 coex_stat->bt_pan_exist ? coex_stat->bt_opp_exist ? in rtw_coex_display_coex_info()
4021 coex_stat->bt_ble_voice ? "Voice," : "", in rtw_coex_display_coex_info()
4022 coex_stat->bt_multi_link); in rtw_coex_display_coex_info()
4025 coex_stat->cnt_bt[COEX_CNT_BT_REINIT], in rtw_coex_display_coex_info()
4026 coex_stat->cnt_bt[COEX_CNT_BT_SETUPLINK], in rtw_coex_display_coex_info()
4027 coex_stat->cnt_bt[COEX_CNT_BT_IGNWLANACT], in rtw_coex_display_coex_info()
4028 coex_stat->bt_supported_feature); in rtw_coex_display_coex_info()
4031 coex_stat->cnt_bt[COEX_CNT_BT_PAGE], in rtw_coex_display_coex_info()
4032 coex_stat->cnt_bt[COEX_CNT_BT_INQ], in rtw_coex_display_coex_info()
4033 coex_stat->cnt_bt[COEX_CNT_BT_IQK], in rtw_coex_display_coex_info()
4034 coex_stat->cnt_bt[COEX_CNT_BT_IQKFAIL]); in rtw_coex_display_coex_info()
4037 coex_stat->bt_reg_vendor_ae, in rtw_coex_display_coex_info()
4038 coex_stat->bt_reg_vendor_ac, in rtw_coex_display_coex_info()
4042 coex_stat->hi_pri_tx, coex_stat->hi_pri_rx, in rtw_coex_display_coex_info()
4043 coex_stat->lo_pri_tx, coex_stat->lo_pri_rx); in rtw_coex_display_coex_info()
4047 coex_stat->bt_info_c2h[i]); in rtw_coex_display_coex_info()
4056 coex_stat->wl_gl_busy, in rtw_coex_display_coex_info()
4087 rtw_coex_get_wl_coex_mode(coex_stat->wl_coex_mode), in rtw_coex_display_coex_info()
4089 coex_stat->tdma_timer_base); in rtw_coex_display_coex_info()
4098 coex_stat->cnt_wl[COEX_CNT_WL_COEXRUN], in rtw_coex_display_coex_info()
4105 coex_stat->wl_force_lps_ctrl ? "On" : "Off", in rtw_coex_display_coex_info()
4106 coex_stat->wl_gl_busy); in rtw_coex_display_coex_info()
4109 coex_stat->wl_fw_dbg_info[1], coex_stat->wl_fw_dbg_info[2], in rtw_coex_display_coex_info()
4110 coex_stat->wl_fw_dbg_info[3], coex_stat->wl_fw_dbg_info[4], in rtw_coex_display_coex_info()
4111 coex_stat->wl_fw_dbg_info[5]); in rtw_coex_display_coex_info()
4114 coex_stat->wl_fw_dbg_info[6], in rtw_coex_display_coex_info()
4115 coex_stat->wl_fw_dbg_info[7], in rtw_coex_display_coex_info()
4116 coex_stat->wl_slot_extend ? "Yes" : "No", in rtw_coex_display_coex_info()
4117 coex_stat->cnt_wl[COEX_CNT_WL_FW_NOTIFY]); in rtw_coex_display_coex_info()
4152 coex_stat->wl_hi_pri_task1 ? "Y" : "N", in rtw_coex_display_coex_info()
4153 coex_stat->wl_cck_lock ? "Y" : "N", in rtw_coex_display_coex_info()
4154 coex_stat->wl_cck_lock_ever ? "Y" : "N", in rtw_coex_display_coex_info()
4155 coex_stat->wl_noisy_level); in rtw_coex_display_coex_info()