Lines Matching refs:btcoexist

159 static u8 btc8723b2ant_wifi_rssi_state(struct btc_coexist *btcoexist,  in btc8723b2ant_wifi_rssi_state()  argument
166 btcoexist->btc_get(btcoexist, BTC_GET_S4_WIFI_RSSI, &wifi_rssi); in btc8723b2ant_wifi_rssi_state()
273 static void btc8723b2ant_monitor_bt_ctr(struct btc_coexist *btcoexist) in btc8723b2ant_monitor_bt_ctr() argument
282 u32tmp = btcoexist->btc_read_4byte(btcoexist, reg_hp_txrx); in btc8723b2ant_monitor_bt_ctr()
286 u32tmp = btcoexist->btc_read_4byte(btcoexist, reg_lp_txrx); in btc8723b2ant_monitor_bt_ctr()
303 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0xc); in btc8723b2ant_monitor_bt_ctr()
306 static void btc8723b2ant_query_bt_info(struct btc_coexist *btcoexist) in btc8723b2ant_query_bt_info() argument
318 btcoexist->btc_fill_h2c(btcoexist, 0x61, 1, h2c_parameter); in btc8723b2ant_query_bt_info()
321 static bool btc8723b2ant_is_wifi_status_changed(struct btc_coexist *btcoexist) in btc8723b2ant_is_wifi_status_changed() argument
329 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in btc8723b2ant_is_wifi_status_changed()
331 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in btc8723b2ant_is_wifi_status_changed()
332 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in btc8723b2ant_is_wifi_status_changed()
333 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_4_WAY_PROGRESS, in btc8723b2ant_is_wifi_status_changed()
356 static void btc8723b2ant_update_bt_link_info(struct btc_coexist *btcoexist) in btc8723b2ant_update_bt_link_info() argument
359 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8723b2ant_update_bt_link_info()
363 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in btc8723b2ant_update_bt_link_info()
420 static u8 btc8723b2ant_action_algorithm(struct btc_coexist *btcoexist) in btc8723b2ant_action_algorithm() argument
422 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8723b2ant_action_algorithm()
427 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in btc8723b2ant_action_algorithm()
607 static bool btc8723b_need_dec_pwr(struct btc_coexist *btcoexist) in btc8723b_need_dec_pwr() argument
614 if (!btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on)) in btc8723b_need_dec_pwr()
616 if (!btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in btc8723b_need_dec_pwr()
619 if (!btcoexist->btc_get(btcoexist, BTC_GET_S4_HS_RSSI, &bt_hs_rssi)) in btc8723b_need_dec_pwr()
646 static void btc8723b2ant_set_fw_dac_swing_level(struct btc_coexist *btcoexist, in btc8723b2ant_set_fw_dac_swing_level() argument
661 btcoexist->btc_fill_h2c(btcoexist, 0x64, 1, h2c_parameter); in btc8723b2ant_set_fw_dac_swing_level()
664 static void btc8723b2ant_set_fw_dec_bt_pwr(struct btc_coexist *btcoexist, in btc8723b2ant_set_fw_dec_bt_pwr() argument
678 btcoexist->btc_fill_h2c(btcoexist, 0x62, 1, h2c_parameter); in btc8723b2ant_set_fw_dec_bt_pwr()
681 static void btc8723b2ant_dec_bt_pwr(struct btc_coexist *btcoexist, in btc8723b2ant_dec_bt_pwr() argument
697 btc8723b2ant_set_fw_dec_bt_pwr(btcoexist, coex_dm->cur_dec_bt_pwr); in btc8723b2ant_dec_bt_pwr()
702 static void btc8723b2ant_fw_dac_swing_lvl(struct btc_coexist *btcoexist, in btc8723b2ant_fw_dac_swing_lvl() argument
722 btc8723b2ant_set_fw_dac_swing_level(btcoexist, in btc8723b2ant_fw_dac_swing_lvl()
727 static void btc8723b2ant_set_sw_rf_rx_lpf_corner(struct btc_coexist *btcoexist, in btc8723b2ant_set_sw_rf_rx_lpf_corner() argument
734 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1e, in btc8723b2ant_set_sw_rf_rx_lpf_corner()
739 if (btcoexist->initilized) { in btc8723b2ant_set_sw_rf_rx_lpf_corner()
742 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1e, in btc8723b2ant_set_sw_rf_rx_lpf_corner()
749 static void btc8723b2ant_rf_shrink(struct btc_coexist *btcoexist, in btc8723b2ant_rf_shrink() argument
769 btc8723b2ant_set_sw_rf_rx_lpf_corner(btcoexist, in btc8723b2ant_rf_shrink()
775 static void btc8723b_set_penalty_txrate(struct btc_coexist *btcoexist, in btc8723b_set_penalty_txrate() argument
795 btcoexist->btc_fill_h2c(btcoexist, 0x69, 6, h2c_parameter); in btc8723b_set_penalty_txrate()
798 static void btc8723b2ant_low_penalty_ra(struct btc_coexist *btcoexist, in btc8723b2ant_low_penalty_ra() argument
818 btc8723b_set_penalty_txrate(btcoexist, coex_dm->cur_low_penalty_ra); in btc8723b2ant_low_penalty_ra()
823 static void btc8723b2ant_set_dac_swing_reg(struct btc_coexist *btcoexist, in btc8723b2ant_set_dac_swing_reg() argument
829 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x883, 0x3e, val); in btc8723b2ant_set_dac_swing_reg()
842 static void btc8723b2ant_dac_swing(struct btc_coexist *btcoexist, in btc8723b2ant_dac_swing() argument
866 btc8723b2ant_set_sw_fulltime_dac_swing(btcoexist, dac_swing_on, in btc8723b2ant_dac_swing()
873 static void btc8723b2ant_set_agc_table(struct btc_coexist *btcoexist, in btc8723b2ant_set_agc_table() argument
882 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0x6e1A0001); in btc8723b2ant_set_agc_table()
883 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0x6d1B0001); in btc8723b2ant_set_agc_table()
884 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0x6c1C0001); in btc8723b2ant_set_agc_table()
885 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0x6b1D0001); in btc8723b2ant_set_agc_table()
886 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0x6a1E0001); in btc8723b2ant_set_agc_table()
887 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0x691F0001); in btc8723b2ant_set_agc_table()
888 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0x68200001); in btc8723b2ant_set_agc_table()
892 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0xaa1A0001); in btc8723b2ant_set_agc_table()
893 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0xa91B0001); in btc8723b2ant_set_agc_table()
894 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0xa81C0001); in btc8723b2ant_set_agc_table()
895 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0xa71D0001); in btc8723b2ant_set_agc_table()
896 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0xa61E0001); in btc8723b2ant_set_agc_table()
897 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0xa51F0001); in btc8723b2ant_set_agc_table()
898 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0xa4200001); in btc8723b2ant_set_agc_table()
902 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0xef, 0xfffff, 0x02000); in btc8723b2ant_set_agc_table()
906 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x3b, in btc8723b2ant_set_agc_table()
908 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x3b, in btc8723b2ant_set_agc_table()
913 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x3b, in btc8723b2ant_set_agc_table()
915 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x3b, in btc8723b2ant_set_agc_table()
918 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0xef, 0xfffff, 0x0); in btc8723b2ant_set_agc_table()
920 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0xed, 0xfffff, 0x1); in btc8723b2ant_set_agc_table()
925 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x40, in btc8723b2ant_set_agc_table()
927 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x40, in btc8723b2ant_set_agc_table()
932 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x40, in btc8723b2ant_set_agc_table()
934 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x40, in btc8723b2ant_set_agc_table()
937 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0xed, 0xfffff, 0x0); in btc8723b2ant_set_agc_table()
942 btcoexist->btc_set(btcoexist, BTC_SET_U1_RSSI_ADJ_VAL_FOR_AGC_TABLE_ON, in btc8723b2ant_set_agc_table()
946 static void btc8723b2ant_agc_table(struct btc_coexist *btcoexist, in btc8723b2ant_agc_table() argument
963 btc8723b2ant_set_agc_table(btcoexist, agc_table_en); in btc8723b2ant_agc_table()
968 static void btc8723b2ant_set_coex_table(struct btc_coexist *btcoexist, in btc8723b2ant_set_coex_table() argument
974 btcoexist->btc_write_4byte(btcoexist, 0x6c0, val0x6c0); in btc8723b2ant_set_coex_table()
978 btcoexist->btc_write_4byte(btcoexist, 0x6c4, val0x6c4); in btc8723b2ant_set_coex_table()
982 btcoexist->btc_write_4byte(btcoexist, 0x6c8, val0x6c8); in btc8723b2ant_set_coex_table()
986 btcoexist->btc_write_1byte(btcoexist, 0x6cc, val0x6cc); in btc8723b2ant_set_coex_table()
989 static void btc8723b2ant_coex_table(struct btc_coexist *btcoexist, in btc8723b2ant_coex_table() argument
1024 btc8723b2ant_set_coex_table(btcoexist, val0x6c0, val0x6c4, in btc8723b2ant_coex_table()
1033 static void btc8723b_coex_tbl_type(struct btc_coexist *btcoexist, in btc8723b_coex_tbl_type() argument
1038 btc8723b2ant_coex_table(btcoexist, force_exec, 0x55555555, in btc8723b_coex_tbl_type()
1042 btc8723b2ant_coex_table(btcoexist, force_exec, 0x55555555, in btc8723b_coex_tbl_type()
1046 btc8723b2ant_coex_table(btcoexist, force_exec, 0x5a5a5a5a, in btc8723b_coex_tbl_type()
1050 btc8723b2ant_coex_table(btcoexist, force_exec, 0xaaaaaaaa, in btc8723b_coex_tbl_type()
1054 btc8723b2ant_coex_table(btcoexist, force_exec, 0xffffffff, in btc8723b_coex_tbl_type()
1058 btc8723b2ant_coex_table(btcoexist, force_exec, 0x5fff5fff, in btc8723b_coex_tbl_type()
1062 btc8723b2ant_coex_table(btcoexist, force_exec, 0x55ff55ff, in btc8723b_coex_tbl_type()
1066 btc8723b2ant_coex_table(btcoexist, force_exec, 0x55ff55ff, in btc8723b_coex_tbl_type()
1070 btc8723b2ant_coex_table(btcoexist, force_exec, 0x5aea5aea, in btc8723b_coex_tbl_type()
1074 btc8723b2ant_coex_table(btcoexist, force_exec, 0x55ff55ff, in btc8723b_coex_tbl_type()
1078 btc8723b2ant_coex_table(btcoexist, force_exec, 0x55ff55ff, in btc8723b_coex_tbl_type()
1082 btc8723b2ant_coex_table(btcoexist, force_exec, 0x55ff55ff, in btc8723b_coex_tbl_type()
1086 btc8723b2ant_coex_table(btcoexist, force_exec, 0x55ff55ff, in btc8723b_coex_tbl_type()
1094 static void btc8723b2ant_set_fw_ignore_wlan_act(struct btc_coexist *btcoexist, in btc8723b2ant_set_fw_ignore_wlan_act() argument
1106 btcoexist->btc_fill_h2c(btcoexist, 0x63, 1, h2c_parameter); in btc8723b2ant_set_fw_ignore_wlan_act()
1109 static void btc8723b2ant_ignore_wlan_act(struct btc_coexist *btcoexist, in btc8723b2ant_ignore_wlan_act() argument
1128 btc8723b2ant_set_fw_ignore_wlan_act(btcoexist, enable); in btc8723b2ant_ignore_wlan_act()
1133 static void btc8723b2ant_set_fw_ps_tdma(struct btc_coexist *btcoexist, u8 byte1, in btc8723b2ant_set_fw_ps_tdma() argument
1156 btcoexist->btc_fill_h2c(btcoexist, 0x60, 5, h2c_parameter); in btc8723b2ant_set_fw_ps_tdma()
1159 static void btc8723b2ant_sw_mechanism1(struct btc_coexist *btcoexist, in btc8723b2ant_sw_mechanism1() argument
1163 btc8723b2ant_rf_shrink(btcoexist, NORMAL_EXEC, shrink_rx_lpf); in btc8723b2ant_sw_mechanism1()
1164 btc8723b2ant_low_penalty_ra(btcoexist, NORMAL_EXEC, low_penalty_ra); in btc8723b2ant_sw_mechanism1()
1167 static void btc8723b2ant_sw_mechanism2(struct btc_coexist *btcoexist, in btc8723b2ant_sw_mechanism2() argument
1171 btc8723b2ant_agc_table(btcoexist, NORMAL_EXEC, agc_table_shift); in btc8723b2ant_sw_mechanism2()
1172 btc8723b2ant_dac_swing(btcoexist, NORMAL_EXEC, sw_dac_swing, in btc8723b2ant_sw_mechanism2()
1176 static void btc8723b2ant_set_ant_path(struct btc_coexist *btcoexist, in btc8723b2ant_set_ant_path() argument
1180 struct btc_board_info *board_info = &btcoexist->board_info; in btc8723b2ant_set_ant_path()
1186 btcoexist->btc_get(btcoexist, BTC_GET_BL_EXT_SWITCH, &pg_ext_switch); in btc8723b2ant_set_ant_path()
1187 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_FW_VER, &fw_ver); in btc8723b2ant_set_ant_path()
1194 u32tmp = btcoexist->btc_read_4byte(btcoexist, 0x4c); in btc8723b2ant_set_ant_path()
1197 btcoexist->btc_write_4byte(btcoexist, 0x4c, u32tmp); in btc8723b2ant_set_ant_path()
1199 btcoexist->btc_write_1byte(btcoexist, 0x974, 0xff); in btc8723b2ant_set_ant_path()
1200 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x944, 0x3, 0x3); in btc8723b2ant_set_ant_path()
1201 btcoexist->btc_write_1byte(btcoexist, 0x930, 0x77); in btc8723b2ant_set_ant_path()
1202 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x67, 0x20, 0x1); in btc8723b2ant_set_ant_path()
1205 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x765, 0x18, 0x0); in btc8723b2ant_set_ant_path()
1211 btcoexist->btc_fill_h2c(btcoexist, 0x65, 2, in btc8723b2ant_set_ant_path()
1213 btcoexist->btc_write_2byte(btcoexist, 0x948, 0x0); in btc8723b2ant_set_ant_path()
1218 btcoexist->btc_fill_h2c(btcoexist, 0x65, 2, in btc8723b2ant_set_ant_path()
1220 btcoexist->btc_write_2byte(btcoexist, 0x948, 0x280); in btc8723b2ant_set_ant_path()
1228 btcoexist->btc_write_2byte(btcoexist, 0x948, 0x0); in btc8723b2ant_set_ant_path()
1230 btcoexist->btc_write_2byte(btcoexist, 0x948, 0x280); in btc8723b2ant_set_ant_path()
1235 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x92c, in btc8723b2ant_set_ant_path()
1240 btcoexist->btc_write_1byte_bitmask(btcoexist, in btc8723b2ant_set_ant_path()
1246 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x92c, 0x3, 0x1); in btc8723b2ant_set_ant_path()
1250 btcoexist->btc_write_2byte(btcoexist, 0x948, 0x0); in btc8723b2ant_set_ant_path()
1254 btcoexist->btc_write_2byte(btcoexist, 0x948, 0x280); in btc8723b2ant_set_ant_path()
1260 static void btc8723b2ant_ps_tdma(struct btc_coexist *btcoexist, bool force_exec, in btc8723b2ant_ps_tdma() argument
1286 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1a, in btc8723b2ant_ps_tdma()
1290 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x12, in btc8723b2ant_ps_tdma()
1301 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x10, in btc8723b2ant_ps_tdma()
1305 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1a, in btc8723b2ant_ps_tdma()
1309 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x12, in btc8723b2ant_ps_tdma()
1313 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1c, in btc8723b2ant_ps_tdma()
1317 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xa3, 0x10, in btc8723b2ant_ps_tdma()
1321 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1a, in btc8723b2ant_ps_tdma()
1325 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x12, in btc8723b2ant_ps_tdma()
1329 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0xa, in btc8723b2ant_ps_tdma()
1333 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x5, in btc8723b2ant_ps_tdma()
1337 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1a, in btc8723b2ant_ps_tdma()
1341 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x12, in btc8723b2ant_ps_tdma()
1345 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0xa, in btc8723b2ant_ps_tdma()
1349 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x5, in btc8723b2ant_ps_tdma()
1353 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xa3, 0x2f, in btc8723b2ant_ps_tdma()
1357 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x5, in btc8723b2ant_ps_tdma()
1361 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x25, in btc8723b2ant_ps_tdma()
1365 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x25, in btc8723b2ant_ps_tdma()
1369 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x15, in btc8723b2ant_ps_tdma()
1373 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1a, in btc8723b2ant_ps_tdma()
1381 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0x0, 0x0, 0x0, in btc8723b2ant_ps_tdma()
1385 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0x0, 0x0, 0x0, in btc8723b2ant_ps_tdma()
1389 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0x0, 0x0, 0x0, in btc8723b2ant_ps_tdma()
1400 static void btc8723b2ant_coex_alloff(struct btc_coexist *btcoexist) in btc8723b2ant_coex_alloff() argument
1403 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_coex_alloff()
1404 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_coex_alloff()
1405 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8723b2ant_coex_alloff()
1408 btc8723b2ant_sw_mechanism1(btcoexist, false, false, false, false); in btc8723b2ant_coex_alloff()
1409 btc8723b2ant_sw_mechanism2(btcoexist, false, false, false, 0x18); in btc8723b2ant_coex_alloff()
1412 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_coex_alloff()
1413 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_coex_alloff()
1416 static void btc8723b2ant_init_coex_dm(struct btc_coexist *btcoexist) in btc8723b2ant_init_coex_dm() argument
1420 btc8723b2ant_ps_tdma(btcoexist, FORCE_EXEC, false, 1); in btc8723b2ant_init_coex_dm()
1421 btc8723b2ant_fw_dac_swing_lvl(btcoexist, FORCE_EXEC, 6); in btc8723b2ant_init_coex_dm()
1422 btc8723b2ant_dec_bt_pwr(btcoexist, FORCE_EXEC, false); in btc8723b2ant_init_coex_dm()
1424 btc8723b2ant_sw_mechanism1(btcoexist, false, false, false, false); in btc8723b2ant_init_coex_dm()
1425 btc8723b2ant_sw_mechanism2(btcoexist, false, false, false, 0x18); in btc8723b2ant_init_coex_dm()
1428 static void btc8723b2ant_action_bt_inquiry(struct btc_coexist *btcoexist) in btc8723b2ant_action_bt_inquiry() argument
1433 btcoexist->btc_set(btcoexist, BTC_SET_ACT_DISABLE_LOW_POWER, in btc8723b2ant_action_bt_inquiry()
1435 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in btc8723b2ant_action_bt_inquiry()
1439 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_bt_inquiry()
1440 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 3); in btc8723b2ant_action_bt_inquiry()
1442 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_bt_inquiry()
1443 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_action_bt_inquiry()
1445 btc8723b2ant_fw_dac_swing_lvl(btcoexist, FORCE_EXEC, 6); in btc8723b2ant_action_bt_inquiry()
1446 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8723b2ant_action_bt_inquiry()
1448 btc8723b2ant_sw_mechanism1(btcoexist, false, false, false, false); in btc8723b2ant_action_bt_inquiry()
1449 btc8723b2ant_sw_mechanism2(btcoexist, false, false, false, 0x18); in btc8723b2ant_action_bt_inquiry()
1452 coex_dm->backup_0x948 = btcoexist->btc_read_2byte(btcoexist, 0x948); in btc8723b2ant_action_bt_inquiry()
1454 btc8723b2ant_set_ant_path(btcoexist, BTC_ANT_WIFI_AT_AUX, in btc8723b2ant_action_bt_inquiry()
1458 static bool btc8723b2ant_is_common_action(struct btc_coexist *btcoexist) in btc8723b2ant_is_common_action() argument
1464 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in btc8723b2ant_is_common_action()
1465 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in btc8723b2ant_is_common_action()
1467 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in btc8723b2ant_is_common_action()
1471 btcoexist->btc_set(btcoexist, BTC_SET_ACT_DISABLE_LOW_POWER, in btc8723b2ant_is_common_action()
1477 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, in btc8723b2ant_is_common_action()
1479 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_is_common_action()
1480 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_is_common_action()
1481 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_is_common_action()
1482 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8723b2ant_is_common_action()
1484 btc8723b2ant_sw_mechanism1(btcoexist, false, false, false, in btc8723b2ant_is_common_action()
1486 btc8723b2ant_sw_mechanism2(btcoexist, false, false, false, in btc8723b2ant_is_common_action()
1494 btcoexist->btc_set(btcoexist, in btc8723b2ant_is_common_action()
1502 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, in btc8723b2ant_is_common_action()
1504 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_is_common_action()
1505 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_is_common_action()
1506 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, in btc8723b2ant_is_common_action()
1508 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, in btc8723b2ant_is_common_action()
1511 btc8723b2ant_sw_mechanism1(btcoexist, false, false, in btc8723b2ant_is_common_action()
1513 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_is_common_action()
1520 btcoexist->btc_set(btcoexist, in btc8723b2ant_is_common_action()
1530 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, in btc8723b2ant_is_common_action()
1532 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_is_common_action()
1533 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_is_common_action()
1534 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, in btc8723b2ant_is_common_action()
1536 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, in btc8723b2ant_is_common_action()
1539 btc8723b2ant_sw_mechanism1(btcoexist, true, false, in btc8723b2ant_is_common_action()
1541 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_is_common_action()
1547 btcoexist->btc_set(btcoexist, in btc8723b2ant_is_common_action()
1564 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, in btc8723b2ant_is_common_action()
1566 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, in btc8723b2ant_is_common_action()
1568 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8723b2ant_is_common_action()
1570 btc8723b2ant_fw_dac_swing_lvl(btcoexist, in btc8723b2ant_is_common_action()
1573 if (btc8723b_need_dec_pwr(btcoexist)) in btc8723b2ant_is_common_action()
1574 btc8723b2ant_dec_bt_pwr(btcoexist, in btc8723b2ant_is_common_action()
1578 btc8723b2ant_dec_bt_pwr(btcoexist, in btc8723b2ant_is_common_action()
1581 btc8723b2ant_sw_mechanism1(btcoexist, false, in btc8723b2ant_is_common_action()
1584 btc8723b2ant_sw_mechanism2(btcoexist, false, in btc8723b2ant_is_common_action()
1595 static void set_tdma_int1(struct btc_coexist *btcoexist, bool tx_pause, in set_tdma_int1() argument
1605 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1609 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1613 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1617 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1621 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1627 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1631 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1635 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1639 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1646 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1650 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1654 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1658 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1662 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1666 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1672 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1676 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1680 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1684 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1688 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1692 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1702 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 71); in set_tdma_int1()
1705 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 2); in set_tdma_int1()
1708 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 3); in set_tdma_int1()
1711 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 4); in set_tdma_int1()
1716 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 9); in set_tdma_int1()
1719 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 10); in set_tdma_int1()
1722 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 11); in set_tdma_int1()
1725 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 12); in set_tdma_int1()
1731 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1735 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1739 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1743 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1747 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1751 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1755 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1761 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1765 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1769 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1773 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1777 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1781 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1785 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1793 static void set_tdma_int2(struct btc_coexist *btcoexist, bool tx_pause, in set_tdma_int2() argument
1802 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 6); in set_tdma_int2()
1805 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 6); in set_tdma_int2()
1808 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 7); in set_tdma_int2()
1811 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 8); in set_tdma_int2()
1815 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 14); in set_tdma_int2()
1818 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 14); in set_tdma_int2()
1821 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 15); in set_tdma_int2()
1824 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 16); in set_tdma_int2()
1829 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1833 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1837 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1841 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1845 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1849 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1855 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1859 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1863 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1867 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1871 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1875 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1885 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 2); in set_tdma_int2()
1888 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 2); in set_tdma_int2()
1891 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 3); in set_tdma_int2()
1894 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 4); in set_tdma_int2()
1898 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 10); in set_tdma_int2()
1901 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 10); in set_tdma_int2()
1904 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 11); in set_tdma_int2()
1907 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 12); in set_tdma_int2()
1912 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1916 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1920 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1924 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1928 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1932 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1938 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1942 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1946 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1950 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1954 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1958 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1966 static void set_tdma_int3(struct btc_coexist *btcoexist, bool tx_pause, in set_tdma_int3() argument
1975 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 7); in set_tdma_int3()
1978 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 7); in set_tdma_int3()
1981 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 7); in set_tdma_int3()
1984 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 8); in set_tdma_int3()
1988 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 15); in set_tdma_int3()
1991 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 15); in set_tdma_int3()
1994 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 15); in set_tdma_int3()
1997 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 16); in set_tdma_int3()
2002 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2006 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2010 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2014 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2018 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2022 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2028 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2032 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2036 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2040 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2044 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2048 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2058 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 3); in set_tdma_int3()
2061 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 3); in set_tdma_int3()
2064 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 3); in set_tdma_int3()
2067 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 4); in set_tdma_int3()
2071 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 11); in set_tdma_int3()
2074 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 11); in set_tdma_int3()
2077 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 11); in set_tdma_int3()
2080 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 12); in set_tdma_int3()
2085 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2089 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2093 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2097 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2101 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2105 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2111 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2115 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2119 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2123 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2127 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2131 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2139 static void btc8723b2ant_tdma_duration_adjust(struct btc_coexist *btcoexist, in btc8723b2ant_tdma_duration_adjust() argument
2158 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2163 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2168 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2173 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2180 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2185 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2190 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2195 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2204 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2209 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2214 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2219 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2226 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2231 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2236 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2241 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2332 set_tdma_int1(btcoexist, tx_pause, result); in btc8723b2ant_tdma_duration_adjust()
2334 set_tdma_int2(btcoexist, tx_pause, result); in btc8723b2ant_tdma_duration_adjust()
2336 set_tdma_int3(btcoexist, tx_pause, result); in btc8723b2ant_tdma_duration_adjust()
2349 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_SCAN, &scan); in btc8723b2ant_tdma_duration_adjust()
2350 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_LINK, &link); in btc8723b2ant_tdma_duration_adjust()
2351 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_ROAM, &roam); in btc8723b2ant_tdma_duration_adjust()
2354 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, in btc8723b2ant_tdma_duration_adjust()
2364 static void btc8723b2ant_action_sco(struct btc_coexist *btcoexist) in btc8723b2ant_action_sco() argument
2369 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, in btc8723b2ant_action_sco()
2372 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_sco()
2374 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 4); in btc8723b2ant_action_sco()
2376 if (btc8723b_need_dec_pwr(btcoexist)) in btc8723b2ant_action_sco()
2377 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, true); in btc8723b2ant_action_sco()
2379 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8723b2ant_action_sco()
2381 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_sco()
2385 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 2); in btc8723b2ant_action_sco()
2387 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 8); in btc8723b2ant_action_sco()
2390 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 0); in btc8723b2ant_action_sco()
2396 btc8723b2ant_sw_mechanism1(btcoexist, true, true, in btc8723b2ant_action_sco()
2398 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_sco()
2401 btc8723b2ant_sw_mechanism1(btcoexist, true, true, in btc8723b2ant_action_sco()
2403 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_sco()
2409 btc8723b2ant_sw_mechanism1(btcoexist, false, true, in btc8723b2ant_action_sco()
2411 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_sco()
2414 btc8723b2ant_sw_mechanism1(btcoexist, false, true, in btc8723b2ant_action_sco()
2416 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_sco()
2422 static void btc8723b2ant_action_hid(struct btc_coexist *btcoexist) in btc8723b2ant_action_hid() argument
2427 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, in btc8723b2ant_action_hid()
2431 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_hid()
2433 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_hid()
2435 if (btc8723b_need_dec_pwr(btcoexist)) in btc8723b2ant_action_hid()
2436 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, true); in btc8723b2ant_action_hid()
2438 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8723b2ant_action_hid()
2440 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_hid()
2443 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_hid()
2445 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 9); in btc8723b2ant_action_hid()
2449 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 9); in btc8723b2ant_action_hid()
2451 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 13); in btc8723b2ant_action_hid()
2457 btc8723b2ant_sw_mechanism1(btcoexist, true, true, in btc8723b2ant_action_hid()
2459 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_hid()
2462 btc8723b2ant_sw_mechanism1(btcoexist, true, true, in btc8723b2ant_action_hid()
2464 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_hid()
2470 btc8723b2ant_sw_mechanism1(btcoexist, false, true, in btc8723b2ant_action_hid()
2472 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_hid()
2475 btc8723b2ant_sw_mechanism1(btcoexist, false, true, in btc8723b2ant_action_hid()
2477 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_hid()
2484 static void btc8723b2ant_action_a2dp(struct btc_coexist *btcoexist) in btc8723b2ant_action_a2dp() argument
2490 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, in btc8723b2ant_action_a2dp()
2492 wifi_rssi_state1 = btc8723b2ant_wifi_rssi_state(btcoexist, in btc8723b2ant_action_a2dp()
2496 btcoexist->btc_get(btcoexist, BTC_GET_U1_AP_NUM, &ap_num); in btc8723b2ant_action_a2dp()
2501 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, in btc8723b2ant_action_a2dp()
2503 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_a2dp()
2504 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8723b2ant_action_a2dp()
2505 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_a2dp()
2506 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_action_a2dp()
2509 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_a2dp()
2511 btc8723b2ant_sw_mechanism1(btcoexist, true, false, in btc8723b2ant_action_a2dp()
2513 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_a2dp()
2516 btc8723b2ant_sw_mechanism1(btcoexist, false, false, in btc8723b2ant_action_a2dp()
2518 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_a2dp()
2524 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_a2dp()
2526 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_a2dp()
2528 if (btc8723b_need_dec_pwr(btcoexist)) in btc8723b2ant_action_a2dp()
2529 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, true); in btc8723b2ant_action_a2dp()
2531 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8723b2ant_action_a2dp()
2533 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_a2dp()
2537 btc8723b2ant_tdma_duration_adjust(btcoexist, false, in btc8723b2ant_action_a2dp()
2540 btc8723b2ant_tdma_duration_adjust(btcoexist, false, true, 1); in btc8723b2ant_action_a2dp()
2543 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_a2dp()
2547 btc8723b2ant_sw_mechanism1(btcoexist, true, false, in btc8723b2ant_action_a2dp()
2549 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_a2dp()
2552 btc8723b2ant_sw_mechanism1(btcoexist, true, false, in btc8723b2ant_action_a2dp()
2554 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_a2dp()
2560 btc8723b2ant_sw_mechanism1(btcoexist, false, false, in btc8723b2ant_action_a2dp()
2562 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_a2dp()
2565 btc8723b2ant_sw_mechanism1(btcoexist, false, false, in btc8723b2ant_action_a2dp()
2567 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_a2dp()
2573 static void btc8723b2ant_action_a2dp_pan_hs(struct btc_coexist *btcoexist) in btc8723b2ant_action_a2dp_pan_hs() argument
2578 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, in btc8723b2ant_action_a2dp_pan_hs()
2581 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_a2dp_pan_hs()
2583 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_a2dp_pan_hs()
2585 if (btc8723b_need_dec_pwr(btcoexist)) in btc8723b2ant_action_a2dp_pan_hs()
2586 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, true); in btc8723b2ant_action_a2dp_pan_hs()
2588 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8723b2ant_action_a2dp_pan_hs()
2590 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_a2dp_pan_hs()
2592 btc8723b2ant_tdma_duration_adjust(btcoexist, false, true, 2); in btc8723b2ant_action_a2dp_pan_hs()
2595 btcoexist->btc_get(btcoexist, in btc8723b2ant_action_a2dp_pan_hs()
2600 btc8723b2ant_sw_mechanism1(btcoexist, true, false, in btc8723b2ant_action_a2dp_pan_hs()
2602 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_a2dp_pan_hs()
2605 btc8723b2ant_sw_mechanism1(btcoexist, true, false, in btc8723b2ant_action_a2dp_pan_hs()
2607 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_a2dp_pan_hs()
2613 btc8723b2ant_sw_mechanism1(btcoexist, false, false, in btc8723b2ant_action_a2dp_pan_hs()
2615 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_a2dp_pan_hs()
2618 btc8723b2ant_sw_mechanism1(btcoexist, false, false, in btc8723b2ant_action_a2dp_pan_hs()
2620 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_a2dp_pan_hs()
2626 static void btc8723b2ant_action_pan_edr(struct btc_coexist *btcoexist) in btc8723b2ant_action_pan_edr() argument
2631 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, in btc8723b2ant_action_pan_edr()
2635 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_pan_edr()
2637 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_pan_edr()
2639 if (btc8723b_need_dec_pwr(btcoexist)) in btc8723b2ant_action_pan_edr()
2640 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, true); in btc8723b2ant_action_pan_edr()
2642 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8723b2ant_action_pan_edr()
2644 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 10); in btc8723b2ant_action_pan_edr()
2648 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 1); in btc8723b2ant_action_pan_edr()
2650 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 5); in btc8723b2ant_action_pan_edr()
2653 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_pan_edr()
2657 btc8723b2ant_sw_mechanism1(btcoexist, true, false, in btc8723b2ant_action_pan_edr()
2659 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_pan_edr()
2662 btc8723b2ant_sw_mechanism1(btcoexist, true, false, in btc8723b2ant_action_pan_edr()
2664 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_pan_edr()
2670 btc8723b2ant_sw_mechanism1(btcoexist, false, false, in btc8723b2ant_action_pan_edr()
2672 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_pan_edr()
2675 btc8723b2ant_sw_mechanism1(btcoexist, false, false, in btc8723b2ant_action_pan_edr()
2677 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_pan_edr()
2684 static void btc8723b2ant_action_pan_hs(struct btc_coexist *btcoexist) in btc8723b2ant_action_pan_hs() argument
2689 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, in btc8723b2ant_action_pan_hs()
2692 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_pan_hs()
2694 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_pan_hs()
2698 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, true); in btc8723b2ant_action_pan_hs()
2700 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8723b2ant_action_pan_hs()
2702 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_pan_hs()
2704 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_action_pan_hs()
2706 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_pan_hs()
2710 btc8723b2ant_sw_mechanism1(btcoexist, true, false, in btc8723b2ant_action_pan_hs()
2712 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_pan_hs()
2715 btc8723b2ant_sw_mechanism1(btcoexist, true, false, in btc8723b2ant_action_pan_hs()
2717 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_pan_hs()
2723 btc8723b2ant_sw_mechanism1(btcoexist, false, false, in btc8723b2ant_action_pan_hs()
2725 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_pan_hs()
2728 btc8723b2ant_sw_mechanism1(btcoexist, false, false, in btc8723b2ant_action_pan_hs()
2730 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_pan_hs()
2737 static void btc8723b2ant_action_pan_edr_a2dp(struct btc_coexist *btcoexist) in btc8723b2ant_action_pan_edr_a2dp() argument
2742 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, in btc8723b2ant_action_pan_edr_a2dp()
2746 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_pan_edr_a2dp()
2748 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_pan_edr_a2dp()
2750 if (btc8723b_need_dec_pwr(btcoexist)) in btc8723b2ant_action_pan_edr_a2dp()
2751 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, true); in btc8723b2ant_action_pan_edr_a2dp()
2753 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8723b2ant_action_pan_edr_a2dp()
2755 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_pan_edr_a2dp()
2759 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 12); in btc8723b2ant_action_pan_edr_a2dp()
2761 btc8723b2ant_tdma_duration_adjust(btcoexist, false, in btc8723b2ant_action_pan_edr_a2dp()
2764 btc8723b2ant_tdma_duration_adjust(btcoexist, false, in btc8723b2ant_action_pan_edr_a2dp()
2767 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_pan_edr_a2dp()
2768 btc8723b2ant_tdma_duration_adjust(btcoexist, false, true, 3); in btc8723b2ant_action_pan_edr_a2dp()
2775 btc8723b2ant_sw_mechanism1(btcoexist, true, false, in btc8723b2ant_action_pan_edr_a2dp()
2777 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_pan_edr_a2dp()
2780 btc8723b2ant_sw_mechanism1(btcoexist, true, false, in btc8723b2ant_action_pan_edr_a2dp()
2782 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_pan_edr_a2dp()
2788 btc8723b2ant_sw_mechanism1(btcoexist, false, false, in btc8723b2ant_action_pan_edr_a2dp()
2790 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_pan_edr_a2dp()
2793 btc8723b2ant_sw_mechanism1(btcoexist, false, false, in btc8723b2ant_action_pan_edr_a2dp()
2795 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_pan_edr_a2dp()
2801 static void btc8723b2ant_action_pan_edr_hid(struct btc_coexist *btcoexist) in btc8723b2ant_action_pan_edr_hid() argument
2806 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, in btc8723b2ant_action_pan_edr_hid()
2809 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_pan_edr_hid()
2811 if (btc8723b_need_dec_pwr(btcoexist)) in btc8723b2ant_action_pan_edr_hid()
2812 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, true); in btc8723b2ant_action_pan_edr_hid()
2814 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8723b2ant_action_pan_edr_hid()
2819 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, in btc8723b2ant_action_pan_edr_hid()
2821 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 11); in btc8723b2ant_action_pan_edr_hid()
2822 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, in btc8723b2ant_action_pan_edr_hid()
2825 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, in btc8723b2ant_action_pan_edr_hid()
2827 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_pan_edr_hid()
2828 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, in btc8723b2ant_action_pan_edr_hid()
2831 btc8723b2ant_tdma_duration_adjust(btcoexist, true, false, 2); in btc8723b2ant_action_pan_edr_hid()
2833 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_pan_edr_hid()
2834 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 11); in btc8723b2ant_action_pan_edr_hid()
2835 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, in btc8723b2ant_action_pan_edr_hid()
2837 btc8723b2ant_tdma_duration_adjust(btcoexist, true, true, 2); in btc8723b2ant_action_pan_edr_hid()
2844 btc8723b2ant_sw_mechanism1(btcoexist, true, true, in btc8723b2ant_action_pan_edr_hid()
2846 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_pan_edr_hid()
2849 btc8723b2ant_sw_mechanism1(btcoexist, true, true, in btc8723b2ant_action_pan_edr_hid()
2851 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_pan_edr_hid()
2857 btc8723b2ant_sw_mechanism1(btcoexist, false, true, in btc8723b2ant_action_pan_edr_hid()
2859 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_pan_edr_hid()
2862 btc8723b2ant_sw_mechanism1(btcoexist, false, true, in btc8723b2ant_action_pan_edr_hid()
2864 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_pan_edr_hid()
2871 static void btc8723b2ant_action_hid_a2dp_pan_edr(struct btc_coexist *btcoexist) in btc8723b2ant_action_hid_a2dp_pan_edr() argument
2876 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, in btc8723b2ant_action_hid_a2dp_pan_edr()
2880 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_hid_a2dp_pan_edr()
2882 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_hid_a2dp_pan_edr()
2884 if (btc8723b_need_dec_pwr(btcoexist)) in btc8723b2ant_action_hid_a2dp_pan_edr()
2885 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, true); in btc8723b2ant_action_hid_a2dp_pan_edr()
2887 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8723b2ant_action_hid_a2dp_pan_edr()
2889 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_hid_a2dp_pan_edr()
2891 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_hid_a2dp_pan_edr()
2896 btc8723b2ant_tdma_duration_adjust(btcoexist, true, in btc8723b2ant_action_hid_a2dp_pan_edr()
2899 btc8723b2ant_tdma_duration_adjust(btcoexist, true, in btc8723b2ant_action_hid_a2dp_pan_edr()
2902 btc8723b2ant_tdma_duration_adjust(btcoexist, true, true, 3); in btc8723b2ant_action_hid_a2dp_pan_edr()
2909 btc8723b2ant_sw_mechanism1(btcoexist, true, true, in btc8723b2ant_action_hid_a2dp_pan_edr()
2911 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_hid_a2dp_pan_edr()
2914 btc8723b2ant_sw_mechanism1(btcoexist, true, true, in btc8723b2ant_action_hid_a2dp_pan_edr()
2916 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_hid_a2dp_pan_edr()
2922 btc8723b2ant_sw_mechanism1(btcoexist, false, true, in btc8723b2ant_action_hid_a2dp_pan_edr()
2924 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_hid_a2dp_pan_edr()
2927 btc8723b2ant_sw_mechanism1(btcoexist, false, true, in btc8723b2ant_action_hid_a2dp_pan_edr()
2929 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_hid_a2dp_pan_edr()
2935 static void btc8723b2ant_action_hid_a2dp(struct btc_coexist *btcoexist) in btc8723b2ant_action_hid_a2dp() argument
2940 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, in btc8723b2ant_action_hid_a2dp()
2944 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_hid_a2dp()
2946 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_hid_a2dp()
2948 if (btc8723b_need_dec_pwr(btcoexist)) in btc8723b2ant_action_hid_a2dp()
2949 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, true); in btc8723b2ant_action_hid_a2dp()
2951 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8723b2ant_action_hid_a2dp()
2953 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_hid_a2dp()
2955 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_hid_a2dp()
2959 btc8723b2ant_tdma_duration_adjust(btcoexist, true, false, 2); in btc8723b2ant_action_hid_a2dp()
2961 btc8723b2ant_tdma_duration_adjust(btcoexist, true, true, 2); in btc8723b2ant_action_hid_a2dp()
2967 btc8723b2ant_sw_mechanism1(btcoexist, true, true, in btc8723b2ant_action_hid_a2dp()
2969 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_hid_a2dp()
2972 btc8723b2ant_sw_mechanism1(btcoexist, true, true, in btc8723b2ant_action_hid_a2dp()
2974 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_hid_a2dp()
2980 btc8723b2ant_sw_mechanism1(btcoexist, false, true, in btc8723b2ant_action_hid_a2dp()
2982 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_hid_a2dp()
2985 btc8723b2ant_sw_mechanism1(btcoexist, false, true, in btc8723b2ant_action_hid_a2dp()
2987 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_hid_a2dp()
2993 static void btc8723b2ant_run_coexist_mechanism(struct btc_coexist *btcoexist) in btc8723b2ant_run_coexist_mechanism() argument
3000 if (btcoexist->manual_control) { in btc8723b2ant_run_coexist_mechanism()
3013 algorithm = btc8723b2ant_action_algorithm(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3018 btc8723b2ant_action_bt_inquiry(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3023 btcoexist->btc_write_2byte(btcoexist, 0x948, in btc8723b2ant_run_coexist_mechanism()
3032 if (btc8723b2ant_is_common_action(btcoexist)) { in btc8723b2ant_run_coexist_mechanism()
3048 btc8723b2ant_action_sco(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3053 btc8723b2ant_action_hid(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3059 btc8723b2ant_action_a2dp(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3065 btc8723b2ant_action_a2dp_pan_hs(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3071 btc8723b2ant_action_pan_edr(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3077 btc8723b2ant_action_pan_hs(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3083 btc8723b2ant_action_pan_edr_a2dp(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3089 btc8723b2ant_action_pan_edr_hid(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3095 btc8723b2ant_action_hid_a2dp_pan_edr(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3101 btc8723b2ant_action_hid_a2dp(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3107 btc8723b2ant_coex_alloff(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3114 static void btc8723b2ant_wifioff_hwcfg(struct btc_coexist *btcoexist) in btc8723b2ant_wifioff_hwcfg() argument
3117 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0x4); in btc8723b2ant_wifioff_hwcfg()
3119 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x765, 0x18, 0x3); in btc8723b2ant_wifioff_hwcfg()
3121 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x67, 0x20, 0x0); in btc8723b2ant_wifioff_hwcfg()
3130 void ex_btc8723b2ant_init_hwconfig(struct btc_coexist *btcoexist) in ex_btc8723b2ant_init_hwconfig() argument
3137 btcoexist->btc_get_rf_reg(btcoexist, BTC_RF_A, 0x1e, 0xfffff); in ex_btc8723b2ant_init_hwconfig()
3140 u8tmp = btcoexist->btc_read_1byte(btcoexist, 0x790); in ex_btc8723b2ant_init_hwconfig()
3143 btcoexist->btc_write_1byte(btcoexist, 0x790, u8tmp); in ex_btc8723b2ant_init_hwconfig()
3146 btc8723b2ant_set_ant_path(btcoexist, BTC_ANT_WIFI_AT_MAIN, in ex_btc8723b2ant_init_hwconfig()
3149 btc8723b_coex_tbl_type(btcoexist, FORCE_EXEC, 0); in ex_btc8723b2ant_init_hwconfig()
3153 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0xc); in ex_btc8723b2ant_init_hwconfig()
3154 btcoexist->btc_write_1byte(btcoexist, 0x778, 0x3); in ex_btc8723b2ant_init_hwconfig()
3155 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x40, 0x20, 0x1); in ex_btc8723b2ant_init_hwconfig()
3158 void ex_btc8723b2ant_init_coex_dm(struct btc_coexist *btcoexist) in ex_btc8723b2ant_init_coex_dm() argument
3162 btc8723b2ant_init_coex_dm(btcoexist); in ex_btc8723b2ant_init_coex_dm()
3165 void ex_btc8723b2ant_display_coex_info(struct btc_coexist *btcoexist) in ex_btc8723b2ant_display_coex_info() argument
3167 struct btc_board_info *board_info = &btcoexist->board_info; in ex_btc8723b2ant_display_coex_info()
3168 struct btc_stack_info *stack_info = &btcoexist->stack_info; in ex_btc8723b2ant_display_coex_info()
3169 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in ex_btc8723b2ant_display_coex_info()
3170 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b2ant_display_coex_info()
3185 if (btcoexist->manual_control) { in ex_btc8723b2ant_display_coex_info()
3206 btcoexist->btc_get(btcoexist, BTC_GET_U4_BT_PATCH_VER, &bt_patch_ver); in ex_btc8723b2ant_display_coex_info()
3207 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_FW_VER, &fw_ver); in ex_btc8723b2ant_display_coex_info()
3214 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in ex_btc8723b2ant_display_coex_info()
3215 btcoexist->btc_get(btcoexist, BTC_GET_U1_WIFI_DOT11_CHNL, in ex_btc8723b2ant_display_coex_info()
3217 btcoexist->btc_get(btcoexist, BTC_GET_U1_WIFI_HS_CHNL, &wifi_hs_chnl); in ex_btc8723b2ant_display_coex_info()
3227 btcoexist->btc_get(btcoexist, BTC_GET_S4_WIFI_RSSI, &wifi_rssi); in ex_btc8723b2ant_display_coex_info()
3228 btcoexist->btc_get(btcoexist, BTC_GET_S4_HS_RSSI, &bt_hs_rssi); in ex_btc8723b2ant_display_coex_info()
3229 btcoexist->btc_get(btcoexist, BTC_GET_U1_AP_NUM, &ap_num); in ex_btc8723b2ant_display_coex_info()
3233 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_SCAN, &scan); in ex_btc8723b2ant_display_coex_info()
3234 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_LINK, &link); in ex_btc8723b2ant_display_coex_info()
3235 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_ROAM, &roam); in ex_btc8723b2ant_display_coex_info()
3239 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_UNDER_5G, &wifi_under_5g); in ex_btc8723b2ant_display_coex_info()
3240 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in ex_btc8723b2ant_display_coex_info()
3241 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in ex_btc8723b2ant_display_coex_info()
3242 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_TRAFFIC_DIRECTION, in ex_btc8723b2ant_display_coex_info()
3257 btcoexist->btc_disp_dbg_msg(btcoexist, BTC_DBG_DISP_BT_LINK_INFO); in ex_btc8723b2ant_display_coex_info()
3285 btcoexist->btc_disp_dbg_msg(btcoexist, BTC_DBG_DISP_FW_PWR_MODE_CMD); in ex_btc8723b2ant_display_coex_info()
3321 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x778); in ex_btc8723b2ant_display_coex_info()
3322 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x880); in ex_btc8723b2ant_display_coex_info()
3327 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x948); in ex_btc8723b2ant_display_coex_info()
3328 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x67); in ex_btc8723b2ant_display_coex_info()
3329 u8tmp[1] = btcoexist->btc_read_1byte(btcoexist, 0x765); in ex_btc8723b2ant_display_coex_info()
3334 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x92c); in ex_btc8723b2ant_display_coex_info()
3335 u32tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0x930); in ex_btc8723b2ant_display_coex_info()
3336 u32tmp[2] = btcoexist->btc_read_4byte(btcoexist, 0x944); in ex_btc8723b2ant_display_coex_info()
3341 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x39); in ex_btc8723b2ant_display_coex_info()
3342 u8tmp[1] = btcoexist->btc_read_1byte(btcoexist, 0x40); in ex_btc8723b2ant_display_coex_info()
3343 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x4c); in ex_btc8723b2ant_display_coex_info()
3344 u8tmp[2] = btcoexist->btc_read_1byte(btcoexist, 0x64); in ex_btc8723b2ant_display_coex_info()
3351 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x550); in ex_btc8723b2ant_display_coex_info()
3352 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x522); in ex_btc8723b2ant_display_coex_info()
3356 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0xc50); in ex_btc8723b2ant_display_coex_info()
3357 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x49c); in ex_btc8723b2ant_display_coex_info()
3361 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0xda0); in ex_btc8723b2ant_display_coex_info()
3362 u32tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0xda4); in ex_btc8723b2ant_display_coex_info()
3363 u32tmp[2] = btcoexist->btc_read_4byte(btcoexist, 0xda8); in ex_btc8723b2ant_display_coex_info()
3364 u32tmp[3] = btcoexist->btc_read_4byte(btcoexist, 0xcf0); in ex_btc8723b2ant_display_coex_info()
3366 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0xa5b); in ex_btc8723b2ant_display_coex_info()
3367 u8tmp[1] = btcoexist->btc_read_1byte(btcoexist, 0xa5c); in ex_btc8723b2ant_display_coex_info()
3381 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x6c0); in ex_btc8723b2ant_display_coex_info()
3382 u32tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0x6c4); in ex_btc8723b2ant_display_coex_info()
3383 u32tmp[2] = btcoexist->btc_read_4byte(btcoexist, 0x6c8); in ex_btc8723b2ant_display_coex_info()
3384 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x6cc); in ex_btc8723b2ant_display_coex_info()
3397 btc8723b2ant_monitor_bt_ctr(btcoexist); in ex_btc8723b2ant_display_coex_info()
3399 btcoexist->btc_disp_dbg_msg(btcoexist, in ex_btc8723b2ant_display_coex_info()
3403 void ex_btc8723b2ant_ips_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8723b2ant_ips_notify() argument
3409 btc8723b2ant_wifioff_hwcfg(btcoexist); in ex_btc8723b2ant_ips_notify()
3410 btc8723b2ant_ignore_wlan_act(btcoexist, FORCE_EXEC, true); in ex_btc8723b2ant_ips_notify()
3411 btc8723b2ant_coex_alloff(btcoexist); in ex_btc8723b2ant_ips_notify()
3416 ex_btc8723b2ant_init_hwconfig(btcoexist); in ex_btc8723b2ant_ips_notify()
3417 btc8723b2ant_init_coex_dm(btcoexist); in ex_btc8723b2ant_ips_notify()
3418 btc8723b2ant_query_bt_info(btcoexist); in ex_btc8723b2ant_ips_notify()
3422 void ex_btc8723b2ant_lps_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8723b2ant_lps_notify() argument
3435 void ex_btc8723b2ant_scan_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8723b2ant_scan_notify() argument
3445 void ex_btc8723b2ant_connect_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8723b2ant_connect_notify() argument
3455 void ex_btc8723b2ant_media_status_notify(struct btc_coexist *btcoexist, in ex_btc8723b2ant_media_status_notify() argument
3470 btcoexist->btc_get(btcoexist, in ex_btc8723b2ant_media_status_notify()
3476 btcoexist->btc_get(btcoexist, in ex_btc8723b2ant_media_status_notify()
3493 btcoexist->btc_fill_h2c(btcoexist, 0x66, 3, h2c_parameter); in ex_btc8723b2ant_media_status_notify()
3496 void ex_btc8723b2ant_special_packet_notify(struct btc_coexist *btcoexist, in ex_btc8723b2ant_special_packet_notify() argument
3504 void ex_btc8723b2ant_bt_info_notify(struct btc_coexist *btcoexist, in ex_btc8723b2ant_bt_info_notify() argument
3534 if (btcoexist->manual_control) { in ex_btc8723b2ant_bt_info_notify()
3558 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in ex_btc8723b2ant_bt_info_notify()
3562 btcoexist, in ex_btc8723b2ant_bt_info_notify()
3566 btcoexist, in ex_btc8723b2ant_bt_info_notify()
3574 btc8723b2ant_ignore_wlan_act(btcoexist, FORCE_EXEC, in ex_btc8723b2ant_bt_info_notify()
3583 btc8723b2ant_bt_auto_report(btcoexist, FORCE_EXEC, in ex_btc8723b2ant_bt_info_notify()
3622 btc8723b2ant_update_bt_link_info(btcoexist); in ex_btc8723b2ant_bt_info_notify()
3660 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_TRAFFIC_BUSY, &bt_busy); in ex_btc8723b2ant_bt_info_notify()
3663 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_LIMITED_DIG, &limited_dig); in ex_btc8723b2ant_bt_info_notify()
3665 btc8723b2ant_run_coexist_mechanism(btcoexist); in ex_btc8723b2ant_bt_info_notify()
3668 void ex_btc8723b2ant_halt_notify(struct btc_coexist *btcoexist) in ex_btc8723b2ant_halt_notify() argument
3672 btc8723b2ant_wifioff_hwcfg(btcoexist); in ex_btc8723b2ant_halt_notify()
3673 btc8723b2ant_ignore_wlan_act(btcoexist, FORCE_EXEC, true); in ex_btc8723b2ant_halt_notify()
3674 ex_btc8723b2ant_media_status_notify(btcoexist, BTC_MEDIA_DISCONNECT); in ex_btc8723b2ant_halt_notify()
3677 void ex_btc8723b2ant_periodical(struct btc_coexist *btcoexist) in ex_btc8723b2ant_periodical() argument
3679 struct btc_board_info *board_info = &btcoexist->board_info; in ex_btc8723b2ant_periodical()
3680 struct btc_stack_info *stack_info = &btcoexist->stack_info; in ex_btc8723b2ant_periodical()
3701 btcoexist->btc_get(btcoexist, BTC_GET_U4_BT_PATCH_VER, in ex_btc8723b2ant_periodical()
3703 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_FW_VER, &fw_ver); in ex_btc8723b2ant_periodical()
3714 btc8723b2ant_query_bt_info(btcoexist); in ex_btc8723b2ant_periodical()
3715 btc8723b2ant_monitor_bt_ctr(btcoexist); in ex_btc8723b2ant_periodical()
3716 btc8723b2ant_monitor_bt_enable_disable(btcoexist); in ex_btc8723b2ant_periodical()
3718 if (btc8723b2ant_is_wifi_status_changed(btcoexist) || in ex_btc8723b2ant_periodical()
3720 btc8723b2ant_run_coexist_mechanism(btcoexist); in ex_btc8723b2ant_periodical()