Lines Matching refs:btcoexist
42 static void halbtc8723b1ant_updatera_mask(struct btc_coexist *btcoexist, in halbtc8723b1ant_updatera_mask() argument
48 btcoexist->btc_set(btcoexist, BTC_SET_ACT_UPDATE_RAMASK, in halbtc8723b1ant_updatera_mask()
54 static void btc8723b1ant_auto_rate_fb_retry(struct btc_coexist *btcoexist, in btc8723b1ant_auto_rate_fb_retry() argument
64 btcoexist->btc_write_4byte(btcoexist, 0x430, in btc8723b1ant_auto_rate_fb_retry()
66 btcoexist->btc_write_4byte(btcoexist, 0x434, in btc8723b1ant_auto_rate_fb_retry()
70 btcoexist->btc_get(btcoexist, in btc8723b1ant_auto_rate_fb_retry()
74 btcoexist->btc_write_4byte(btcoexist, in btc8723b1ant_auto_rate_fb_retry()
76 btcoexist->btc_write_4byte(btcoexist, in btc8723b1ant_auto_rate_fb_retry()
79 btcoexist->btc_write_4byte(btcoexist, in btc8723b1ant_auto_rate_fb_retry()
81 btcoexist->btc_write_4byte(btcoexist, in btc8723b1ant_auto_rate_fb_retry()
93 static void halbtc8723b1ant_retry_limit(struct btc_coexist *btcoexist, in halbtc8723b1ant_retry_limit() argument
102 btcoexist->btc_write_2byte(btcoexist, 0x42a, in halbtc8723b1ant_retry_limit()
106 btcoexist->btc_write_2byte(btcoexist, 0x42a, 0x0808); in halbtc8723b1ant_retry_limit()
116 static void halbtc8723b1ant_ampdu_maxtime(struct btc_coexist *btcoexist, in halbtc8723b1ant_ampdu_maxtime() argument
125 btcoexist->btc_write_1byte(btcoexist, 0x456, in halbtc8723b1ant_ampdu_maxtime()
129 btcoexist->btc_write_1byte(btcoexist, 0x456, 0x38); in halbtc8723b1ant_ampdu_maxtime()
139 static void halbtc8723b1ant_limited_tx(struct btc_coexist *btcoexist, in halbtc8723b1ant_limited_tx() argument
146 halbtc8723b1ant_updatera_mask(btcoexist, force_exec, 0x0); in halbtc8723b1ant_limited_tx()
149 halbtc8723b1ant_updatera_mask(btcoexist, force_exec, in halbtc8723b1ant_limited_tx()
154 halbtc8723b1ant_updatera_mask(btcoexist, force_exec, in halbtc8723b1ant_limited_tx()
161 btc8723b1ant_auto_rate_fb_retry(btcoexist, force_exec, arfr_type); in halbtc8723b1ant_limited_tx()
162 halbtc8723b1ant_retry_limit(btcoexist, force_exec, retry_limit_type); in halbtc8723b1ant_limited_tx()
163 halbtc8723b1ant_ampdu_maxtime(btcoexist, force_exec, ampdu_time_type); in halbtc8723b1ant_limited_tx()
166 static void halbtc8723b1ant_limited_rx(struct btc_coexist *btcoexist, in halbtc8723b1ant_limited_rx() argument
178 btcoexist->btc_set(btcoexist, BTC_SET_BL_TO_REJ_AP_AGG_PKT, in halbtc8723b1ant_limited_rx()
181 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_CTRL_AGG_SIZE, in halbtc8723b1ant_limited_rx()
186 btcoexist->btc_set(btcoexist, BTC_SET_U1_AGG_BUF_SIZE, &rxaggsize); in halbtc8723b1ant_limited_rx()
188 btcoexist->btc_set(btcoexist, BTC_SET_ACT_AGGREGATE_CTRL, NULL); in halbtc8723b1ant_limited_rx()
191 static void halbtc8723b1ant_query_bt_info(struct btc_coexist *btcoexist) in halbtc8723b1ant_query_bt_info() argument
200 btcoexist->btc_fill_h2c(btcoexist, 0x61, 1, h2c_parameter); in halbtc8723b1ant_query_bt_info()
203 static void halbtc8723b1ant_monitor_bt_ctr(struct btc_coexist *btcoexist) in halbtc8723b1ant_monitor_bt_ctr() argument
213 u32tmp = btcoexist->btc_read_4byte(btcoexist, reg_hp_txrx); in halbtc8723b1ant_monitor_bt_ctr()
217 u32tmp = btcoexist->btc_read_4byte(btcoexist, reg_lp_txrx); in halbtc8723b1ant_monitor_bt_ctr()
231 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0xc); in halbtc8723b1ant_monitor_bt_ctr()
248 halbtc8723b1ant_query_bt_info(btcoexist); in halbtc8723b1ant_monitor_bt_ctr()
254 static void halbtc8723b1ant_monitor_wifi_ctr(struct btc_coexist *btcoexist) in halbtc8723b1ant_monitor_wifi_ctr() argument
261 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in halbtc8723b1ant_monitor_wifi_ctr()
262 btcoexist->btc_get(btcoexist, BTC_GET_S4_WIFI_RSSI, &wifi_rssi); in halbtc8723b1ant_monitor_wifi_ctr()
263 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_UNDER_B_MODE, in halbtc8723b1ant_monitor_wifi_ctr()
278 btcoexist->btc_read_4byte(btcoexist, 0xf88); in halbtc8723b1ant_monitor_wifi_ctr()
280 btcoexist->btc_read_2byte(btcoexist, 0xf94); in halbtc8723b1ant_monitor_wifi_ctr()
282 btcoexist->btc_read_2byte(btcoexist, 0xf90); in halbtc8723b1ant_monitor_wifi_ctr()
284 btcoexist->btc_read_2byte(btcoexist, 0xfb8); in halbtc8723b1ant_monitor_wifi_ctr()
287 btcoexist->btc_read_4byte(btcoexist, 0xf84); in halbtc8723b1ant_monitor_wifi_ctr()
289 btcoexist->btc_read_2byte(btcoexist, 0xf96); in halbtc8723b1ant_monitor_wifi_ctr()
291 btcoexist->btc_read_2byte(btcoexist, 0xf92); in halbtc8723b1ant_monitor_wifi_ctr()
293 btcoexist->btc_read_2byte(btcoexist, 0xfba); in halbtc8723b1ant_monitor_wifi_ctr()
297 btcoexist->btc_write_1byte_bitmask(btcoexist, 0xf16, 0x1, 0x1); in halbtc8723b1ant_monitor_wifi_ctr()
298 btcoexist->btc_write_1byte_bitmask(btcoexist, 0xf16, 0x1, 0x0); in halbtc8723b1ant_monitor_wifi_ctr()
344 static bool btc8723b1ant_is_wifi_status_changed(struct btc_coexist *btcoexist) in btc8723b1ant_is_wifi_status_changed() argument
351 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in btc8723b1ant_is_wifi_status_changed()
353 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in btc8723b1ant_is_wifi_status_changed()
354 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in btc8723b1ant_is_wifi_status_changed()
355 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_4_WAY_PROGRESS, in btc8723b1ant_is_wifi_status_changed()
376 static void halbtc8723b1ant_update_bt_link_info(struct btc_coexist *btcoexist) in halbtc8723b1ant_update_bt_link_info() argument
378 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in halbtc8723b1ant_update_bt_link_info()
381 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in halbtc8723b1ant_update_bt_link_info()
425 static void halbtc8723b1ant_set_bt_auto_report(struct btc_coexist *btcoexist, in halbtc8723b1ant_set_bt_auto_report() argument
435 btcoexist->btc_fill_h2c(btcoexist, 0x68, 1, h2c_parameter); in halbtc8723b1ant_set_bt_auto_report()
438 static void halbtc8723b1ant_bt_auto_report(struct btc_coexist *btcoexist, in halbtc8723b1ant_bt_auto_report() argument
448 halbtc8723b1ant_set_bt_auto_report(btcoexist, in halbtc8723b1ant_bt_auto_report()
454 static void btc8723b1ant_set_sw_pen_tx_rate_adapt(struct btc_coexist *btcoexist, in btc8723b1ant_set_sw_pen_tx_rate_adapt() argument
457 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b1ant_set_sw_pen_tx_rate_adapt()
475 btcoexist->btc_fill_h2c(btcoexist, 0x69, 6, h2c_parameter); in btc8723b1ant_set_sw_pen_tx_rate_adapt()
478 static void halbtc8723b1ant_low_penalty_ra(struct btc_coexist *btcoexist, in halbtc8723b1ant_low_penalty_ra() argument
487 btc8723b1ant_set_sw_pen_tx_rate_adapt(btcoexist, in halbtc8723b1ant_low_penalty_ra()
493 static void halbtc8723b1ant_set_coex_table(struct btc_coexist *btcoexist, in halbtc8723b1ant_set_coex_table() argument
497 struct rtl_priv *rtlpriv = btcoexist->adapter; in halbtc8723b1ant_set_coex_table()
501 btcoexist->btc_write_4byte(btcoexist, 0x6c0, val0x6c0); in halbtc8723b1ant_set_coex_table()
505 btcoexist->btc_write_4byte(btcoexist, 0x6c4, val0x6c4); in halbtc8723b1ant_set_coex_table()
509 btcoexist->btc_write_4byte(btcoexist, 0x6c8, val0x6c8); in halbtc8723b1ant_set_coex_table()
513 btcoexist->btc_write_1byte(btcoexist, 0x6cc, val0x6cc); in halbtc8723b1ant_set_coex_table()
516 static void halbtc8723b1ant_coex_table(struct btc_coexist *btcoexist, in halbtc8723b1ant_coex_table() argument
521 struct rtl_priv *rtlpriv = btcoexist->adapter; in halbtc8723b1ant_coex_table()
539 halbtc8723b1ant_set_coex_table(btcoexist, val0x6c0, val0x6c4, in halbtc8723b1ant_coex_table()
548 static void halbtc8723b1ant_coex_table_with_type(struct btc_coexist *btcoexist, in halbtc8723b1ant_coex_table_with_type() argument
555 halbtc8723b1ant_coex_table(btcoexist, force_exec, 0x55555555, in halbtc8723b1ant_coex_table_with_type()
559 halbtc8723b1ant_coex_table(btcoexist, force_exec, 0x55555555, in halbtc8723b1ant_coex_table_with_type()
563 halbtc8723b1ant_coex_table(btcoexist, force_exec, 0x5a5a5a5a, in halbtc8723b1ant_coex_table_with_type()
567 halbtc8723b1ant_coex_table(btcoexist, force_exec, 0x55555555, in halbtc8723b1ant_coex_table_with_type()
572 halbtc8723b1ant_coex_table(btcoexist, force_exec, in halbtc8723b1ant_coex_table_with_type()
576 halbtc8723b1ant_coex_table(btcoexist, force_exec, in halbtc8723b1ant_coex_table_with_type()
581 halbtc8723b1ant_coex_table(btcoexist, force_exec, 0x5a5a5a5a, in halbtc8723b1ant_coex_table_with_type()
585 halbtc8723b1ant_coex_table(btcoexist, force_exec, 0x55555555, in halbtc8723b1ant_coex_table_with_type()
589 halbtc8723b1ant_coex_table(btcoexist, force_exec, 0xaaaaaaaa, in halbtc8723b1ant_coex_table_with_type()
593 halbtc8723b1ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in halbtc8723b1ant_coex_table_with_type()
597 halbtc8723b1ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in halbtc8723b1ant_coex_table_with_type()
601 halbtc8723b1ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in halbtc8723b1ant_coex_table_with_type()
605 halbtc8723b1ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in halbtc8723b1ant_coex_table_with_type()
609 halbtc8723b1ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in halbtc8723b1ant_coex_table_with_type()
613 halbtc8723b1ant_coex_table(btcoexist, force_exec, 0x5fff5fff, in halbtc8723b1ant_coex_table_with_type()
617 halbtc8723b1ant_coex_table(btcoexist, force_exec, 0x5fff5fff, in halbtc8723b1ant_coex_table_with_type()
621 halbtc8723b1ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in halbtc8723b1ant_coex_table_with_type()
630 halbtc8723b1ant_set_fw_ignore_wlan_act(struct btc_coexist *btcoexist, in halbtc8723b1ant_set_fw_ignore_wlan_act() argument
633 struct rtl_priv *rtlpriv = btcoexist->adapter; in halbtc8723b1ant_set_fw_ignore_wlan_act()
643 btcoexist->btc_fill_h2c(btcoexist, 0x63, 1, h2c_parameter); in halbtc8723b1ant_set_fw_ignore_wlan_act()
646 static void halbtc8723b1ant_ignore_wlan_act(struct btc_coexist *btcoexist, in halbtc8723b1ant_ignore_wlan_act() argument
649 struct rtl_priv *rtlpriv = btcoexist->adapter; in halbtc8723b1ant_ignore_wlan_act()
666 halbtc8723b1ant_set_fw_ignore_wlan_act(btcoexist, enable); in halbtc8723b1ant_ignore_wlan_act()
671 static void halbtc8723b1ant_set_fw_ps_tdma(struct btc_coexist *btcoexist, in halbtc8723b1ant_set_fw_ps_tdma() argument
675 struct rtl_priv *rtlpriv = btcoexist->adapter; in halbtc8723b1ant_set_fw_ps_tdma()
680 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_AP_MODE_ENABLE, in halbtc8723b1ant_set_fw_ps_tdma()
715 btcoexist->btc_fill_h2c(btcoexist, 0x60, 5, h2c_parameter); in halbtc8723b1ant_set_fw_ps_tdma()
718 static void halbtc8723b1ant_set_lps_rpwm(struct btc_coexist *btcoexist, in halbtc8723b1ant_set_lps_rpwm() argument
724 btcoexist->btc_set(btcoexist, BTC_SET_U1_LPS_VAL, &lps); in halbtc8723b1ant_set_lps_rpwm()
725 btcoexist->btc_set(btcoexist, BTC_SET_U1_RPWM_VAL, &rpwm); in halbtc8723b1ant_set_lps_rpwm()
728 static void halbtc8723b1ant_lps_rpwm(struct btc_coexist *btcoexist, in halbtc8723b1ant_lps_rpwm() argument
732 struct rtl_priv *rtlpriv = btcoexist->adapter; in halbtc8723b1ant_lps_rpwm()
754 halbtc8723b1ant_set_lps_rpwm(btcoexist, lps_val, rpwm_val); in halbtc8723b1ant_lps_rpwm()
760 static void halbtc8723b1ant_sw_mechanism(struct btc_coexist *btcoexist, in halbtc8723b1ant_sw_mechanism() argument
763 struct rtl_priv *rtlpriv = btcoexist->adapter; in halbtc8723b1ant_sw_mechanism()
768 halbtc8723b1ant_low_penalty_ra(btcoexist, NORMAL_EXEC, low_penalty_ra); in halbtc8723b1ant_sw_mechanism()
771 static void halbtc8723b1ant_set_ant_path(struct btc_coexist *btcoexist, in halbtc8723b1ant_set_ant_path() argument
775 struct rtl_priv *rtlpriv = btcoexist->adapter; in halbtc8723b1ant_set_ant_path()
776 struct btc_board_info *board_info = &btcoexist->board_info; in halbtc8723b1ant_set_ant_path()
785 btcoexist->btc_get(btcoexist, BTC_GET_BL_EXT_SWITCH, &pg_ext_switch); in halbtc8723b1ant_set_ant_path()
787 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_FW_VER, &fw_ver); in halbtc8723b1ant_set_ant_path()
794 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, in halbtc8723b1ant_set_ant_path()
803 btcoexist->btc_fill_h2c(btcoexist, 0x6E, 1, in halbtc8723b1ant_set_ant_path()
807 btcoexist->btc_write_1byte(btcoexist, 0x765, 0x18); in halbtc8723b1ant_set_ant_path()
810 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0x4); in halbtc8723b1ant_set_ant_path()
813 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x67, 0x20, 0x0); in halbtc8723b1ant_set_ant_path()
814 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x39, 0x8, 0x1); in halbtc8723b1ant_set_ant_path()
815 btcoexist->btc_write_1byte(btcoexist, 0x974, 0xff); in halbtc8723b1ant_set_ant_path()
816 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x944, 0x3, 0x3); in halbtc8723b1ant_set_ant_path()
817 btcoexist->btc_write_1byte(btcoexist, 0x930, 0x77); in halbtc8723b1ant_set_ant_path()
822 btcoexist->btc_fill_h2c(btcoexist, 0x6E, 1, in halbtc8723b1ant_set_ant_path()
826 btcoexist->btc_write_1byte(btcoexist, 0x765, 0x18); in halbtc8723b1ant_set_ant_path()
829 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0x4); in halbtc8723b1ant_set_ant_path()
831 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_IS_IN_MP_MODE, in halbtc8723b1ant_set_ant_path()
835 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x67, in halbtc8723b1ant_set_ant_path()
839 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x67, in halbtc8723b1ant_set_ant_path()
845 u32tmp = btcoexist->btc_read_4byte(btcoexist, 0x4c); in halbtc8723b1ant_set_ant_path()
848 btcoexist->btc_write_4byte(btcoexist, 0x4c, u32tmp); in halbtc8723b1ant_set_ant_path()
852 if (btcoexist->btc_read_1byte(btcoexist, 0x765) != 0) { in halbtc8723b1ant_set_ant_path()
854 btcoexist->btc_fill_h2c(btcoexist, 0x6E, 1, in halbtc8723b1ant_set_ant_path()
860 u8tmp = btcoexist->btc_read_1byte(btcoexist, in halbtc8723b1ant_set_ant_path()
879 btcoexist->btc_write_1byte(btcoexist, 0x765, 0x0); in halbtc8723b1ant_set_ant_path()
882 if (btcoexist->btc_read_1byte(btcoexist, 0x76e) != 0xc) { in halbtc8723b1ant_set_ant_path()
884 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0xc); in halbtc8723b1ant_set_ant_path()
887 btcoexist->btc_write_1byte_bitmask( in halbtc8723b1ant_set_ant_path()
888 btcoexist, 0x67, 0x20, in halbtc8723b1ant_set_ant_path()
897 u32tmp = btcoexist->btc_read_4byte(btcoexist, 0x4c); in halbtc8723b1ant_set_ant_path()
900 btcoexist->btc_write_4byte(btcoexist, 0x4c, u32tmp); in halbtc8723b1ant_set_ant_path()
903 btcoexist->btc_write_4byte(btcoexist, 0x948, 0x0); in halbtc8723b1ant_set_ant_path()
911 btcoexist->btc_fill_h2c(btcoexist, 0x65, 2, in halbtc8723b1ant_set_ant_path()
918 btcoexist->btc_fill_h2c(btcoexist, 0x65, 2, in halbtc8723b1ant_set_ant_path()
930 btcoexist->btc_write_1byte_bitmask( in halbtc8723b1ant_set_ant_path()
931 btcoexist, 0x92c, 0x3, 0x1); in halbtc8723b1ant_set_ant_path()
933 btcoexist->btc_write_1byte_bitmask( in halbtc8723b1ant_set_ant_path()
934 btcoexist, 0x92c, 0x3, 0x2); in halbtc8723b1ant_set_ant_path()
939 btcoexist->btc_write_1byte_bitmask( in halbtc8723b1ant_set_ant_path()
940 btcoexist, 0x92c, 0x3, 0x2); in halbtc8723b1ant_set_ant_path()
942 btcoexist->btc_write_1byte_bitmask( in halbtc8723b1ant_set_ant_path()
943 btcoexist, 0x92c, 0x3, 0x1); in halbtc8723b1ant_set_ant_path()
949 btcoexist->btc_write_1byte_bitmask( in halbtc8723b1ant_set_ant_path()
950 btcoexist, 0x92c, 0x3, 0x1); in halbtc8723b1ant_set_ant_path()
952 btcoexist->btc_write_1byte_bitmask( in halbtc8723b1ant_set_ant_path()
953 btcoexist, 0x92c, 0x3, 0x2); in halbtc8723b1ant_set_ant_path()
962 u32tmp = btcoexist->btc_read_4byte(btcoexist, 0x4c); in halbtc8723b1ant_set_ant_path()
965 btcoexist->btc_write_4byte(btcoexist, 0x4c, u32tmp); in halbtc8723b1ant_set_ant_path()
968 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x64, 0x1, in halbtc8723b1ant_set_ant_path()
977 btcoexist->btc_fill_h2c(btcoexist, 0x65, 2, in halbtc8723b1ant_set_ant_path()
984 btcoexist->btc_fill_h2c(btcoexist, 0x65, 2, in halbtc8723b1ant_set_ant_path()
996 btcoexist->btc_write_4byte(btcoexist, in halbtc8723b1ant_set_ant_path()
999 btcoexist->btc_write_4byte(btcoexist, in halbtc8723b1ant_set_ant_path()
1005 btcoexist->btc_write_4byte(btcoexist, in halbtc8723b1ant_set_ant_path()
1008 btcoexist->btc_write_4byte(btcoexist, in halbtc8723b1ant_set_ant_path()
1015 btcoexist->btc_write_4byte(btcoexist, in halbtc8723b1ant_set_ant_path()
1018 btcoexist->btc_write_4byte(btcoexist, in halbtc8723b1ant_set_ant_path()
1028 static void halbtc8723b1ant_ps_tdma(struct btc_coexist *btcoexist, in halbtc8723b1ant_ps_tdma() argument
1031 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in halbtc8723b1ant_ps_tdma()
1043 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in halbtc8723b1ant_ps_tdma()
1138 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x51, 0x1a, in halbtc8723b1ant_ps_tdma()
1144 btcoexist, ps_tdma_byte0_val, in halbtc8723b1ant_ps_tdma()
1152 btcoexist, ps_tdma_byte0_val, in halbtc8723b1ant_ps_tdma()
1158 btcoexist, ps_tdma_byte0_val, 0x30, 0x03, in halbtc8723b1ant_ps_tdma()
1162 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x93, 0x15, in halbtc8723b1ant_ps_tdma()
1167 btcoexist, ps_tdma_byte0_val, 0x1f, 0x3, in halbtc8723b1ant_ps_tdma()
1172 btcoexist, ps_tdma_byte0_val, 0x20, 0x3, in halbtc8723b1ant_ps_tdma()
1176 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x13, 0xc, in halbtc8723b1ant_ps_tdma()
1180 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x93, 0x25, in halbtc8723b1ant_ps_tdma()
1185 btcoexist, ps_tdma_byte0_val, 0x21, 0x3, in halbtc8723b1ant_ps_tdma()
1189 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x13, 0xa, in halbtc8723b1ant_ps_tdma()
1194 btcoexist, ps_tdma_byte0_val, 0x21, 0x03, in halbtc8723b1ant_ps_tdma()
1198 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x51, 0x0a, in halbtc8723b1ant_ps_tdma()
1204 btcoexist, ps_tdma_byte0_val, 0x40, 0x3, in halbtc8723b1ant_ps_tdma()
1208 btcoexist, ps_tdma_byte0_val, 0x21, 0x3, in halbtc8723b1ant_ps_tdma()
1214 btcoexist, 0x51, 0x30, 0x3, 0x10, 0x50); in halbtc8723b1ant_ps_tdma()
1217 btcoexist, ps_tdma_byte0_val, 0x21, 0x3, in halbtc8723b1ant_ps_tdma()
1221 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x13, 0xa, in halbtc8723b1ant_ps_tdma()
1225 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x93, 0x15, in halbtc8723b1ant_ps_tdma()
1229 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x93, 0x25, in halbtc8723b1ant_ps_tdma()
1234 btcoexist, ps_tdma_byte0_val, 0x3f, 0x03, in halbtc8723b1ant_ps_tdma()
1238 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x61, 0x25, in halbtc8723b1ant_ps_tdma()
1243 btcoexist, ps_tdma_byte0_val, 0x25, 0x03, in halbtc8723b1ant_ps_tdma()
1247 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x25, in halbtc8723b1ant_ps_tdma()
1251 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x15, in halbtc8723b1ant_ps_tdma()
1255 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0xe3, 0xa, in halbtc8723b1ant_ps_tdma()
1259 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0xe3, 0xa, in halbtc8723b1ant_ps_tdma()
1263 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x25, in halbtc8723b1ant_ps_tdma()
1267 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x69, 0x25, in halbtc8723b1ant_ps_tdma()
1271 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0xab, 0x1a, in halbtc8723b1ant_ps_tdma()
1275 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x51, 0x30, in halbtc8723b1ant_ps_tdma()
1279 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0xd3, 0x1a, in halbtc8723b1ant_ps_tdma()
1284 btcoexist, ps_tdma_byte0_val, 0x35, 0x3, in halbtc8723b1ant_ps_tdma()
1289 btcoexist, ps_tdma_byte0_val, 0x35, 0x3, in halbtc8723b1ant_ps_tdma()
1293 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x53, 0x1a, in halbtc8723b1ant_ps_tdma()
1297 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x63, 0x1a, in halbtc8723b1ant_ps_tdma()
1301 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0xd3, 0x12, in halbtc8723b1ant_ps_tdma()
1311 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x23, 0x18, in halbtc8723b1ant_ps_tdma()
1318 btcoexist, ps_tdma_byte0_val, in halbtc8723b1ant_ps_tdma()
1324 btcoexist, ps_tdma_byte0_val, in halbtc8723b1ant_ps_tdma()
1330 btcoexist, ps_tdma_byte0_val, 0x3a, 0x03, in halbtc8723b1ant_ps_tdma()
1335 btcoexist, ps_tdma_byte0_val, 0x15, 0x3, in halbtc8723b1ant_ps_tdma()
1340 btcoexist, ps_tdma_byte0_val, 0x20, 0x3, in halbtc8723b1ant_ps_tdma()
1345 btcoexist, ps_tdma_byte0_val, 0x21, 0x3, in halbtc8723b1ant_ps_tdma()
1350 btcoexist, ps_tdma_byte0_val, 0x21, 0x03, in halbtc8723b1ant_ps_tdma()
1355 btcoexist, ps_tdma_byte0_val, 0x21, 0x3, in halbtc8723b1ant_ps_tdma()
1360 btcoexist, ps_tdma_byte0_val, 0x21, 0x3, in halbtc8723b1ant_ps_tdma()
1365 btcoexist, ps_tdma_byte0_val, 0x3f, 0x03, in halbtc8723b1ant_ps_tdma()
1370 btcoexist, ps_tdma_byte0_val, 0x25, 0x03, in halbtc8723b1ant_ps_tdma()
1375 btcoexist, ps_tdma_byte0_val, 0x25, 0x03, in halbtc8723b1ant_ps_tdma()
1380 btcoexist, ps_tdma_byte0_val, 0x25, 0x03, in halbtc8723b1ant_ps_tdma()
1388 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x8, 0x0, in halbtc8723b1ant_ps_tdma()
1390 halbtc8723b1ant_set_ant_path(btcoexist, in halbtc8723b1ant_ps_tdma()
1398 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x0, 0x0, in halbtc8723b1ant_ps_tdma()
1402 halbtc8723b1ant_set_fw_ps_tdma(btcoexist, 0x0, 0x0, 0x0, in halbtc8723b1ant_ps_tdma()
1408 btcoexist->btc_set(btcoexist, in halbtc8723b1ant_ps_tdma()
1418 void btc8723b1ant_tdma_dur_adj_for_acl(struct btc_coexist *btcoexist, in btc8723b1ant_tdma_dur_adj_for_acl() argument
1421 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b1ant_tdma_dur_adj_for_acl()
1438 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8723b1ant_tdma_dur_adj_for_acl()
1457 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 2); in btc8723b1ant_tdma_dur_adj_for_acl()
1557 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8723b1ant_tdma_dur_adj_for_acl()
1561 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8723b1ant_tdma_dur_adj_for_acl()
1565 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8723b1ant_tdma_dur_adj_for_acl()
1571 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8723b1ant_tdma_dur_adj_for_acl()
1575 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8723b1ant_tdma_dur_adj_for_acl()
1579 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8723b1ant_tdma_dur_adj_for_acl()
1588 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, in btc8723b1ant_tdma_dur_adj_for_acl()
1594 static void halbtc8723b1ant_ps_tdma_chk_pwr_save(struct btc_coexist *btcoexist, in halbtc8723b1ant_ps_tdma_chk_pwr_save() argument
1599 btcoexist->btc_get(btcoexist, BTC_GET_U1_LPS_MODE, &lps_mode); in halbtc8723b1ant_ps_tdma_chk_pwr_save()
1607 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in halbtc8723b1ant_ps_tdma_chk_pwr_save()
1614 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in halbtc8723b1ant_ps_tdma_chk_pwr_save()
1622 static void halbtc8723b1ant_power_save_state(struct btc_coexist *btcoexist, in halbtc8723b1ant_power_save_state() argument
1632 btcoexist->btc_set(btcoexist, BTC_SET_ACT_DISABLE_LOW_POWER, in halbtc8723b1ant_power_save_state()
1634 btcoexist->btc_set(btcoexist, BTC_SET_ACT_NORMAL_LPS, NULL); in halbtc8723b1ant_power_save_state()
1638 halbtc8723b1ant_ps_tdma_chk_pwr_save(btcoexist, true); in halbtc8723b1ant_power_save_state()
1639 halbtc8723b1ant_lps_rpwm(btcoexist, NORMAL_EXEC, lps_val, in halbtc8723b1ant_power_save_state()
1643 btcoexist->btc_set(btcoexist, BTC_SET_ACT_DISABLE_LOW_POWER, in halbtc8723b1ant_power_save_state()
1646 btcoexist->btc_set(btcoexist, BTC_SET_ACT_ENTER_LPS, NULL); in halbtc8723b1ant_power_save_state()
1650 halbtc8723b1ant_ps_tdma_chk_pwr_save(btcoexist, false); in halbtc8723b1ant_power_save_state()
1651 btcoexist->btc_set(btcoexist, BTC_SET_ACT_LEAVE_LPS, NULL); in halbtc8723b1ant_power_save_state()
1659 static void halbtc8723b1ant_action_wifi_only(struct btc_coexist *btcoexist) in halbtc8723b1ant_action_wifi_only() argument
1661 halbtc8723b1ant_coex_table_with_type(btcoexist, FORCE_EXEC, 0); in halbtc8723b1ant_action_wifi_only()
1662 halbtc8723b1ant_ps_tdma(btcoexist, FORCE_EXEC, false, 8); in halbtc8723b1ant_action_wifi_only()
1663 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, in halbtc8723b1ant_action_wifi_only()
1669 *btcoexist) in halbtc8723b1ant_monitor_bt_enable_disable() argument
1671 struct rtl_priv *rtlpriv = btcoexist->adapter; in halbtc8723b1ant_monitor_bt_enable_disable()
1699 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_DISABLE, in halbtc8723b1ant_monitor_bt_enable_disable()
1702 halbtc8723b1ant_action_wifi_only(btcoexist); in halbtc8723b1ant_monitor_bt_enable_disable()
1703 btcoexist->btc_set(btcoexist, BTC_SET_ACT_LEAVE_LPS, in halbtc8723b1ant_monitor_bt_enable_disable()
1705 btcoexist->btc_set(btcoexist, BTC_SET_ACT_NORMAL_LPS, in halbtc8723b1ant_monitor_bt_enable_disable()
1717 static void halbtc8723b1ant_action_bt_whck_test(struct btc_coexist *btcoexist) in halbtc8723b1ant_action_bt_whck_test() argument
1719 halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, 0x0, in halbtc8723b1ant_action_bt_whck_test()
1722 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 8); in halbtc8723b1ant_action_bt_whck_test()
1723 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, NORMAL_EXEC, in halbtc8723b1ant_action_bt_whck_test()
1725 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in halbtc8723b1ant_action_bt_whck_test()
1728 static void halbtc8723b1ant_action_wifi_multiport(struct btc_coexist *btcoexist) in halbtc8723b1ant_action_wifi_multiport() argument
1730 halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in halbtc8723b1ant_action_wifi_multiport()
1733 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 8); in halbtc8723b1ant_action_wifi_multiport()
1734 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, NORMAL_EXEC, in halbtc8723b1ant_action_wifi_multiport()
1736 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 2); in halbtc8723b1ant_action_wifi_multiport()
1739 static void halbtc8723b1ant_action_hs(struct btc_coexist *btcoexist) in halbtc8723b1ant_action_hs() argument
1741 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 5); in halbtc8723b1ant_action_hs()
1742 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 2); in halbtc8723b1ant_action_hs()
1745 static void halbtc8723b1ant_action_bt_inquiry(struct btc_coexist *btcoexist) in halbtc8723b1ant_action_bt_inquiry() argument
1747 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in halbtc8723b1ant_action_bt_inquiry()
1751 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_AP_MODE_ENABLE, in halbtc8723b1ant_action_bt_inquiry()
1753 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in halbtc8723b1ant_action_bt_inquiry()
1755 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in halbtc8723b1ant_action_bt_inquiry()
1756 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_TRAFFIC_BUSY, &bt_busy); in halbtc8723b1ant_action_bt_inquiry()
1759 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 33); in halbtc8723b1ant_action_bt_inquiry()
1760 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 7); in halbtc8723b1ant_action_bt_inquiry()
1762 halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in halbtc8723b1ant_action_bt_inquiry()
1764 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 8); in halbtc8723b1ant_action_bt_inquiry()
1765 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, in halbtc8723b1ant_action_bt_inquiry()
1767 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in halbtc8723b1ant_action_bt_inquiry()
1771 halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in halbtc8723b1ant_action_bt_inquiry()
1774 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, in halbtc8723b1ant_action_bt_inquiry()
1777 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, in halbtc8723b1ant_action_bt_inquiry()
1780 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 4); in halbtc8723b1ant_action_bt_inquiry()
1782 halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in halbtc8723b1ant_action_bt_inquiry()
1785 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, in halbtc8723b1ant_action_bt_inquiry()
1788 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, in halbtc8723b1ant_action_bt_inquiry()
1791 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 4); in halbtc8723b1ant_action_bt_inquiry()
1793 halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in halbtc8723b1ant_action_bt_inquiry()
1795 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 8); in halbtc8723b1ant_action_bt_inquiry()
1796 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, in halbtc8723b1ant_action_bt_inquiry()
1798 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 7); in halbtc8723b1ant_action_bt_inquiry()
1802 static void btc8723b1ant_act_bt_sco_hid_only_busy(struct btc_coexist *btcoexist, in btc8723b1ant_act_bt_sco_hid_only_busy() argument
1805 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8723b1ant_act_bt_sco_hid_only_busy()
1808 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in btc8723b1ant_act_bt_sco_hid_only_busy()
1813 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 5); in btc8723b1ant_act_bt_sco_hid_only_busy()
1814 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 5); in btc8723b1ant_act_bt_sco_hid_only_busy()
1817 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 6); in btc8723b1ant_act_bt_sco_hid_only_busy()
1818 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 5); in btc8723b1ant_act_bt_sco_hid_only_busy()
1823 struct btc_coexist *btcoexist, in halbtc8723b1ant_action_wifi_connected_bt_acl_busy() argument
1826 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in halbtc8723b1ant_action_wifi_connected_bt_acl_busy()
1834 btc8723b1ant_act_bt_sco_hid_only_busy(btcoexist, wifi_status); in halbtc8723b1ant_action_wifi_connected_bt_acl_busy()
1839 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in halbtc8723b1ant_action_wifi_connected_bt_acl_busy()
1841 halbtc8723b1ant_coex_table_with_type(btcoexist, in halbtc8723b1ant_action_wifi_connected_bt_acl_busy()
1845 btc8723b1ant_tdma_dur_adj_for_acl(btcoexist, in halbtc8723b1ant_action_wifi_connected_bt_acl_busy()
1847 halbtc8723b1ant_coex_table_with_type(btcoexist, in halbtc8723b1ant_action_wifi_connected_bt_acl_busy()
1855 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 13); in halbtc8723b1ant_action_wifi_connected_bt_acl_busy()
1856 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 4); in halbtc8723b1ant_action_wifi_connected_bt_acl_busy()
1860 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 14); in halbtc8723b1ant_action_wifi_connected_bt_acl_busy()
1863 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 4); in halbtc8723b1ant_action_wifi_connected_bt_acl_busy()
1867 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 3); in halbtc8723b1ant_action_wifi_connected_bt_acl_busy()
1868 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 4); in halbtc8723b1ant_action_wifi_connected_bt_acl_busy()
1872 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 33); in halbtc8723b1ant_action_wifi_connected_bt_acl_busy()
1873 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 4); in halbtc8723b1ant_action_wifi_connected_bt_acl_busy()
1878 static void btc8723b1ant_action_wifi_not_conn(struct btc_coexist *btcoexist) in btc8723b1ant_action_wifi_not_conn() argument
1881 halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8723b1ant_action_wifi_not_conn()
1885 halbtc8723b1ant_ps_tdma(btcoexist, FORCE_EXEC, false, 8); in btc8723b1ant_action_wifi_not_conn()
1886 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, NORMAL_EXEC, in btc8723b1ant_action_wifi_not_conn()
1888 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8723b1ant_action_wifi_not_conn()
1892 btc8723b1ant_action_wifi_not_conn_scan(struct btc_coexist *btcoexist) in btc8723b1ant_action_wifi_not_conn_scan() argument
1894 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8723b1ant_action_wifi_not_conn_scan()
1896 halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8723b1ant_action_wifi_not_conn_scan()
1902 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8723b1ant_action_wifi_not_conn_scan()
1904 halbtc8723b1ant_coex_table_with_type(btcoexist, in btc8723b1ant_action_wifi_not_conn_scan()
1907 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8723b1ant_action_wifi_not_conn_scan()
1909 halbtc8723b1ant_coex_table_with_type(btcoexist, in btc8723b1ant_action_wifi_not_conn_scan()
1912 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8723b1ant_action_wifi_not_conn_scan()
1914 halbtc8723b1ant_coex_table_with_type(btcoexist, in btc8723b1ant_action_wifi_not_conn_scan()
1919 btc8723b1ant_act_bt_sco_hid_only_busy(btcoexist, in btc8723b1ant_action_wifi_not_conn_scan()
1922 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 8); in btc8723b1ant_action_wifi_not_conn_scan()
1923 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, in btc8723b1ant_action_wifi_not_conn_scan()
1925 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 2); in btc8723b1ant_action_wifi_not_conn_scan()
1930 btc8723b1ant_act_wifi_not_conn_asso_auth(struct btc_coexist *btcoexist) in btc8723b1ant_act_wifi_not_conn_asso_auth() argument
1932 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8723b1ant_act_wifi_not_conn_asso_auth()
1934 halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8723b1ant_act_wifi_not_conn_asso_auth()
1940 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 32); in btc8723b1ant_act_wifi_not_conn_asso_auth()
1941 halbtc8723b1ant_coex_table_with_type(btcoexist, FORCE_EXEC, 4); in btc8723b1ant_act_wifi_not_conn_asso_auth()
1943 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 20); in btc8723b1ant_act_wifi_not_conn_asso_auth()
1944 halbtc8723b1ant_coex_table_with_type(btcoexist, FORCE_EXEC, 4); in btc8723b1ant_act_wifi_not_conn_asso_auth()
1946 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 8); in btc8723b1ant_act_wifi_not_conn_asso_auth()
1947 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, in btc8723b1ant_act_wifi_not_conn_asso_auth()
1949 halbtc8723b1ant_coex_table_with_type(btcoexist, FORCE_EXEC, 2); in btc8723b1ant_act_wifi_not_conn_asso_auth()
1953 static void btc8723b1ant_action_wifi_conn_scan(struct btc_coexist *btcoexist) in btc8723b1ant_action_wifi_conn_scan() argument
1955 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8723b1ant_action_wifi_conn_scan()
1957 halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8723b1ant_action_wifi_conn_scan()
1963 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8723b1ant_action_wifi_conn_scan()
1965 halbtc8723b1ant_coex_table_with_type(btcoexist, in btc8723b1ant_action_wifi_conn_scan()
1968 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8723b1ant_action_wifi_conn_scan()
1970 halbtc8723b1ant_coex_table_with_type(btcoexist, in btc8723b1ant_action_wifi_conn_scan()
1973 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8723b1ant_action_wifi_conn_scan()
1975 halbtc8723b1ant_coex_table_with_type(btcoexist, in btc8723b1ant_action_wifi_conn_scan()
1980 btc8723b1ant_act_bt_sco_hid_only_busy(btcoexist, in btc8723b1ant_action_wifi_conn_scan()
1983 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 8); in btc8723b1ant_action_wifi_conn_scan()
1984 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, in btc8723b1ant_action_wifi_conn_scan()
1986 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 2); in btc8723b1ant_action_wifi_conn_scan()
1991 struct btc_coexist *btcoexist) in halbtc8723b1ant_action_wifi_connected_special_packet() argument
1993 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in halbtc8723b1ant_action_wifi_connected_special_packet()
1996 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in halbtc8723b1ant_action_wifi_connected_special_packet()
2003 halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in halbtc8723b1ant_action_wifi_connected_special_packet()
2008 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 32); in halbtc8723b1ant_action_wifi_connected_special_packet()
2009 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 5); in halbtc8723b1ant_action_wifi_connected_special_packet()
2011 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 32); in halbtc8723b1ant_action_wifi_connected_special_packet()
2012 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 4); in halbtc8723b1ant_action_wifi_connected_special_packet()
2014 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 20); in halbtc8723b1ant_action_wifi_connected_special_packet()
2015 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 4); in halbtc8723b1ant_action_wifi_connected_special_packet()
2017 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 8); in halbtc8723b1ant_action_wifi_connected_special_packet()
2018 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, in halbtc8723b1ant_action_wifi_connected_special_packet()
2020 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 2); in halbtc8723b1ant_action_wifi_connected_special_packet()
2024 static void halbtc8723b1ant_action_wifi_connected(struct btc_coexist *btcoexist) in halbtc8723b1ant_action_wifi_connected() argument
2026 struct rtl_priv *rtlpriv = btcoexist->adapter; in halbtc8723b1ant_action_wifi_connected()
2034 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_4_WAY_PROGRESS, in halbtc8723b1ant_action_wifi_connected()
2037 halbtc8723b1ant_action_wifi_connected_special_packet(btcoexist); in halbtc8723b1ant_action_wifi_connected()
2043 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_SCAN, &scan); in halbtc8723b1ant_action_wifi_connected()
2044 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_LINK, &link); in halbtc8723b1ant_action_wifi_connected()
2045 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_ROAM, &roam); in halbtc8723b1ant_action_wifi_connected()
2049 btc8723b1ant_action_wifi_conn_scan(btcoexist); in halbtc8723b1ant_action_wifi_connected()
2052 btcoexist); in halbtc8723b1ant_action_wifi_connected()
2058 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_AP_MODE_ENABLE, in halbtc8723b1ant_action_wifi_connected()
2060 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in halbtc8723b1ant_action_wifi_connected()
2064 !btcoexist->bt_link_info.hid_only) { in halbtc8723b1ant_action_wifi_connected()
2065 if (btcoexist->bt_link_info.a2dp_only) { in halbtc8723b1ant_action_wifi_connected()
2067 halbtc8723b1ant_power_save_state(btcoexist, in halbtc8723b1ant_action_wifi_connected()
2077 btcoexist, BTC_PS_WIFI_NATIVE, in halbtc8723b1ant_action_wifi_connected()
2081 btcoexist, BTC_PS_LPS_ON, 0x50, in halbtc8723b1ant_action_wifi_connected()
2087 btcoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); in halbtc8723b1ant_action_wifi_connected()
2089 halbtc8723b1ant_power_save_state(btcoexist, in halbtc8723b1ant_action_wifi_connected()
2093 halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in halbtc8723b1ant_action_wifi_connected()
2100 btcoexist, in halbtc8723b1ant_action_wifi_connected()
2106 btc8723b1ant_act_bt_sco_hid_only_busy(btcoexist, in halbtc8723b1ant_action_wifi_connected()
2109 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in halbtc8723b1ant_action_wifi_connected()
2111 halbtc8723b1ant_set_ant_path(btcoexist, in halbtc8723b1ant_action_wifi_connected()
2114 halbtc8723b1ant_coex_table_with_type(btcoexist, in halbtc8723b1ant_action_wifi_connected()
2120 btcoexist, in halbtc8723b1ant_action_wifi_connected()
2126 btc8723b1ant_act_bt_sco_hid_only_busy(btcoexist, in halbtc8723b1ant_action_wifi_connected()
2129 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, in halbtc8723b1ant_action_wifi_connected()
2131 halbtc8723b1ant_set_ant_path(btcoexist, in halbtc8723b1ant_action_wifi_connected()
2134 halbtc8723b1ant_coex_table_with_type(btcoexist, in halbtc8723b1ant_action_wifi_connected()
2140 static void halbtc8723b1ant_run_coexist_mechanism(struct btc_coexist *btcoexist) in halbtc8723b1ant_run_coexist_mechanism() argument
2142 struct rtl_priv *rtlpriv = btcoexist->adapter; in halbtc8723b1ant_run_coexist_mechanism()
2143 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in halbtc8723b1ant_run_coexist_mechanism()
2157 if (btcoexist->manual_control) { in halbtc8723b1ant_run_coexist_mechanism()
2163 if (btcoexist->stop_coex_dm) { in halbtc8723b1ant_run_coexist_mechanism()
2178 halbtc8723b1ant_action_bt_whck_test(btcoexist); in halbtc8723b1ant_run_coexist_mechanism()
2187 btcoexist->btc_set(btcoexist, BTC_SET_BL_INC_SCAN_DEV_NUM, in halbtc8723b1ant_run_coexist_mechanism()
2189 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in halbtc8723b1ant_run_coexist_mechanism()
2191 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in halbtc8723b1ant_run_coexist_mechanism()
2193 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_LINK_STATUS, in halbtc8723b1ant_run_coexist_mechanism()
2200 halbtc8723b1ant_limited_tx(btcoexist, NORMAL_EXEC, 1, 1, in halbtc8723b1ant_run_coexist_mechanism()
2204 halbtc8723b1ant_limited_tx(btcoexist, NORMAL_EXEC, 0, 0, in halbtc8723b1ant_run_coexist_mechanism()
2208 btcoexist->btc_set(btcoexist, BTC_SET_BL_MIRACAST_PLUS_BT, in halbtc8723b1ant_run_coexist_mechanism()
2210 halbtc8723b1ant_limited_rx(btcoexist, NORMAL_EXEC, false, in halbtc8723b1ant_run_coexist_mechanism()
2215 halbtc8723b1ant_action_bt_inquiry(btcoexist); in halbtc8723b1ant_run_coexist_mechanism()
2217 halbtc8723b1ant_action_wifi_multiport(btcoexist); in halbtc8723b1ant_run_coexist_mechanism()
2223 btcoexist->btc_set(btcoexist, BTC_SET_BL_MIRACAST_PLUS_BT, in halbtc8723b1ant_run_coexist_mechanism()
2225 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in halbtc8723b1ant_run_coexist_mechanism()
2228 halbtc8723b1ant_limited_tx(btcoexist, NORMAL_EXEC, 1, 1, 0, 1); in halbtc8723b1ant_run_coexist_mechanism()
2230 btcoexist->btc_get(btcoexist, BTC_GET_U1_IOT_PEER, &iot_peer); in halbtc8723b1ant_run_coexist_mechanism()
2236 halbtc8723b1ant_limited_rx(btcoexist, in halbtc8723b1ant_run_coexist_mechanism()
2241 halbtc8723b1ant_limited_rx(btcoexist, in halbtc8723b1ant_run_coexist_mechanism()
2247 btcoexist, NORMAL_EXEC, false, in halbtc8723b1ant_run_coexist_mechanism()
2251 btcoexist, NORMAL_EXEC, false, in halbtc8723b1ant_run_coexist_mechanism()
2256 halbtc8723b1ant_sw_mechanism(btcoexist, true); in halbtc8723b1ant_run_coexist_mechanism()
2258 halbtc8723b1ant_limited_tx(btcoexist, NORMAL_EXEC, 0, 0, 0, 0); in halbtc8723b1ant_run_coexist_mechanism()
2260 halbtc8723b1ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, in halbtc8723b1ant_run_coexist_mechanism()
2263 halbtc8723b1ant_sw_mechanism(btcoexist, false); in halbtc8723b1ant_run_coexist_mechanism()
2265 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in halbtc8723b1ant_run_coexist_mechanism()
2268 halbtc8723b1ant_action_bt_inquiry(btcoexist); in halbtc8723b1ant_run_coexist_mechanism()
2271 halbtc8723b1ant_action_hs(btcoexist); in halbtc8723b1ant_run_coexist_mechanism()
2281 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_SCAN, &scan); in halbtc8723b1ant_run_coexist_mechanism()
2282 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_LINK, &link); in halbtc8723b1ant_run_coexist_mechanism()
2283 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_ROAM, &roam); in halbtc8723b1ant_run_coexist_mechanism()
2288 btcoexist); in halbtc8723b1ant_run_coexist_mechanism()
2291 btcoexist); in halbtc8723b1ant_run_coexist_mechanism()
2293 btc8723b1ant_action_wifi_not_conn(btcoexist); in halbtc8723b1ant_run_coexist_mechanism()
2296 halbtc8723b1ant_action_wifi_connected(btcoexist); in halbtc8723b1ant_run_coexist_mechanism()
2301 static void halbtc8723b1ant_init_coex_dm(struct btc_coexist *btcoexist) in halbtc8723b1ant_init_coex_dm() argument
2304 halbtc8723b1ant_sw_mechanism(btcoexist, false); in halbtc8723b1ant_init_coex_dm()
2309 static void halbtc8723b1ant_init_hw_config(struct btc_coexist *btcoexist, in halbtc8723b1ant_init_hw_config() argument
2312 struct rtl_priv *rtlpriv = btcoexist->adapter; in halbtc8723b1ant_init_hw_config()
2321 (btcoexist->btc_read_1byte(btcoexist, 0xf1) & 0xf0) >> 4; in halbtc8723b1ant_init_hw_config()
2323 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x550, 0x8, 0x1); in halbtc8723b1ant_init_hw_config()
2326 btcoexist->btc_write_1byte(btcoexist, 0x790, 0x5); in halbtc8723b1ant_init_hw_config()
2329 btcoexist->btc_write_1byte(btcoexist, 0x778, 0x1); in halbtc8723b1ant_init_hw_config()
2330 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x40, 0x20, 0x1); in halbtc8723b1ant_init_hw_config()
2332 halbtc8723b1ant_ps_tdma(btcoexist, FORCE_EXEC, false, 8); in halbtc8723b1ant_init_hw_config()
2336 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_WIFI, in halbtc8723b1ant_init_hw_config()
2339 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_BT, in halbtc8723b1ant_init_hw_config()
2343 halbtc8723b1ant_coex_table_with_type(btcoexist, FORCE_EXEC, 0); in halbtc8723b1ant_init_hw_config()
2345 u32tmp = btcoexist->btc_read_4byte(btcoexist, 0x948); in halbtc8723b1ant_init_hw_config()
2346 u8tmpa = btcoexist->btc_read_1byte(btcoexist, 0x765); in halbtc8723b1ant_init_hw_config()
2347 u8tmpb = btcoexist->btc_read_1byte(btcoexist, 0x67); in halbtc8723b1ant_init_hw_config()
2357 void ex_btc8723b1ant_power_on_setting(struct btc_coexist *btcoexist) in ex_btc8723b1ant_power_on_setting() argument
2359 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b1ant_power_on_setting()
2360 struct btc_board_info *board_info = &btcoexist->board_info; in ex_btc8723b1ant_power_on_setting()
2368 btcoexist->stop_coex_dm = true; in ex_btc8723b1ant_power_on_setting()
2370 btcoexist->btc_write_1byte(btcoexist, 0x67, 0x20); in ex_btc8723b1ant_power_on_setting()
2373 u16tmp = btcoexist->btc_read_2byte(btcoexist, 0x2); in ex_btc8723b1ant_power_on_setting()
2374 btcoexist->btc_write_2byte(btcoexist, 0x2, u16tmp | BIT0 | BIT1); in ex_btc8723b1ant_power_on_setting()
2377 btcoexist->btc_write_1byte(btcoexist, 0x765, 0x18); in ex_btc8723b1ant_power_on_setting()
2379 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0x4); in ex_btc8723b1ant_power_on_setting()
2391 if (btcoexist->chip_interface == BTC_INTF_USB) { in ex_btc8723b1ant_power_on_setting()
2393 btcoexist->btc_write_4byte(btcoexist, 0x948, 0x0); in ex_btc8723b1ant_power_on_setting()
2396 btcoexist->btc_write_local_reg_1byte(btcoexist, 0xfe08, u8tmp); in ex_btc8723b1ant_power_on_setting()
2403 btcoexist->btc_write_4byte(btcoexist, 0x948, 0x280); in ex_btc8723b1ant_power_on_setting()
2408 btcoexist->btc_write_4byte(btcoexist, 0x948, 0x0); in ex_btc8723b1ant_power_on_setting()
2414 btcoexist->btc_set(btcoexist, BTC_SET_ACT_ANTPOSREGRISTRY_CTRL, in ex_btc8723b1ant_power_on_setting()
2417 if (btcoexist->chip_interface == BTC_INTF_PCI) in ex_btc8723b1ant_power_on_setting()
2418 btcoexist->btc_write_local_reg_1byte(btcoexist, 0x384, in ex_btc8723b1ant_power_on_setting()
2420 else if (btcoexist->chip_interface == BTC_INTF_SDIO) in ex_btc8723b1ant_power_on_setting()
2421 btcoexist->btc_write_local_reg_1byte(btcoexist, 0x60, in ex_btc8723b1ant_power_on_setting()
2427 void ex_btc8723b1ant_init_hwconfig(struct btc_coexist *btcoexist, in ex_btc8723b1ant_init_hwconfig() argument
2430 halbtc8723b1ant_init_hw_config(btcoexist, true, wifi_only); in ex_btc8723b1ant_init_hwconfig()
2431 btcoexist->stop_coex_dm = false; in ex_btc8723b1ant_init_hwconfig()
2434 void ex_btc8723b1ant_init_coex_dm(struct btc_coexist *btcoexist) in ex_btc8723b1ant_init_coex_dm() argument
2436 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b1ant_init_coex_dm()
2441 btcoexist->stop_coex_dm = false; in ex_btc8723b1ant_init_coex_dm()
2443 halbtc8723b1ant_init_coex_dm(btcoexist); in ex_btc8723b1ant_init_coex_dm()
2445 halbtc8723b1ant_query_bt_info(btcoexist); in ex_btc8723b1ant_init_coex_dm()
2448 void ex_btc8723b1ant_display_coex_info(struct btc_coexist *btcoexist, in ex_btc8723b1ant_display_coex_info() argument
2451 struct btc_board_info *board_info = &btcoexist->board_info; in ex_btc8723b1ant_display_coex_info()
2452 struct btc_stack_info *stack_info = &btcoexist->stack_info; in ex_btc8723b1ant_display_coex_info()
2453 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in ex_btc8723b1ant_display_coex_info()
2467 if (btcoexist->manual_control) { in ex_btc8723b1ant_display_coex_info()
2471 if (btcoexist->stop_coex_dm) { in ex_btc8723b1ant_display_coex_info()
2486 btcoexist->btc_get(btcoexist, BTC_GET_U4_BT_PATCH_VER, &bt_patch_ver); in ex_btc8723b1ant_display_coex_info()
2487 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_FW_VER, &fw_ver); in ex_btc8723b1ant_display_coex_info()
2493 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in ex_btc8723b1ant_display_coex_info()
2494 btcoexist->btc_get(btcoexist, BTC_GET_U1_WIFI_DOT11_CHNL, in ex_btc8723b1ant_display_coex_info()
2496 btcoexist->btc_get(btcoexist, BTC_GET_U1_WIFI_HS_CHNL, &wifi_hs_chnl); in ex_btc8723b1ant_display_coex_info()
2505 btcoexist->btc_get(btcoexist, BTC_GET_S4_WIFI_RSSI, &wifi_rssi); in ex_btc8723b1ant_display_coex_info()
2506 btcoexist->btc_get(btcoexist, BTC_GET_S4_HS_RSSI, &bt_hs_rssi); in ex_btc8723b1ant_display_coex_info()
2510 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_SCAN, &scan); in ex_btc8723b1ant_display_coex_info()
2511 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_LINK, &link); in ex_btc8723b1ant_display_coex_info()
2512 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_ROAM, &roam); in ex_btc8723b1ant_display_coex_info()
2516 btcoexist->btc_get(btcoexist , BTC_GET_BL_WIFI_UNDER_5G, in ex_btc8723b1ant_display_coex_info()
2518 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in ex_btc8723b1ant_display_coex_info()
2519 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in ex_btc8723b1ant_display_coex_info()
2520 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_TRAFFIC_DIRECTION, in ex_btc8723b1ant_display_coex_info()
2531 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_LINK_STATUS, in ex_btc8723b1ant_display_coex_info()
2557 btcoexist->btc_disp_dbg_msg(btcoexist, BTC_DBG_DISP_BT_LINK_INFO, m); in ex_btc8723b1ant_display_coex_info()
2576 btcoexist->bt_info.lps_val, in ex_btc8723b1ant_display_coex_info()
2577 btcoexist->bt_info.rpwm_val); in ex_btc8723b1ant_display_coex_info()
2578 btcoexist->btc_disp_dbg_msg(btcoexist, BTC_DBG_DISP_FW_PWR_MODE_CMD, m); in ex_btc8723b1ant_display_coex_info()
2580 if (!btcoexist->manual_control) { in ex_btc8723b1ant_display_coex_info()
2590 (btcoexist->bt_info.reject_agg_pkt ? "Yes" : "No"), in ex_btc8723b1ant_display_coex_info()
2591 (btcoexist->bt_info.bt_ctrl_buf_size ? "Yes" : "No"), in ex_btc8723b1ant_display_coex_info()
2592 btcoexist->bt_info.agg_buf_size); in ex_btc8723b1ant_display_coex_info()
2595 "Rate Mask", btcoexist->bt_info.ra_mask); in ex_btc8723b1ant_display_coex_info()
2626 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x430); in ex_btc8723b1ant_display_coex_info()
2627 u32tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0x434); in ex_btc8723b1ant_display_coex_info()
2628 u16tmp[0] = btcoexist->btc_read_2byte(btcoexist, 0x42a); in ex_btc8723b1ant_display_coex_info()
2629 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x456); in ex_btc8723b1ant_display_coex_info()
2634 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x778); in ex_btc8723b1ant_display_coex_info()
2635 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x6cc); in ex_btc8723b1ant_display_coex_info()
2636 u32tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0x880); in ex_btc8723b1ant_display_coex_info()
2641 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x948); in ex_btc8723b1ant_display_coex_info()
2642 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x67); in ex_btc8723b1ant_display_coex_info()
2643 u8tmp[1] = btcoexist->btc_read_1byte(btcoexist, 0x765); in ex_btc8723b1ant_display_coex_info()
2648 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x92c); in ex_btc8723b1ant_display_coex_info()
2649 u32tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0x930); in ex_btc8723b1ant_display_coex_info()
2650 u32tmp[2] = btcoexist->btc_read_4byte(btcoexist, 0x944); in ex_btc8723b1ant_display_coex_info()
2655 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x39); in ex_btc8723b1ant_display_coex_info()
2656 u8tmp[1] = btcoexist->btc_read_1byte(btcoexist, 0x40); in ex_btc8723b1ant_display_coex_info()
2657 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x4c); in ex_btc8723b1ant_display_coex_info()
2658 u8tmp[2] = btcoexist->btc_read_1byte(btcoexist, 0x64); in ex_btc8723b1ant_display_coex_info()
2664 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x550); in ex_btc8723b1ant_display_coex_info()
2665 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x522); in ex_btc8723b1ant_display_coex_info()
2669 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0xc50); in ex_btc8723b1ant_display_coex_info()
2670 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x49c); in ex_btc8723b1ant_display_coex_info()
2674 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0xda0); in ex_btc8723b1ant_display_coex_info()
2675 u32tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0xda4); in ex_btc8723b1ant_display_coex_info()
2676 u32tmp[2] = btcoexist->btc_read_4byte(btcoexist, 0xda8); in ex_btc8723b1ant_display_coex_info()
2677 u32tmp[3] = btcoexist->btc_read_4byte(btcoexist, 0xcf0); in ex_btc8723b1ant_display_coex_info()
2679 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0xa5b); in ex_btc8723b1ant_display_coex_info()
2680 u8tmp[1] = btcoexist->btc_read_1byte(btcoexist, 0xa5c); in ex_btc8723b1ant_display_coex_info()
2694 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x6c0); in ex_btc8723b1ant_display_coex_info()
2695 u32tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0x6c4); in ex_btc8723b1ant_display_coex_info()
2696 u32tmp[2] = btcoexist->btc_read_4byte(btcoexist, 0x6c8); in ex_btc8723b1ant_display_coex_info()
2707 if (btcoexist->auto_report_1ant) in ex_btc8723b1ant_display_coex_info()
2708 halbtc8723b1ant_monitor_bt_ctr(btcoexist); in ex_btc8723b1ant_display_coex_info()
2709 btcoexist->btc_disp_dbg_msg(btcoexist, BTC_DBG_DISP_COEX_STATISTICS, m); in ex_btc8723b1ant_display_coex_info()
2712 void ex_btc8723b1ant_ips_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8723b1ant_ips_notify() argument
2714 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b1ant_ips_notify()
2716 if (btcoexist->manual_control || btcoexist->stop_coex_dm) in ex_btc8723b1ant_ips_notify()
2724 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_BT, in ex_btc8723b1ant_ips_notify()
2727 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 0); in ex_btc8723b1ant_ips_notify()
2728 halbtc8723b1ant_coex_table_with_type(btcoexist, in ex_btc8723b1ant_ips_notify()
2735 halbtc8723b1ant_init_hw_config(btcoexist, false, false); in ex_btc8723b1ant_ips_notify()
2736 halbtc8723b1ant_init_coex_dm(btcoexist); in ex_btc8723b1ant_ips_notify()
2737 halbtc8723b1ant_query_bt_info(btcoexist); in ex_btc8723b1ant_ips_notify()
2741 void ex_btc8723b1ant_lps_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8723b1ant_lps_notify() argument
2743 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b1ant_lps_notify()
2745 if (btcoexist->manual_control || btcoexist->stop_coex_dm) in ex_btc8723b1ant_lps_notify()
2759 void ex_btc8723b1ant_scan_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8723b1ant_scan_notify() argument
2761 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b1ant_scan_notify()
2770 if (btcoexist->manual_control || btcoexist->stop_coex_dm) in ex_btc8723b1ant_scan_notify()
2778 halbtc8723b1ant_ps_tdma(btcoexist, FORCE_EXEC, false, 8); in ex_btc8723b1ant_scan_notify()
2779 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, in ex_btc8723b1ant_scan_notify()
2781 u32tmp = btcoexist->btc_read_4byte(btcoexist, 0x948); in ex_btc8723b1ant_scan_notify()
2782 u8tmpa = btcoexist->btc_read_1byte(btcoexist, 0x765); in ex_btc8723b1ant_scan_notify()
2783 u8tmpb = btcoexist->btc_read_1byte(btcoexist, 0x67); in ex_btc8723b1ant_scan_notify()
2793 btcoexist->btc_get(btcoexist, BTC_GET_U1_AP_NUM, in ex_btc8723b1ant_scan_notify()
2800 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in ex_btc8723b1ant_scan_notify()
2801 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in ex_btc8723b1ant_scan_notify()
2804 halbtc8723b1ant_query_bt_info(btcoexist); in ex_btc8723b1ant_scan_notify()
2806 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_LINK_STATUS, in ex_btc8723b1ant_scan_notify()
2810 halbtc8723b1ant_limited_tx(btcoexist, NORMAL_EXEC, 0, 0, 0, 0); in ex_btc8723b1ant_scan_notify()
2811 halbtc8723b1ant_limited_rx(btcoexist, NORMAL_EXEC, false, in ex_btc8723b1ant_scan_notify()
2813 halbtc8723b1ant_action_wifi_multiport(btcoexist); in ex_btc8723b1ant_scan_notify()
2818 halbtc8723b1ant_action_bt_inquiry(btcoexist); in ex_btc8723b1ant_scan_notify()
2821 halbtc8723b1ant_action_hs(btcoexist); in ex_btc8723b1ant_scan_notify()
2830 btc8723b1ant_action_wifi_not_conn_scan(btcoexist); in ex_btc8723b1ant_scan_notify()
2833 btc8723b1ant_action_wifi_conn_scan(btcoexist); in ex_btc8723b1ant_scan_notify()
2839 btc8723b1ant_action_wifi_not_conn(btcoexist); in ex_btc8723b1ant_scan_notify()
2841 halbtc8723b1ant_action_wifi_connected(btcoexist); in ex_btc8723b1ant_scan_notify()
2845 void ex_btc8723b1ant_connect_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8723b1ant_connect_notify() argument
2847 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b1ant_connect_notify()
2854 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_4_WAY_PROGRESS, in ex_btc8723b1ant_connect_notify()
2857 if (btcoexist->manual_control || btcoexist->stop_coex_dm || in ex_btc8723b1ant_connect_notify()
2865 halbtc8723b1ant_ps_tdma(btcoexist, FORCE_EXEC, false, 8); in ex_btc8723b1ant_connect_notify()
2866 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, in ex_btc8723b1ant_connect_notify()
2877 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_LINK_STATUS, in ex_btc8723b1ant_connect_notify()
2881 halbtc8723b1ant_limited_tx(btcoexist, NORMAL_EXEC, 0, 0, 0, 0); in ex_btc8723b1ant_connect_notify()
2882 halbtc8723b1ant_limited_rx(btcoexist, NORMAL_EXEC, false, in ex_btc8723b1ant_connect_notify()
2884 halbtc8723b1ant_action_wifi_multiport(btcoexist); in ex_btc8723b1ant_connect_notify()
2888 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in ex_btc8723b1ant_connect_notify()
2890 halbtc8723b1ant_action_bt_inquiry(btcoexist); in ex_btc8723b1ant_connect_notify()
2893 halbtc8723b1ant_action_hs(btcoexist); in ex_btc8723b1ant_connect_notify()
2900 btc8723b1ant_act_wifi_not_conn_asso_auth(btcoexist); in ex_btc8723b1ant_connect_notify()
2905 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in ex_btc8723b1ant_connect_notify()
2909 btc8723b1ant_action_wifi_not_conn(btcoexist); in ex_btc8723b1ant_connect_notify()
2911 halbtc8723b1ant_action_wifi_connected(btcoexist); in ex_btc8723b1ant_connect_notify()
2915 void ex_btc8723b1ant_media_status_notify(struct btc_coexist *btcoexist, in ex_btc8723b1ant_media_status_notify() argument
2918 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b1ant_media_status_notify()
2924 if (btcoexist->manual_control || btcoexist->stop_coex_dm || in ex_btc8723b1ant_media_status_notify()
2932 halbtc8723b1ant_ps_tdma(btcoexist, FORCE_EXEC, false, 8); in ex_btc8723b1ant_media_status_notify()
2933 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, in ex_btc8723b1ant_media_status_notify()
2935 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_UNDER_B_MODE, in ex_btc8723b1ant_media_status_notify()
2940 btcoexist->btc_write_1byte(btcoexist, 0x6cd, in ex_btc8723b1ant_media_status_notify()
2942 btcoexist->btc_write_1byte(btcoexist, 0x6cf, in ex_btc8723b1ant_media_status_notify()
2945 btcoexist->btc_write_1byte(btcoexist, 0x6cd, in ex_btc8723b1ant_media_status_notify()
2947 btcoexist->btc_write_1byte(btcoexist, 0x6cf, in ex_btc8723b1ant_media_status_notify()
2952 btcoexist->btc_read_4byte(btcoexist, 0x430); in ex_btc8723b1ant_media_status_notify()
2954 btcoexist->btc_read_4byte(btcoexist, 0x434); in ex_btc8723b1ant_media_status_notify()
2956 btcoexist->btc_read_2byte(btcoexist, 0x42a); in ex_btc8723b1ant_media_status_notify()
2958 btcoexist->btc_read_1byte(btcoexist, 0x456); in ex_btc8723b1ant_media_status_notify()
2964 btcoexist->btc_write_1byte(btcoexist, 0x6cd, 0x0); /* CCK Tx */ in ex_btc8723b1ant_media_status_notify()
2965 btcoexist->btc_write_1byte(btcoexist, 0x6cf, 0x0); /* CCK Rx */ in ex_btc8723b1ant_media_status_notify()
2971 btcoexist->btc_get(btcoexist, BTC_GET_U1_WIFI_CENTRAL_CHNL, in ex_btc8723b1ant_media_status_notify()
2977 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in ex_btc8723b1ant_media_status_notify()
2993 btcoexist->btc_fill_h2c(btcoexist, 0x66, 3, h2c_parameter); in ex_btc8723b1ant_media_status_notify()
2996 void ex_btc8723b1ant_special_packet_notify(struct btc_coexist *btcoexist, in ex_btc8723b1ant_special_packet_notify() argument
2999 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b1ant_special_packet_notify()
3006 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_4_WAY_PROGRESS, in ex_btc8723b1ant_special_packet_notify()
3009 if (btcoexist->manual_control || btcoexist->stop_coex_dm || in ex_btc8723b1ant_special_packet_notify()
3043 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_LINK_STATUS, in ex_btc8723b1ant_special_packet_notify()
3047 halbtc8723b1ant_limited_tx(btcoexist, NORMAL_EXEC, 0, 0, 0, 0); in ex_btc8723b1ant_special_packet_notify()
3048 halbtc8723b1ant_limited_rx(btcoexist, NORMAL_EXEC, false, in ex_btc8723b1ant_special_packet_notify()
3050 halbtc8723b1ant_action_wifi_multiport(btcoexist); in ex_btc8723b1ant_special_packet_notify()
3056 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in ex_btc8723b1ant_special_packet_notify()
3058 halbtc8723b1ant_action_bt_inquiry(btcoexist); in ex_btc8723b1ant_special_packet_notify()
3061 halbtc8723b1ant_action_hs(btcoexist); in ex_btc8723b1ant_special_packet_notify()
3069 halbtc8723b1ant_action_wifi_connected_special_packet(btcoexist); in ex_btc8723b1ant_special_packet_notify()
3073 void ex_btc8723b1ant_bt_info_notify(struct btc_coexist *btcoexist, in ex_btc8723b1ant_bt_info_notify() argument
3076 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b1ant_bt_info_notify()
3137 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_TX_RX_MASK, in ex_btc8723b1ant_bt_info_notify()
3146 btcoexist->btc_set_bt_reg(btcoexist, BTC_BT_REG_RF, in ex_btc8723b1ant_bt_info_notify()
3150 btcoexist->btc_set_bt_reg(btcoexist, BTC_BT_REG_RF, in ex_btc8723b1ant_bt_info_notify()
3152 btcoexist->btc_set_bt_reg(btcoexist, BTC_BT_REG_RF, in ex_btc8723b1ant_bt_info_notify()
3162 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in ex_btc8723b1ant_bt_info_notify()
3165 ex_btc8723b1ant_media_status_notify(btcoexist, in ex_btc8723b1ant_bt_info_notify()
3168 ex_btc8723b1ant_media_status_notify(btcoexist, in ex_btc8723b1ant_bt_info_notify()
3173 if (!btcoexist->manual_control && in ex_btc8723b1ant_bt_info_notify()
3174 !btcoexist->stop_coex_dm) { in ex_btc8723b1ant_bt_info_notify()
3177 halbtc8723b1ant_ignore_wlan_act(btcoexist, in ex_btc8723b1ant_bt_info_notify()
3184 if (!btcoexist->auto_report_1ant) { in ex_btc8723b1ant_bt_info_notify()
3188 halbtc8723b1ant_bt_auto_report(btcoexist, in ex_btc8723b1ant_bt_info_notify()
3273 halbtc8723b1ant_update_bt_link_info(btcoexist); in ex_btc8723b1ant_bt_info_notify()
3313 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_TRAFFIC_BUSY, &bt_busy); in ex_btc8723b1ant_bt_info_notify()
3315 halbtc8723b1ant_run_coexist_mechanism(btcoexist); in ex_btc8723b1ant_bt_info_notify()
3318 void ex_btc8723b1ant_rf_status_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8723b1ant_rf_status_notify() argument
3320 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b1ant_rf_status_notify()
3330 btcoexist->stop_coex_dm = false; in ex_btc8723b1ant_rf_status_notify()
3335 halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in ex_btc8723b1ant_rf_status_notify()
3337 halbtc8723b1ant_ps_tdma(btcoexist, FORCE_EXEC, false, 0); in ex_btc8723b1ant_rf_status_notify()
3338 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_BT, in ex_btc8723b1ant_rf_status_notify()
3341 halbtc8723b1ant_ignore_wlan_act(btcoexist, FORCE_EXEC, true); in ex_btc8723b1ant_rf_status_notify()
3342 btcoexist->stop_coex_dm = true; in ex_btc8723b1ant_rf_status_notify()
3344 u32tmp = btcoexist->btc_read_4byte(btcoexist, 0x948); in ex_btc8723b1ant_rf_status_notify()
3345 u8tmpa = btcoexist->btc_read_1byte(btcoexist, 0x765); in ex_btc8723b1ant_rf_status_notify()
3346 u8tmpb = btcoexist->btc_read_1byte(btcoexist, 0x67); in ex_btc8723b1ant_rf_status_notify()
3347 u8tmpc = btcoexist->btc_read_1byte(btcoexist, 0x76e); in ex_btc8723b1ant_rf_status_notify()
3355 void ex_btc8723b1ant_halt_notify(struct btc_coexist *btcoexist) in ex_btc8723b1ant_halt_notify() argument
3357 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b1ant_halt_notify()
3361 btcoexist->stop_coex_dm = true; in ex_btc8723b1ant_halt_notify()
3363 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_BT, FORCE_EXEC, in ex_btc8723b1ant_halt_notify()
3366 halbtc8723b1ant_ignore_wlan_act(btcoexist, FORCE_EXEC, true); in ex_btc8723b1ant_halt_notify()
3368 halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in ex_btc8723b1ant_halt_notify()
3370 halbtc8723b1ant_ps_tdma(btcoexist, FORCE_EXEC, false, 0); in ex_btc8723b1ant_halt_notify()
3372 ex_btc8723b1ant_media_status_notify(btcoexist, BTC_MEDIA_DISCONNECT); in ex_btc8723b1ant_halt_notify()
3374 btcoexist->stop_coex_dm = true; in ex_btc8723b1ant_halt_notify()
3377 void ex_btc8723b1ant_pnp_notify(struct btc_coexist *btcoexist, u8 pnp_state) in ex_btc8723b1ant_pnp_notify() argument
3379 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b1ant_pnp_notify()
3386 halbtc8723b1ant_set_ant_path(btcoexist, BTC_ANT_PATH_BT, in ex_btc8723b1ant_pnp_notify()
3388 halbtc8723b1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in ex_btc8723b1ant_pnp_notify()
3390 halbtc8723b1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 0); in ex_btc8723b1ant_pnp_notify()
3391 halbtc8723b1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 2); in ex_btc8723b1ant_pnp_notify()
3401 btcoexist->stop_coex_dm = true; in ex_btc8723b1ant_pnp_notify()
3405 btcoexist->stop_coex_dm = false; in ex_btc8723b1ant_pnp_notify()
3406 halbtc8723b1ant_init_hw_config(btcoexist, false, false); in ex_btc8723b1ant_pnp_notify()
3407 halbtc8723b1ant_init_coex_dm(btcoexist); in ex_btc8723b1ant_pnp_notify()
3408 halbtc8723b1ant_query_bt_info(btcoexist); in ex_btc8723b1ant_pnp_notify()
3412 void ex_btc8723b1ant_coex_dm_reset(struct btc_coexist *btcoexist) in ex_btc8723b1ant_coex_dm_reset() argument
3414 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b1ant_coex_dm_reset()
3419 halbtc8723b1ant_init_hw_config(btcoexist, false, false); in ex_btc8723b1ant_coex_dm_reset()
3420 halbtc8723b1ant_init_coex_dm(btcoexist); in ex_btc8723b1ant_coex_dm_reset()
3423 void ex_btc8723b1ant_periodical(struct btc_coexist *btcoexist) in ex_btc8723b1ant_periodical() argument
3425 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b1ant_periodical()
3426 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in ex_btc8723b1ant_periodical()
3431 if (!btcoexist->auto_report_1ant) { in ex_btc8723b1ant_periodical()
3432 halbtc8723b1ant_query_bt_info(btcoexist); in ex_btc8723b1ant_periodical()
3433 halbtc8723b1ant_monitor_bt_enable_disable(btcoexist); in ex_btc8723b1ant_periodical()
3435 halbtc8723b1ant_monitor_bt_ctr(btcoexist); in ex_btc8723b1ant_periodical()
3436 halbtc8723b1ant_monitor_wifi_ctr(btcoexist); in ex_btc8723b1ant_periodical()
3442 if (btc8723b1ant_is_wifi_status_changed(btcoexist) || in ex_btc8723b1ant_periodical()
3444 halbtc8723b1ant_run_coexist_mechanism(btcoexist); in ex_btc8723b1ant_periodical()