Lines Matching refs:btcoexist

61 static u8 btc8723b2ant_bt_rssi_state(struct btc_coexist *btcoexist,  in btc8723b2ant_bt_rssi_state()  argument
65 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_bt_rssi_state()
150 static u8 btc8723b2ant_wifi_rssi_state(struct btc_coexist *btcoexist, in btc8723b2ant_wifi_rssi_state() argument
154 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_wifi_rssi_state()
158 btcoexist->btc_get(btcoexist, BTC_GET_S4_WIFI_RSSI, &wifi_rssi); in btc8723b2ant_wifi_rssi_state()
244 void btc8723b2ant_limited_rx(struct btc_coexist *btcoexist, bool force_exec, in btc8723b2ant_limited_rx() argument
255 btcoexist->btc_set(btcoexist, BTC_SET_BL_TO_REJ_AP_AGG_PKT, in btc8723b2ant_limited_rx()
258 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_CTRL_AGG_SIZE, in btc8723b2ant_limited_rx()
261 btcoexist->btc_set(btcoexist, BTC_SET_U1_AGG_BUF_SIZE, &rx_agg_size); in btc8723b2ant_limited_rx()
263 btcoexist->btc_set(btcoexist, BTC_SET_ACT_AGGREGATE_CTRL, NULL); in btc8723b2ant_limited_rx()
266 static void btc8723b2ant_monitor_bt_ctr(struct btc_coexist *btcoexist) in btc8723b2ant_monitor_bt_ctr() argument
268 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_monitor_bt_ctr()
269 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8723b2ant_monitor_bt_ctr()
277 u32tmp = btcoexist->btc_read_4byte(btcoexist, reg_hp_txrx); in btc8723b2ant_monitor_bt_ctr()
281 u32tmp = btcoexist->btc_read_4byte(btcoexist, reg_lp_txrx); in btc8723b2ant_monitor_bt_ctr()
309 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0xc); in btc8723b2ant_monitor_bt_ctr()
312 static void btc8723b2ant_monitor_wifi_ctr(struct btc_coexist *btcoexist) in btc8723b2ant_monitor_wifi_ctr() argument
326 btcoexist->btc_read_4byte(btcoexist, 0xf88); in btc8723b2ant_monitor_wifi_ctr()
328 btcoexist->btc_read_2byte(btcoexist, 0xf94); in btc8723b2ant_monitor_wifi_ctr()
330 btcoexist->btc_read_2byte(btcoexist, 0xf90); in btc8723b2ant_monitor_wifi_ctr()
332 btcoexist->btc_read_2byte(btcoexist, 0xfb8); in btc8723b2ant_monitor_wifi_ctr()
335 btcoexist->btc_read_4byte(btcoexist, 0xf84); in btc8723b2ant_monitor_wifi_ctr()
337 btcoexist->btc_read_2byte(btcoexist, 0xf96); in btc8723b2ant_monitor_wifi_ctr()
339 btcoexist->btc_read_2byte(btcoexist, 0xf92); in btc8723b2ant_monitor_wifi_ctr()
341 btcoexist->btc_read_2byte(btcoexist, 0xfba); in btc8723b2ant_monitor_wifi_ctr()
345 btcoexist->btc_write_1byte_bitmask(btcoexist, 0xf16, 0x1, 0x1); in btc8723b2ant_monitor_wifi_ctr()
346 btcoexist->btc_write_1byte_bitmask(btcoexist, 0xf16, 0x1, 0x0); in btc8723b2ant_monitor_wifi_ctr()
349 static void btc8723b2ant_query_bt_info(struct btc_coexist *btcoexist) in btc8723b2ant_query_bt_info() argument
351 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_query_bt_info()
362 btcoexist->btc_fill_h2c(btcoexist, 0x61, 1, h2c_parameter); in btc8723b2ant_query_bt_info()
365 static bool btc8723b2ant_is_wifi_status_changed(struct btc_coexist *btcoexist) in btc8723b2ant_is_wifi_status_changed() argument
375 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in btc8723b2ant_is_wifi_status_changed()
377 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in btc8723b2ant_is_wifi_status_changed()
378 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in btc8723b2ant_is_wifi_status_changed()
379 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_4_WAY_PROGRESS, in btc8723b2ant_is_wifi_status_changed()
401 btc8723b2ant_wifi_rssi_state(btcoexist, 0, 2, tmp, 0); in btc8723b2ant_is_wifi_status_changed()
411 static void btc8723b2ant_update_bt_link_info(struct btc_coexist *btcoexist) in btc8723b2ant_update_bt_link_info() argument
413 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8723b2ant_update_bt_link_info()
416 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in btc8723b2ant_update_bt_link_info()
459 static u8 btc8723b2ant_action_algorithm(struct btc_coexist *btcoexist) in btc8723b2ant_action_algorithm() argument
461 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_action_algorithm()
462 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8723b2ant_action_algorithm()
467 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in btc8723b2ant_action_algorithm()
654 static void btc8723b2ant_set_fw_dac_swing_level(struct btc_coexist *btcoexist, in btc8723b2ant_set_fw_dac_swing_level() argument
657 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_set_fw_dac_swing_level()
670 btcoexist->btc_fill_h2c(btcoexist, 0x64, 1, h2c_parameter); in btc8723b2ant_set_fw_dac_swing_level()
673 static void btc8723b2ant_set_fw_dec_bt_pwr(struct btc_coexist *btcoexist, in btc8723b2ant_set_fw_dec_bt_pwr() argument
676 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_set_fw_dec_bt_pwr()
684 btcoexist->btc_fill_h2c(btcoexist, 0x62, 1, h2c_parameter); in btc8723b2ant_set_fw_dec_bt_pwr()
687 static void btc8723b2ant_dec_bt_pwr(struct btc_coexist *btcoexist, in btc8723b2ant_dec_bt_pwr() argument
690 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_dec_bt_pwr()
705 btc8723b2ant_set_fw_dec_bt_pwr(btcoexist, coex_dm->cur_dec_bt_pwr_lvl); in btc8723b2ant_dec_bt_pwr()
711 void halbtc8723b2ant_set_bt_auto_report(struct btc_coexist *btcoexist, in halbtc8723b2ant_set_bt_auto_report() argument
721 btcoexist->btc_fill_h2c(btcoexist, 0x68, 1, h2c_parameter); in halbtc8723b2ant_set_bt_auto_report()
725 void btc8723b2ant_bt_auto_report(struct btc_coexist *btcoexist, in btc8723b2ant_bt_auto_report() argument
734 halbtc8723b2ant_set_bt_auto_report(btcoexist, in btc8723b2ant_bt_auto_report()
740 static void btc8723b2ant_fw_dac_swing_lvl(struct btc_coexist *btcoexist, in btc8723b2ant_fw_dac_swing_lvl() argument
743 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_fw_dac_swing_lvl()
761 btc8723b2ant_set_fw_dac_swing_level(btcoexist, in btc8723b2ant_fw_dac_swing_lvl()
766 static void btc8723b_set_penalty_txrate(struct btc_coexist *btcoexist, in btc8723b_set_penalty_txrate() argument
769 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b_set_penalty_txrate()
787 btcoexist->btc_fill_h2c(btcoexist, 0x69, 6, h2c_parameter); in btc8723b_set_penalty_txrate()
790 static void btc8723b2ant_low_penalty_ra(struct btc_coexist *btcoexist, in btc8723b2ant_low_penalty_ra() argument
793 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_low_penalty_ra()
810 btc8723b_set_penalty_txrate(btcoexist, coex_dm->cur_low_penalty_ra); in btc8723b2ant_low_penalty_ra()
815 static void btc8723b2ant_set_dac_swing_reg(struct btc_coexist *btcoexist, in btc8723b2ant_set_dac_swing_reg() argument
818 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_set_dac_swing_reg()
823 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x883, 0x3e, val); in btc8723b2ant_set_dac_swing_reg()
836 static void btc8723b2ant_dac_swing(struct btc_coexist *btcoexist, in btc8723b2ant_dac_swing() argument
840 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_dac_swing()
862 btc8723b2ant_set_sw_fulltime_dac_swing(btcoexist, dac_swing_on, in btc8723b2ant_dac_swing()
869 static void btc8723b2ant_set_coex_table(struct btc_coexist *btcoexist, in btc8723b2ant_set_coex_table() argument
873 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_set_coex_table()
877 btcoexist->btc_write_4byte(btcoexist, 0x6c0, val0x6c0); in btc8723b2ant_set_coex_table()
881 btcoexist->btc_write_4byte(btcoexist, 0x6c4, val0x6c4); in btc8723b2ant_set_coex_table()
885 btcoexist->btc_write_4byte(btcoexist, 0x6c8, val0x6c8); in btc8723b2ant_set_coex_table()
889 btcoexist->btc_write_1byte(btcoexist, 0x6cc, val0x6cc); in btc8723b2ant_set_coex_table()
892 static void btc8723b2ant_coex_table(struct btc_coexist *btcoexist, in btc8723b2ant_coex_table() argument
897 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_coex_table()
924 btc8723b2ant_set_coex_table(btcoexist, val0x6c0, val0x6c4, in btc8723b2ant_coex_table()
933 static void btc8723b2ant_coex_table_with_type(struct btc_coexist *btcoexist, in btc8723b2ant_coex_table_with_type() argument
938 btc8723b2ant_coex_table(btcoexist, force_exec, 0x55555555, in btc8723b2ant_coex_table_with_type()
942 btc8723b2ant_coex_table(btcoexist, force_exec, 0x55555555, in btc8723b2ant_coex_table_with_type()
946 btc8723b2ant_coex_table(btcoexist, force_exec, 0x5ada5ada, in btc8723b2ant_coex_table_with_type()
950 btc8723b2ant_coex_table(btcoexist, force_exec, 0xaaaaaaaa, in btc8723b2ant_coex_table_with_type()
954 btc8723b2ant_coex_table(btcoexist, force_exec, 0xffffffff, in btc8723b2ant_coex_table_with_type()
958 btc8723b2ant_coex_table(btcoexist, force_exec, 0x5fff5fff, in btc8723b2ant_coex_table_with_type()
962 btc8723b2ant_coex_table(btcoexist, force_exec, 0x55ff55ff, in btc8723b2ant_coex_table_with_type()
966 btc8723b2ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in btc8723b2ant_coex_table_with_type()
970 btc8723b2ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in btc8723b2ant_coex_table_with_type()
974 btc8723b2ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in btc8723b2ant_coex_table_with_type()
978 btc8723b2ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in btc8723b2ant_coex_table_with_type()
982 btc8723b2ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in btc8723b2ant_coex_table_with_type()
986 btc8723b2ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in btc8723b2ant_coex_table_with_type()
990 btc8723b2ant_coex_table(btcoexist, force_exec, 0x5fff5fff, in btc8723b2ant_coex_table_with_type()
994 btc8723b2ant_coex_table(btcoexist, force_exec, 0x5fff5fff, in btc8723b2ant_coex_table_with_type()
998 btc8723b2ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in btc8723b2ant_coex_table_with_type()
1006 static void btc8723b2ant_set_fw_ignore_wlan_act(struct btc_coexist *btcoexist, in btc8723b2ant_set_fw_ignore_wlan_act() argument
1009 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_set_fw_ignore_wlan_act()
1019 btcoexist->btc_fill_h2c(btcoexist, 0x63, 1, h2c_parameter); in btc8723b2ant_set_fw_ignore_wlan_act()
1022 static void btc8723b2ant_set_lps_rpwm(struct btc_coexist *btcoexist, in btc8723b2ant_set_lps_rpwm() argument
1028 btcoexist->btc_set(btcoexist, BTC_SET_U1_LPS_VAL, &lps); in btc8723b2ant_set_lps_rpwm()
1029 btcoexist->btc_set(btcoexist, BTC_SET_U1_RPWM_VAL, &rpwm); in btc8723b2ant_set_lps_rpwm()
1032 static void btc8723b2ant_lps_rpwm(struct btc_coexist *btcoexist, in btc8723b2ant_lps_rpwm() argument
1043 btc8723b2ant_set_lps_rpwm(btcoexist, lps_val, rpwm_val); in btc8723b2ant_lps_rpwm()
1049 static void btc8723b2ant_ignore_wlan_act(struct btc_coexist *btcoexist, in btc8723b2ant_ignore_wlan_act() argument
1052 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_ignore_wlan_act()
1069 btc8723b2ant_set_fw_ignore_wlan_act(btcoexist, enable); in btc8723b2ant_ignore_wlan_act()
1074 static void btc8723b2ant_set_fw_ps_tdma(struct btc_coexist *btcoexist, u8 byte1, in btc8723b2ant_set_fw_ps_tdma() argument
1077 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_set_fw_ps_tdma()
1100 btcoexist->btc_fill_h2c(btcoexist, 0x60, 5, h2c_parameter); in btc8723b2ant_set_fw_ps_tdma()
1103 static void btc8723b2ant_sw_mechanism(struct btc_coexist *btcoexist, in btc8723b2ant_sw_mechanism() argument
1107 btc8723b2ant_low_penalty_ra(btcoexist, NORMAL_EXEC, low_penalty_ra); in btc8723b2ant_sw_mechanism()
1110 static void btc8723b2ant_set_ant_path(struct btc_coexist *btcoexist, in btc8723b2ant_set_ant_path() argument
1114 struct btc_board_info *board_info = &btcoexist->board_info; in btc8723b2ant_set_ant_path()
1120 btcoexist->btc_get(btcoexist, BTC_GET_BL_EXT_SWITCH, &pg_ext_switch); in btc8723b2ant_set_ant_path()
1121 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_FW_VER, &fw_ver); in btc8723b2ant_set_ant_path()
1127 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x39, 0x8, 0x1); in btc8723b2ant_set_ant_path()
1128 btcoexist->btc_write_1byte(btcoexist, 0x974, 0xff); in btc8723b2ant_set_ant_path()
1129 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x944, 0x3, 0x3); in btc8723b2ant_set_ant_path()
1130 btcoexist->btc_write_1byte(btcoexist, 0x930, 0x77); in btc8723b2ant_set_ant_path()
1131 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x67, 0x20, 0x1); in btc8723b2ant_set_ant_path()
1136 btcoexist->btc_fill_h2c(btcoexist, 0x6E, 1, in btc8723b2ant_set_ant_path()
1139 btcoexist->btc_write_1byte(btcoexist, 0x765, 0x18); in btc8723b2ant_set_ant_path()
1142 btcoexist->btc_write_4byte(btcoexist, 0x948, 0x0); in btc8723b2ant_set_ant_path()
1145 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, in btc8723b2ant_set_ant_path()
1163 btcoexist->btc_fill_h2c(btcoexist, 0x65, 2, h2c_parameter); in btc8723b2ant_set_ant_path()
1168 btcoexist->btc_fill_h2c(btcoexist, 0x6E, 1, in btc8723b2ant_set_ant_path()
1171 btcoexist->btc_write_1byte(btcoexist, 0x765, 0x0); in btc8723b2ant_set_ant_path()
1179 u32tmp = btcoexist->btc_read_4byte(btcoexist, 0x4c); in btc8723b2ant_set_ant_path()
1182 btcoexist->btc_write_4byte(btcoexist, 0x4c, u32tmp); in btc8723b2ant_set_ant_path()
1187 btcoexist->btc_write_2byte(btcoexist, 0x948, 0x0); in btc8723b2ant_set_ant_path()
1189 btcoexist->btc_write_2byte(btcoexist, 0x948, 0x280); in btc8723b2ant_set_ant_path()
1194 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x92c, in btc8723b2ant_set_ant_path()
1199 btcoexist->btc_write_1byte_bitmask(btcoexist, in btc8723b2ant_set_ant_path()
1207 u32tmp = btcoexist->btc_read_4byte(btcoexist, 0x4c); in btc8723b2ant_set_ant_path()
1210 btcoexist->btc_write_4byte(btcoexist, 0x4c, u32tmp); in btc8723b2ant_set_ant_path()
1214 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x64, 0x1, 0x0); in btc8723b2ant_set_ant_path()
1218 btcoexist->btc_write_2byte(btcoexist, 0x948, 0x0); in btc8723b2ant_set_ant_path()
1222 btcoexist->btc_write_2byte(btcoexist, 0x948, 0x280); in btc8723b2ant_set_ant_path()
1228 static void btc8723b2ant_ps_tdma(struct btc_coexist *btcoexist, bool force_exec, in btc8723b2ant_ps_tdma() argument
1231 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_ps_tdma()
1232 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8723b2ant_ps_tdma()
1239 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, 0, 2, tmp, 0); in btc8723b2ant_ps_tdma()
1242 bt_rssi_state = btc8723b2ant_bt_rssi_state(btcoexist, 2, tmp, 0); in btc8723b2ant_ps_tdma()
1312 btcoexist, 0xe3, 0x3c, in btc8723b2ant_ps_tdma()
1317 btcoexist, 0xe3, 0x2d, in btc8723b2ant_ps_tdma()
1321 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1c, in btc8723b2ant_ps_tdma()
1326 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x10, in btc8723b2ant_ps_tdma()
1332 btcoexist, 0xe3, 0x3c, in btc8723b2ant_ps_tdma()
1337 btcoexist, 0xe3, 0x2d, in btc8723b2ant_ps_tdma()
1341 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1c, in btc8723b2ant_ps_tdma()
1346 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xa3, 0x10, in btc8723b2ant_ps_tdma()
1352 btcoexist, 0xe3, 0x3c + wifi_duration_adjust, in btc8723b2ant_ps_tdma()
1357 btcoexist, 0xe3, 0x2d, in btc8723b2ant_ps_tdma()
1361 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1c, in btc8723b2ant_ps_tdma()
1366 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x10, in btc8723b2ant_ps_tdma()
1372 btcoexist, 0xe3, 0x3c, in btc8723b2ant_ps_tdma()
1377 btcoexist, 0xe3, 0x2d, in btc8723b2ant_ps_tdma()
1381 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1c, in btc8723b2ant_ps_tdma()
1386 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x10, in btc8723b2ant_ps_tdma()
1391 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xa3, 0x2f, in btc8723b2ant_ps_tdma()
1395 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x5, 0x5, in btc8723b2ant_ps_tdma()
1399 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x25, in btc8723b2ant_ps_tdma()
1403 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x25, in btc8723b2ant_ps_tdma()
1407 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x15, in btc8723b2ant_ps_tdma()
1413 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x35, in btc8723b2ant_ps_tdma()
1418 btcoexist, 0xe3, 0x3c + wifi_duration_adjust, in btc8723b2ant_ps_tdma()
1426 btcoexist, 0xd3, 0x3a + wifi_duration_adjust, in btc8723b2ant_ps_tdma()
1434 btcoexist, 0xd3, 0x2d + wifi_duration_adjust, in btc8723b2ant_ps_tdma()
1441 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xd3, 0x1c, in btc8723b2ant_ps_tdma()
1449 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xd3, 0x10, in btc8723b2ant_ps_tdma()
1454 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x3c, in btc8723b2ant_ps_tdma()
1459 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x15, in btc8723b2ant_ps_tdma()
1465 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x35, in btc8723b2ant_ps_tdma()
1473 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0x0, 0x0, 0x0, in btc8723b2ant_ps_tdma()
1477 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0x0, 0x0, 0x0, in btc8723b2ant_ps_tdma()
1481 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0x0, 0x0, 0x0, in btc8723b2ant_ps_tdma()
1493 struct btc_coexist *btcoexist, bool new_ps_state) in btc8723b2ant_ps_tdma_check_for_power_save_state() argument
1497 btcoexist->btc_get(btcoexist, BTC_GET_U1_LPS_MODE, &lps_mode); in btc8723b2ant_ps_tdma_check_for_power_save_state()
1505 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_ps_tdma_check_for_power_save_state()
1511 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_ps_tdma_check_for_power_save_state()
1518 static void btc8723b2ant_power_save_state(struct btc_coexist *btcoexist, in btc8723b2ant_power_save_state() argument
1527 btcoexist->btc_set(btcoexist, BTC_SET_ACT_DISABLE_LOW_POWER, in btc8723b2ant_power_save_state()
1529 btcoexist->btc_set(btcoexist, BTC_SET_ACT_NORMAL_LPS, NULL); in btc8723b2ant_power_save_state()
1533 btc8723b2ant_ps_tdma_check_for_power_save_state(btcoexist, in btc8723b2ant_power_save_state()
1535 btc8723b2ant_lps_rpwm(btcoexist, NORMAL_EXEC, lps_val, in btc8723b2ant_power_save_state()
1539 btcoexist->btc_set(btcoexist, BTC_SET_ACT_DISABLE_LOW_POWER, in btc8723b2ant_power_save_state()
1542 btcoexist->btc_set(btcoexist, BTC_SET_ACT_ENTER_LPS, NULL); in btc8723b2ant_power_save_state()
1546 btc8723b2ant_ps_tdma_check_for_power_save_state(btcoexist, in btc8723b2ant_power_save_state()
1548 btcoexist->btc_set(btcoexist, BTC_SET_ACT_LEAVE_LPS, NULL); in btc8723b2ant_power_save_state()
1556 static void btc8723b2ant_coex_alloff(struct btc_coexist *btcoexist) in btc8723b2ant_coex_alloff() argument
1559 btc8723b2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); in btc8723b2ant_coex_alloff()
1560 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_coex_alloff()
1561 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_coex_alloff()
1562 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_coex_alloff()
1565 btc8723b2ant_sw_mechanism(btcoexist, false, false, false, false); in btc8723b2ant_coex_alloff()
1568 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_coex_alloff()
1569 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_coex_alloff()
1572 static void btc8723b2ant_init_coex_dm(struct btc_coexist *btcoexist) in btc8723b2ant_init_coex_dm() argument
1575 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_init_coex_dm()
1576 btc8723b2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); in btc8723b2ant_init_coex_dm()
1578 btc8723b2ant_ps_tdma(btcoexist, FORCE_EXEC, false, 1); in btc8723b2ant_init_coex_dm()
1579 btc8723b2ant_fw_dac_swing_lvl(btcoexist, FORCE_EXEC, 6); in btc8723b2ant_init_coex_dm()
1580 btc8723b2ant_dec_bt_pwr(btcoexist, FORCE_EXEC, 0); in btc8723b2ant_init_coex_dm()
1582 btc8723b2ant_sw_mechanism(btcoexist, false, false, false, false); in btc8723b2ant_init_coex_dm()
1587 static void btc8723b2ant_action_bt_inquiry(struct btc_coexist *btcoexist) in btc8723b2ant_action_bt_inquiry() argument
1589 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_action_bt_inquiry()
1594 btcoexist->btc_set(btcoexist, BTC_SET_ACT_DISABLE_LOW_POWER, in btc8723b2ant_action_bt_inquiry()
1596 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in btc8723b2ant_action_bt_inquiry()
1599 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_SCAN, &scan); in btc8723b2ant_action_bt_inquiry()
1600 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_LINK, &link); in btc8723b2ant_action_bt_inquiry()
1601 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_ROAM, &roam); in btc8723b2ant_action_bt_inquiry()
1603 btc8723b2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); in btc8723b2ant_action_bt_inquiry()
1606 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 23); in btc8723b2ant_action_bt_inquiry()
1607 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 3); in btc8723b2ant_action_bt_inquiry()
1611 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 15); in btc8723b2ant_action_bt_inquiry()
1612 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 22); in btc8723b2ant_action_bt_inquiry()
1616 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 15); in btc8723b2ant_action_bt_inquiry()
1617 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 22); in btc8723b2ant_action_bt_inquiry()
1619 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_bt_inquiry()
1620 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_action_bt_inquiry()
1622 btc8723b2ant_fw_dac_swing_lvl(btcoexist, FORCE_EXEC, 6); in btc8723b2ant_action_bt_inquiry()
1623 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_bt_inquiry()
1625 btc8723b2ant_sw_mechanism(btcoexist, false, false, false, false); in btc8723b2ant_action_bt_inquiry()
1629 *btcoexist) in btc8723b2ant_action_wifi_link_process() argument
1631 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_action_wifi_link_process()
1635 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 15); in btc8723b2ant_action_wifi_link_process()
1636 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 22); in btc8723b2ant_action_wifi_link_process()
1638 btc8723b2ant_sw_mechanism(btcoexist, false, false, false, false); in btc8723b2ant_action_wifi_link_process()
1640 u32tmp = btcoexist->btc_read_4byte(btcoexist, 0x948); in btc8723b2ant_action_wifi_link_process()
1641 u8tmpa = btcoexist->btc_read_1byte(btcoexist, 0x765); in btc8723b2ant_action_wifi_link_process()
1642 u8tmpb = btcoexist->btc_read_1byte(btcoexist, 0x76e); in btc8723b2ant_action_wifi_link_process()
1649 static bool btc8723b2ant_action_wifi_idle_process(struct btc_coexist *btcoexist) in btc8723b2ant_action_wifi_idle_process() argument
1651 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_action_wifi_idle_process()
1657 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8723b2ant_action_wifi_idle_process()
1658 wifi_rssi_state1 = btc8723b2ant_wifi_rssi_state(btcoexist, 1, 2, in btc8723b2ant_action_wifi_idle_process()
1662 bt_rssi_state = btc8723b2ant_bt_rssi_state(btcoexist, 2, tmp, 0); in btc8723b2ant_action_wifi_idle_process()
1664 btcoexist->btc_get(btcoexist, BTC_GET_U1_AP_NUM, &ap_num); in btc8723b2ant_action_wifi_idle_process()
1672 btc8723b2ant_dac_swing(btcoexist, NORMAL_EXEC, true, 0x6); in btc8723b2ant_action_wifi_idle_process()
1673 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_wifi_idle_process()
1676 btc8723b2ant_sw_mechanism(btcoexist, false, false, false, in btc8723b2ant_action_wifi_idle_process()
1678 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_wifi_idle_process()
1679 btc8723b2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8723b2ant_action_wifi_idle_process()
1681 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_action_wifi_idle_process()
1686 btc8723b2ant_dac_swing(btcoexist, NORMAL_EXEC, true, 0x18); in btc8723b2ant_action_wifi_idle_process()
1690 static bool btc8723b2ant_is_common_action(struct btc_coexist *btcoexist) in btc8723b2ant_is_common_action() argument
1692 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_is_common_action()
1697 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in btc8723b2ant_is_common_action()
1698 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in btc8723b2ant_is_common_action()
1700 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in btc8723b2ant_is_common_action()
1704 btcoexist->btc_set(btcoexist, BTC_SET_ACT_DISABLE_LOW_POWER, in btc8723b2ant_is_common_action()
1706 btc8723b2ant_limited_rx(btcoexist, NORMAL_EXEC, in btc8723b2ant_is_common_action()
1712 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, in btc8723b2ant_is_common_action()
1714 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_is_common_action()
1715 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_is_common_action()
1716 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_is_common_action()
1717 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_is_common_action()
1719 btc8723b2ant_sw_mechanism(btcoexist, false, false, false, in btc8723b2ant_is_common_action()
1727 btcoexist->btc_set(btcoexist, in btc8723b2ant_is_common_action()
1730 btc8723b2ant_limited_rx(btcoexist, NORMAL_EXEC, in btc8723b2ant_is_common_action()
1736 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, in btc8723b2ant_is_common_action()
1738 btc8723b2ant_coex_table_with_type(btcoexist, in btc8723b2ant_is_common_action()
1740 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_is_common_action()
1741 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, in btc8723b2ant_is_common_action()
1743 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_is_common_action()
1745 btc8723b2ant_sw_mechanism(btcoexist, false, false, in btc8723b2ant_is_common_action()
1752 btcoexist->btc_set(btcoexist, in btc8723b2ant_is_common_action()
1760 btc8723b2ant_limited_rx(btcoexist, NORMAL_EXEC, in btc8723b2ant_is_common_action()
1763 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, in btc8723b2ant_is_common_action()
1765 btc8723b2ant_coex_table_with_type(btcoexist, in btc8723b2ant_is_common_action()
1767 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_is_common_action()
1768 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, in btc8723b2ant_is_common_action()
1770 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_is_common_action()
1772 btc8723b2ant_sw_mechanism(btcoexist, true, false, in btc8723b2ant_is_common_action()
1778 btcoexist->btc_set(btcoexist, in btc8723b2ant_is_common_action()
1792 btcoexist); in btc8723b2ant_is_common_action()
1800 static void btc8723b2ant_tdma_duration_adjust(struct btc_coexist *btcoexist, in btc8723b2ant_tdma_duration_adjust() argument
1804 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_tdma_duration_adjust()
1820 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
1825 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
1830 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
1835 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
1842 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
1847 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
1852 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
1857 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
1866 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
1871 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
1876 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
1881 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
1888 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
1893 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
1898 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
1903 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2015 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2020 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2025 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2030 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2035 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2041 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2046 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2051 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2056 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2065 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2071 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2077 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2083 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2089 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2095 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2103 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2109 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2115 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2121 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2127 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2133 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2141 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2146 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2151 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2156 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2162 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2167 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2172 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2177 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2186 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2192 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2198 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2204 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2210 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2216 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2222 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2230 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2236 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2242 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2248 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2254 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2260 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2266 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2276 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2281 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2286 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2291 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2297 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2302 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2307 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2312 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2320 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2326 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2332 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2338 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2344 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2350 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2358 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2364 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2370 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2376 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2382 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2388 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2396 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2401 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2406 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2411 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2417 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2422 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2427 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2432 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2440 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2446 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2452 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2458 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2464 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2470 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2478 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2484 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2490 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2496 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2502 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2508 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2518 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2523 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2528 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2533 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2539 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2544 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2549 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2554 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2562 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2568 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2574 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2580 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2586 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2592 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2600 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2606 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2612 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2618 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2624 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2630 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2638 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2643 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2648 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2653 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2659 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2664 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2669 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2674 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2682 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2688 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2694 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2700 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2706 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2712 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2720 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2726 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2732 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2738 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2744 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2750 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2772 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_SCAN, &scan); in btc8723b2ant_tdma_duration_adjust()
2773 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_LINK, &link); in btc8723b2ant_tdma_duration_adjust()
2774 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_ROAM, &roam); in btc8723b2ant_tdma_duration_adjust()
2777 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, in btc8723b2ant_tdma_duration_adjust()
2786 static void btc8723b2ant_action_sco(struct btc_coexist *btcoexist) in btc8723b2ant_action_sco() argument
2791 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8723b2ant_action_sco()
2793 btcoexist, 2, BT_8723B_2ANT_BT_RSSI_COEXSWITCH_THRES - in btc8723b2ant_action_sco()
2797 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_sco()
2799 btc8723b2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8723b2ant_action_sco()
2800 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 4); in btc8723b2ant_action_sco()
2803 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8723b2ant_action_sco()
2805 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_sco()
2807 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_sco()
2811 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 2); in btc8723b2ant_action_sco()
2814 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 8); in btc8723b2ant_action_sco()
2817 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 0); in btc8723b2ant_action_sco()
2821 btc8723b2ant_sw_mechanism(btcoexist, true, true, in btc8723b2ant_action_sco()
2824 btc8723b2ant_sw_mechanism(btcoexist, false, true, in btc8723b2ant_action_sco()
2829 static void btc8723b2ant_action_hid(struct btc_coexist *btcoexist) in btc8723b2ant_action_hid() argument
2836 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8723b2ant_action_hid()
2837 bt_rssi_state = btc8723b2ant_bt_rssi_state(btcoexist, 2, tmp, 0); in btc8723b2ant_action_hid()
2839 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_hid()
2841 btc8723b2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8723b2ant_action_hid()
2842 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_hid()
2845 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8723b2ant_action_hid()
2847 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_hid()
2849 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_hid()
2853 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_hid()
2856 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 9); in btc8723b2ant_action_hid()
2858 btc8723b2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); in btc8723b2ant_action_hid()
2862 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 9); in btc8723b2ant_action_hid()
2864 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 13); in btc8723b2ant_action_hid()
2868 btc8723b2ant_sw_mechanism(btcoexist, true, true, false, false); in btc8723b2ant_action_hid()
2870 btc8723b2ant_sw_mechanism(btcoexist, false, true, false, false); in btc8723b2ant_action_hid()
2874 static void btc8723b2ant_action_a2dp(struct btc_coexist *btcoexist) in btc8723b2ant_action_a2dp() argument
2882 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8723b2ant_action_a2dp()
2883 wifi_rssi_state1 = btc8723b2ant_wifi_rssi_state(btcoexist, 1, 2, 40, 0); in btc8723b2ant_action_a2dp()
2884 bt_rssi_state = btc8723b2ant_bt_rssi_state(btcoexist, 2, tmp, 0); in btc8723b2ant_action_a2dp()
2886 btcoexist->btc_get(btcoexist, BTC_GET_U1_AP_NUM, &ap_num); in btc8723b2ant_action_a2dp()
2891 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, in btc8723b2ant_action_a2dp()
2893 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_a2dp()
2894 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8723b2ant_action_a2dp()
2895 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_a2dp()
2896 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_action_a2dp()
2899 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_a2dp()
2901 btc8723b2ant_sw_mechanism(btcoexist, true, false, in btc8723b2ant_action_a2dp()
2904 btc8723b2ant_sw_mechanism(btcoexist, false, false, in btc8723b2ant_action_a2dp()
2910 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_a2dp()
2911 btc8723b2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8723b2ant_action_a2dp()
2913 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_a2dp()
2916 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8723b2ant_action_a2dp()
2918 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_a2dp()
2921 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_a2dp()
2922 btc8723b2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8723b2ant_action_a2dp()
2925 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 13); in btc8723b2ant_action_a2dp()
2926 btc8723b2ant_power_save_state(btcoexist, BTC_PS_LPS_ON, 0x50, in btc8723b2ant_action_a2dp()
2932 btc8723b2ant_tdma_duration_adjust(btcoexist, false, in btc8723b2ant_action_a2dp()
2935 btc8723b2ant_tdma_duration_adjust(btcoexist, false, true, 1); in btc8723b2ant_action_a2dp()
2938 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_a2dp()
2940 btc8723b2ant_sw_mechanism(btcoexist, true, false, in btc8723b2ant_action_a2dp()
2943 btc8723b2ant_sw_mechanism(btcoexist, false, false, in btc8723b2ant_action_a2dp()
2948 static void btc8723b2ant_action_a2dp_pan_hs(struct btc_coexist *btcoexist) in btc8723b2ant_action_a2dp_pan_hs() argument
2955 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8723b2ant_action_a2dp_pan_hs()
2956 wifi_rssi_state1 = btc8723b2ant_wifi_rssi_state(btcoexist, 1, 2, in btc8723b2ant_action_a2dp_pan_hs()
2960 bt_rssi_state = btc8723b2ant_bt_rssi_state(btcoexist, 2, tmp, 0); in btc8723b2ant_action_a2dp_pan_hs()
2962 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_a2dp_pan_hs()
2964 btc8723b2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8723b2ant_action_a2dp_pan_hs()
2965 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_a2dp_pan_hs()
2968 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8723b2ant_action_a2dp_pan_hs()
2970 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_a2dp_pan_hs()
2973 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_a2dp_pan_hs()
2974 btc8723b2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8723b2ant_action_a2dp_pan_hs()
2977 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 13); in btc8723b2ant_action_a2dp_pan_hs()
2978 btc8723b2ant_power_save_state(btcoexist, BTC_PS_LPS_ON, 0x50, in btc8723b2ant_action_a2dp_pan_hs()
2982 btc8723b2ant_tdma_duration_adjust(btcoexist, false, true, 2); in btc8723b2ant_action_a2dp_pan_hs()
2985 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_a2dp_pan_hs()
2987 btc8723b2ant_sw_mechanism(btcoexist, true, false, in btc8723b2ant_action_a2dp_pan_hs()
2990 btc8723b2ant_sw_mechanism(btcoexist, false, false, in btc8723b2ant_action_a2dp_pan_hs()
2995 static void btc8723b2ant_action_pan_edr(struct btc_coexist *btcoexist) in btc8723b2ant_action_pan_edr() argument
3002 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8723b2ant_action_pan_edr()
3003 wifi_rssi_state1 = btc8723b2ant_wifi_rssi_state(btcoexist, 1, 2, in btc8723b2ant_action_pan_edr()
3007 bt_rssi_state = btc8723b2ant_bt_rssi_state(btcoexist, 2, tmp, 0); in btc8723b2ant_action_pan_edr()
3009 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_pan_edr()
3011 btc8723b2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8723b2ant_action_pan_edr()
3012 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_pan_edr()
3015 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8723b2ant_action_pan_edr()
3017 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_pan_edr()
3020 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 10); in btc8723b2ant_action_pan_edr()
3021 btc8723b2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8723b2ant_action_pan_edr()
3024 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 13); in btc8723b2ant_action_pan_edr()
3025 btc8723b2ant_power_save_state(btcoexist, BTC_PS_LPS_ON, 0x50, in btc8723b2ant_action_pan_edr()
3031 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 1); in btc8723b2ant_action_pan_edr()
3033 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 5); in btc8723b2ant_action_pan_edr()
3036 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_pan_edr()
3038 btc8723b2ant_sw_mechanism(btcoexist, true, false, in btc8723b2ant_action_pan_edr()
3041 btc8723b2ant_sw_mechanism(btcoexist, false, false, in btc8723b2ant_action_pan_edr()
3047 static void btc8723b2ant_action_pan_hs(struct btc_coexist *btcoexist) in btc8723b2ant_action_pan_hs() argument
3054 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8723b2ant_action_pan_hs()
3055 wifi_rssi_state1 = btc8723b2ant_wifi_rssi_state(btcoexist, 1, 2, in btc8723b2ant_action_pan_hs()
3059 bt_rssi_state = btc8723b2ant_bt_rssi_state(btcoexist, 2, tmp, 0); in btc8723b2ant_action_pan_hs()
3061 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_pan_hs()
3063 btc8723b2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8723b2ant_action_pan_hs()
3064 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_pan_hs()
3067 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8723b2ant_action_pan_hs()
3069 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_pan_hs()
3071 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_pan_hs()
3072 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_action_pan_hs()
3074 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_pan_hs()
3076 btc8723b2ant_sw_mechanism(btcoexist, true, false, in btc8723b2ant_action_pan_hs()
3079 btc8723b2ant_sw_mechanism(btcoexist, false, false, in btc8723b2ant_action_pan_hs()
3085 static void btc8723b2ant_action_pan_edr_a2dp(struct btc_coexist *btcoexist) in btc8723b2ant_action_pan_edr_a2dp() argument
3092 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8723b2ant_action_pan_edr_a2dp()
3093 wifi_rssi_state1 = btc8723b2ant_wifi_rssi_state(btcoexist, 1, 2, in btc8723b2ant_action_pan_edr_a2dp()
3097 bt_rssi_state = btc8723b2ant_bt_rssi_state(btcoexist, 2, tmp, 0); in btc8723b2ant_action_pan_edr_a2dp()
3099 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_pan_edr_a2dp()
3101 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_pan_edr_a2dp()
3104 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8723b2ant_action_pan_edr_a2dp()
3106 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_pan_edr_a2dp()
3109 btc8723b2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8723b2ant_action_pan_edr_a2dp()
3112 btc8723b2ant_power_save_state(btcoexist, BTC_PS_LPS_ON, 0x50, in btc8723b2ant_action_pan_edr_a2dp()
3114 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_pan_edr_a2dp()
3118 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 12); in btc8723b2ant_action_pan_edr_a2dp()
3120 btc8723b2ant_tdma_duration_adjust(btcoexist, false, in btc8723b2ant_action_pan_edr_a2dp()
3123 btc8723b2ant_tdma_duration_adjust(btcoexist, false, in btc8723b2ant_action_pan_edr_a2dp()
3126 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_pan_edr_a2dp()
3127 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 3); in btc8723b2ant_action_pan_edr_a2dp()
3132 btc8723b2ant_sw_mechanism(btcoexist, true, false, in btc8723b2ant_action_pan_edr_a2dp()
3135 btc8723b2ant_sw_mechanism(btcoexist, false, false, in btc8723b2ant_action_pan_edr_a2dp()
3140 static void btc8723b2ant_action_pan_edr_hid(struct btc_coexist *btcoexist) in btc8723b2ant_action_pan_edr_hid() argument
3147 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8723b2ant_action_pan_edr_hid()
3148 wifi_rssi_state1 = btc8723b2ant_wifi_rssi_state(btcoexist, 1, 2, in btc8723b2ant_action_pan_edr_hid()
3152 bt_rssi_state = btc8723b2ant_bt_rssi_state(btcoexist, 2, tmp, 0); in btc8723b2ant_action_pan_edr_hid()
3153 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_pan_edr_hid()
3155 btc8723b2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8723b2ant_action_pan_edr_hid()
3158 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8723b2ant_action_pan_edr_hid()
3160 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_pan_edr_hid()
3163 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_pan_edr_hid()
3164 btc8723b2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8723b2ant_action_pan_edr_hid()
3167 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 14); in btc8723b2ant_action_pan_edr_hid()
3168 btc8723b2ant_power_save_state(btcoexist, BTC_PS_LPS_ON, 0x50, in btc8723b2ant_action_pan_edr_hid()
3175 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, in btc8723b2ant_action_pan_edr_hid()
3177 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, in btc8723b2ant_action_pan_edr_hid()
3180 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, in btc8723b2ant_action_pan_edr_hid()
3182 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, in btc8723b2ant_action_pan_edr_hid()
3185 btc8723b2ant_tdma_duration_adjust(btcoexist, true, false, 2); in btc8723b2ant_action_pan_edr_hid()
3187 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_pan_edr_hid()
3188 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, in btc8723b2ant_action_pan_edr_hid()
3190 btc8723b2ant_tdma_duration_adjust(btcoexist, true, true, 2); in btc8723b2ant_action_pan_edr_hid()
3195 btc8723b2ant_sw_mechanism(btcoexist, true, true, in btc8723b2ant_action_pan_edr_hid()
3198 btc8723b2ant_sw_mechanism(btcoexist, false, true, in btc8723b2ant_action_pan_edr_hid()
3204 static void btc8723b2ant_action_hid_a2dp_pan_edr(struct btc_coexist *btcoexist) in btc8723b2ant_action_hid_a2dp_pan_edr() argument
3211 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8723b2ant_action_hid_a2dp_pan_edr()
3212 wifi_rssi_state1 = btc8723b2ant_wifi_rssi_state(btcoexist, 1, 2, in btc8723b2ant_action_hid_a2dp_pan_edr()
3216 bt_rssi_state = btc8723b2ant_bt_rssi_state(btcoexist, 2, tmp, 0); in btc8723b2ant_action_hid_a2dp_pan_edr()
3218 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_hid_a2dp_pan_edr()
3220 btc8723b2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8723b2ant_action_hid_a2dp_pan_edr()
3221 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_hid_a2dp_pan_edr()
3224 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8723b2ant_action_hid_a2dp_pan_edr()
3226 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_hid_a2dp_pan_edr()
3229 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_hid_a2dp_pan_edr()
3230 btc8723b2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8723b2ant_action_hid_a2dp_pan_edr()
3233 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 14); in btc8723b2ant_action_hid_a2dp_pan_edr()
3234 btc8723b2ant_power_save_state(btcoexist, BTC_PS_LPS_ON, 0x50, in btc8723b2ant_action_hid_a2dp_pan_edr()
3238 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_hid_a2dp_pan_edr()
3244 btc8723b2ant_tdma_duration_adjust(btcoexist, true, in btc8723b2ant_action_hid_a2dp_pan_edr()
3247 btc8723b2ant_tdma_duration_adjust(btcoexist, true, in btc8723b2ant_action_hid_a2dp_pan_edr()
3250 btc8723b2ant_tdma_duration_adjust(btcoexist, true, true, 3); in btc8723b2ant_action_hid_a2dp_pan_edr()
3255 btc8723b2ant_sw_mechanism(btcoexist, true, true, in btc8723b2ant_action_hid_a2dp_pan_edr()
3258 btc8723b2ant_sw_mechanism(btcoexist, false, true, in btc8723b2ant_action_hid_a2dp_pan_edr()
3263 static void btc8723b2ant_action_hid_a2dp(struct btc_coexist *btcoexist) in btc8723b2ant_action_hid_a2dp() argument
3271 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8723b2ant_action_hid_a2dp()
3272 wifi_rssi_state1 = btc8723b2ant_wifi_rssi_state(btcoexist, 1, 2, in btc8723b2ant_action_hid_a2dp()
3276 bt_rssi_state = btc8723b2ant_bt_rssi_state(btcoexist, 3, tmp, 37); in btc8723b2ant_action_hid_a2dp()
3278 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_hid_a2dp()
3280 btc8723b2ant_limited_rx(btcoexist, NORMAL_EXEC, false, true, 0x5); in btc8723b2ant_action_hid_a2dp()
3281 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_hid_a2dp()
3283 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_hid_a2dp()
3287 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8723b2ant_action_hid_a2dp()
3289 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8723b2ant_action_hid_a2dp()
3291 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_hid_a2dp()
3297 btc8723b2ant_dec_bt_pwr(btcoexist, in btc8723b2ant_action_hid_a2dp()
3300 btc8723b2ant_dec_bt_pwr(btcoexist, in btc8723b2ant_action_hid_a2dp()
3303 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8723b2ant_action_hid_a2dp()
3305 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_hid_a2dp()
3310 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_hid_a2dp()
3311 btc8723b2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8723b2ant_action_hid_a2dp()
3314 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 14); in btc8723b2ant_action_hid_a2dp()
3315 btc8723b2ant_power_save_state(btcoexist, BTC_PS_LPS_ON, 0x50, in btc8723b2ant_action_hid_a2dp()
3321 btc8723b2ant_tdma_duration_adjust(btcoexist, true, in btc8723b2ant_action_hid_a2dp()
3324 btc8723b2ant_tdma_duration_adjust(btcoexist, true, in btc8723b2ant_action_hid_a2dp()
3327 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 18); in btc8723b2ant_action_hid_a2dp()
3328 btcoexist->btc_write_1byte(btcoexist, 0x456, 0x38); in btc8723b2ant_action_hid_a2dp()
3329 btcoexist->btc_write_2byte(btcoexist, 0x42a, 0x0808); in btc8723b2ant_action_hid_a2dp()
3330 btcoexist->btc_write_4byte(btcoexist, 0x430, 0x0); in btc8723b2ant_action_hid_a2dp()
3331 btcoexist->btc_write_4byte(btcoexist, 0x434, 0x01010000); in btc8723b2ant_action_hid_a2dp()
3334 btc8723b2ant_tdma_duration_adjust(btcoexist, true, in btc8723b2ant_action_hid_a2dp()
3337 btc8723b2ant_tdma_duration_adjust(btcoexist, true, in btc8723b2ant_action_hid_a2dp()
3343 btc8723b2ant_sw_mechanism(btcoexist, true, true, in btc8723b2ant_action_hid_a2dp()
3346 btc8723b2ant_sw_mechanism(btcoexist, false, true, in btc8723b2ant_action_hid_a2dp()
3351 static void btc8723b2ant_action_wifi_multi_port(struct btc_coexist *btcoexist) in btc8723b2ant_action_wifi_multi_port() argument
3353 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_wifi_multi_port()
3354 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_wifi_multi_port()
3357 btc8723b2ant_sw_mechanism(btcoexist, false, false, false, false); in btc8723b2ant_action_wifi_multi_port()
3360 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_wifi_multi_port()
3362 btc8723b2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); in btc8723b2ant_action_wifi_multi_port()
3363 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_action_wifi_multi_port()
3366 static void btc8723b2ant_run_coexist_mechanism(struct btc_coexist *btcoexist) in btc8723b2ant_run_coexist_mechanism() argument
3368 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_run_coexist_mechanism()
3372 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8723b2ant_run_coexist_mechanism()
3379 if (btcoexist->manual_control) { in btc8723b2ant_run_coexist_mechanism()
3391 algorithm = btc8723b2ant_action_algorithm(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3396 btc8723b2ant_action_bt_inquiry(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3400 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_SCAN, &scan); in btc8723b2ant_run_coexist_mechanism()
3401 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_LINK, &link); in btc8723b2ant_run_coexist_mechanism()
3402 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_ROAM, &roam); in btc8723b2ant_run_coexist_mechanism()
3407 btc8723b2ant_action_wifi_link_process(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3412 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_LINK_STATUS, in btc8723b2ant_run_coexist_mechanism()
3427 btcoexist->btc_set(btcoexist, BTC_SET_BL_MIRACAST_PLUS_BT, in btc8723b2ant_run_coexist_mechanism()
3429 btc8723b2ant_action_wifi_multi_port(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3435 btcoexist->btc_set(btcoexist, BTC_SET_BL_MIRACAST_PLUS_BT, in btc8723b2ant_run_coexist_mechanism()
3443 if (btc8723b2ant_is_common_action(btcoexist)) { in btc8723b2ant_run_coexist_mechanism()
3459 btc8723b2ant_action_sco(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3464 btc8723b2ant_action_hid(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3469 btc8723b2ant_action_a2dp(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3474 btc8723b2ant_action_a2dp_pan_hs(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3479 btc8723b2ant_action_pan_edr(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3484 btc8723b2ant_action_pan_hs(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3489 btc8723b2ant_action_pan_edr_a2dp(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3494 btc8723b2ant_action_pan_edr_hid(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3499 btc8723b2ant_action_hid_a2dp_pan_edr(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3504 btc8723b2ant_action_hid_a2dp(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3509 btc8723b2ant_coex_alloff(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3516 static void btc8723b2ant_wifioff_hwcfg(struct btc_coexist *btcoexist) in btc8723b2ant_wifioff_hwcfg() argument
3523 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0x4); in btc8723b2ant_wifioff_hwcfg()
3526 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x780); in btc8723b2ant_wifioff_hwcfg()
3528 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_FW_VER, &fw_ver); in btc8723b2ant_wifioff_hwcfg()
3532 btcoexist->btc_fill_h2c(btcoexist, 0x6E, 1, h2c_parameter); in btc8723b2ant_wifioff_hwcfg()
3534 btcoexist->btc_write_1byte(btcoexist, 0x765, 0x18); in btc8723b2ant_wifioff_hwcfg()
3537 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_IS_IN_MP_MODE, in btc8723b2ant_wifioff_hwcfg()
3541 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x67, 0x20, 0x0); in btc8723b2ant_wifioff_hwcfg()
3544 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x67, 0x20, 0x1); in btc8723b2ant_wifioff_hwcfg()
3550 void ex_btc8723b2ant_init_hwconfig(struct btc_coexist *btcoexist) in ex_btc8723b2ant_init_hwconfig() argument
3552 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b2ant_init_hwconfig()
3558 btcoexist->btc_get_rf_reg(btcoexist, BTC_RF_A, 0x1e, 0xfffff); in ex_btc8723b2ant_init_hwconfig()
3561 u8tmp = btcoexist->btc_read_1byte(btcoexist, 0x790); in ex_btc8723b2ant_init_hwconfig()
3564 btcoexist->btc_write_1byte(btcoexist, 0x790, u8tmp); in ex_btc8723b2ant_init_hwconfig()
3567 btc8723b2ant_set_ant_path(btcoexist, BTC_ANT_WIFI_AT_MAIN, in ex_btc8723b2ant_init_hwconfig()
3572 btc8723b2ant_coex_table_with_type(btcoexist, FORCE_EXEC, 0); in ex_btc8723b2ant_init_hwconfig()
3576 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0x4); in ex_btc8723b2ant_init_hwconfig()
3577 btcoexist->btc_write_1byte(btcoexist, 0x778, 0x3); in ex_btc8723b2ant_init_hwconfig()
3578 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x40, 0x20, 0x1); in ex_btc8723b2ant_init_hwconfig()
3579 btcoexist->auto_report_2ant = true; in ex_btc8723b2ant_init_hwconfig()
3582 void ex_btc8723b2ant_power_on_setting(struct btc_coexist *btcoexist) in ex_btc8723b2ant_power_on_setting() argument
3584 struct btc_board_info *board_info = &btcoexist->board_info; in ex_btc8723b2ant_power_on_setting()
3588 btcoexist->btc_write_1byte(btcoexist, 0x67, 0x20); in ex_btc8723b2ant_power_on_setting()
3591 u16tmp = btcoexist->btc_read_2byte(btcoexist, 0x2); in ex_btc8723b2ant_power_on_setting()
3592 btcoexist->btc_write_2byte(btcoexist, 0x2, u16tmp | BIT0 | BIT1); in ex_btc8723b2ant_power_on_setting()
3594 btcoexist->btc_write_4byte(btcoexist, 0x948, 0x0); in ex_btc8723b2ant_power_on_setting()
3596 if (btcoexist->chip_interface == BTC_INTF_USB) { in ex_btc8723b2ant_power_on_setting()
3608 btcoexist->btc_set(btcoexist, BTC_SET_ACT_ANTPOSREGRISTRY_CTRL, in ex_btc8723b2ant_power_on_setting()
3613 void ex_btc8723b2ant_pre_load_firmware(struct btc_coexist *btcoexist) in ex_btc8723b2ant_pre_load_firmware() argument
3615 struct btc_board_info *board_info = &btcoexist->board_info; in ex_btc8723b2ant_pre_load_firmware()
3630 if (btcoexist->chip_interface == BTC_INTF_USB) { in ex_btc8723b2ant_pre_load_firmware()
3633 btcoexist->btc_write_local_reg_1byte(btcoexist, 0xfe08, u8tmp); in ex_btc8723b2ant_pre_load_firmware()
3642 if (btcoexist->chip_interface == BTC_INTF_PCI) in ex_btc8723b2ant_pre_load_firmware()
3643 btcoexist->btc_write_local_reg_1byte(btcoexist, 0x384, in ex_btc8723b2ant_pre_load_firmware()
3645 else if (btcoexist->chip_interface == BTC_INTF_SDIO) in ex_btc8723b2ant_pre_load_firmware()
3646 btcoexist->btc_write_local_reg_1byte(btcoexist, 0x60, in ex_btc8723b2ant_pre_load_firmware()
3651 void ex_btc8723b2ant_init_coex_dm(struct btc_coexist *btcoexist) in ex_btc8723b2ant_init_coex_dm() argument
3653 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b2ant_init_coex_dm()
3657 btc8723b2ant_init_coex_dm(btcoexist); in ex_btc8723b2ant_init_coex_dm()
3660 void ex_btc8723b2ant_display_coex_info(struct btc_coexist *btcoexist, in ex_btc8723b2ant_display_coex_info() argument
3663 struct btc_board_info *board_info = &btcoexist->board_info; in ex_btc8723b2ant_display_coex_info()
3664 struct btc_stack_info *stack_info = &btcoexist->stack_info; in ex_btc8723b2ant_display_coex_info()
3665 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in ex_btc8723b2ant_display_coex_info()
3679 if (btcoexist->manual_control) { in ex_btc8723b2ant_display_coex_info()
3693 btcoexist->btc_get(btcoexist, BTC_GET_U4_BT_PATCH_VER, &bt_patch_ver); in ex_btc8723b2ant_display_coex_info()
3694 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_FW_VER, &fw_ver); in ex_btc8723b2ant_display_coex_info()
3700 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in ex_btc8723b2ant_display_coex_info()
3701 btcoexist->btc_get(btcoexist, BTC_GET_U1_WIFI_DOT11_CHNL, in ex_btc8723b2ant_display_coex_info()
3703 btcoexist->btc_get(btcoexist, BTC_GET_U1_WIFI_HS_CHNL, &wifi_hs_chnl); in ex_btc8723b2ant_display_coex_info()
3712 btcoexist->btc_get(btcoexist, BTC_GET_S4_WIFI_RSSI, &wifi_rssi); in ex_btc8723b2ant_display_coex_info()
3713 btcoexist->btc_get(btcoexist, BTC_GET_S4_HS_RSSI, &bt_hs_rssi); in ex_btc8723b2ant_display_coex_info()
3714 btcoexist->btc_get(btcoexist, BTC_GET_U1_AP_NUM, &ap_num); in ex_btc8723b2ant_display_coex_info()
3718 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_SCAN, &scan); in ex_btc8723b2ant_display_coex_info()
3719 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_LINK, &link); in ex_btc8723b2ant_display_coex_info()
3720 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_ROAM, &roam); in ex_btc8723b2ant_display_coex_info()
3724 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_UNDER_5G, &wifi_under_5g); in ex_btc8723b2ant_display_coex_info()
3725 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in ex_btc8723b2ant_display_coex_info()
3726 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in ex_btc8723b2ant_display_coex_info()
3727 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_TRAFFIC_DIRECTION, in ex_btc8723b2ant_display_coex_info()
3741 btcoexist->btc_disp_dbg_msg(btcoexist, BTC_DBG_DISP_BT_LINK_INFO, m); in ex_btc8723b2ant_display_coex_info()
3761 btcoexist->btc_disp_dbg_msg(btcoexist, BTC_DBG_DISP_FW_PWR_MODE_CMD, m); in ex_btc8723b2ant_display_coex_info()
3794 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x778); in ex_btc8723b2ant_display_coex_info()
3795 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x880); in ex_btc8723b2ant_display_coex_info()
3800 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x948); in ex_btc8723b2ant_display_coex_info()
3801 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x67); in ex_btc8723b2ant_display_coex_info()
3802 u8tmp[1] = btcoexist->btc_read_1byte(btcoexist, 0x765); in ex_btc8723b2ant_display_coex_info()
3807 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x92c); in ex_btc8723b2ant_display_coex_info()
3808 u32tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0x930); in ex_btc8723b2ant_display_coex_info()
3809 u32tmp[2] = btcoexist->btc_read_4byte(btcoexist, 0x944); in ex_btc8723b2ant_display_coex_info()
3814 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x39); in ex_btc8723b2ant_display_coex_info()
3815 u8tmp[1] = btcoexist->btc_read_1byte(btcoexist, 0x40); in ex_btc8723b2ant_display_coex_info()
3816 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x4c); in ex_btc8723b2ant_display_coex_info()
3817 u8tmp[2] = btcoexist->btc_read_1byte(btcoexist, 0x64); in ex_btc8723b2ant_display_coex_info()
3823 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x550); in ex_btc8723b2ant_display_coex_info()
3824 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x522); in ex_btc8723b2ant_display_coex_info()
3828 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0xc50); in ex_btc8723b2ant_display_coex_info()
3829 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x49c); in ex_btc8723b2ant_display_coex_info()
3833 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0xda0); in ex_btc8723b2ant_display_coex_info()
3834 u32tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0xda4); in ex_btc8723b2ant_display_coex_info()
3835 u32tmp[2] = btcoexist->btc_read_4byte(btcoexist, 0xda8); in ex_btc8723b2ant_display_coex_info()
3836 u32tmp[3] = btcoexist->btc_read_4byte(btcoexist, 0xcf0); in ex_btc8723b2ant_display_coex_info()
3838 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0xa5b); in ex_btc8723b2ant_display_coex_info()
3839 u8tmp[1] = btcoexist->btc_read_1byte(btcoexist, 0xa5c); in ex_btc8723b2ant_display_coex_info()
3853 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x6c0); in ex_btc8723b2ant_display_coex_info()
3854 u32tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0x6c4); in ex_btc8723b2ant_display_coex_info()
3855 u32tmp[2] = btcoexist->btc_read_4byte(btcoexist, 0x6c8); in ex_btc8723b2ant_display_coex_info()
3856 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x6cc); in ex_btc8723b2ant_display_coex_info()
3867 if (btcoexist->auto_report_2ant) in ex_btc8723b2ant_display_coex_info()
3868 btc8723b2ant_monitor_bt_ctr(btcoexist); in ex_btc8723b2ant_display_coex_info()
3869 btcoexist->btc_disp_dbg_msg(btcoexist, BTC_DBG_DISP_COEX_STATISTICS, m); in ex_btc8723b2ant_display_coex_info()
3872 void ex_btc8723b2ant_ips_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8723b2ant_ips_notify() argument
3874 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b2ant_ips_notify()
3880 btc8723b2ant_wifioff_hwcfg(btcoexist); in ex_btc8723b2ant_ips_notify()
3881 btc8723b2ant_ignore_wlan_act(btcoexist, FORCE_EXEC, true); in ex_btc8723b2ant_ips_notify()
3882 btc8723b2ant_coex_alloff(btcoexist); in ex_btc8723b2ant_ips_notify()
3887 ex_btc8723b2ant_init_hwconfig(btcoexist); in ex_btc8723b2ant_ips_notify()
3888 btc8723b2ant_init_coex_dm(btcoexist); in ex_btc8723b2ant_ips_notify()
3889 btc8723b2ant_query_bt_info(btcoexist); in ex_btc8723b2ant_ips_notify()
3893 void ex_btc8723b2ant_lps_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8723b2ant_lps_notify() argument
3895 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b2ant_lps_notify()
3908 void ex_btc8723b2ant_scan_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8723b2ant_scan_notify() argument
3910 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b2ant_scan_notify()
3914 u32tmp = btcoexist->btc_read_4byte(btcoexist, 0x948); in ex_btc8723b2ant_scan_notify()
3915 u8tmpa = btcoexist->btc_read_1byte(btcoexist, 0x765); in ex_btc8723b2ant_scan_notify()
3916 u8tmpb = btcoexist->btc_read_1byte(btcoexist, 0x76e); in ex_btc8723b2ant_scan_notify()
3924 btcoexist->btc_get(btcoexist, BTC_GET_U1_AP_NUM, in ex_btc8723b2ant_scan_notify()
3932 void ex_btc8723b2ant_connect_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8723b2ant_connect_notify() argument
3934 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b2ant_connect_notify()
3944 void ex_btc8723b2ant_media_status_notify(struct btc_coexist *btcoexist, in ex_btc8723b2ant_media_status_notify() argument
3947 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b2ant_media_status_notify()
3961 btcoexist->btc_get(btcoexist, in ex_btc8723b2ant_media_status_notify()
3967 btcoexist->btc_get(btcoexist, in ex_btc8723b2ant_media_status_notify()
3972 btcoexist->btc_get(btcoexist, BTC_GET_U1_AP_NUM, in ex_btc8723b2ant_media_status_notify()
3990 btcoexist->btc_fill_h2c(btcoexist, 0x66, 3, h2c_parameter); in ex_btc8723b2ant_media_status_notify()
3993 void ex_btc8723b2ant_special_packet_notify(struct btc_coexist *btcoexist, in ex_btc8723b2ant_special_packet_notify() argument
3996 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b2ant_special_packet_notify()
4003 void ex_btc8723b2ant_bt_info_notify(struct btc_coexist *btcoexist, in ex_btc8723b2ant_bt_info_notify() argument
4006 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b2ant_bt_info_notify()
4034 if (btcoexist->manual_control) { in ex_btc8723b2ant_bt_info_notify()
4069 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in ex_btc8723b2ant_bt_info_notify()
4073 btcoexist, in ex_btc8723b2ant_bt_info_notify()
4077 btcoexist, in ex_btc8723b2ant_bt_info_notify()
4084 btc8723b2ant_ignore_wlan_act(btcoexist, FORCE_EXEC, in ex_btc8723b2ant_bt_info_notify()
4089 if (!btcoexist->auto_report_2ant) { in ex_btc8723b2ant_bt_info_notify()
4091 btc8723b2ant_bt_auto_report(btcoexist, in ex_btc8723b2ant_bt_info_notify()
4140 btc8723b2ant_update_bt_link_info(btcoexist); in ex_btc8723b2ant_bt_info_notify()
4176 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_TRAFFIC_BUSY, &bt_busy); in ex_btc8723b2ant_bt_info_notify()
4179 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_LIMITED_DIG, &limited_dig); in ex_btc8723b2ant_bt_info_notify()
4181 btc8723b2ant_run_coexist_mechanism(btcoexist); in ex_btc8723b2ant_bt_info_notify()
4184 void ex_btc8723b2ant_halt_notify(struct btc_coexist *btcoexist) in ex_btc8723b2ant_halt_notify() argument
4186 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b2ant_halt_notify()
4190 btc8723b2ant_wifioff_hwcfg(btcoexist); in ex_btc8723b2ant_halt_notify()
4191 btc8723b2ant_ignore_wlan_act(btcoexist, FORCE_EXEC, true); in ex_btc8723b2ant_halt_notify()
4192 ex_btc8723b2ant_media_status_notify(btcoexist, BTC_MEDIA_DISCONNECT); in ex_btc8723b2ant_halt_notify()
4195 void ex_btc8723b2ant_pnp_notify(struct btc_coexist *btcoexist, u8 pnp_state) in ex_btc8723b2ant_pnp_notify() argument
4197 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b2ant_pnp_notify()
4216 ex_btc8723b2ant_init_hwconfig(btcoexist); in ex_btc8723b2ant_pnp_notify()
4217 btc8723b2ant_init_coex_dm(btcoexist); in ex_btc8723b2ant_pnp_notify()
4218 btc8723b2ant_query_bt_info(btcoexist); in ex_btc8723b2ant_pnp_notify()
4222 void ex_btc8723b2ant_periodical(struct btc_coexist *btcoexist) in ex_btc8723b2ant_periodical() argument
4224 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b2ant_periodical()
4225 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in ex_btc8723b2ant_periodical()
4239 btcoexist, BTC_ANT_WIFI_AT_MAIN, false, false); in ex_btc8723b2ant_periodical()
4243 if (!btcoexist->auto_report_2ant) { in ex_btc8723b2ant_periodical()
4244 btc8723b2ant_query_bt_info(btcoexist); in ex_btc8723b2ant_periodical()
4246 btc8723b2ant_monitor_bt_ctr(btcoexist); in ex_btc8723b2ant_periodical()
4247 btc8723b2ant_monitor_wifi_ctr(btcoexist); in ex_btc8723b2ant_periodical()
4257 if (btc8723b2ant_is_wifi_status_changed(btcoexist) || in ex_btc8723b2ant_periodical()
4259 btc8723b2ant_run_coexist_mechanism(btcoexist); in ex_btc8723b2ant_periodical()