Lines Matching refs:btcoexist
64 static void halbtc8723b1ant_updatera_mask(struct btc_coexist *btcoexist, in halbtc8723b1ant_updatera_mask() argument
70 btcoexist->btc_set(btcoexist, BTC_SET_ACT_UPDATE_RAMASK, in halbtc8723b1ant_updatera_mask()
76 static void btc8723b1ant_auto_rate_fb_retry(struct btc_coexist *btcoexist, in btc8723b1ant_auto_rate_fb_retry() argument
86 btcoexist->btc_write_4byte(btcoexist, 0x430, in btc8723b1ant_auto_rate_fb_retry()
88 btcoexist->btc_write_4byte(btcoexist, 0x434, in btc8723b1ant_auto_rate_fb_retry()
92 btcoexist->btc_get(btcoexist, in btc8723b1ant_auto_rate_fb_retry()
96 btcoexist->btc_write_4byte(btcoexist, in btc8723b1ant_auto_rate_fb_retry()
98 btcoexist->btc_write_4byte(btcoexist, in btc8723b1ant_auto_rate_fb_retry()
101 btcoexist->btc_write_4byte(btcoexist, in btc8723b1ant_auto_rate_fb_retry()
103 btcoexist->btc_write_4byte(btcoexist, in btc8723b1ant_auto_rate_fb_retry()
115 static void halbtc8723b1ant_retry_limit(struct btc_coexist *btcoexist, in halbtc8723b1ant_retry_limit() argument
124 btcoexist->btc_write_2byte(btcoexist, 0x42a, in halbtc8723b1ant_retry_limit()
128 btcoexist->btc_write_2byte(btcoexist, 0x42a, 0x0808); in halbtc8723b1ant_retry_limit()
138 static void halbtc8723b1ant_ampdu_maxtime(struct btc_coexist *btcoexist, in halbtc8723b1ant_ampdu_maxtime() argument
147 btcoexist->btc_write_1byte(btcoexist, 0x456, in halbtc8723b1ant_ampdu_maxtime()
151 btcoexist->btc_write_1byte(btcoexist, 0x456, 0x38); in halbtc8723b1ant_ampdu_maxtime()
161 static void halbtc8723b1ant_limited_tx(struct btc_coexist *btcoexist, in halbtc8723b1ant_limited_tx() argument
168 halbtc8723b1ant_updatera_mask(btcoexist, force_exec, 0x0); in halbtc8723b1ant_limited_tx()
171 halbtc8723b1ant_updatera_mask(btcoexist, force_exec, in halbtc8723b1ant_limited_tx()
176 halbtc8723b1ant_updatera_mask(btcoexist, force_exec, in halbtc8723b1ant_limited_tx()
183 btc8723b1ant_auto_rate_fb_retry(btcoexist, force_exec, arfr_type); in halbtc8723b1ant_limited_tx()
184 halbtc8723b1ant_retry_limit(btcoexist, force_exec, retry_limit_type); in halbtc8723b1ant_limited_tx()
185 halbtc8723b1ant_ampdu_maxtime(btcoexist, force_exec, ampdu_time_type); in halbtc8723b1ant_limited_tx()
188 static void halbtc8723b1ant_limited_rx(struct btc_coexist *btcoexist, in halbtc8723b1ant_limited_rx() argument
200 btcoexist->btc_set(btcoexist, BTC_SET_BL_TO_REJ_AP_AGG_PKT, in halbtc8723b1ant_limited_rx()
203 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_CTRL_AGG_SIZE, in halbtc8723b1ant_limited_rx()
208 btcoexist->btc_set(btcoexist, BTC_SET_U1_AGG_BUF_SIZE, &rxaggsize); in halbtc8723b1ant_limited_rx()
210 btcoexist->btc_set(btcoexist, BTC_SET_ACT_AGGREGATE_CTRL, NULL); in halbtc8723b1ant_limited_rx()
213 static void halbtc8723b1ant_query_bt_info(struct btc_coexist *btcoexist) in halbtc8723b1ant_query_bt_info() argument
222 btcoexist->btc_fill_h2c(btcoexist, 0x61, 1, h2c_parameter); in halbtc8723b1ant_query_bt_info()
225 static void halbtc8723b1ant_monitor_bt_ctr(struct btc_coexist *btcoexist) in halbtc8723b1ant_monitor_bt_ctr() argument
235 u32tmp = btcoexist->btc_read_4byte(btcoexist, reg_hp_txrx); in halbtc8723b1ant_monitor_bt_ctr()
239 u32tmp = btcoexist->btc_read_4byte(btcoexist, reg_lp_txrx); in halbtc8723b1ant_monitor_bt_ctr()
253 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0xc); in halbtc8723b1ant_monitor_bt_ctr()
270 halbtc8723b1ant_query_bt_info(btcoexist); in halbtc8723b1ant_monitor_bt_ctr()
276 static void halbtc8723b1ant_monitor_wifi_ctr(struct btc_coexist *btcoexist) in halbtc8723b1ant_monitor_wifi_ctr() argument
283 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in halbtc8723b1ant_monitor_wifi_ctr()
284 btcoexist->btc_get(btcoexist, BTC_GET_S4_WIFI_RSSI, &wifi_rssi); in halbtc8723b1ant_monitor_wifi_ctr()
285 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_UNDER_B_MODE, in halbtc8723b1ant_monitor_wifi_ctr()
300 btcoexist->btc_read_4byte(btcoexist, 0xf88); in halbtc8723b1ant_monitor_wifi_ctr()
302 btcoexist->btc_read_2byte(btcoexist, 0xf94); in halbtc8723b1ant_monitor_wifi_ctr()
304 btcoexist->btc_read_2byte(btcoexist, 0xf90); in halbtc8723b1ant_monitor_wifi_ctr()
306 btcoexist->btc_read_2byte(btcoexist, 0xfb8); in halbtc8723b1ant_monitor_wifi_ctr()
309 btcoexist->btc_read_4byte(btcoexist, 0xf84); in halbtc8723b1ant_monitor_wifi_ctr()
311 btcoexist->btc_read_2byte(btcoexist, 0xf96); in halbtc8723b1ant_monitor_wifi_ctr()
313 btcoexist->btc_read_2byte(btcoexist, 0xf92); in halbtc8723b1ant_monitor_wifi_ctr()
315 btcoexist->btc_read_2byte(btcoexist, 0xfba); in halbtc8723b1ant_monitor_wifi_ctr()
319 btcoexist->btc_write_1byte_bitmask(btcoexist, 0xf16, 0x1, 0x1); in halbtc8723b1ant_monitor_wifi_ctr()
320 btcoexist->btc_write_1byte_bitmask(btcoexist, 0xf16, 0x1, 0x0); in halbtc8723b1ant_monitor_wifi_ctr()
366 static bool btc8723b1ant_is_wifi_status_changed(struct btc_coexist *btcoexist) in btc8723b1ant_is_wifi_status_changed() argument
373 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in btc8723b1ant_is_wifi_status_changed()
375 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in btc8723b1ant_is_wifi_status_changed()
376 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in btc8723b1ant_is_wifi_status_changed()
377 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_4_WAY_PROGRESS, in btc8723b1ant_is_wifi_status_changed()
398 static void halbtc8723b1ant_update_bt_link_info(struct btc_coexist *btcoexist) in halbtc8723b1ant_update_bt_link_info() argument
400 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in halbtc8723b1ant_update_bt_link_info()
403 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in halbtc8723b1ant_update_bt_link_info()
447 static void halbtc8723b1ant_set_bt_auto_report(struct btc_coexist *btcoexist, in halbtc8723b1ant_set_bt_auto_report() argument
457 btcoexist->btc_fill_h2c(btcoexist, 0x68, 1, h2c_parameter); in halbtc8723b1ant_set_bt_auto_report()
460 static void halbtc8723b1ant_bt_auto_report(struct btc_coexist *btcoexist, in halbtc8723b1ant_bt_auto_report() argument
470 halbtc8723b1ant_set_bt_auto_report(btcoexist, in halbtc8723b1ant_bt_auto_report()
476 static void btc8723b1ant_set_sw_pen_tx_rate_adapt(struct btc_coexist *btcoexist, in btc8723b1ant_set_sw_pen_tx_rate_adapt() argument
479 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b1ant_set_sw_pen_tx_rate_adapt()
497 btcoexist->btc_fill_h2c(btcoexist, 0x69, 6, h2c_parameter); in btc8723b1ant_set_sw_pen_tx_rate_adapt()
500 static void halbtc8723b1ant_low_penalty_ra(struct btc_coexist *btcoexist, in halbtc8723b1ant_low_penalty_ra() argument
509 btc8723b1ant_set_sw_pen_tx_rate_adapt(btcoexist, in halbtc8723b1ant_low_penalty_ra()
515 static void halbtc8723b1ant_set_coex_table(struct btc_coexist *btcoexist, in halbtc8723b1ant_set_coex_table() argument
519 struct rtl_priv *rtlpriv = btcoexist->adapter; in halbtc8723b1ant_set_coex_table()
523 btcoexist->btc_write_4byte(btcoexist, 0x6c0, val0x6c0); in halbtc8723b1ant_set_coex_table()
527 btcoexist->btc_write_4byte(btcoexist, 0x6c4, val0x6c4); in halbtc8723b1ant_set_coex_table()
531 btcoexist->btc_write_4byte(btcoexist, 0x6c8, val0x6c8); in halbtc8723b1ant_set_coex_table()
535 btcoexist->btc_write_1byte(btcoexist, 0x6cc, val0x6cc); in halbtc8723b1ant_set_coex_table()
538 static void halbtc8723b1ant_coex_table(struct btc_coexist *btcoexist, in halbtc8723b1ant_coex_table() argument
543 struct rtl_priv *rtlpriv = btcoexist->adapter; in halbtc8723b1ant_coex_table()
561 halbtc8723b1ant_set_coex_table(btcoexist, val0x6c0, val0x6c4, in halbtc8723b1ant_coex_table()
570 static void halbtc8723b1ant_coex_table_with_type(struct btc_coexist *btcoexist, in halbtc8723b1ant_coex_table_with_type() argument
577 halbtc8723b1ant_coex_table(btcoexist, force_exec, 0x55555555, in halbtc8723b1ant_coex_table_with_type()
581 halbtc8723b1ant_coex_table(btcoexist, force_exec, 0x55555555, in halbtc8723b1ant_coex_table_with_type()
585 halbtc8723b1ant_coex_table(btcoexist, force_exec, 0x5a5a5a5a, in halbtc8723b1ant_coex_table_with_type()
589 halbtc8723b1ant_coex_table(btcoexist, force_exec, 0x55555555, in halbtc8723b1ant_coex_table_with_type()
594 halbtc8723b1ant_coex_table(btcoexist, force_exec, in halbtc8723b1ant_coex_table_with_type()
598 halbtc8723b1ant_coex_table(btcoexist, force_exec, in halbtc8723b1ant_coex_table_with_type()
603 halbtc8723b1ant_coex_table(btcoexist, force_exec, 0x5a5a5a5a, in halbtc8723b1ant_coex_table_with_type()
607 halbtc8723b1ant_coex_table(btcoexist, force_exec, 0x55555555, in halbtc8723b1ant_coex_table_with_type()
611 halbtc8723b1ant_coex_table(btcoexist, force_exec, 0xaaaaaaaa, in halbtc8723b1ant_coex_table_with_type()
615 halbtc8723b1ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in halbtc8723b1ant_coex_table_with_type()
619 halbtc8723b1ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in halbtc8723b1ant_coex_table_with_type()
623 halbtc8723b1ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in halbtc8723b1ant_coex_table_with_type()
627 halbtc8723b1ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in halbtc8723b1ant_coex_table_with_type()
631 halbtc8723b1ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in halbtc8723b1ant_coex_table_with_type()
635 halbtc8723b1ant_coex_table(btcoexist, force_exec, 0x5fff5fff, in halbtc8723b1ant_coex_table_with_type()
639 halbtc8723b1ant_coex_table(btcoexist, force_exec, 0x5fff5fff, in halbtc8723b1ant_coex_table_with_type()
643 halbtc8723b1ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in halbtc8723b1ant_coex_table_with_type()
652 halbtc8723b1ant_set_fw_ignore_wlan_act(struct btc_coexist *btcoexist, in halbtc8723b1ant_set_fw_ignore_wlan_act() argument
655 struct rtl_priv *rtlpriv = btcoexist->adapter; in halbtc8723b1ant_set_fw_ignore_wlan_act()
665 btcoexist->btc_fill_h2c(btcoexist, 0x63, 1, h2c_parameter); in halbtc8723b1ant_set_fw_ignore_wlan_act()
668 static void halbtc8723b1ant_ignore_wlan_act(struct btc_coexist *btcoexist, in halbtc8723b1ant_ignore_wlan_act() argument
671 struct rtl_priv *rtlpriv = btcoexist->adapter; in halbtc8723b1ant_ignore_wlan_act()
688 halbtc8723b1ant_set_fw_ignore_wlan_act(btcoexist, enable); in halbtc8723b1ant_ignore_wlan_act()
693 static void halbtc8723b1ant_set_fw_ps_tdma(struct btc_coexist *btcoexist, in halbtc8723b1ant_set_fw_ps_tdma() argument
697 struct rtl_priv *rtlpriv = btcoexist->adapter; in halbtc8723b1ant_set_fw_ps_tdma()
702 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_AP_MODE_ENABLE, in halbtc8723b1ant_set_fw_ps_tdma()
737 btcoexist->btc_fill_h2c(btcoexist, 0x60, 5, h2c_parameter); in halbtc8723b1ant_set_fw_ps_tdma()
740 static void halbtc8723b1ant_set_lps_rpwm(struct btc_coexist *btcoexist, in halbtc8723b1ant_set_lps_rpwm() argument
746 btcoexist->btc_set(btcoexist, BTC_SET_U1_LPS_VAL, &lps); in halbtc8723b1ant_set_lps_rpwm()
747 btcoexist->btc_set(btcoexist, BTC_SET_U1_RPWM_VAL, &rpwm); in halbtc8723b1ant_set_lps_rpwm()
750 static void halbtc8723b1ant_lps_rpwm(struct btc_coexist *btcoexist, in halbtc8723b1ant_lps_rpwm() argument
754 struct rtl_priv *rtlpriv = btcoexist->adapter; in halbtc8723b1ant_lps_rpwm()
776 halbtc8723b1ant_set_lps_rpwm(btcoexist, lps_val, rpwm_val); in halbtc8723b1ant_lps_rpwm()
782 static void halbtc8723b1ant_sw_mechanism(struct btc_coexist *btcoexist, in halbtc8723b1ant_sw_mechanism() argument
785 struct rtl_priv *rtlpriv = btcoexist->adapter; in halbtc8723b1ant_sw_mechanism()
790 halbtc8723b1ant_low_penalty_ra(btcoexist, NORMAL_EXEC, low_penalty_ra); in halbtc8723b1ant_sw_mechanism()
793 static void halbtc8723b1ant_set_ant_path(struct btc_coexist *btcoexist, in halbtc8723b1ant_set_ant_path() argument
797 struct rtl_priv *rtlpriv = btcoexist->adapter; in halbtc8723b1ant_set_ant_path()
798 struct btc_board_info *board_info = &btcoexist->board_info; in halbtc8723b1ant_set_ant_path()
807 btcoexist->btc_get(btcoexist, BTC_GET_BL_EXT_SWITCH, &pg_ext_switch); in halbtc8723b1ant_set_ant_path()
809 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_FW_VER, &fw_ver); in halbtc8723b1ant_set_ant_path()
816 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, in halbtc8723b1ant_set_ant_path()
825 btcoexist->btc_fill_h2c(btcoexist, 0x6E, 1, in halbtc8723b1ant_set_ant_path()
829 btcoexist->btc_write_1byte(btcoexist, 0x765, 0x18); in halbtc8723b1ant_set_ant_path()
832 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0x4); in halbtc8723b1ant_set_ant_path()
835 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x67, 0x20, 0x0); in halbtc8723b1ant_set_ant_path()
836 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x39, 0x8, 0x1); in halbtc8723b1ant_set_ant_path()
837 btcoexist->btc_write_1byte(btcoexist, 0x974, 0xff); in halbtc8723b1ant_set_ant_path()
838 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x944, 0x3, 0x3); in halbtc8723b1ant_set_ant_path()
839 btcoexist->btc_write_1byte(btcoexist, 0x930, 0x77); in halbtc8723b1ant_set_ant_path()
844 btcoexist->btc_fill_h2c(btcoexist, 0x6E, 1, in halbtc8723b1ant_set_ant_path()
848 btcoexist->btc_write_1byte(btcoexist, 0x765, 0x18); in halbtc8723b1ant_set_ant_path()
851 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0x4); in halbtc8723b1ant_set_ant_path()
853 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_IS_IN_MP_MODE, in halbtc8723b1ant_set_ant_path()
857 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x67, in halbtc8723b1ant_set_ant_path()
861 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x67, in halbtc8723b1ant_set_ant_path()
867 u32tmp = btcoexist->btc_read_4byte(btcoexist, 0x4c); in halbtc8723b1ant_set_ant_path()
870 btcoexist->btc_write_4byte(btcoexist, 0x4c, u32tmp); in halbtc8723b1ant_set_ant_path()
874 if (btcoexist->btc_read_1byte(btcoexist, 0x765) != 0) { in halbtc8723b1ant_set_ant_path()
876 btcoexist->btc_fill_h2c(btcoexist, 0x6E, 1, in halbtc8723b1ant_set_ant_path()
882 u8tmp = btcoexist->btc_read_1byte(btcoexist, in halbtc8723b1ant_set_ant_path()
901 btcoexist->btc_write_1byte(btcoexist, 0x765, 0x0); in halbtc8723b1ant_set_ant_path()
904 if (btcoexist->btc_read_1byte(btcoexist, 0x76e) != 0xc) { in halbtc8723b1ant_set_ant_path()
906 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0xc); in halbtc8723b1ant_set_ant_path()
909 btcoexist->btc_write_1byte_bitmask( in halbtc8723b1ant_set_ant_path()
910 btcoexist, 0x67, 0x20, in halbtc8723b1ant_set_ant_path()
919 u32tmp = btcoexist->btc_read_4byte(btcoexist, 0x4c); in halbtc8723b1ant_set_ant_path()
922 btcoexist->btc_write_4byte(btcoexist, 0x4c, u32tmp); in halbtc8723b1ant_set_ant_path()
925 btcoexist->btc_write_4byte(btcoexist, 0x948, 0x0); in halbtc8723b1ant_set_ant_path()
933 btcoexist->btc_fill_h2c(btcoexist, 0x65, 2, in halbtc8723b1ant_set_ant_path()
940 btcoexist->btc_fill_h2c(btcoexist, 0x65, 2, in halbtc8723b1ant_set_ant_path()
952 btcoexist->btc_write_1byte_bitmask( in halbtc8723b1ant_set_ant_path()
953 btcoexist, 0x92c, 0x3, 0x1); in halbtc8723b1ant_set_ant_path()
955 btcoexist->btc_write_1byte_bitmask( in halbtc8723b1ant_set_ant_path()
956 btcoexist, 0x92c, 0x3, 0x2); in halbtc8723b1ant_set_ant_path()
961 btcoexist->btc_write_1byte_bitmask( in halbtc8723b1ant_set_ant_path()
962 btcoexist, 0x92c, 0x3, 0x2); in halbtc8723b1ant_set_ant_path()
964 btcoexist->btc_write_1byte_bitmask( in halbtc8723b1ant_set_ant_path()
965 btcoexist, 0x92c, 0x3, 0x1); in halbtc8723b1ant_set_ant_path()
971 btcoexist->btc_write_1byte_bitmask( in halbtc8723b1ant_set_ant_path()
972 btcoexist, 0x92c, 0x3, 0x1); in halbtc8723b1ant_set_ant_path()
974 btcoexist->btc_write_1byte_bitmask( in halbtc8723b1ant_set_ant_path()
975 btcoexist, 0x92c, 0x3, 0x2); in halbtc8723b1ant_set_ant_path()
984 u32tmp = btcoexist->btc_read_4byte(btcoexist, 0x4c); in halbtc8723b1ant_set_ant_path()
987 btcoexist->btc_write_4byte(btcoexist, 0x4c, u32tmp); in halbtc8723b1ant_set_ant_path()
990 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x64, 0x1, in halbtc8723b1ant_set_ant_path()
999 btcoexist->btc_fill_h2c(btcoexist, 0x65, 2, in halbtc8723b1ant_set_ant_path()
1006 btcoexist->btc_fill_h2c(btcoexist, 0x65, 2, in halbtc8723b1ant_set_ant_path()
1018 btcoexist->btc_write_4byte(btcoexist, in halbtc8723b1ant_set_ant_path()
1021 btcoexist->btc_write_4byte(btcoexist, in halbtc8723b1ant_set_ant_path()
1027 btcoexist->btc_write_4byte(btcoexist, in halbtc8723b1ant_set_ant_path()
1030 btcoexist->btc_write_4byte(btcoexist, in halbtc8723b1ant_set_ant_path()
1037 btcoexist->btc_write_4byte(btcoexist, in halbtc8723b1ant_set_ant_path()
1040 btcoexist->btc_write_4byte(btcoexist, in halbtc8723b1ant_set_ant_path()
1050 static void halbtc8723b1ant_ps_tdma(struct btc_coexist *btcoexist, in halbtc8723b1ant_ps_tdma() argument
1053 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in halbtc8723b1ant_ps_tdma()
1065 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in halbtc8723b1ant_ps_tdma()
1160 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x51, 0x1a, in halbtc8723b1ant_ps_tdma()
1166 btcoexist, ps_tdma_byte0_val, in halbtc8723b1ant_ps_tdma()
1174 btcoexist, ps_tdma_byte0_val, in halbtc8723b1ant_ps_tdma()
1180 btcoexist, ps_tdma_byte0_val, 0x30, 0x03, in halbtc8723b1ant_ps_tdma()
1184 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x93, 0x15, in halbtc8723b1ant_ps_tdma()
1189 btcoexist, ps_tdma_byte0_val, 0x1f, 0x3, in halbtc8723b1ant_ps_tdma()
1194 btcoexist, ps_tdma_byte0_val, 0x20, 0x3, in halbtc8723b1ant_ps_tdma()
1198 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x13, 0xc, in halbtc8723b1ant_ps_tdma()
1202 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x93, 0x25, in halbtc8723b1ant_ps_tdma()
1207 btcoexist, ps_tdma_byte0_val, 0x21, 0x3, in halbtc8723b1ant_ps_tdma()
1211 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x13, 0xa, in halbtc8723b1ant_ps_tdma()
1216 btcoexist, ps_tdma_byte0_val, 0x21, 0x03, in halbtc8723b1ant_ps_tdma()
1220 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x51, 0x0a, in halbtc8723b1ant_ps_tdma()
1226 btcoexist, ps_tdma_byte0_val, 0x40, 0x3, in halbtc8723b1ant_ps_tdma()
1230 btcoexist, ps_tdma_byte0_val, 0x21, 0x3, in halbtc8723b1ant_ps_tdma()
1236 btcoexist, 0x51, 0x30, 0x3, 0x10, 0x50); in halbtc8723b1ant_ps_tdma()
1239 btcoexist, ps_tdma_byte0_val, 0x21, 0x3, in halbtc8723b1ant_ps_tdma()
1243 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x13, 0xa, in halbtc8723b1ant_ps_tdma()
1247 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x93, 0x15, in halbtc8723b1ant_ps_tdma()
1251 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x93, 0x25, in halbtc8723b1ant_ps_tdma()
1256 btcoexist, ps_tdma_byte0_val, 0x3f, 0x03, in halbtc8723b1ant_ps_tdma()
1260 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x61, 0x25, in halbtc8723b1ant_ps_tdma()
1265 btcoexist, ps_tdma_byte0_val, 0x25, 0x03, in halbtc8723b1ant_ps_tdma()
1269 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x25, in halbtc8723b1ant_ps_tdma()
1273 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x15, in halbtc8723b1ant_ps_tdma()
1277 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0xe3, 0xa, in halbtc8723b1ant_ps_tdma()
1281 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0xe3, 0xa, in halbtc8723b1ant_ps_tdma()
1285 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x25, in halbtc8723b1ant_ps_tdma()
1289 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x69, 0x25, in halbtc8723b1ant_ps_tdma()
1293 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0xab, 0x1a, in halbtc8723b1ant_ps_tdma()
1297 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x51, 0x30, in halbtc8723b1ant_ps_tdma()
1301 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0xd3, 0x1a, in halbtc8723b1ant_ps_tdma()
1306 btcoexist, ps_tdma_byte0_val, 0x35, 0x3, in halbtc8723b1ant_ps_tdma()
1311 btcoexist, ps_tdma_byte0_val, 0x35, 0x3, in halbtc8723b1ant_ps_tdma()
1315 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x53, 0x1a, in halbtc8723b1ant_ps_tdma()
1319 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x63, 0x1a, in halbtc8723b1ant_ps_tdma()
1323 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0xd3, 0x12, in halbtc8723b1ant_ps_tdma()
1333 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x23, 0x18, in halbtc8723b1ant_ps_tdma()
1340 btcoexist, ps_tdma_byte0_val, in halbtc8723b1ant_ps_tdma()
1346 btcoexist, ps_tdma_byte0_val, in halbtc8723b1ant_ps_tdma()
1352 btcoexist, ps_tdma_byte0_val, 0x3a, 0x03, in halbtc8723b1ant_ps_tdma()
1357 btcoexist, ps_tdma_byte0_val, 0x15, 0x3, in halbtc8723b1ant_ps_tdma()
1362 btcoexist, ps_tdma_byte0_val, 0x20, 0x3, in halbtc8723b1ant_ps_tdma()
1367 btcoexist, ps_tdma_byte0_val, 0x21, 0x3, in halbtc8723b1ant_ps_tdma()
1372 btcoexist, ps_tdma_byte0_val, 0x21, 0x03, in halbtc8723b1ant_ps_tdma()
1377 btcoexist, ps_tdma_byte0_val, 0x21, 0x3, in halbtc8723b1ant_ps_tdma()
1382 btcoexist, ps_tdma_byte0_val, 0x21, 0x3, in halbtc8723b1ant_ps_tdma()
1387 btcoexist, ps_tdma_byte0_val, 0x3f, 0x03, in halbtc8723b1ant_ps_tdma()
1392 btcoexist, ps_tdma_byte0_val, 0x25, 0x03, in halbtc8723b1ant_ps_tdma()
1397 btcoexist, ps_tdma_byte0_val, 0x25, 0x03, in halbtc8723b1ant_ps_tdma()
1402 btcoexist, ps_tdma_byte0_val, 0x25, 0x03, in halbtc8723b1ant_ps_tdma()
1410 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x8, 0x0, in halbtc8723b1ant_ps_tdma()
1412 halbtc8723b1ant_set_ant_path(btcoexist, in halbtc8723b1ant_ps_tdma()
1420 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x0, 0x0, in halbtc8723b1ant_ps_tdma()
1424 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x0, 0x0, 0x0, in halbtc8723b1ant_ps_tdma()
1430 btcoexist->btc_set(btcoexist, in halbtc8723b1ant_ps_tdma()
1440 void btc8723b1ant_tdma_dur_adj_for_acl(struct btc_coexist *btcoexist, in btc8723b1ant_tdma_dur_adj_for_acl() argument
1443 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b1ant_tdma_dur_adj_for_acl()
1466 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8723b1ant_tdma_dur_adj_for_acl()
1485 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 2); in btc8723b1ant_tdma_dur_adj_for_acl()
1586 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8723b1ant_tdma_dur_adj_for_acl()
1590 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8723b1ant_tdma_dur_adj_for_acl()
1594 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8723b1ant_tdma_dur_adj_for_acl()
1600 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8723b1ant_tdma_dur_adj_for_acl()
1604 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8723b1ant_tdma_dur_adj_for_acl()
1608 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8723b1ant_tdma_dur_adj_for_acl()
1617 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, in btc8723b1ant_tdma_dur_adj_for_acl()
1623 static void halbtc8723b1ant_ps_tdma_chk_pwr_save(struct btc_coexist *btcoexist, in halbtc8723b1ant_ps_tdma_chk_pwr_save() argument
1628 btcoexist->btc_get(btcoexist, BTC_GET_U1_LPS_MODE, &lps_mode); in halbtc8723b1ant_ps_tdma_chk_pwr_save()
1636 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in halbtc8723b1ant_ps_tdma_chk_pwr_save()
1643 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in halbtc8723b1ant_ps_tdma_chk_pwr_save()
1651 static void halbtc8723b1ant_power_save_state(struct btc_coexist *btcoexist, in halbtc8723b1ant_power_save_state() argument
1661 btcoexist->btc_set(btcoexist, BTC_SET_ACT_DISABLE_LOW_POWER, in halbtc8723b1ant_power_save_state()
1663 btcoexist->btc_set(btcoexist, BTC_SET_ACT_NORMAL_LPS, NULL); in halbtc8723b1ant_power_save_state()
1667 halbtc8723b1ant_ps_tdma_chk_pwr_save(btcoexist, true); in halbtc8723b1ant_power_save_state()
1668 halbtc8723b1ant_lps_rpwm(btcoexist, NORMAL_EXEC, lps_val, in halbtc8723b1ant_power_save_state()
1672 btcoexist->btc_set(btcoexist, BTC_SET_ACT_DISABLE_LOW_POWER, in halbtc8723b1ant_power_save_state()
1675 btcoexist->btc_set(btcoexist, BTC_SET_ACT_ENTER_LPS, NULL); in halbtc8723b1ant_power_save_state()
1679 halbtc8723b1ant_ps_tdma_chk_pwr_save(btcoexist, false); in halbtc8723b1ant_power_save_state()
1680 btcoexist->btc_set(btcoexist, BTC_SET_ACT_LEAVE_LPS, NULL); in halbtc8723b1ant_power_save_state()
1688 static void halbtc8723b1ant_action_wifi_only(struct btc_coexist *btcoexist) in halbtc8723b1ant_action_wifi_only() argument
1690 halbtc8723b1ant_coex_table_with_type(btcoexist, FORCE_EXEC, 0); in halbtc8723b1ant_action_wifi_only()
1691 halbtc8723b1ant_ps_tdma(btcoexist, FORCE_EXEC, false, 8); in halbtc8723b1ant_action_wifi_only()
1692 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, in halbtc8723b1ant_action_wifi_only()
1698 *btcoexist) in halbtc8723b1ant_monitor_bt_enable_disable() argument
1700 struct rtl_priv *rtlpriv = btcoexist->adapter; in halbtc8723b1ant_monitor_bt_enable_disable()
1728 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_DISABLE, in halbtc8723b1ant_monitor_bt_enable_disable()
1731 halbtc8723b1ant_action_wifi_only(btcoexist); in halbtc8723b1ant_monitor_bt_enable_disable()
1732 btcoexist->btc_set(btcoexist, BTC_SET_ACT_LEAVE_LPS, in halbtc8723b1ant_monitor_bt_enable_disable()
1734 btcoexist->btc_set(btcoexist, BTC_SET_ACT_NORMAL_LPS, in halbtc8723b1ant_monitor_bt_enable_disable()
1746 static void halbtc8723b1ant_action_bt_whck_test(struct btc_coexist *btcoexist) in halbtc8723b1ant_action_bt_whck_test() argument
1748 halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, 0x0, in halbtc8723b1ant_action_bt_whck_test()
1751 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 8); in halbtc8723b1ant_action_bt_whck_test()
1752 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, NORMAL_EXEC, in halbtc8723b1ant_action_bt_whck_test()
1754 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in halbtc8723b1ant_action_bt_whck_test()
1757 static void halbtc8723b1ant_action_wifi_multiport(struct btc_coexist *btcoexist) in halbtc8723b1ant_action_wifi_multiport() argument
1759 halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in halbtc8723b1ant_action_wifi_multiport()
1762 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 8); in halbtc8723b1ant_action_wifi_multiport()
1763 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, NORMAL_EXEC, in halbtc8723b1ant_action_wifi_multiport()
1765 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 2); in halbtc8723b1ant_action_wifi_multiport()
1768 static void halbtc8723b1ant_action_hs(struct btc_coexist *btcoexist) in halbtc8723b1ant_action_hs() argument
1770 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 5); in halbtc8723b1ant_action_hs()
1771 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 2); in halbtc8723b1ant_action_hs()
1774 static void halbtc8723b1ant_action_bt_inquiry(struct btc_coexist *btcoexist) in halbtc8723b1ant_action_bt_inquiry() argument
1776 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in halbtc8723b1ant_action_bt_inquiry()
1780 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_AP_MODE_ENABLE, in halbtc8723b1ant_action_bt_inquiry()
1782 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in halbtc8723b1ant_action_bt_inquiry()
1784 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in halbtc8723b1ant_action_bt_inquiry()
1785 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_TRAFFIC_BUSY, &bt_busy); in halbtc8723b1ant_action_bt_inquiry()
1788 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 33); in halbtc8723b1ant_action_bt_inquiry()
1789 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 7); in halbtc8723b1ant_action_bt_inquiry()
1791 halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in halbtc8723b1ant_action_bt_inquiry()
1793 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 8); in halbtc8723b1ant_action_bt_inquiry()
1794 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, in halbtc8723b1ant_action_bt_inquiry()
1796 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in halbtc8723b1ant_action_bt_inquiry()
1800 halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in halbtc8723b1ant_action_bt_inquiry()
1803 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, in halbtc8723b1ant_action_bt_inquiry()
1806 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, in halbtc8723b1ant_action_bt_inquiry()
1809 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 4); in halbtc8723b1ant_action_bt_inquiry()
1811 halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in halbtc8723b1ant_action_bt_inquiry()
1814 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, in halbtc8723b1ant_action_bt_inquiry()
1817 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, in halbtc8723b1ant_action_bt_inquiry()
1820 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 4); in halbtc8723b1ant_action_bt_inquiry()
1822 halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in halbtc8723b1ant_action_bt_inquiry()
1824 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 8); in halbtc8723b1ant_action_bt_inquiry()
1825 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, in halbtc8723b1ant_action_bt_inquiry()
1827 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 7); in halbtc8723b1ant_action_bt_inquiry()
1831 static void btc8723b1ant_act_bt_sco_hid_only_busy(struct btc_coexist *btcoexist, in btc8723b1ant_act_bt_sco_hid_only_busy() argument
1834 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8723b1ant_act_bt_sco_hid_only_busy()
1837 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in btc8723b1ant_act_bt_sco_hid_only_busy()
1842 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 5); in btc8723b1ant_act_bt_sco_hid_only_busy()
1843 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 5); in btc8723b1ant_act_bt_sco_hid_only_busy()
1846 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 6); in btc8723b1ant_act_bt_sco_hid_only_busy()
1847 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 5); in btc8723b1ant_act_bt_sco_hid_only_busy()
1852 struct btc_coexist *btcoexist, in halbtc8723b1ant_action_wifi_connected_bt_acl_busy() argument
1855 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in halbtc8723b1ant_action_wifi_connected_bt_acl_busy()
1863 btc8723b1ant_act_bt_sco_hid_only_busy(btcoexist, wifi_status); in halbtc8723b1ant_action_wifi_connected_bt_acl_busy()
1868 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in halbtc8723b1ant_action_wifi_connected_bt_acl_busy()
1870 halbtc8723b1ant_coex_table_with_type(btcoexist, in halbtc8723b1ant_action_wifi_connected_bt_acl_busy()
1874 btc8723b1ant_tdma_dur_adj_for_acl(btcoexist, in halbtc8723b1ant_action_wifi_connected_bt_acl_busy()
1876 halbtc8723b1ant_coex_table_with_type(btcoexist, in halbtc8723b1ant_action_wifi_connected_bt_acl_busy()
1884 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 13); in halbtc8723b1ant_action_wifi_connected_bt_acl_busy()
1885 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 4); in halbtc8723b1ant_action_wifi_connected_bt_acl_busy()
1889 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 14); in halbtc8723b1ant_action_wifi_connected_bt_acl_busy()
1892 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 4); in halbtc8723b1ant_action_wifi_connected_bt_acl_busy()
1896 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 3); in halbtc8723b1ant_action_wifi_connected_bt_acl_busy()
1897 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 4); in halbtc8723b1ant_action_wifi_connected_bt_acl_busy()
1901 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 33); in halbtc8723b1ant_action_wifi_connected_bt_acl_busy()
1902 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 4); in halbtc8723b1ant_action_wifi_connected_bt_acl_busy()
1907 static void btc8723b1ant_action_wifi_not_conn(struct btc_coexist *btcoexist) in btc8723b1ant_action_wifi_not_conn() argument
1910 halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8723b1ant_action_wifi_not_conn()
1914 halbtc8723b1ant_ps_tdma(btcoexist, FORCE_EXEC, false, 8); in btc8723b1ant_action_wifi_not_conn()
1915 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, NORMAL_EXEC, in btc8723b1ant_action_wifi_not_conn()
1917 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8723b1ant_action_wifi_not_conn()
1921 btc8723b1ant_action_wifi_not_conn_scan(struct btc_coexist *btcoexist) in btc8723b1ant_action_wifi_not_conn_scan() argument
1923 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8723b1ant_action_wifi_not_conn_scan()
1925 halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8723b1ant_action_wifi_not_conn_scan()
1931 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8723b1ant_action_wifi_not_conn_scan()
1933 halbtc8723b1ant_coex_table_with_type(btcoexist, in btc8723b1ant_action_wifi_not_conn_scan()
1936 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8723b1ant_action_wifi_not_conn_scan()
1938 halbtc8723b1ant_coex_table_with_type(btcoexist, in btc8723b1ant_action_wifi_not_conn_scan()
1941 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8723b1ant_action_wifi_not_conn_scan()
1943 halbtc8723b1ant_coex_table_with_type(btcoexist, in btc8723b1ant_action_wifi_not_conn_scan()
1948 btc8723b1ant_act_bt_sco_hid_only_busy(btcoexist, in btc8723b1ant_action_wifi_not_conn_scan()
1951 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 8); in btc8723b1ant_action_wifi_not_conn_scan()
1952 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, in btc8723b1ant_action_wifi_not_conn_scan()
1954 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 2); in btc8723b1ant_action_wifi_not_conn_scan()
1959 btc8723b1ant_act_wifi_not_conn_asso_auth(struct btc_coexist *btcoexist) in btc8723b1ant_act_wifi_not_conn_asso_auth() argument
1961 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8723b1ant_act_wifi_not_conn_asso_auth()
1963 halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8723b1ant_act_wifi_not_conn_asso_auth()
1969 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 32); in btc8723b1ant_act_wifi_not_conn_asso_auth()
1970 halbtc8723b1ant_coex_table_with_type(btcoexist, FORCE_EXEC, 4); in btc8723b1ant_act_wifi_not_conn_asso_auth()
1972 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 20); in btc8723b1ant_act_wifi_not_conn_asso_auth()
1973 halbtc8723b1ant_coex_table_with_type(btcoexist, FORCE_EXEC, 4); in btc8723b1ant_act_wifi_not_conn_asso_auth()
1975 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 8); in btc8723b1ant_act_wifi_not_conn_asso_auth()
1976 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, in btc8723b1ant_act_wifi_not_conn_asso_auth()
1978 halbtc8723b1ant_coex_table_with_type(btcoexist, FORCE_EXEC, 2); in btc8723b1ant_act_wifi_not_conn_asso_auth()
1982 static void btc8723b1ant_action_wifi_conn_scan(struct btc_coexist *btcoexist) in btc8723b1ant_action_wifi_conn_scan() argument
1984 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8723b1ant_action_wifi_conn_scan()
1986 halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8723b1ant_action_wifi_conn_scan()
1992 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8723b1ant_action_wifi_conn_scan()
1994 halbtc8723b1ant_coex_table_with_type(btcoexist, in btc8723b1ant_action_wifi_conn_scan()
1998 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8723b1ant_action_wifi_conn_scan()
2000 halbtc8723b1ant_coex_table_with_type(btcoexist, in btc8723b1ant_action_wifi_conn_scan()
2003 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8723b1ant_action_wifi_conn_scan()
2005 halbtc8723b1ant_coex_table_with_type(btcoexist, in btc8723b1ant_action_wifi_conn_scan()
2010 btc8723b1ant_act_bt_sco_hid_only_busy(btcoexist, in btc8723b1ant_action_wifi_conn_scan()
2013 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 8); in btc8723b1ant_action_wifi_conn_scan()
2014 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, in btc8723b1ant_action_wifi_conn_scan()
2016 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 2); in btc8723b1ant_action_wifi_conn_scan()
2021 struct btc_coexist *btcoexist) in halbtc8723b1ant_action_wifi_connected_special_packet() argument
2023 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in halbtc8723b1ant_action_wifi_connected_special_packet()
2026 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in halbtc8723b1ant_action_wifi_connected_special_packet()
2033 halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in halbtc8723b1ant_action_wifi_connected_special_packet()
2038 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 32); in halbtc8723b1ant_action_wifi_connected_special_packet()
2039 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 5); in halbtc8723b1ant_action_wifi_connected_special_packet()
2041 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 32); in halbtc8723b1ant_action_wifi_connected_special_packet()
2042 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 4); in halbtc8723b1ant_action_wifi_connected_special_packet()
2044 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 20); in halbtc8723b1ant_action_wifi_connected_special_packet()
2045 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 4); in halbtc8723b1ant_action_wifi_connected_special_packet()
2047 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 8); in halbtc8723b1ant_action_wifi_connected_special_packet()
2048 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, in halbtc8723b1ant_action_wifi_connected_special_packet()
2050 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 2); in halbtc8723b1ant_action_wifi_connected_special_packet()
2054 static void halbtc8723b1ant_action_wifi_connected(struct btc_coexist *btcoexist) in halbtc8723b1ant_action_wifi_connected() argument
2056 struct rtl_priv *rtlpriv = btcoexist->adapter; in halbtc8723b1ant_action_wifi_connected()
2064 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_4_WAY_PROGRESS, in halbtc8723b1ant_action_wifi_connected()
2067 halbtc8723b1ant_action_wifi_connected_special_packet(btcoexist); in halbtc8723b1ant_action_wifi_connected()
2073 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_SCAN, &scan); in halbtc8723b1ant_action_wifi_connected()
2074 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_LINK, &link); in halbtc8723b1ant_action_wifi_connected()
2075 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_ROAM, &roam); in halbtc8723b1ant_action_wifi_connected()
2079 btc8723b1ant_action_wifi_conn_scan(btcoexist); in halbtc8723b1ant_action_wifi_connected()
2082 btcoexist); in halbtc8723b1ant_action_wifi_connected()
2088 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_AP_MODE_ENABLE, in halbtc8723b1ant_action_wifi_connected()
2090 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in halbtc8723b1ant_action_wifi_connected()
2094 !btcoexist->bt_link_info.hid_only) { in halbtc8723b1ant_action_wifi_connected()
2095 if (btcoexist->bt_link_info.a2dp_only) { in halbtc8723b1ant_action_wifi_connected()
2097 halbtc8723b1ant_power_save_state(btcoexist, in halbtc8723b1ant_action_wifi_connected()
2107 btcoexist, BTC_PS_WIFI_NATIVE, in halbtc8723b1ant_action_wifi_connected()
2111 btcoexist, BTC_PS_LPS_ON, 0x50, in halbtc8723b1ant_action_wifi_connected()
2117 btcoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); in halbtc8723b1ant_action_wifi_connected()
2119 halbtc8723b1ant_power_save_state(btcoexist, in halbtc8723b1ant_action_wifi_connected()
2123 halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in halbtc8723b1ant_action_wifi_connected()
2130 btcoexist, in halbtc8723b1ant_action_wifi_connected()
2136 btc8723b1ant_act_bt_sco_hid_only_busy(btcoexist, in halbtc8723b1ant_action_wifi_connected()
2139 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in halbtc8723b1ant_action_wifi_connected()
2141 halbtc8723b1ant_set_ant_path(btcoexist, in halbtc8723b1ant_action_wifi_connected()
2144 halbtc8723b1ant_coex_table_with_type(btcoexist, in halbtc8723b1ant_action_wifi_connected()
2150 btcoexist, in halbtc8723b1ant_action_wifi_connected()
2156 btc8723b1ant_act_bt_sco_hid_only_busy(btcoexist, in halbtc8723b1ant_action_wifi_connected()
2159 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in halbtc8723b1ant_action_wifi_connected()
2161 halbtc8723b1ant_set_ant_path(btcoexist, in halbtc8723b1ant_action_wifi_connected()
2164 halbtc8723b1ant_coex_table_with_type(btcoexist, in halbtc8723b1ant_action_wifi_connected()
2170 static void halbtc8723b1ant_run_coexist_mechanism(struct btc_coexist *btcoexist) in halbtc8723b1ant_run_coexist_mechanism() argument
2172 struct rtl_priv *rtlpriv = btcoexist->adapter; in halbtc8723b1ant_run_coexist_mechanism()
2173 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in halbtc8723b1ant_run_coexist_mechanism()
2187 if (btcoexist->manual_control) { in halbtc8723b1ant_run_coexist_mechanism()
2193 if (btcoexist->stop_coex_dm) { in halbtc8723b1ant_run_coexist_mechanism()
2208 halbtc8723b1ant_action_bt_whck_test(btcoexist); in halbtc8723b1ant_run_coexist_mechanism()
2217 btcoexist->btc_set(btcoexist, BTC_SET_BL_INC_SCAN_DEV_NUM, in halbtc8723b1ant_run_coexist_mechanism()
2219 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in halbtc8723b1ant_run_coexist_mechanism()
2221 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in halbtc8723b1ant_run_coexist_mechanism()
2223 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_LINK_STATUS, in halbtc8723b1ant_run_coexist_mechanism()
2230 halbtc8723b1ant_limited_tx(btcoexist, NORMAL_EXEC, 1, 1, in halbtc8723b1ant_run_coexist_mechanism()
2234 halbtc8723b1ant_limited_tx(btcoexist, NORMAL_EXEC, 0, 0, in halbtc8723b1ant_run_coexist_mechanism()
2238 btcoexist->btc_set(btcoexist, BTC_SET_BL_MIRACAST_PLUS_BT, in halbtc8723b1ant_run_coexist_mechanism()
2240 halbtc8723b1ant_limited_rx(btcoexist, NORMAL_EXEC, false, in halbtc8723b1ant_run_coexist_mechanism()
2245 halbtc8723b1ant_action_bt_inquiry(btcoexist); in halbtc8723b1ant_run_coexist_mechanism()
2247 halbtc8723b1ant_action_wifi_multiport(btcoexist); in halbtc8723b1ant_run_coexist_mechanism()
2253 btcoexist->btc_set(btcoexist, BTC_SET_BL_MIRACAST_PLUS_BT, in halbtc8723b1ant_run_coexist_mechanism()
2255 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in halbtc8723b1ant_run_coexist_mechanism()
2258 halbtc8723b1ant_limited_tx(btcoexist, NORMAL_EXEC, 1, 1, 0, 1); in halbtc8723b1ant_run_coexist_mechanism()
2260 btcoexist->btc_get(btcoexist, BTC_GET_U1_IOT_PEER, &iot_peer); in halbtc8723b1ant_run_coexist_mechanism()
2266 halbtc8723b1ant_limited_rx(btcoexist, in halbtc8723b1ant_run_coexist_mechanism()
2271 halbtc8723b1ant_limited_rx(btcoexist, in halbtc8723b1ant_run_coexist_mechanism()
2277 btcoexist, NORMAL_EXEC, false, in halbtc8723b1ant_run_coexist_mechanism()
2281 btcoexist, NORMAL_EXEC, false, in halbtc8723b1ant_run_coexist_mechanism()
2286 halbtc8723b1ant_sw_mechanism(btcoexist, true); in halbtc8723b1ant_run_coexist_mechanism()
2288 halbtc8723b1ant_limited_tx(btcoexist, NORMAL_EXEC, 0, 0, 0, 0); in halbtc8723b1ant_run_coexist_mechanism()
2290 halbtc8723b1ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, in halbtc8723b1ant_run_coexist_mechanism()
2293 halbtc8723b1ant_sw_mechanism(btcoexist, false); in halbtc8723b1ant_run_coexist_mechanism()
2295 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in halbtc8723b1ant_run_coexist_mechanism()
2298 halbtc8723b1ant_action_bt_inquiry(btcoexist); in halbtc8723b1ant_run_coexist_mechanism()
2301 halbtc8723b1ant_action_hs(btcoexist); in halbtc8723b1ant_run_coexist_mechanism()
2311 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_SCAN, &scan); in halbtc8723b1ant_run_coexist_mechanism()
2312 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_LINK, &link); in halbtc8723b1ant_run_coexist_mechanism()
2313 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_ROAM, &roam); in halbtc8723b1ant_run_coexist_mechanism()
2318 btcoexist); in halbtc8723b1ant_run_coexist_mechanism()
2321 btcoexist); in halbtc8723b1ant_run_coexist_mechanism()
2323 btc8723b1ant_action_wifi_not_conn(btcoexist); in halbtc8723b1ant_run_coexist_mechanism()
2326 halbtc8723b1ant_action_wifi_connected(btcoexist); in halbtc8723b1ant_run_coexist_mechanism()
2331 static void halbtc8723b1ant_init_coex_dm(struct btc_coexist *btcoexist) in halbtc8723b1ant_init_coex_dm() argument
2334 halbtc8723b1ant_sw_mechanism(btcoexist, false); in halbtc8723b1ant_init_coex_dm()
2339 static void halbtc8723b1ant_init_hw_config(struct btc_coexist *btcoexist, in halbtc8723b1ant_init_hw_config() argument
2342 struct rtl_priv *rtlpriv = btcoexist->adapter; in halbtc8723b1ant_init_hw_config()
2351 (btcoexist->btc_read_1byte(btcoexist, 0xf1) & 0xf0) >> 4; in halbtc8723b1ant_init_hw_config()
2353 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x550, 0x8, 0x1); in halbtc8723b1ant_init_hw_config()
2356 btcoexist->btc_write_1byte(btcoexist, 0x790, 0x5); in halbtc8723b1ant_init_hw_config()
2359 btcoexist->btc_write_1byte(btcoexist, 0x778, 0x1); in halbtc8723b1ant_init_hw_config()
2360 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x40, 0x20, 0x1); in halbtc8723b1ant_init_hw_config()
2362 halbtc8723b1ant_ps_tdma(btcoexist, FORCE_EXEC, false, 8); in halbtc8723b1ant_init_hw_config()
2366 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_WIFI, in halbtc8723b1ant_init_hw_config()
2369 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_BT, in halbtc8723b1ant_init_hw_config()
2373 halbtc8723b1ant_coex_table_with_type(btcoexist, FORCE_EXEC, 0); in halbtc8723b1ant_init_hw_config()
2375 u32tmp = btcoexist->btc_read_4byte(btcoexist, 0x948); in halbtc8723b1ant_init_hw_config()
2376 u8tmpa = btcoexist->btc_read_1byte(btcoexist, 0x765); in halbtc8723b1ant_init_hw_config()
2377 u8tmpb = btcoexist->btc_read_1byte(btcoexist, 0x67); in halbtc8723b1ant_init_hw_config()
2387 void ex_btc8723b1ant_power_on_setting(struct btc_coexist *btcoexist) in ex_btc8723b1ant_power_on_setting() argument
2389 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b1ant_power_on_setting()
2390 struct btc_board_info *board_info = &btcoexist->board_info; in ex_btc8723b1ant_power_on_setting()
2398 btcoexist->stop_coex_dm = true; in ex_btc8723b1ant_power_on_setting()
2400 btcoexist->btc_write_1byte(btcoexist, 0x67, 0x20); in ex_btc8723b1ant_power_on_setting()
2403 u16tmp = btcoexist->btc_read_2byte(btcoexist, 0x2); in ex_btc8723b1ant_power_on_setting()
2404 btcoexist->btc_write_2byte(btcoexist, 0x2, u16tmp | BIT0 | BIT1); in ex_btc8723b1ant_power_on_setting()
2407 btcoexist->btc_write_1byte(btcoexist, 0x765, 0x18); in ex_btc8723b1ant_power_on_setting()
2409 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0x4); in ex_btc8723b1ant_power_on_setting()
2421 if (btcoexist->chip_interface == BTC_INTF_USB) { in ex_btc8723b1ant_power_on_setting()
2423 btcoexist->btc_write_4byte(btcoexist, 0x948, 0x0); in ex_btc8723b1ant_power_on_setting()
2426 btcoexist->btc_write_local_reg_1byte(btcoexist, 0xfe08, u8tmp); in ex_btc8723b1ant_power_on_setting()
2433 btcoexist->btc_write_4byte(btcoexist, 0x948, 0x280); in ex_btc8723b1ant_power_on_setting()
2438 btcoexist->btc_write_4byte(btcoexist, 0x948, 0x0); in ex_btc8723b1ant_power_on_setting()
2444 btcoexist->btc_set(btcoexist, BTC_SET_ACT_ANTPOSREGRISTRY_CTRL, in ex_btc8723b1ant_power_on_setting()
2447 if (btcoexist->chip_interface == BTC_INTF_PCI) in ex_btc8723b1ant_power_on_setting()
2448 btcoexist->btc_write_local_reg_1byte(btcoexist, 0x384, in ex_btc8723b1ant_power_on_setting()
2450 else if (btcoexist->chip_interface == BTC_INTF_SDIO) in ex_btc8723b1ant_power_on_setting()
2451 btcoexist->btc_write_local_reg_1byte(btcoexist, 0x60, in ex_btc8723b1ant_power_on_setting()
2457 void ex_btc8723b1ant_init_hwconfig(struct btc_coexist *btcoexist, in ex_btc8723b1ant_init_hwconfig() argument
2460 halbtc8723b1ant_init_hw_config(btcoexist, true, wifi_only); in ex_btc8723b1ant_init_hwconfig()
2461 btcoexist->stop_coex_dm = false; in ex_btc8723b1ant_init_hwconfig()
2464 void ex_btc8723b1ant_init_coex_dm(struct btc_coexist *btcoexist) in ex_btc8723b1ant_init_coex_dm() argument
2466 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b1ant_init_coex_dm()
2471 btcoexist->stop_coex_dm = false; in ex_btc8723b1ant_init_coex_dm()
2473 halbtc8723b1ant_init_coex_dm(btcoexist); in ex_btc8723b1ant_init_coex_dm()
2475 halbtc8723b1ant_query_bt_info(btcoexist); in ex_btc8723b1ant_init_coex_dm()
2478 void ex_btc8723b1ant_display_coex_info(struct btc_coexist *btcoexist, in ex_btc8723b1ant_display_coex_info() argument
2481 struct btc_board_info *board_info = &btcoexist->board_info; in ex_btc8723b1ant_display_coex_info()
2482 struct btc_stack_info *stack_info = &btcoexist->stack_info; in ex_btc8723b1ant_display_coex_info()
2483 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in ex_btc8723b1ant_display_coex_info()
2497 if (btcoexist->manual_control) { in ex_btc8723b1ant_display_coex_info()
2501 if (btcoexist->stop_coex_dm) { in ex_btc8723b1ant_display_coex_info()
2516 btcoexist->btc_get(btcoexist, BTC_GET_U4_BT_PATCH_VER, &bt_patch_ver); in ex_btc8723b1ant_display_coex_info()
2517 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_FW_VER, &fw_ver); in ex_btc8723b1ant_display_coex_info()
2523 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in ex_btc8723b1ant_display_coex_info()
2524 btcoexist->btc_get(btcoexist, BTC_GET_U1_WIFI_DOT11_CHNL, in ex_btc8723b1ant_display_coex_info()
2526 btcoexist->btc_get(btcoexist, BTC_GET_U1_WIFI_HS_CHNL, &wifi_hs_chnl); in ex_btc8723b1ant_display_coex_info()
2535 btcoexist->btc_get(btcoexist, BTC_GET_S4_WIFI_RSSI, &wifi_rssi); in ex_btc8723b1ant_display_coex_info()
2536 btcoexist->btc_get(btcoexist, BTC_GET_S4_HS_RSSI, &bt_hs_rssi); in ex_btc8723b1ant_display_coex_info()
2540 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_SCAN, &scan); in ex_btc8723b1ant_display_coex_info()
2541 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_LINK, &link); in ex_btc8723b1ant_display_coex_info()
2542 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_ROAM, &roam); in ex_btc8723b1ant_display_coex_info()
2546 btcoexist->btc_get(btcoexist , BTC_GET_BL_WIFI_UNDER_5G, in ex_btc8723b1ant_display_coex_info()
2548 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in ex_btc8723b1ant_display_coex_info()
2549 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in ex_btc8723b1ant_display_coex_info()
2550 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_TRAFFIC_DIRECTION, in ex_btc8723b1ant_display_coex_info()
2561 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_LINK_STATUS, in ex_btc8723b1ant_display_coex_info()
2587 btcoexist->btc_disp_dbg_msg(btcoexist, BTC_DBG_DISP_BT_LINK_INFO, m); in ex_btc8723b1ant_display_coex_info()
2606 btcoexist->bt_info.lps_val, in ex_btc8723b1ant_display_coex_info()
2607 btcoexist->bt_info.rpwm_val); in ex_btc8723b1ant_display_coex_info()
2608 btcoexist->btc_disp_dbg_msg(btcoexist, BTC_DBG_DISP_FW_PWR_MODE_CMD, m); in ex_btc8723b1ant_display_coex_info()
2610 if (!btcoexist->manual_control) { in ex_btc8723b1ant_display_coex_info()
2620 (btcoexist->bt_info.reject_agg_pkt ? "Yes" : "No"), in ex_btc8723b1ant_display_coex_info()
2621 (btcoexist->bt_info.bt_ctrl_buf_size ? "Yes" : "No"), in ex_btc8723b1ant_display_coex_info()
2622 btcoexist->bt_info.agg_buf_size); in ex_btc8723b1ant_display_coex_info()
2625 "Rate Mask", btcoexist->bt_info.ra_mask); in ex_btc8723b1ant_display_coex_info()
2656 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x430); in ex_btc8723b1ant_display_coex_info()
2657 u32tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0x434); in ex_btc8723b1ant_display_coex_info()
2658 u16tmp[0] = btcoexist->btc_read_2byte(btcoexist, 0x42a); in ex_btc8723b1ant_display_coex_info()
2659 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x456); in ex_btc8723b1ant_display_coex_info()
2664 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x778); in ex_btc8723b1ant_display_coex_info()
2665 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x6cc); in ex_btc8723b1ant_display_coex_info()
2666 u32tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0x880); in ex_btc8723b1ant_display_coex_info()
2671 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x948); in ex_btc8723b1ant_display_coex_info()
2672 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x67); in ex_btc8723b1ant_display_coex_info()
2673 u8tmp[1] = btcoexist->btc_read_1byte(btcoexist, 0x765); in ex_btc8723b1ant_display_coex_info()
2678 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x92c); in ex_btc8723b1ant_display_coex_info()
2679 u32tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0x930); in ex_btc8723b1ant_display_coex_info()
2680 u32tmp[2] = btcoexist->btc_read_4byte(btcoexist, 0x944); in ex_btc8723b1ant_display_coex_info()
2685 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x39); in ex_btc8723b1ant_display_coex_info()
2686 u8tmp[1] = btcoexist->btc_read_1byte(btcoexist, 0x40); in ex_btc8723b1ant_display_coex_info()
2687 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x4c); in ex_btc8723b1ant_display_coex_info()
2688 u8tmp[2] = btcoexist->btc_read_1byte(btcoexist, 0x64); in ex_btc8723b1ant_display_coex_info()
2694 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x550); in ex_btc8723b1ant_display_coex_info()
2695 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x522); in ex_btc8723b1ant_display_coex_info()
2699 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0xc50); in ex_btc8723b1ant_display_coex_info()
2700 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x49c); in ex_btc8723b1ant_display_coex_info()
2704 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0xda0); in ex_btc8723b1ant_display_coex_info()
2705 u32tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0xda4); in ex_btc8723b1ant_display_coex_info()
2706 u32tmp[2] = btcoexist->btc_read_4byte(btcoexist, 0xda8); in ex_btc8723b1ant_display_coex_info()
2707 u32tmp[3] = btcoexist->btc_read_4byte(btcoexist, 0xcf0); in ex_btc8723b1ant_display_coex_info()
2709 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0xa5b); in ex_btc8723b1ant_display_coex_info()
2710 u8tmp[1] = btcoexist->btc_read_1byte(btcoexist, 0xa5c); in ex_btc8723b1ant_display_coex_info()
2724 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x6c0); in ex_btc8723b1ant_display_coex_info()
2725 u32tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0x6c4); in ex_btc8723b1ant_display_coex_info()
2726 u32tmp[2] = btcoexist->btc_read_4byte(btcoexist, 0x6c8); in ex_btc8723b1ant_display_coex_info()
2737 if (btcoexist->auto_report_1ant) in ex_btc8723b1ant_display_coex_info()
2738 halbtc8723b1ant_monitor_bt_ctr(btcoexist); in ex_btc8723b1ant_display_coex_info()
2739 btcoexist->btc_disp_dbg_msg(btcoexist, BTC_DBG_DISP_COEX_STATISTICS, m); in ex_btc8723b1ant_display_coex_info()
2742 void ex_btc8723b1ant_ips_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8723b1ant_ips_notify() argument
2744 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b1ant_ips_notify()
2746 if (btcoexist->manual_control || btcoexist->stop_coex_dm) in ex_btc8723b1ant_ips_notify()
2754 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_BT, in ex_btc8723b1ant_ips_notify()
2757 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 0); in ex_btc8723b1ant_ips_notify()
2758 halbtc8723b1ant_coex_table_with_type(btcoexist, in ex_btc8723b1ant_ips_notify()
2765 halbtc8723b1ant_init_hw_config(btcoexist, false, false); in ex_btc8723b1ant_ips_notify()
2766 halbtc8723b1ant_init_coex_dm(btcoexist); in ex_btc8723b1ant_ips_notify()
2767 halbtc8723b1ant_query_bt_info(btcoexist); in ex_btc8723b1ant_ips_notify()
2771 void ex_btc8723b1ant_lps_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8723b1ant_lps_notify() argument
2773 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b1ant_lps_notify()
2775 if (btcoexist->manual_control || btcoexist->stop_coex_dm) in ex_btc8723b1ant_lps_notify()
2789 void ex_btc8723b1ant_scan_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8723b1ant_scan_notify() argument
2791 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b1ant_scan_notify()
2800 if (btcoexist->manual_control || btcoexist->stop_coex_dm) in ex_btc8723b1ant_scan_notify()
2808 halbtc8723b1ant_ps_tdma(btcoexist, FORCE_EXEC, false, 8); in ex_btc8723b1ant_scan_notify()
2809 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, in ex_btc8723b1ant_scan_notify()
2811 u32tmp = btcoexist->btc_read_4byte(btcoexist, 0x948); in ex_btc8723b1ant_scan_notify()
2812 u8tmpa = btcoexist->btc_read_1byte(btcoexist, 0x765); in ex_btc8723b1ant_scan_notify()
2813 u8tmpb = btcoexist->btc_read_1byte(btcoexist, 0x67); in ex_btc8723b1ant_scan_notify()
2823 btcoexist->btc_get(btcoexist, BTC_GET_U1_AP_NUM, in ex_btc8723b1ant_scan_notify()
2830 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in ex_btc8723b1ant_scan_notify()
2831 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in ex_btc8723b1ant_scan_notify()
2834 halbtc8723b1ant_query_bt_info(btcoexist); in ex_btc8723b1ant_scan_notify()
2836 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_LINK_STATUS, in ex_btc8723b1ant_scan_notify()
2840 halbtc8723b1ant_limited_tx(btcoexist, NORMAL_EXEC, 0, 0, 0, 0); in ex_btc8723b1ant_scan_notify()
2841 halbtc8723b1ant_limited_rx(btcoexist, NORMAL_EXEC, false, in ex_btc8723b1ant_scan_notify()
2843 halbtc8723b1ant_action_wifi_multiport(btcoexist); in ex_btc8723b1ant_scan_notify()
2848 halbtc8723b1ant_action_bt_inquiry(btcoexist); in ex_btc8723b1ant_scan_notify()
2851 halbtc8723b1ant_action_hs(btcoexist); in ex_btc8723b1ant_scan_notify()
2860 btc8723b1ant_action_wifi_not_conn_scan(btcoexist); in ex_btc8723b1ant_scan_notify()
2863 btc8723b1ant_action_wifi_conn_scan(btcoexist); in ex_btc8723b1ant_scan_notify()
2869 btc8723b1ant_action_wifi_not_conn(btcoexist); in ex_btc8723b1ant_scan_notify()
2871 halbtc8723b1ant_action_wifi_connected(btcoexist); in ex_btc8723b1ant_scan_notify()
2875 void ex_btc8723b1ant_connect_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8723b1ant_connect_notify() argument
2877 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b1ant_connect_notify()
2884 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_4_WAY_PROGRESS, in ex_btc8723b1ant_connect_notify()
2887 if (btcoexist->manual_control || btcoexist->stop_coex_dm || in ex_btc8723b1ant_connect_notify()
2895 halbtc8723b1ant_ps_tdma(btcoexist, FORCE_EXEC, false, 8); in ex_btc8723b1ant_connect_notify()
2896 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, in ex_btc8723b1ant_connect_notify()
2907 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_LINK_STATUS, in ex_btc8723b1ant_connect_notify()
2911 halbtc8723b1ant_limited_tx(btcoexist, NORMAL_EXEC, 0, 0, 0, 0); in ex_btc8723b1ant_connect_notify()
2912 halbtc8723b1ant_limited_rx(btcoexist, NORMAL_EXEC, false, in ex_btc8723b1ant_connect_notify()
2914 halbtc8723b1ant_action_wifi_multiport(btcoexist); in ex_btc8723b1ant_connect_notify()
2918 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in ex_btc8723b1ant_connect_notify()
2920 halbtc8723b1ant_action_bt_inquiry(btcoexist); in ex_btc8723b1ant_connect_notify()
2923 halbtc8723b1ant_action_hs(btcoexist); in ex_btc8723b1ant_connect_notify()
2930 btc8723b1ant_act_wifi_not_conn_asso_auth(btcoexist); in ex_btc8723b1ant_connect_notify()
2935 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in ex_btc8723b1ant_connect_notify()
2939 btc8723b1ant_action_wifi_not_conn(btcoexist); in ex_btc8723b1ant_connect_notify()
2941 halbtc8723b1ant_action_wifi_connected(btcoexist); in ex_btc8723b1ant_connect_notify()
2945 void ex_btc8723b1ant_media_status_notify(struct btc_coexist *btcoexist, in ex_btc8723b1ant_media_status_notify() argument
2948 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b1ant_media_status_notify()
2954 if (btcoexist->manual_control || btcoexist->stop_coex_dm || in ex_btc8723b1ant_media_status_notify()
2962 halbtc8723b1ant_ps_tdma(btcoexist, FORCE_EXEC, false, 8); in ex_btc8723b1ant_media_status_notify()
2963 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, in ex_btc8723b1ant_media_status_notify()
2965 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_UNDER_B_MODE, in ex_btc8723b1ant_media_status_notify()
2970 btcoexist->btc_write_1byte(btcoexist, 0x6cd, in ex_btc8723b1ant_media_status_notify()
2972 btcoexist->btc_write_1byte(btcoexist, 0x6cf, in ex_btc8723b1ant_media_status_notify()
2975 btcoexist->btc_write_1byte(btcoexist, 0x6cd, in ex_btc8723b1ant_media_status_notify()
2977 btcoexist->btc_write_1byte(btcoexist, 0x6cf, in ex_btc8723b1ant_media_status_notify()
2982 btcoexist->btc_read_4byte(btcoexist, 0x430); in ex_btc8723b1ant_media_status_notify()
2984 btcoexist->btc_read_4byte(btcoexist, 0x434); in ex_btc8723b1ant_media_status_notify()
2986 btcoexist->btc_read_2byte(btcoexist, 0x42a); in ex_btc8723b1ant_media_status_notify()
2988 btcoexist->btc_read_1byte(btcoexist, 0x456); in ex_btc8723b1ant_media_status_notify()
2994 btcoexist->btc_write_1byte(btcoexist, 0x6cd, 0x0); /* CCK Tx */ in ex_btc8723b1ant_media_status_notify()
2995 btcoexist->btc_write_1byte(btcoexist, 0x6cf, 0x0); /* CCK Rx */ in ex_btc8723b1ant_media_status_notify()
3001 btcoexist->btc_get(btcoexist, BTC_GET_U1_WIFI_CENTRAL_CHNL, in ex_btc8723b1ant_media_status_notify()
3007 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in ex_btc8723b1ant_media_status_notify()
3023 btcoexist->btc_fill_h2c(btcoexist, 0x66, 3, h2c_parameter); in ex_btc8723b1ant_media_status_notify()
3026 void ex_btc8723b1ant_special_packet_notify(struct btc_coexist *btcoexist, in ex_btc8723b1ant_special_packet_notify() argument
3029 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b1ant_special_packet_notify()
3036 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_4_WAY_PROGRESS, in ex_btc8723b1ant_special_packet_notify()
3039 if (btcoexist->manual_control || btcoexist->stop_coex_dm || in ex_btc8723b1ant_special_packet_notify()
3073 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_LINK_STATUS, in ex_btc8723b1ant_special_packet_notify()
3077 halbtc8723b1ant_limited_tx(btcoexist, NORMAL_EXEC, 0, 0, 0, 0); in ex_btc8723b1ant_special_packet_notify()
3078 halbtc8723b1ant_limited_rx(btcoexist, NORMAL_EXEC, false, in ex_btc8723b1ant_special_packet_notify()
3080 halbtc8723b1ant_action_wifi_multiport(btcoexist); in ex_btc8723b1ant_special_packet_notify()
3086 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in ex_btc8723b1ant_special_packet_notify()
3088 halbtc8723b1ant_action_bt_inquiry(btcoexist); in ex_btc8723b1ant_special_packet_notify()
3091 halbtc8723b1ant_action_hs(btcoexist); in ex_btc8723b1ant_special_packet_notify()
3099 halbtc8723b1ant_action_wifi_connected_special_packet(btcoexist); in ex_btc8723b1ant_special_packet_notify()
3103 void ex_btc8723b1ant_bt_info_notify(struct btc_coexist *btcoexist, in ex_btc8723b1ant_bt_info_notify() argument
3106 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b1ant_bt_info_notify()
3167 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_TX_RX_MASK, in ex_btc8723b1ant_bt_info_notify()
3176 btcoexist->btc_set_bt_reg(btcoexist, BTC_BT_REG_RF, in ex_btc8723b1ant_bt_info_notify()
3180 btcoexist->btc_set_bt_reg(btcoexist, BTC_BT_REG_RF, in ex_btc8723b1ant_bt_info_notify()
3182 btcoexist->btc_set_bt_reg(btcoexist, BTC_BT_REG_RF, in ex_btc8723b1ant_bt_info_notify()
3192 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in ex_btc8723b1ant_bt_info_notify()
3195 ex_btc8723b1ant_media_status_notify(btcoexist, in ex_btc8723b1ant_bt_info_notify()
3198 ex_btc8723b1ant_media_status_notify(btcoexist, in ex_btc8723b1ant_bt_info_notify()
3203 if (!btcoexist->manual_control && in ex_btc8723b1ant_bt_info_notify()
3204 !btcoexist->stop_coex_dm) { in ex_btc8723b1ant_bt_info_notify()
3207 halbtc8723b1ant_ignore_wlan_act(btcoexist, in ex_btc8723b1ant_bt_info_notify()
3214 if (!btcoexist->auto_report_1ant) { in ex_btc8723b1ant_bt_info_notify()
3218 halbtc8723b1ant_bt_auto_report(btcoexist, in ex_btc8723b1ant_bt_info_notify()
3303 halbtc8723b1ant_update_bt_link_info(btcoexist); in ex_btc8723b1ant_bt_info_notify()
3343 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_TRAFFIC_BUSY, &bt_busy); in ex_btc8723b1ant_bt_info_notify()
3345 halbtc8723b1ant_run_coexist_mechanism(btcoexist); in ex_btc8723b1ant_bt_info_notify()
3348 void ex_btc8723b1ant_rf_status_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8723b1ant_rf_status_notify() argument
3350 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b1ant_rf_status_notify()
3360 btcoexist->stop_coex_dm = false; in ex_btc8723b1ant_rf_status_notify()
3365 halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in ex_btc8723b1ant_rf_status_notify()
3367 halbtc8723b1ant_ps_tdma(btcoexist, FORCE_EXEC, false, 0); in ex_btc8723b1ant_rf_status_notify()
3368 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_BT, in ex_btc8723b1ant_rf_status_notify()
3371 halbtc8723b1ant_ignore_wlan_act(btcoexist, FORCE_EXEC, true); in ex_btc8723b1ant_rf_status_notify()
3372 btcoexist->stop_coex_dm = true; in ex_btc8723b1ant_rf_status_notify()
3374 u32tmp = btcoexist->btc_read_4byte(btcoexist, 0x948); in ex_btc8723b1ant_rf_status_notify()
3375 u8tmpa = btcoexist->btc_read_1byte(btcoexist, 0x765); in ex_btc8723b1ant_rf_status_notify()
3376 u8tmpb = btcoexist->btc_read_1byte(btcoexist, 0x67); in ex_btc8723b1ant_rf_status_notify()
3377 u8tmpc = btcoexist->btc_read_1byte(btcoexist, 0x76e); in ex_btc8723b1ant_rf_status_notify()
3385 void ex_btc8723b1ant_halt_notify(struct btc_coexist *btcoexist) in ex_btc8723b1ant_halt_notify() argument
3387 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b1ant_halt_notify()
3391 btcoexist->stop_coex_dm = true; in ex_btc8723b1ant_halt_notify()
3393 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_BT, FORCE_EXEC, in ex_btc8723b1ant_halt_notify()
3396 halbtc8723b1ant_ignore_wlan_act(btcoexist, FORCE_EXEC, true); in ex_btc8723b1ant_halt_notify()
3398 halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in ex_btc8723b1ant_halt_notify()
3400 halbtc8723b1ant_ps_tdma(btcoexist, FORCE_EXEC, false, 0); in ex_btc8723b1ant_halt_notify()
3402 ex_btc8723b1ant_media_status_notify(btcoexist, BTC_MEDIA_DISCONNECT); in ex_btc8723b1ant_halt_notify()
3404 btcoexist->stop_coex_dm = true; in ex_btc8723b1ant_halt_notify()
3407 void ex_btc8723b1ant_pnp_notify(struct btc_coexist *btcoexist, u8 pnp_state) in ex_btc8723b1ant_pnp_notify() argument
3409 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b1ant_pnp_notify()
3416 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_BT, in ex_btc8723b1ant_pnp_notify()
3418 halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in ex_btc8723b1ant_pnp_notify()
3420 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 0); in ex_btc8723b1ant_pnp_notify()
3421 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 2); in ex_btc8723b1ant_pnp_notify()
3431 btcoexist->stop_coex_dm = true; in ex_btc8723b1ant_pnp_notify()
3435 btcoexist->stop_coex_dm = false; in ex_btc8723b1ant_pnp_notify()
3436 halbtc8723b1ant_init_hw_config(btcoexist, false, false); in ex_btc8723b1ant_pnp_notify()
3437 halbtc8723b1ant_init_coex_dm(btcoexist); in ex_btc8723b1ant_pnp_notify()
3438 halbtc8723b1ant_query_bt_info(btcoexist); in ex_btc8723b1ant_pnp_notify()
3442 void ex_btc8723b1ant_coex_dm_reset(struct btc_coexist *btcoexist) in ex_btc8723b1ant_coex_dm_reset() argument
3444 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b1ant_coex_dm_reset()
3449 halbtc8723b1ant_init_hw_config(btcoexist, false, false); in ex_btc8723b1ant_coex_dm_reset()
3450 halbtc8723b1ant_init_coex_dm(btcoexist); in ex_btc8723b1ant_coex_dm_reset()
3453 void ex_btc8723b1ant_periodical(struct btc_coexist *btcoexist) in ex_btc8723b1ant_periodical() argument
3455 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b1ant_periodical()
3456 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in ex_btc8723b1ant_periodical()
3461 if (!btcoexist->auto_report_1ant) { in ex_btc8723b1ant_periodical()
3462 halbtc8723b1ant_query_bt_info(btcoexist); in ex_btc8723b1ant_periodical()
3463 halbtc8723b1ant_monitor_bt_enable_disable(btcoexist); in ex_btc8723b1ant_periodical()
3465 halbtc8723b1ant_monitor_bt_ctr(btcoexist); in ex_btc8723b1ant_periodical()
3466 halbtc8723b1ant_monitor_wifi_ctr(btcoexist); in ex_btc8723b1ant_periodical()
3472 if (btc8723b1ant_is_wifi_status_changed(btcoexist) || in ex_btc8723b1ant_periodical()
3474 halbtc8723b1ant_run_coexist_mechanism(btcoexist); in ex_btc8723b1ant_periodical()