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()
1294 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1c, in btc8723b2ant_ps_tdma()
1298 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x10, in btc8723b2ant_ps_tdma()
1302 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1a, in btc8723b2ant_ps_tdma()
1306 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x12, in btc8723b2ant_ps_tdma()
1310 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1c, in btc8723b2ant_ps_tdma()
1314 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xa3, 0x10, in btc8723b2ant_ps_tdma()
1318 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1a, in btc8723b2ant_ps_tdma()
1322 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x12, in btc8723b2ant_ps_tdma()
1326 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0xa, in btc8723b2ant_ps_tdma()
1330 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x5, in btc8723b2ant_ps_tdma()
1334 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1a, in btc8723b2ant_ps_tdma()
1338 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x12, in btc8723b2ant_ps_tdma()
1342 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0xa, in btc8723b2ant_ps_tdma()
1346 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x5, in btc8723b2ant_ps_tdma()
1350 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xa3, 0x2f, in btc8723b2ant_ps_tdma()
1354 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x5, in btc8723b2ant_ps_tdma()
1358 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x25, in btc8723b2ant_ps_tdma()
1362 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x25, in btc8723b2ant_ps_tdma()
1366 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x15, in btc8723b2ant_ps_tdma()
1370 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1a, in btc8723b2ant_ps_tdma()
1378 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0x0, 0x0, 0x0, in btc8723b2ant_ps_tdma()
1382 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0x0, 0x0, 0x0, in btc8723b2ant_ps_tdma()
1386 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0x0, 0x0, 0x0, in btc8723b2ant_ps_tdma()
1397 static void btc8723b2ant_coex_alloff(struct btc_coexist *btcoexist) in btc8723b2ant_coex_alloff() argument
1400 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_coex_alloff()
1401 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_coex_alloff()
1402 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8723b2ant_coex_alloff()
1405 btc8723b2ant_sw_mechanism1(btcoexist, false, false, false, false); in btc8723b2ant_coex_alloff()
1406 btc8723b2ant_sw_mechanism2(btcoexist, false, false, false, 0x18); in btc8723b2ant_coex_alloff()
1409 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_coex_alloff()
1410 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_coex_alloff()
1413 static void btc8723b2ant_init_coex_dm(struct btc_coexist *btcoexist) in btc8723b2ant_init_coex_dm() argument
1417 btc8723b2ant_ps_tdma(btcoexist, FORCE_EXEC, false, 1); in btc8723b2ant_init_coex_dm()
1418 btc8723b2ant_fw_dac_swing_lvl(btcoexist, FORCE_EXEC, 6); in btc8723b2ant_init_coex_dm()
1419 btc8723b2ant_dec_bt_pwr(btcoexist, FORCE_EXEC, false); in btc8723b2ant_init_coex_dm()
1421 btc8723b2ant_sw_mechanism1(btcoexist, false, false, false, false); in btc8723b2ant_init_coex_dm()
1422 btc8723b2ant_sw_mechanism2(btcoexist, false, false, false, 0x18); in btc8723b2ant_init_coex_dm()
1425 static void btc8723b2ant_action_bt_inquiry(struct btc_coexist *btcoexist) in btc8723b2ant_action_bt_inquiry() argument
1430 btcoexist->btc_set(btcoexist, BTC_SET_ACT_DISABLE_LOW_POWER, in btc8723b2ant_action_bt_inquiry()
1432 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in btc8723b2ant_action_bt_inquiry()
1436 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_bt_inquiry()
1437 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 3); in btc8723b2ant_action_bt_inquiry()
1439 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_bt_inquiry()
1440 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_action_bt_inquiry()
1442 btc8723b2ant_fw_dac_swing_lvl(btcoexist, FORCE_EXEC, 6); in btc8723b2ant_action_bt_inquiry()
1443 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8723b2ant_action_bt_inquiry()
1445 btc8723b2ant_sw_mechanism1(btcoexist, false, false, false, false); in btc8723b2ant_action_bt_inquiry()
1446 btc8723b2ant_sw_mechanism2(btcoexist, false, false, false, 0x18); in btc8723b2ant_action_bt_inquiry()
1449 coex_dm->backup_0x948 = btcoexist->btc_read_2byte(btcoexist, 0x948); in btc8723b2ant_action_bt_inquiry()
1451 btc8723b2ant_set_ant_path(btcoexist, BTC_ANT_WIFI_AT_AUX, in btc8723b2ant_action_bt_inquiry()
1455 static bool btc8723b2ant_is_common_action(struct btc_coexist *btcoexist) in btc8723b2ant_is_common_action() argument
1461 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in btc8723b2ant_is_common_action()
1462 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in btc8723b2ant_is_common_action()
1464 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in btc8723b2ant_is_common_action()
1468 btcoexist->btc_set(btcoexist, BTC_SET_ACT_DISABLE_LOW_POWER, in btc8723b2ant_is_common_action()
1474 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, in btc8723b2ant_is_common_action()
1476 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_is_common_action()
1477 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_is_common_action()
1478 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_is_common_action()
1479 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8723b2ant_is_common_action()
1481 btc8723b2ant_sw_mechanism1(btcoexist, false, false, false, in btc8723b2ant_is_common_action()
1483 btc8723b2ant_sw_mechanism2(btcoexist, false, false, false, in btc8723b2ant_is_common_action()
1491 btcoexist->btc_set(btcoexist, in btc8723b2ant_is_common_action()
1499 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, in btc8723b2ant_is_common_action()
1501 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_is_common_action()
1502 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_is_common_action()
1503 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, in btc8723b2ant_is_common_action()
1505 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, in btc8723b2ant_is_common_action()
1508 btc8723b2ant_sw_mechanism1(btcoexist, false, false, in btc8723b2ant_is_common_action()
1510 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_is_common_action()
1517 btcoexist->btc_set(btcoexist, in btc8723b2ant_is_common_action()
1527 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, in btc8723b2ant_is_common_action()
1529 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_is_common_action()
1530 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_is_common_action()
1531 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, in btc8723b2ant_is_common_action()
1533 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, in btc8723b2ant_is_common_action()
1536 btc8723b2ant_sw_mechanism1(btcoexist, true, false, in btc8723b2ant_is_common_action()
1538 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_is_common_action()
1544 btcoexist->btc_set(btcoexist, in btc8723b2ant_is_common_action()
1561 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, in btc8723b2ant_is_common_action()
1563 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, in btc8723b2ant_is_common_action()
1565 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8723b2ant_is_common_action()
1567 btc8723b2ant_fw_dac_swing_lvl(btcoexist, in btc8723b2ant_is_common_action()
1570 if (btc8723b_need_dec_pwr(btcoexist)) in btc8723b2ant_is_common_action()
1571 btc8723b2ant_dec_bt_pwr(btcoexist, in btc8723b2ant_is_common_action()
1575 btc8723b2ant_dec_bt_pwr(btcoexist, in btc8723b2ant_is_common_action()
1578 btc8723b2ant_sw_mechanism1(btcoexist, false, in btc8723b2ant_is_common_action()
1581 btc8723b2ant_sw_mechanism2(btcoexist, false, in btc8723b2ant_is_common_action()
1592 static void set_tdma_int1(struct btc_coexist *btcoexist, bool tx_pause, in set_tdma_int1() argument
1602 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1606 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1610 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1614 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1618 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1624 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1628 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1632 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1636 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1643 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1647 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1651 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1655 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1659 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1663 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1669 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1673 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1677 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1681 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1685 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1689 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1699 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 71); in set_tdma_int1()
1702 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 2); in set_tdma_int1()
1705 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 3); in set_tdma_int1()
1708 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 4); in set_tdma_int1()
1713 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 9); in set_tdma_int1()
1716 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 10); in set_tdma_int1()
1719 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 11); in set_tdma_int1()
1722 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 12); in set_tdma_int1()
1728 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1732 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1736 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1740 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1744 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1748 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1752 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1758 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1762 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1766 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1770 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1774 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1778 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1782 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int1()
1790 static void set_tdma_int2(struct btc_coexist *btcoexist, bool tx_pause, in set_tdma_int2() argument
1799 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 6); in set_tdma_int2()
1802 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 6); in set_tdma_int2()
1805 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 7); in set_tdma_int2()
1808 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 8); in set_tdma_int2()
1812 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 14); 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, 15); in set_tdma_int2()
1821 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 16); in set_tdma_int2()
1826 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1830 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1834 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1838 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1842 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1846 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1852 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1856 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1860 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1864 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1868 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1872 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1882 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 2); 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, 3); in set_tdma_int2()
1891 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 4); in set_tdma_int2()
1895 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 10); 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, 11); in set_tdma_int2()
1904 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 12); in set_tdma_int2()
1909 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1913 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1917 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1921 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1925 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1929 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1935 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1939 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1943 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1947 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1951 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1955 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int2()
1963 static void set_tdma_int3(struct btc_coexist *btcoexist, bool tx_pause, in set_tdma_int3() argument
1972 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 7); in set_tdma_int3()
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, 8); in set_tdma_int3()
1985 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 15); 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, 16); in set_tdma_int3()
1999 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2003 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2007 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2011 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2015 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2019 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2025 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2029 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2033 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2037 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2041 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2045 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2055 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 3); 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, 4); in set_tdma_int3()
2068 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 11); 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, 12); in set_tdma_int3()
2082 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2086 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2090 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2094 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2098 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2102 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2108 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2112 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2116 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2120 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2124 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2128 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, in set_tdma_int3()
2136 static void btc8723b2ant_tdma_duration_adjust(struct btc_coexist *btcoexist, in btc8723b2ant_tdma_duration_adjust() argument
2155 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2160 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2165 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2170 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2177 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2182 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2187 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2192 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2201 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2206 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2211 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2216 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2223 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2228 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2233 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2238 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2329 set_tdma_int1(btcoexist, tx_pause, result); in btc8723b2ant_tdma_duration_adjust()
2331 set_tdma_int2(btcoexist, tx_pause, result); in btc8723b2ant_tdma_duration_adjust()
2333 set_tdma_int3(btcoexist, tx_pause, result); in btc8723b2ant_tdma_duration_adjust()
2346 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_SCAN, &scan); in btc8723b2ant_tdma_duration_adjust()
2347 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_LINK, &link); in btc8723b2ant_tdma_duration_adjust()
2348 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_ROAM, &roam); in btc8723b2ant_tdma_duration_adjust()
2351 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, in btc8723b2ant_tdma_duration_adjust()
2361 static void btc8723b2ant_action_sco(struct btc_coexist *btcoexist) in btc8723b2ant_action_sco() argument
2366 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, in btc8723b2ant_action_sco()
2369 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_sco()
2371 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 4); in btc8723b2ant_action_sco()
2373 if (btc8723b_need_dec_pwr(btcoexist)) in btc8723b2ant_action_sco()
2374 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, true); in btc8723b2ant_action_sco()
2376 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8723b2ant_action_sco()
2378 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_sco()
2382 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 2); in btc8723b2ant_action_sco()
2384 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 8); in btc8723b2ant_action_sco()
2387 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 0); in btc8723b2ant_action_sco()
2393 btc8723b2ant_sw_mechanism1(btcoexist, true, true, in btc8723b2ant_action_sco()
2395 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_sco()
2398 btc8723b2ant_sw_mechanism1(btcoexist, true, true, in btc8723b2ant_action_sco()
2400 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_sco()
2406 btc8723b2ant_sw_mechanism1(btcoexist, false, true, in btc8723b2ant_action_sco()
2408 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_sco()
2411 btc8723b2ant_sw_mechanism1(btcoexist, false, true, in btc8723b2ant_action_sco()
2413 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_sco()
2419 static void btc8723b2ant_action_hid(struct btc_coexist *btcoexist) in btc8723b2ant_action_hid() argument
2424 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, in btc8723b2ant_action_hid()
2428 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_hid()
2430 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_hid()
2432 if (btc8723b_need_dec_pwr(btcoexist)) in btc8723b2ant_action_hid()
2433 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, true); in btc8723b2ant_action_hid()
2435 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8723b2ant_action_hid()
2437 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_hid()
2440 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_hid()
2442 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 9); in btc8723b2ant_action_hid()
2446 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 9); in btc8723b2ant_action_hid()
2448 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 13); in btc8723b2ant_action_hid()
2454 btc8723b2ant_sw_mechanism1(btcoexist, true, true, in btc8723b2ant_action_hid()
2456 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_hid()
2459 btc8723b2ant_sw_mechanism1(btcoexist, true, true, in btc8723b2ant_action_hid()
2461 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_hid()
2467 btc8723b2ant_sw_mechanism1(btcoexist, false, true, in btc8723b2ant_action_hid()
2469 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_hid()
2472 btc8723b2ant_sw_mechanism1(btcoexist, false, true, in btc8723b2ant_action_hid()
2474 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_hid()
2481 static void btc8723b2ant_action_a2dp(struct btc_coexist *btcoexist) in btc8723b2ant_action_a2dp() argument
2487 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, in btc8723b2ant_action_a2dp()
2489 wifi_rssi_state1 = btc8723b2ant_wifi_rssi_state(btcoexist, in btc8723b2ant_action_a2dp()
2493 btcoexist->btc_get(btcoexist, BTC_GET_U1_AP_NUM, &ap_num); in btc8723b2ant_action_a2dp()
2498 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, in btc8723b2ant_action_a2dp()
2500 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_a2dp()
2501 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8723b2ant_action_a2dp()
2502 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_a2dp()
2503 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_action_a2dp()
2506 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_a2dp()
2508 btc8723b2ant_sw_mechanism1(btcoexist, true, false, in btc8723b2ant_action_a2dp()
2510 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_a2dp()
2513 btc8723b2ant_sw_mechanism1(btcoexist, false, false, in btc8723b2ant_action_a2dp()
2515 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_a2dp()
2521 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_a2dp()
2523 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_a2dp()
2525 if (btc8723b_need_dec_pwr(btcoexist)) in btc8723b2ant_action_a2dp()
2526 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, true); in btc8723b2ant_action_a2dp()
2528 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8723b2ant_action_a2dp()
2530 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_a2dp()
2534 btc8723b2ant_tdma_duration_adjust(btcoexist, false, in btc8723b2ant_action_a2dp()
2537 btc8723b2ant_tdma_duration_adjust(btcoexist, false, true, 1); in btc8723b2ant_action_a2dp()
2540 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_a2dp()
2544 btc8723b2ant_sw_mechanism1(btcoexist, true, false, in btc8723b2ant_action_a2dp()
2546 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_a2dp()
2549 btc8723b2ant_sw_mechanism1(btcoexist, true, false, in btc8723b2ant_action_a2dp()
2551 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_a2dp()
2557 btc8723b2ant_sw_mechanism1(btcoexist, false, false, in btc8723b2ant_action_a2dp()
2559 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_a2dp()
2562 btc8723b2ant_sw_mechanism1(btcoexist, false, false, in btc8723b2ant_action_a2dp()
2564 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_a2dp()
2570 static void btc8723b2ant_action_a2dp_pan_hs(struct btc_coexist *btcoexist) in btc8723b2ant_action_a2dp_pan_hs() argument
2575 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, in btc8723b2ant_action_a2dp_pan_hs()
2578 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_a2dp_pan_hs()
2580 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_a2dp_pan_hs()
2582 if (btc8723b_need_dec_pwr(btcoexist)) in btc8723b2ant_action_a2dp_pan_hs()
2583 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, true); in btc8723b2ant_action_a2dp_pan_hs()
2585 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8723b2ant_action_a2dp_pan_hs()
2587 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_a2dp_pan_hs()
2589 btc8723b2ant_tdma_duration_adjust(btcoexist, false, true, 2); in btc8723b2ant_action_a2dp_pan_hs()
2592 btcoexist->btc_get(btcoexist, in btc8723b2ant_action_a2dp_pan_hs()
2597 btc8723b2ant_sw_mechanism1(btcoexist, true, false, in btc8723b2ant_action_a2dp_pan_hs()
2599 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_a2dp_pan_hs()
2602 btc8723b2ant_sw_mechanism1(btcoexist, true, false, in btc8723b2ant_action_a2dp_pan_hs()
2604 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_a2dp_pan_hs()
2610 btc8723b2ant_sw_mechanism1(btcoexist, false, false, in btc8723b2ant_action_a2dp_pan_hs()
2612 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_a2dp_pan_hs()
2615 btc8723b2ant_sw_mechanism1(btcoexist, false, false, in btc8723b2ant_action_a2dp_pan_hs()
2617 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_a2dp_pan_hs()
2623 static void btc8723b2ant_action_pan_edr(struct btc_coexist *btcoexist) in btc8723b2ant_action_pan_edr() argument
2628 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, in btc8723b2ant_action_pan_edr()
2632 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_pan_edr()
2634 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_pan_edr()
2636 if (btc8723b_need_dec_pwr(btcoexist)) in btc8723b2ant_action_pan_edr()
2637 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, true); in btc8723b2ant_action_pan_edr()
2639 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8723b2ant_action_pan_edr()
2641 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 10); in btc8723b2ant_action_pan_edr()
2645 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 1); in btc8723b2ant_action_pan_edr()
2647 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 5); in btc8723b2ant_action_pan_edr()
2650 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_pan_edr()
2654 btc8723b2ant_sw_mechanism1(btcoexist, true, false, in btc8723b2ant_action_pan_edr()
2656 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_pan_edr()
2659 btc8723b2ant_sw_mechanism1(btcoexist, true, false, in btc8723b2ant_action_pan_edr()
2661 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_pan_edr()
2667 btc8723b2ant_sw_mechanism1(btcoexist, false, false, in btc8723b2ant_action_pan_edr()
2669 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_pan_edr()
2672 btc8723b2ant_sw_mechanism1(btcoexist, false, false, in btc8723b2ant_action_pan_edr()
2674 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_pan_edr()
2681 static void btc8723b2ant_action_pan_hs(struct btc_coexist *btcoexist) in btc8723b2ant_action_pan_hs() argument
2686 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, in btc8723b2ant_action_pan_hs()
2689 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_pan_hs()
2691 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_pan_hs()
2695 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, true); in btc8723b2ant_action_pan_hs()
2697 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8723b2ant_action_pan_hs()
2699 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_pan_hs()
2701 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_action_pan_hs()
2703 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_pan_hs()
2707 btc8723b2ant_sw_mechanism1(btcoexist, true, false, in btc8723b2ant_action_pan_hs()
2709 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_pan_hs()
2712 btc8723b2ant_sw_mechanism1(btcoexist, true, false, in btc8723b2ant_action_pan_hs()
2714 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_pan_hs()
2720 btc8723b2ant_sw_mechanism1(btcoexist, false, false, in btc8723b2ant_action_pan_hs()
2722 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_pan_hs()
2725 btc8723b2ant_sw_mechanism1(btcoexist, false, false, in btc8723b2ant_action_pan_hs()
2727 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_pan_hs()
2734 static void btc8723b2ant_action_pan_edr_a2dp(struct btc_coexist *btcoexist) in btc8723b2ant_action_pan_edr_a2dp() argument
2739 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, in btc8723b2ant_action_pan_edr_a2dp()
2743 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_pan_edr_a2dp()
2745 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_pan_edr_a2dp()
2747 if (btc8723b_need_dec_pwr(btcoexist)) in btc8723b2ant_action_pan_edr_a2dp()
2748 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, true); in btc8723b2ant_action_pan_edr_a2dp()
2750 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8723b2ant_action_pan_edr_a2dp()
2752 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_pan_edr_a2dp()
2756 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 12); in btc8723b2ant_action_pan_edr_a2dp()
2758 btc8723b2ant_tdma_duration_adjust(btcoexist, false, in btc8723b2ant_action_pan_edr_a2dp()
2761 btc8723b2ant_tdma_duration_adjust(btcoexist, false, in btc8723b2ant_action_pan_edr_a2dp()
2764 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_pan_edr_a2dp()
2765 btc8723b2ant_tdma_duration_adjust(btcoexist, false, true, 3); in btc8723b2ant_action_pan_edr_a2dp()
2772 btc8723b2ant_sw_mechanism1(btcoexist, true, false, in btc8723b2ant_action_pan_edr_a2dp()
2774 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_pan_edr_a2dp()
2777 btc8723b2ant_sw_mechanism1(btcoexist, true, false, in btc8723b2ant_action_pan_edr_a2dp()
2779 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_pan_edr_a2dp()
2785 btc8723b2ant_sw_mechanism1(btcoexist, false, false, in btc8723b2ant_action_pan_edr_a2dp()
2787 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_pan_edr_a2dp()
2790 btc8723b2ant_sw_mechanism1(btcoexist, false, false, in btc8723b2ant_action_pan_edr_a2dp()
2792 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_pan_edr_a2dp()
2798 static void btc8723b2ant_action_pan_edr_hid(struct btc_coexist *btcoexist) in btc8723b2ant_action_pan_edr_hid() argument
2803 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, in btc8723b2ant_action_pan_edr_hid()
2806 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_pan_edr_hid()
2808 if (btc8723b_need_dec_pwr(btcoexist)) in btc8723b2ant_action_pan_edr_hid()
2809 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, true); in btc8723b2ant_action_pan_edr_hid()
2811 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8723b2ant_action_pan_edr_hid()
2816 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, in btc8723b2ant_action_pan_edr_hid()
2818 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 11); in btc8723b2ant_action_pan_edr_hid()
2819 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, in btc8723b2ant_action_pan_edr_hid()
2822 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, in btc8723b2ant_action_pan_edr_hid()
2824 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_pan_edr_hid()
2825 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, in btc8723b2ant_action_pan_edr_hid()
2828 btc8723b2ant_tdma_duration_adjust(btcoexist, true, false, 2); in btc8723b2ant_action_pan_edr_hid()
2830 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_pan_edr_hid()
2831 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 11); in btc8723b2ant_action_pan_edr_hid()
2832 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, in btc8723b2ant_action_pan_edr_hid()
2834 btc8723b2ant_tdma_duration_adjust(btcoexist, true, true, 2); in btc8723b2ant_action_pan_edr_hid()
2841 btc8723b2ant_sw_mechanism1(btcoexist, true, true, in btc8723b2ant_action_pan_edr_hid()
2843 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_pan_edr_hid()
2846 btc8723b2ant_sw_mechanism1(btcoexist, true, true, in btc8723b2ant_action_pan_edr_hid()
2848 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_pan_edr_hid()
2854 btc8723b2ant_sw_mechanism1(btcoexist, false, true, in btc8723b2ant_action_pan_edr_hid()
2856 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_pan_edr_hid()
2859 btc8723b2ant_sw_mechanism1(btcoexist, false, true, in btc8723b2ant_action_pan_edr_hid()
2861 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_pan_edr_hid()
2868 static void btc8723b2ant_action_hid_a2dp_pan_edr(struct btc_coexist *btcoexist) in btc8723b2ant_action_hid_a2dp_pan_edr() argument
2873 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, in btc8723b2ant_action_hid_a2dp_pan_edr()
2877 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_hid_a2dp_pan_edr()
2879 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_hid_a2dp_pan_edr()
2881 if (btc8723b_need_dec_pwr(btcoexist)) in btc8723b2ant_action_hid_a2dp_pan_edr()
2882 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, true); in btc8723b2ant_action_hid_a2dp_pan_edr()
2884 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8723b2ant_action_hid_a2dp_pan_edr()
2886 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_hid_a2dp_pan_edr()
2888 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_hid_a2dp_pan_edr()
2893 btc8723b2ant_tdma_duration_adjust(btcoexist, true, 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, true, 3); in btc8723b2ant_action_hid_a2dp_pan_edr()
2906 btc8723b2ant_sw_mechanism1(btcoexist, true, true, in btc8723b2ant_action_hid_a2dp_pan_edr()
2908 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_hid_a2dp_pan_edr()
2911 btc8723b2ant_sw_mechanism1(btcoexist, true, true, in btc8723b2ant_action_hid_a2dp_pan_edr()
2913 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_hid_a2dp_pan_edr()
2919 btc8723b2ant_sw_mechanism1(btcoexist, false, true, in btc8723b2ant_action_hid_a2dp_pan_edr()
2921 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_hid_a2dp_pan_edr()
2924 btc8723b2ant_sw_mechanism1(btcoexist, false, true, in btc8723b2ant_action_hid_a2dp_pan_edr()
2926 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_hid_a2dp_pan_edr()
2932 static void btc8723b2ant_action_hid_a2dp(struct btc_coexist *btcoexist) in btc8723b2ant_action_hid_a2dp() argument
2937 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, in btc8723b2ant_action_hid_a2dp()
2941 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_hid_a2dp()
2943 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_hid_a2dp()
2945 if (btc8723b_need_dec_pwr(btcoexist)) in btc8723b2ant_action_hid_a2dp()
2946 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, true); in btc8723b2ant_action_hid_a2dp()
2948 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8723b2ant_action_hid_a2dp()
2950 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_hid_a2dp()
2952 btc8723b_coex_tbl_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_hid_a2dp()
2956 btc8723b2ant_tdma_duration_adjust(btcoexist, true, false, 2); in btc8723b2ant_action_hid_a2dp()
2958 btc8723b2ant_tdma_duration_adjust(btcoexist, true, true, 2); in btc8723b2ant_action_hid_a2dp()
2964 btc8723b2ant_sw_mechanism1(btcoexist, true, true, in btc8723b2ant_action_hid_a2dp()
2966 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_hid_a2dp()
2969 btc8723b2ant_sw_mechanism1(btcoexist, true, true, in btc8723b2ant_action_hid_a2dp()
2971 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_hid_a2dp()
2977 btc8723b2ant_sw_mechanism1(btcoexist, false, true, in btc8723b2ant_action_hid_a2dp()
2979 btc8723b2ant_sw_mechanism2(btcoexist, true, false, in btc8723b2ant_action_hid_a2dp()
2982 btc8723b2ant_sw_mechanism1(btcoexist, false, true, in btc8723b2ant_action_hid_a2dp()
2984 btc8723b2ant_sw_mechanism2(btcoexist, false, false, in btc8723b2ant_action_hid_a2dp()
2990 static void btc8723b2ant_run_coexist_mechanism(struct btc_coexist *btcoexist) in btc8723b2ant_run_coexist_mechanism() argument
2997 if (btcoexist->manual_control) { in btc8723b2ant_run_coexist_mechanism()
3010 algorithm = btc8723b2ant_action_algorithm(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3015 btc8723b2ant_action_bt_inquiry(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3020 btcoexist->btc_write_2byte(btcoexist, 0x948, in btc8723b2ant_run_coexist_mechanism()
3029 if (btc8723b2ant_is_common_action(btcoexist)) { in btc8723b2ant_run_coexist_mechanism()
3045 btc8723b2ant_action_sco(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3050 btc8723b2ant_action_hid(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3056 btc8723b2ant_action_a2dp(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3062 btc8723b2ant_action_a2dp_pan_hs(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3068 btc8723b2ant_action_pan_edr(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3074 btc8723b2ant_action_pan_hs(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3080 btc8723b2ant_action_pan_edr_a2dp(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3086 btc8723b2ant_action_pan_edr_hid(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3092 btc8723b2ant_action_hid_a2dp_pan_edr(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3098 btc8723b2ant_action_hid_a2dp(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3104 btc8723b2ant_coex_alloff(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3111 static void btc8723b2ant_wifioff_hwcfg(struct btc_coexist *btcoexist) in btc8723b2ant_wifioff_hwcfg() argument
3114 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0x4); in btc8723b2ant_wifioff_hwcfg()
3116 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x765, 0x18, 0x3); in btc8723b2ant_wifioff_hwcfg()
3118 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x67, 0x20, 0x0); in btc8723b2ant_wifioff_hwcfg()
3127 void ex_btc8723b2ant_init_hwconfig(struct btc_coexist *btcoexist) in ex_btc8723b2ant_init_hwconfig() argument
3134 btcoexist->btc_get_rf_reg(btcoexist, BTC_RF_A, 0x1e, 0xfffff); in ex_btc8723b2ant_init_hwconfig()
3137 u8tmp = btcoexist->btc_read_1byte(btcoexist, 0x790); in ex_btc8723b2ant_init_hwconfig()
3140 btcoexist->btc_write_1byte(btcoexist, 0x790, u8tmp); in ex_btc8723b2ant_init_hwconfig()
3143 btc8723b2ant_set_ant_path(btcoexist, BTC_ANT_WIFI_AT_MAIN, in ex_btc8723b2ant_init_hwconfig()
3146 btc8723b_coex_tbl_type(btcoexist, FORCE_EXEC, 0); in ex_btc8723b2ant_init_hwconfig()
3150 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0xc); in ex_btc8723b2ant_init_hwconfig()
3151 btcoexist->btc_write_1byte(btcoexist, 0x778, 0x3); in ex_btc8723b2ant_init_hwconfig()
3152 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x40, 0x20, 0x1); in ex_btc8723b2ant_init_hwconfig()
3155 void ex_btc8723b2ant_init_coex_dm(struct btc_coexist *btcoexist) in ex_btc8723b2ant_init_coex_dm() argument
3159 btc8723b2ant_init_coex_dm(btcoexist); in ex_btc8723b2ant_init_coex_dm()
3162 void ex_btc8723b2ant_display_coex_info(struct btc_coexist *btcoexist) in ex_btc8723b2ant_display_coex_info() argument
3164 struct btc_board_info *board_info = &btcoexist->board_info; in ex_btc8723b2ant_display_coex_info()
3165 struct btc_stack_info *stack_info = &btcoexist->stack_info; in ex_btc8723b2ant_display_coex_info()
3166 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in ex_btc8723b2ant_display_coex_info()
3167 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b2ant_display_coex_info()
3182 if (btcoexist->manual_control) { in ex_btc8723b2ant_display_coex_info()
3203 btcoexist->btc_get(btcoexist, BTC_GET_U4_BT_PATCH_VER, &bt_patch_ver); in ex_btc8723b2ant_display_coex_info()
3204 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_FW_VER, &fw_ver); in ex_btc8723b2ant_display_coex_info()
3211 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in ex_btc8723b2ant_display_coex_info()
3212 btcoexist->btc_get(btcoexist, BTC_GET_U1_WIFI_DOT11_CHNL, in ex_btc8723b2ant_display_coex_info()
3214 btcoexist->btc_get(btcoexist, BTC_GET_U1_WIFI_HS_CHNL, &wifi_hs_chnl); in ex_btc8723b2ant_display_coex_info()
3224 btcoexist->btc_get(btcoexist, BTC_GET_S4_WIFI_RSSI, &wifi_rssi); in ex_btc8723b2ant_display_coex_info()
3225 btcoexist->btc_get(btcoexist, BTC_GET_S4_HS_RSSI, &bt_hs_rssi); in ex_btc8723b2ant_display_coex_info()
3226 btcoexist->btc_get(btcoexist, BTC_GET_U1_AP_NUM, &ap_num); in ex_btc8723b2ant_display_coex_info()
3230 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_SCAN, &scan); in ex_btc8723b2ant_display_coex_info()
3231 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_LINK, &link); in ex_btc8723b2ant_display_coex_info()
3232 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_ROAM, &roam); in ex_btc8723b2ant_display_coex_info()
3236 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_UNDER_5G, &wifi_under_5g); in ex_btc8723b2ant_display_coex_info()
3237 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in ex_btc8723b2ant_display_coex_info()
3238 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in ex_btc8723b2ant_display_coex_info()
3239 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_TRAFFIC_DIRECTION, in ex_btc8723b2ant_display_coex_info()
3254 btcoexist->btc_disp_dbg_msg(btcoexist, BTC_DBG_DISP_BT_LINK_INFO); in ex_btc8723b2ant_display_coex_info()
3282 btcoexist->btc_disp_dbg_msg(btcoexist, BTC_DBG_DISP_FW_PWR_MODE_CMD); in ex_btc8723b2ant_display_coex_info()
3318 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x778); in ex_btc8723b2ant_display_coex_info()
3319 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x880); in ex_btc8723b2ant_display_coex_info()
3324 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x948); in ex_btc8723b2ant_display_coex_info()
3325 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x67); in ex_btc8723b2ant_display_coex_info()
3326 u8tmp[1] = btcoexist->btc_read_1byte(btcoexist, 0x765); in ex_btc8723b2ant_display_coex_info()
3331 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x92c); in ex_btc8723b2ant_display_coex_info()
3332 u32tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0x930); in ex_btc8723b2ant_display_coex_info()
3333 u32tmp[2] = btcoexist->btc_read_4byte(btcoexist, 0x944); in ex_btc8723b2ant_display_coex_info()
3338 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x39); in ex_btc8723b2ant_display_coex_info()
3339 u8tmp[1] = btcoexist->btc_read_1byte(btcoexist, 0x40); in ex_btc8723b2ant_display_coex_info()
3340 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x4c); in ex_btc8723b2ant_display_coex_info()
3341 u8tmp[2] = btcoexist->btc_read_1byte(btcoexist, 0x64); in ex_btc8723b2ant_display_coex_info()
3348 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x550); in ex_btc8723b2ant_display_coex_info()
3349 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x522); in ex_btc8723b2ant_display_coex_info()
3353 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0xc50); in ex_btc8723b2ant_display_coex_info()
3354 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x49c); in ex_btc8723b2ant_display_coex_info()
3358 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0xda0); in ex_btc8723b2ant_display_coex_info()
3359 u32tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0xda4); in ex_btc8723b2ant_display_coex_info()
3360 u32tmp[2] = btcoexist->btc_read_4byte(btcoexist, 0xda8); in ex_btc8723b2ant_display_coex_info()
3361 u32tmp[3] = btcoexist->btc_read_4byte(btcoexist, 0xcf0); in ex_btc8723b2ant_display_coex_info()
3363 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0xa5b); in ex_btc8723b2ant_display_coex_info()
3364 u8tmp[1] = btcoexist->btc_read_1byte(btcoexist, 0xa5c); in ex_btc8723b2ant_display_coex_info()
3378 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x6c0); in ex_btc8723b2ant_display_coex_info()
3379 u32tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0x6c4); in ex_btc8723b2ant_display_coex_info()
3380 u32tmp[2] = btcoexist->btc_read_4byte(btcoexist, 0x6c8); in ex_btc8723b2ant_display_coex_info()
3381 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x6cc); in ex_btc8723b2ant_display_coex_info()
3394 btc8723b2ant_monitor_bt_ctr(btcoexist); in ex_btc8723b2ant_display_coex_info()
3396 btcoexist->btc_disp_dbg_msg(btcoexist, in ex_btc8723b2ant_display_coex_info()
3400 void ex_btc8723b2ant_ips_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8723b2ant_ips_notify() argument
3406 btc8723b2ant_wifioff_hwcfg(btcoexist); in ex_btc8723b2ant_ips_notify()
3407 btc8723b2ant_ignore_wlan_act(btcoexist, FORCE_EXEC, true); in ex_btc8723b2ant_ips_notify()
3408 btc8723b2ant_coex_alloff(btcoexist); in ex_btc8723b2ant_ips_notify()
3413 ex_btc8723b2ant_init_hwconfig(btcoexist); in ex_btc8723b2ant_ips_notify()
3414 btc8723b2ant_init_coex_dm(btcoexist); in ex_btc8723b2ant_ips_notify()
3415 btc8723b2ant_query_bt_info(btcoexist); in ex_btc8723b2ant_ips_notify()
3419 void ex_btc8723b2ant_lps_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8723b2ant_lps_notify() argument
3432 void ex_btc8723b2ant_scan_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8723b2ant_scan_notify() argument
3442 void ex_btc8723b2ant_connect_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8723b2ant_connect_notify() argument
3452 void ex_btc8723b2ant_media_status_notify(struct btc_coexist *btcoexist, in ex_btc8723b2ant_media_status_notify() argument
3467 btcoexist->btc_get(btcoexist, in ex_btc8723b2ant_media_status_notify()
3473 btcoexist->btc_get(btcoexist, in ex_btc8723b2ant_media_status_notify()
3490 btcoexist->btc_fill_h2c(btcoexist, 0x66, 3, h2c_parameter); in ex_btc8723b2ant_media_status_notify()
3493 void ex_btc8723b2ant_special_packet_notify(struct btc_coexist *btcoexist, in ex_btc8723b2ant_special_packet_notify() argument
3501 void ex_btc8723b2ant_bt_info_notify(struct btc_coexist *btcoexist, in ex_btc8723b2ant_bt_info_notify() argument
3531 if (btcoexist->manual_control) { in ex_btc8723b2ant_bt_info_notify()
3555 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in ex_btc8723b2ant_bt_info_notify()
3559 btcoexist, in ex_btc8723b2ant_bt_info_notify()
3563 btcoexist, in ex_btc8723b2ant_bt_info_notify()
3571 btc8723b2ant_ignore_wlan_act(btcoexist, FORCE_EXEC, in ex_btc8723b2ant_bt_info_notify()
3580 btc8723b2ant_bt_auto_report(btcoexist, FORCE_EXEC, in ex_btc8723b2ant_bt_info_notify()
3619 btc8723b2ant_update_bt_link_info(btcoexist); in ex_btc8723b2ant_bt_info_notify()
3657 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_TRAFFIC_BUSY, &bt_busy); in ex_btc8723b2ant_bt_info_notify()
3660 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_LIMITED_DIG, &limited_dig); in ex_btc8723b2ant_bt_info_notify()
3662 btc8723b2ant_run_coexist_mechanism(btcoexist); in ex_btc8723b2ant_bt_info_notify()
3665 void ex_btc8723b2ant_halt_notify(struct btc_coexist *btcoexist) in ex_btc8723b2ant_halt_notify() argument
3669 btc8723b2ant_wifioff_hwcfg(btcoexist); in ex_btc8723b2ant_halt_notify()
3670 btc8723b2ant_ignore_wlan_act(btcoexist, FORCE_EXEC, true); in ex_btc8723b2ant_halt_notify()
3671 ex_btc8723b2ant_media_status_notify(btcoexist, BTC_MEDIA_DISCONNECT); in ex_btc8723b2ant_halt_notify()
3674 void ex_btc8723b2ant_periodical(struct btc_coexist *btcoexist) in ex_btc8723b2ant_periodical() argument
3676 struct btc_board_info *board_info = &btcoexist->board_info; in ex_btc8723b2ant_periodical()
3677 struct btc_stack_info *stack_info = &btcoexist->stack_info; in ex_btc8723b2ant_periodical()
3698 btcoexist->btc_get(btcoexist, BTC_GET_U4_BT_PATCH_VER, in ex_btc8723b2ant_periodical()
3700 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_FW_VER, &fw_ver); in ex_btc8723b2ant_periodical()
3711 btc8723b2ant_query_bt_info(btcoexist); in ex_btc8723b2ant_periodical()
3712 btc8723b2ant_monitor_bt_ctr(btcoexist); in ex_btc8723b2ant_periodical()
3713 btc8723b2ant_monitor_bt_enable_disable(btcoexist); in ex_btc8723b2ant_periodical()
3715 if (btc8723b2ant_is_wifi_status_changed(btcoexist) || in ex_btc8723b2ant_periodical()
3717 btc8723b2ant_run_coexist_mechanism(btcoexist); in ex_btc8723b2ant_periodical()