Lines Matching refs:btcoexist
40 static u8 btc8723b2ant_bt_rssi_state(struct btc_coexist *btcoexist, in btc8723b2ant_bt_rssi_state() argument
44 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_bt_rssi_state()
129 static u8 btc8723b2ant_wifi_rssi_state(struct btc_coexist *btcoexist, in btc8723b2ant_wifi_rssi_state() argument
133 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_wifi_rssi_state()
137 btcoexist->btc_get(btcoexist, BTC_GET_S4_WIFI_RSSI, &wifi_rssi); in btc8723b2ant_wifi_rssi_state()
223 void btc8723b2ant_limited_rx(struct btc_coexist *btcoexist, bool force_exec, in btc8723b2ant_limited_rx() argument
234 btcoexist->btc_set(btcoexist, BTC_SET_BL_TO_REJ_AP_AGG_PKT, in btc8723b2ant_limited_rx()
237 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_CTRL_AGG_SIZE, in btc8723b2ant_limited_rx()
240 btcoexist->btc_set(btcoexist, BTC_SET_U1_AGG_BUF_SIZE, &rx_agg_size); in btc8723b2ant_limited_rx()
242 btcoexist->btc_set(btcoexist, BTC_SET_ACT_AGGREGATE_CTRL, NULL); in btc8723b2ant_limited_rx()
245 static void btc8723b2ant_monitor_bt_ctr(struct btc_coexist *btcoexist) in btc8723b2ant_monitor_bt_ctr() argument
247 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_monitor_bt_ctr()
248 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8723b2ant_monitor_bt_ctr()
256 u32tmp = btcoexist->btc_read_4byte(btcoexist, reg_hp_txrx); in btc8723b2ant_monitor_bt_ctr()
260 u32tmp = btcoexist->btc_read_4byte(btcoexist, reg_lp_txrx); in btc8723b2ant_monitor_bt_ctr()
288 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0xc); in btc8723b2ant_monitor_bt_ctr()
291 static void btc8723b2ant_monitor_wifi_ctr(struct btc_coexist *btcoexist) in btc8723b2ant_monitor_wifi_ctr() argument
305 btcoexist->btc_read_4byte(btcoexist, 0xf88); in btc8723b2ant_monitor_wifi_ctr()
307 btcoexist->btc_read_2byte(btcoexist, 0xf94); in btc8723b2ant_monitor_wifi_ctr()
309 btcoexist->btc_read_2byte(btcoexist, 0xf90); in btc8723b2ant_monitor_wifi_ctr()
311 btcoexist->btc_read_2byte(btcoexist, 0xfb8); in btc8723b2ant_monitor_wifi_ctr()
314 btcoexist->btc_read_4byte(btcoexist, 0xf84); in btc8723b2ant_monitor_wifi_ctr()
316 btcoexist->btc_read_2byte(btcoexist, 0xf96); in btc8723b2ant_monitor_wifi_ctr()
318 btcoexist->btc_read_2byte(btcoexist, 0xf92); in btc8723b2ant_monitor_wifi_ctr()
320 btcoexist->btc_read_2byte(btcoexist, 0xfba); in btc8723b2ant_monitor_wifi_ctr()
324 btcoexist->btc_write_1byte_bitmask(btcoexist, 0xf16, 0x1, 0x1); in btc8723b2ant_monitor_wifi_ctr()
325 btcoexist->btc_write_1byte_bitmask(btcoexist, 0xf16, 0x1, 0x0); in btc8723b2ant_monitor_wifi_ctr()
328 static void btc8723b2ant_query_bt_info(struct btc_coexist *btcoexist) in btc8723b2ant_query_bt_info() argument
330 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_query_bt_info()
341 btcoexist->btc_fill_h2c(btcoexist, 0x61, 1, h2c_parameter); in btc8723b2ant_query_bt_info()
344 static bool btc8723b2ant_is_wifi_status_changed(struct btc_coexist *btcoexist) in btc8723b2ant_is_wifi_status_changed() argument
354 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in btc8723b2ant_is_wifi_status_changed()
356 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in btc8723b2ant_is_wifi_status_changed()
357 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in btc8723b2ant_is_wifi_status_changed()
358 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_4_WAY_PROGRESS, in btc8723b2ant_is_wifi_status_changed()
380 btc8723b2ant_wifi_rssi_state(btcoexist, 0, 2, tmp, 0); in btc8723b2ant_is_wifi_status_changed()
390 static void btc8723b2ant_update_bt_link_info(struct btc_coexist *btcoexist) in btc8723b2ant_update_bt_link_info() argument
392 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8723b2ant_update_bt_link_info()
395 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in btc8723b2ant_update_bt_link_info()
438 static u8 btc8723b2ant_action_algorithm(struct btc_coexist *btcoexist) in btc8723b2ant_action_algorithm() argument
440 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_action_algorithm()
441 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8723b2ant_action_algorithm()
446 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in btc8723b2ant_action_algorithm()
633 static void btc8723b2ant_set_fw_dac_swing_level(struct btc_coexist *btcoexist, in btc8723b2ant_set_fw_dac_swing_level() argument
636 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_set_fw_dac_swing_level()
649 btcoexist->btc_fill_h2c(btcoexist, 0x64, 1, h2c_parameter); in btc8723b2ant_set_fw_dac_swing_level()
652 static void btc8723b2ant_set_fw_dec_bt_pwr(struct btc_coexist *btcoexist, in btc8723b2ant_set_fw_dec_bt_pwr() argument
655 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_set_fw_dec_bt_pwr()
663 btcoexist->btc_fill_h2c(btcoexist, 0x62, 1, h2c_parameter); in btc8723b2ant_set_fw_dec_bt_pwr()
666 static void btc8723b2ant_dec_bt_pwr(struct btc_coexist *btcoexist, in btc8723b2ant_dec_bt_pwr() argument
669 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_dec_bt_pwr()
684 btc8723b2ant_set_fw_dec_bt_pwr(btcoexist, coex_dm->cur_dec_bt_pwr_lvl); in btc8723b2ant_dec_bt_pwr()
690 void halbtc8723b2ant_set_bt_auto_report(struct btc_coexist *btcoexist, in halbtc8723b2ant_set_bt_auto_report() argument
700 btcoexist->btc_fill_h2c(btcoexist, 0x68, 1, h2c_parameter); in halbtc8723b2ant_set_bt_auto_report()
704 void btc8723b2ant_bt_auto_report(struct btc_coexist *btcoexist, in btc8723b2ant_bt_auto_report() argument
713 halbtc8723b2ant_set_bt_auto_report(btcoexist, in btc8723b2ant_bt_auto_report()
719 static void btc8723b2ant_fw_dac_swing_lvl(struct btc_coexist *btcoexist, in btc8723b2ant_fw_dac_swing_lvl() argument
722 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_fw_dac_swing_lvl()
740 btc8723b2ant_set_fw_dac_swing_level(btcoexist, in btc8723b2ant_fw_dac_swing_lvl()
745 static void btc8723b_set_penalty_txrate(struct btc_coexist *btcoexist, in btc8723b_set_penalty_txrate() argument
748 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b_set_penalty_txrate()
766 btcoexist->btc_fill_h2c(btcoexist, 0x69, 6, h2c_parameter); in btc8723b_set_penalty_txrate()
769 static void btc8723b2ant_low_penalty_ra(struct btc_coexist *btcoexist, in btc8723b2ant_low_penalty_ra() argument
772 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_low_penalty_ra()
789 btc8723b_set_penalty_txrate(btcoexist, coex_dm->cur_low_penalty_ra); in btc8723b2ant_low_penalty_ra()
794 static void btc8723b2ant_set_dac_swing_reg(struct btc_coexist *btcoexist, in btc8723b2ant_set_dac_swing_reg() argument
797 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_set_dac_swing_reg()
802 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x883, 0x3e, val); in btc8723b2ant_set_dac_swing_reg()
815 static void btc8723b2ant_dac_swing(struct btc_coexist *btcoexist, in btc8723b2ant_dac_swing() argument
819 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_dac_swing()
841 btc8723b2ant_set_sw_fulltime_dac_swing(btcoexist, dac_swing_on, in btc8723b2ant_dac_swing()
848 static void btc8723b2ant_set_coex_table(struct btc_coexist *btcoexist, in btc8723b2ant_set_coex_table() argument
852 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_set_coex_table()
856 btcoexist->btc_write_4byte(btcoexist, 0x6c0, val0x6c0); in btc8723b2ant_set_coex_table()
860 btcoexist->btc_write_4byte(btcoexist, 0x6c4, val0x6c4); in btc8723b2ant_set_coex_table()
864 btcoexist->btc_write_4byte(btcoexist, 0x6c8, val0x6c8); in btc8723b2ant_set_coex_table()
868 btcoexist->btc_write_1byte(btcoexist, 0x6cc, val0x6cc); in btc8723b2ant_set_coex_table()
871 static void btc8723b2ant_coex_table(struct btc_coexist *btcoexist, in btc8723b2ant_coex_table() argument
876 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_coex_table()
903 btc8723b2ant_set_coex_table(btcoexist, val0x6c0, val0x6c4, in btc8723b2ant_coex_table()
912 static void btc8723b2ant_coex_table_with_type(struct btc_coexist *btcoexist, in btc8723b2ant_coex_table_with_type() argument
917 btc8723b2ant_coex_table(btcoexist, force_exec, 0x55555555, in btc8723b2ant_coex_table_with_type()
921 btc8723b2ant_coex_table(btcoexist, force_exec, 0x55555555, in btc8723b2ant_coex_table_with_type()
925 btc8723b2ant_coex_table(btcoexist, force_exec, 0x5ada5ada, in btc8723b2ant_coex_table_with_type()
929 btc8723b2ant_coex_table(btcoexist, force_exec, 0xaaaaaaaa, in btc8723b2ant_coex_table_with_type()
933 btc8723b2ant_coex_table(btcoexist, force_exec, 0xffffffff, in btc8723b2ant_coex_table_with_type()
937 btc8723b2ant_coex_table(btcoexist, force_exec, 0x5fff5fff, in btc8723b2ant_coex_table_with_type()
941 btc8723b2ant_coex_table(btcoexist, force_exec, 0x55ff55ff, in btc8723b2ant_coex_table_with_type()
945 btc8723b2ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in btc8723b2ant_coex_table_with_type()
949 btc8723b2ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in btc8723b2ant_coex_table_with_type()
953 btc8723b2ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in btc8723b2ant_coex_table_with_type()
957 btc8723b2ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in btc8723b2ant_coex_table_with_type()
961 btc8723b2ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in btc8723b2ant_coex_table_with_type()
965 btc8723b2ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in btc8723b2ant_coex_table_with_type()
969 btc8723b2ant_coex_table(btcoexist, force_exec, 0x5fff5fff, in btc8723b2ant_coex_table_with_type()
973 btc8723b2ant_coex_table(btcoexist, force_exec, 0x5fff5fff, in btc8723b2ant_coex_table_with_type()
977 btc8723b2ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in btc8723b2ant_coex_table_with_type()
985 static void btc8723b2ant_set_fw_ignore_wlan_act(struct btc_coexist *btcoexist, in btc8723b2ant_set_fw_ignore_wlan_act() argument
988 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_set_fw_ignore_wlan_act()
998 btcoexist->btc_fill_h2c(btcoexist, 0x63, 1, h2c_parameter); in btc8723b2ant_set_fw_ignore_wlan_act()
1001 static void btc8723b2ant_set_lps_rpwm(struct btc_coexist *btcoexist, in btc8723b2ant_set_lps_rpwm() argument
1007 btcoexist->btc_set(btcoexist, BTC_SET_U1_LPS_VAL, &lps); in btc8723b2ant_set_lps_rpwm()
1008 btcoexist->btc_set(btcoexist, BTC_SET_U1_RPWM_VAL, &rpwm); in btc8723b2ant_set_lps_rpwm()
1011 static void btc8723b2ant_lps_rpwm(struct btc_coexist *btcoexist, in btc8723b2ant_lps_rpwm() argument
1022 btc8723b2ant_set_lps_rpwm(btcoexist, lps_val, rpwm_val); in btc8723b2ant_lps_rpwm()
1028 static void btc8723b2ant_ignore_wlan_act(struct btc_coexist *btcoexist, in btc8723b2ant_ignore_wlan_act() argument
1031 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_ignore_wlan_act()
1048 btc8723b2ant_set_fw_ignore_wlan_act(btcoexist, enable); in btc8723b2ant_ignore_wlan_act()
1053 static void btc8723b2ant_set_fw_ps_tdma(struct btc_coexist *btcoexist, u8 byte1, in btc8723b2ant_set_fw_ps_tdma() argument
1056 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_set_fw_ps_tdma()
1079 btcoexist->btc_fill_h2c(btcoexist, 0x60, 5, h2c_parameter); in btc8723b2ant_set_fw_ps_tdma()
1082 static void btc8723b2ant_sw_mechanism(struct btc_coexist *btcoexist, in btc8723b2ant_sw_mechanism() argument
1086 btc8723b2ant_low_penalty_ra(btcoexist, NORMAL_EXEC, low_penalty_ra); in btc8723b2ant_sw_mechanism()
1089 static void btc8723b2ant_set_ant_path(struct btc_coexist *btcoexist, in btc8723b2ant_set_ant_path() argument
1093 struct btc_board_info *board_info = &btcoexist->board_info; in btc8723b2ant_set_ant_path()
1099 btcoexist->btc_get(btcoexist, BTC_GET_BL_EXT_SWITCH, &pg_ext_switch); in btc8723b2ant_set_ant_path()
1100 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_FW_VER, &fw_ver); in btc8723b2ant_set_ant_path()
1106 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x39, 0x8, 0x1); in btc8723b2ant_set_ant_path()
1107 btcoexist->btc_write_1byte(btcoexist, 0x974, 0xff); in btc8723b2ant_set_ant_path()
1108 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x944, 0x3, 0x3); in btc8723b2ant_set_ant_path()
1109 btcoexist->btc_write_1byte(btcoexist, 0x930, 0x77); in btc8723b2ant_set_ant_path()
1110 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x67, 0x20, 0x1); in btc8723b2ant_set_ant_path()
1115 btcoexist->btc_fill_h2c(btcoexist, 0x6E, 1, in btc8723b2ant_set_ant_path()
1118 btcoexist->btc_write_1byte(btcoexist, 0x765, 0x18); in btc8723b2ant_set_ant_path()
1121 btcoexist->btc_write_4byte(btcoexist, 0x948, 0x0); in btc8723b2ant_set_ant_path()
1124 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, in btc8723b2ant_set_ant_path()
1142 btcoexist->btc_fill_h2c(btcoexist, 0x65, 2, h2c_parameter); in btc8723b2ant_set_ant_path()
1147 btcoexist->btc_fill_h2c(btcoexist, 0x6E, 1, in btc8723b2ant_set_ant_path()
1150 btcoexist->btc_write_1byte(btcoexist, 0x765, 0x0); in btc8723b2ant_set_ant_path()
1158 u32tmp = btcoexist->btc_read_4byte(btcoexist, 0x4c); in btc8723b2ant_set_ant_path()
1161 btcoexist->btc_write_4byte(btcoexist, 0x4c, u32tmp); in btc8723b2ant_set_ant_path()
1166 btcoexist->btc_write_2byte(btcoexist, 0x948, 0x0); in btc8723b2ant_set_ant_path()
1168 btcoexist->btc_write_2byte(btcoexist, 0x948, 0x280); in btc8723b2ant_set_ant_path()
1173 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x92c, in btc8723b2ant_set_ant_path()
1178 btcoexist->btc_write_1byte_bitmask(btcoexist, in btc8723b2ant_set_ant_path()
1186 u32tmp = btcoexist->btc_read_4byte(btcoexist, 0x4c); in btc8723b2ant_set_ant_path()
1189 btcoexist->btc_write_4byte(btcoexist, 0x4c, u32tmp); in btc8723b2ant_set_ant_path()
1193 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x64, 0x1, 0x0); in btc8723b2ant_set_ant_path()
1197 btcoexist->btc_write_2byte(btcoexist, 0x948, 0x0); in btc8723b2ant_set_ant_path()
1201 btcoexist->btc_write_2byte(btcoexist, 0x948, 0x280); in btc8723b2ant_set_ant_path()
1207 static void btc8723b2ant_ps_tdma(struct btc_coexist *btcoexist, bool force_exec, in btc8723b2ant_ps_tdma() argument
1210 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_ps_tdma()
1211 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8723b2ant_ps_tdma()
1218 wifi_rssi_state = btc8723b2ant_wifi_rssi_state(btcoexist, 0, 2, tmp, 0); in btc8723b2ant_ps_tdma()
1221 bt_rssi_state = btc8723b2ant_bt_rssi_state(btcoexist, 2, tmp, 0); in btc8723b2ant_ps_tdma()
1291 btcoexist, 0xe3, 0x3c, in btc8723b2ant_ps_tdma()
1296 btcoexist, 0xe3, 0x2d, in btc8723b2ant_ps_tdma()
1300 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1c, in btc8723b2ant_ps_tdma()
1305 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x10, in btc8723b2ant_ps_tdma()
1311 btcoexist, 0xe3, 0x3c, in btc8723b2ant_ps_tdma()
1316 btcoexist, 0xe3, 0x2d, in btc8723b2ant_ps_tdma()
1320 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1c, in btc8723b2ant_ps_tdma()
1325 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xa3, 0x10, in btc8723b2ant_ps_tdma()
1331 btcoexist, 0xe3, 0x3c + wifi_duration_adjust, in btc8723b2ant_ps_tdma()
1336 btcoexist, 0xe3, 0x2d, in btc8723b2ant_ps_tdma()
1340 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1c, in btc8723b2ant_ps_tdma()
1345 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x10, in btc8723b2ant_ps_tdma()
1351 btcoexist, 0xe3, 0x3c, in btc8723b2ant_ps_tdma()
1356 btcoexist, 0xe3, 0x2d, in btc8723b2ant_ps_tdma()
1360 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1c, in btc8723b2ant_ps_tdma()
1365 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x10, in btc8723b2ant_ps_tdma()
1370 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xa3, 0x2f, in btc8723b2ant_ps_tdma()
1374 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x5, 0x5, in btc8723b2ant_ps_tdma()
1378 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x25, in btc8723b2ant_ps_tdma()
1382 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x25, in btc8723b2ant_ps_tdma()
1386 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x15, in btc8723b2ant_ps_tdma()
1392 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x35, in btc8723b2ant_ps_tdma()
1397 btcoexist, 0xe3, 0x3c + wifi_duration_adjust, in btc8723b2ant_ps_tdma()
1405 btcoexist, 0xd3, 0x3a + wifi_duration_adjust, in btc8723b2ant_ps_tdma()
1413 btcoexist, 0xd3, 0x2d + wifi_duration_adjust, in btc8723b2ant_ps_tdma()
1420 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xd3, 0x1c, in btc8723b2ant_ps_tdma()
1428 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xd3, 0x10, in btc8723b2ant_ps_tdma()
1433 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x3c, in btc8723b2ant_ps_tdma()
1438 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x15, in btc8723b2ant_ps_tdma()
1444 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x35, in btc8723b2ant_ps_tdma()
1452 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0x0, 0x0, 0x0, in btc8723b2ant_ps_tdma()
1456 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0x0, 0x0, 0x0, in btc8723b2ant_ps_tdma()
1460 btc8723b2ant_set_fw_ps_tdma(btcoexist, 0x0, 0x0, 0x0, in btc8723b2ant_ps_tdma()
1472 struct btc_coexist *btcoexist, bool new_ps_state) in btc8723b2ant_ps_tdma_check_for_power_save_state() argument
1476 btcoexist->btc_get(btcoexist, BTC_GET_U1_LPS_MODE, &lps_mode); in btc8723b2ant_ps_tdma_check_for_power_save_state()
1484 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_ps_tdma_check_for_power_save_state()
1490 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_ps_tdma_check_for_power_save_state()
1497 static void btc8723b2ant_power_save_state(struct btc_coexist *btcoexist, in btc8723b2ant_power_save_state() argument
1506 btcoexist->btc_set(btcoexist, BTC_SET_ACT_DISABLE_LOW_POWER, in btc8723b2ant_power_save_state()
1508 btcoexist->btc_set(btcoexist, BTC_SET_ACT_NORMAL_LPS, NULL); in btc8723b2ant_power_save_state()
1512 btc8723b2ant_ps_tdma_check_for_power_save_state(btcoexist, in btc8723b2ant_power_save_state()
1514 btc8723b2ant_lps_rpwm(btcoexist, NORMAL_EXEC, lps_val, in btc8723b2ant_power_save_state()
1518 btcoexist->btc_set(btcoexist, BTC_SET_ACT_DISABLE_LOW_POWER, in btc8723b2ant_power_save_state()
1521 btcoexist->btc_set(btcoexist, BTC_SET_ACT_ENTER_LPS, NULL); in btc8723b2ant_power_save_state()
1525 btc8723b2ant_ps_tdma_check_for_power_save_state(btcoexist, in btc8723b2ant_power_save_state()
1527 btcoexist->btc_set(btcoexist, BTC_SET_ACT_LEAVE_LPS, NULL); in btc8723b2ant_power_save_state()
1535 static void btc8723b2ant_coex_alloff(struct btc_coexist *btcoexist) in btc8723b2ant_coex_alloff() argument
1538 btc8723b2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); in btc8723b2ant_coex_alloff()
1539 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_coex_alloff()
1540 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_coex_alloff()
1541 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_coex_alloff()
1544 btc8723b2ant_sw_mechanism(btcoexist, false, false, false, false); in btc8723b2ant_coex_alloff()
1547 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_coex_alloff()
1548 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_coex_alloff()
1551 static void btc8723b2ant_init_coex_dm(struct btc_coexist *btcoexist) in btc8723b2ant_init_coex_dm() argument
1554 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_init_coex_dm()
1555 btc8723b2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); in btc8723b2ant_init_coex_dm()
1557 btc8723b2ant_ps_tdma(btcoexist, FORCE_EXEC, false, 1); in btc8723b2ant_init_coex_dm()
1558 btc8723b2ant_fw_dac_swing_lvl(btcoexist, FORCE_EXEC, 6); in btc8723b2ant_init_coex_dm()
1559 btc8723b2ant_dec_bt_pwr(btcoexist, FORCE_EXEC, 0); in btc8723b2ant_init_coex_dm()
1561 btc8723b2ant_sw_mechanism(btcoexist, false, false, false, false); in btc8723b2ant_init_coex_dm()
1566 static void btc8723b2ant_action_bt_inquiry(struct btc_coexist *btcoexist) in btc8723b2ant_action_bt_inquiry() argument
1568 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_action_bt_inquiry()
1573 btcoexist->btc_set(btcoexist, BTC_SET_ACT_DISABLE_LOW_POWER, in btc8723b2ant_action_bt_inquiry()
1575 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in btc8723b2ant_action_bt_inquiry()
1578 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_SCAN, &scan); in btc8723b2ant_action_bt_inquiry()
1579 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_LINK, &link); in btc8723b2ant_action_bt_inquiry()
1580 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_ROAM, &roam); in btc8723b2ant_action_bt_inquiry()
1582 btc8723b2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); in btc8723b2ant_action_bt_inquiry()
1585 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 23); in btc8723b2ant_action_bt_inquiry()
1586 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 3); in btc8723b2ant_action_bt_inquiry()
1590 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 15); in btc8723b2ant_action_bt_inquiry()
1591 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 22); in btc8723b2ant_action_bt_inquiry()
1595 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 15); in btc8723b2ant_action_bt_inquiry()
1596 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 22); in btc8723b2ant_action_bt_inquiry()
1598 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_bt_inquiry()
1599 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_action_bt_inquiry()
1601 btc8723b2ant_fw_dac_swing_lvl(btcoexist, FORCE_EXEC, 6); in btc8723b2ant_action_bt_inquiry()
1602 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_bt_inquiry()
1604 btc8723b2ant_sw_mechanism(btcoexist, false, false, false, false); in btc8723b2ant_action_bt_inquiry()
1608 *btcoexist) in btc8723b2ant_action_wifi_link_process() argument
1610 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_action_wifi_link_process()
1614 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 15); in btc8723b2ant_action_wifi_link_process()
1615 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 22); in btc8723b2ant_action_wifi_link_process()
1617 btc8723b2ant_sw_mechanism(btcoexist, false, false, false, false); in btc8723b2ant_action_wifi_link_process()
1619 u32tmp = btcoexist->btc_read_4byte(btcoexist, 0x948); in btc8723b2ant_action_wifi_link_process()
1620 u8tmpa = btcoexist->btc_read_1byte(btcoexist, 0x765); in btc8723b2ant_action_wifi_link_process()
1621 u8tmpb = btcoexist->btc_read_1byte(btcoexist, 0x76e); in btc8723b2ant_action_wifi_link_process()
1628 static bool btc8723b2ant_action_wifi_idle_process(struct btc_coexist *btcoexist) in btc8723b2ant_action_wifi_idle_process() argument
1630 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_action_wifi_idle_process()
1636 btc8723b2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8723b2ant_action_wifi_idle_process()
1637 wifi_rssi_state1 = btc8723b2ant_wifi_rssi_state(btcoexist, 1, 2, in btc8723b2ant_action_wifi_idle_process()
1641 btc8723b2ant_bt_rssi_state(btcoexist, 2, tmp, 0); in btc8723b2ant_action_wifi_idle_process()
1643 btcoexist->btc_get(btcoexist, BTC_GET_U1_AP_NUM, &ap_num); in btc8723b2ant_action_wifi_idle_process()
1651 btc8723b2ant_dac_swing(btcoexist, NORMAL_EXEC, true, 0x6); in btc8723b2ant_action_wifi_idle_process()
1652 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_wifi_idle_process()
1655 btc8723b2ant_sw_mechanism(btcoexist, false, false, false, in btc8723b2ant_action_wifi_idle_process()
1657 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_wifi_idle_process()
1658 btc8723b2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8723b2ant_action_wifi_idle_process()
1660 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_action_wifi_idle_process()
1665 btc8723b2ant_dac_swing(btcoexist, NORMAL_EXEC, true, 0x18); in btc8723b2ant_action_wifi_idle_process()
1669 static bool btc8723b2ant_is_common_action(struct btc_coexist *btcoexist) in btc8723b2ant_is_common_action() argument
1671 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_is_common_action()
1676 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in btc8723b2ant_is_common_action()
1677 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in btc8723b2ant_is_common_action()
1679 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in btc8723b2ant_is_common_action()
1683 btcoexist->btc_set(btcoexist, BTC_SET_ACT_DISABLE_LOW_POWER, in btc8723b2ant_is_common_action()
1685 btc8723b2ant_limited_rx(btcoexist, NORMAL_EXEC, in btc8723b2ant_is_common_action()
1691 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, in btc8723b2ant_is_common_action()
1693 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_is_common_action()
1694 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_is_common_action()
1695 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_is_common_action()
1696 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_is_common_action()
1698 btc8723b2ant_sw_mechanism(btcoexist, false, false, false, in btc8723b2ant_is_common_action()
1706 btcoexist->btc_set(btcoexist, in btc8723b2ant_is_common_action()
1709 btc8723b2ant_limited_rx(btcoexist, NORMAL_EXEC, in btc8723b2ant_is_common_action()
1715 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, in btc8723b2ant_is_common_action()
1717 btc8723b2ant_coex_table_with_type(btcoexist, in btc8723b2ant_is_common_action()
1719 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_is_common_action()
1720 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, in btc8723b2ant_is_common_action()
1722 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_is_common_action()
1724 btc8723b2ant_sw_mechanism(btcoexist, false, false, in btc8723b2ant_is_common_action()
1731 btcoexist->btc_set(btcoexist, in btc8723b2ant_is_common_action()
1739 btc8723b2ant_limited_rx(btcoexist, NORMAL_EXEC, in btc8723b2ant_is_common_action()
1742 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, in btc8723b2ant_is_common_action()
1744 btc8723b2ant_coex_table_with_type(btcoexist, in btc8723b2ant_is_common_action()
1746 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_is_common_action()
1747 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, in btc8723b2ant_is_common_action()
1749 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_is_common_action()
1751 btc8723b2ant_sw_mechanism(btcoexist, true, false, in btc8723b2ant_is_common_action()
1757 btcoexist->btc_set(btcoexist, in btc8723b2ant_is_common_action()
1771 btcoexist); in btc8723b2ant_is_common_action()
1779 static void btc8723b2ant_tdma_duration_adjust(struct btc_coexist *btcoexist, in btc8723b2ant_tdma_duration_adjust() argument
1783 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_tdma_duration_adjust()
1799 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
1804 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
1809 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
1814 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
1821 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
1826 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
1831 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
1836 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
1845 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
1850 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
1855 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
1860 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
1867 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
1872 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
1877 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
1882 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
1994 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
1999 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2004 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2009 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2014 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()
2044 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2050 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2056 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2062 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2068 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2074 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2082 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2088 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2094 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2100 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2106 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2112 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2120 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2125 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2130 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2135 btc8723b2ant_ps_tdma(btcoexist, 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()
2165 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2171 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2177 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2183 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2189 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2195 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2201 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2209 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2215 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2221 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2227 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2233 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2239 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2245 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2255 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2260 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2265 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2270 btc8723b2ant_ps_tdma(btcoexist, 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()
2299 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2305 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2311 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2317 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2323 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2329 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2337 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2343 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2349 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2355 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2361 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2367 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2375 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2380 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2385 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2390 btc8723b2ant_ps_tdma(btcoexist, 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()
2419 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2425 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2431 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2437 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2443 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2449 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2457 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2463 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2469 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2475 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2481 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2487 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2497 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2502 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2507 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2512 btc8723b2ant_ps_tdma(btcoexist, 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()
2541 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2547 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2553 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2559 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2565 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2571 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2579 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2585 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2591 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2597 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2603 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2609 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2617 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2622 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2627 btc8723b2ant_ps_tdma(btcoexist, in btc8723b2ant_tdma_duration_adjust()
2632 btc8723b2ant_ps_tdma(btcoexist, 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()
2661 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2667 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2673 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2679 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2685 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2691 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2699 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2705 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2711 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2717 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2723 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2729 btcoexist, NORMAL_EXEC, in btc8723b2ant_tdma_duration_adjust()
2751 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_SCAN, &scan); in btc8723b2ant_tdma_duration_adjust()
2752 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_LINK, &link); in btc8723b2ant_tdma_duration_adjust()
2753 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_ROAM, &roam); in btc8723b2ant_tdma_duration_adjust()
2756 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, in btc8723b2ant_tdma_duration_adjust()
2765 static void btc8723b2ant_action_sco(struct btc_coexist *btcoexist) in btc8723b2ant_action_sco() argument
2770 btc8723b2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8723b2ant_action_sco()
2772 btcoexist, 2, BT_8723B_2ANT_BT_RSSI_COEXSWITCH_THRES - in btc8723b2ant_action_sco()
2776 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_sco()
2778 btc8723b2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8723b2ant_action_sco()
2779 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 4); in btc8723b2ant_action_sco()
2782 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8723b2ant_action_sco()
2784 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_sco()
2786 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_sco()
2790 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 2); in btc8723b2ant_action_sco()
2793 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 8); in btc8723b2ant_action_sco()
2796 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 0); in btc8723b2ant_action_sco()
2800 btc8723b2ant_sw_mechanism(btcoexist, true, true, in btc8723b2ant_action_sco()
2803 btc8723b2ant_sw_mechanism(btcoexist, false, true, in btc8723b2ant_action_sco()
2808 static void btc8723b2ant_action_hid(struct btc_coexist *btcoexist) in btc8723b2ant_action_hid() argument
2815 btc8723b2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8723b2ant_action_hid()
2816 bt_rssi_state = btc8723b2ant_bt_rssi_state(btcoexist, 2, tmp, 0); in btc8723b2ant_action_hid()
2818 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_hid()
2820 btc8723b2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8723b2ant_action_hid()
2821 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_hid()
2824 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8723b2ant_action_hid()
2826 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_hid()
2828 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_hid()
2832 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_hid()
2835 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 9); in btc8723b2ant_action_hid()
2837 btc8723b2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); in btc8723b2ant_action_hid()
2841 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 9); in btc8723b2ant_action_hid()
2843 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 13); in btc8723b2ant_action_hid()
2847 btc8723b2ant_sw_mechanism(btcoexist, true, true, false, false); in btc8723b2ant_action_hid()
2849 btc8723b2ant_sw_mechanism(btcoexist, false, true, false, false); in btc8723b2ant_action_hid()
2853 static void btc8723b2ant_action_a2dp(struct btc_coexist *btcoexist) in btc8723b2ant_action_a2dp() argument
2861 btc8723b2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8723b2ant_action_a2dp()
2862 wifi_rssi_state1 = btc8723b2ant_wifi_rssi_state(btcoexist, 1, 2, 40, 0); in btc8723b2ant_action_a2dp()
2863 bt_rssi_state = btc8723b2ant_bt_rssi_state(btcoexist, 2, tmp, 0); in btc8723b2ant_action_a2dp()
2865 btcoexist->btc_get(btcoexist, BTC_GET_U1_AP_NUM, &ap_num); in btc8723b2ant_action_a2dp()
2870 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, in btc8723b2ant_action_a2dp()
2872 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_a2dp()
2873 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8723b2ant_action_a2dp()
2874 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_a2dp()
2875 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_action_a2dp()
2878 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_a2dp()
2880 btc8723b2ant_sw_mechanism(btcoexist, true, false, in btc8723b2ant_action_a2dp()
2883 btc8723b2ant_sw_mechanism(btcoexist, false, false, in btc8723b2ant_action_a2dp()
2889 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_a2dp()
2890 btc8723b2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8723b2ant_action_a2dp()
2892 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_a2dp()
2895 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8723b2ant_action_a2dp()
2897 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_a2dp()
2900 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_a2dp()
2901 btc8723b2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8723b2ant_action_a2dp()
2904 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 13); in btc8723b2ant_action_a2dp()
2905 btc8723b2ant_power_save_state(btcoexist, BTC_PS_LPS_ON, 0x50, in btc8723b2ant_action_a2dp()
2911 btc8723b2ant_tdma_duration_adjust(btcoexist, false, in btc8723b2ant_action_a2dp()
2914 btc8723b2ant_tdma_duration_adjust(btcoexist, false, true, 1); in btc8723b2ant_action_a2dp()
2917 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_a2dp()
2919 btc8723b2ant_sw_mechanism(btcoexist, true, false, in btc8723b2ant_action_a2dp()
2922 btc8723b2ant_sw_mechanism(btcoexist, false, false, in btc8723b2ant_action_a2dp()
2927 static void btc8723b2ant_action_a2dp_pan_hs(struct btc_coexist *btcoexist) in btc8723b2ant_action_a2dp_pan_hs() argument
2934 btc8723b2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8723b2ant_action_a2dp_pan_hs()
2935 wifi_rssi_state1 = btc8723b2ant_wifi_rssi_state(btcoexist, 1, 2, in btc8723b2ant_action_a2dp_pan_hs()
2939 bt_rssi_state = btc8723b2ant_bt_rssi_state(btcoexist, 2, tmp, 0); in btc8723b2ant_action_a2dp_pan_hs()
2941 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_a2dp_pan_hs()
2943 btc8723b2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8723b2ant_action_a2dp_pan_hs()
2944 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_a2dp_pan_hs()
2947 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8723b2ant_action_a2dp_pan_hs()
2949 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_a2dp_pan_hs()
2952 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_a2dp_pan_hs()
2953 btc8723b2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8723b2ant_action_a2dp_pan_hs()
2956 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 13); in btc8723b2ant_action_a2dp_pan_hs()
2957 btc8723b2ant_power_save_state(btcoexist, BTC_PS_LPS_ON, 0x50, in btc8723b2ant_action_a2dp_pan_hs()
2961 btc8723b2ant_tdma_duration_adjust(btcoexist, false, true, 2); in btc8723b2ant_action_a2dp_pan_hs()
2964 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_a2dp_pan_hs()
2966 btc8723b2ant_sw_mechanism(btcoexist, true, false, in btc8723b2ant_action_a2dp_pan_hs()
2969 btc8723b2ant_sw_mechanism(btcoexist, false, false, in btc8723b2ant_action_a2dp_pan_hs()
2974 static void btc8723b2ant_action_pan_edr(struct btc_coexist *btcoexist) in btc8723b2ant_action_pan_edr() argument
2981 btc8723b2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8723b2ant_action_pan_edr()
2982 wifi_rssi_state1 = btc8723b2ant_wifi_rssi_state(btcoexist, 1, 2, in btc8723b2ant_action_pan_edr()
2986 bt_rssi_state = btc8723b2ant_bt_rssi_state(btcoexist, 2, tmp, 0); in btc8723b2ant_action_pan_edr()
2988 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_pan_edr()
2990 btc8723b2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8723b2ant_action_pan_edr()
2991 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_pan_edr()
2994 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8723b2ant_action_pan_edr()
2996 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_pan_edr()
2999 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 10); in btc8723b2ant_action_pan_edr()
3000 btc8723b2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8723b2ant_action_pan_edr()
3003 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 13); in btc8723b2ant_action_pan_edr()
3004 btc8723b2ant_power_save_state(btcoexist, BTC_PS_LPS_ON, 0x50, in btc8723b2ant_action_pan_edr()
3010 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 1); in btc8723b2ant_action_pan_edr()
3012 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 5); in btc8723b2ant_action_pan_edr()
3015 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_pan_edr()
3017 btc8723b2ant_sw_mechanism(btcoexist, true, false, in btc8723b2ant_action_pan_edr()
3020 btc8723b2ant_sw_mechanism(btcoexist, false, false, in btc8723b2ant_action_pan_edr()
3026 static void btc8723b2ant_action_pan_hs(struct btc_coexist *btcoexist) in btc8723b2ant_action_pan_hs() argument
3033 btc8723b2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8723b2ant_action_pan_hs()
3034 btc8723b2ant_wifi_rssi_state(btcoexist, 1, 2, in btc8723b2ant_action_pan_hs()
3038 bt_rssi_state = btc8723b2ant_bt_rssi_state(btcoexist, 2, tmp, 0); in btc8723b2ant_action_pan_hs()
3040 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_pan_hs()
3042 btc8723b2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8723b2ant_action_pan_hs()
3043 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_pan_hs()
3046 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8723b2ant_action_pan_hs()
3048 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_pan_hs()
3050 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_pan_hs()
3051 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_action_pan_hs()
3053 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_pan_hs()
3055 btc8723b2ant_sw_mechanism(btcoexist, true, false, in btc8723b2ant_action_pan_hs()
3058 btc8723b2ant_sw_mechanism(btcoexist, false, false, in btc8723b2ant_action_pan_hs()
3064 static void btc8723b2ant_action_pan_edr_a2dp(struct btc_coexist *btcoexist) in btc8723b2ant_action_pan_edr_a2dp() argument
3071 btc8723b2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8723b2ant_action_pan_edr_a2dp()
3072 wifi_rssi_state1 = btc8723b2ant_wifi_rssi_state(btcoexist, 1, 2, in btc8723b2ant_action_pan_edr_a2dp()
3076 bt_rssi_state = btc8723b2ant_bt_rssi_state(btcoexist, 2, tmp, 0); in btc8723b2ant_action_pan_edr_a2dp()
3078 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_pan_edr_a2dp()
3080 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_pan_edr_a2dp()
3083 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8723b2ant_action_pan_edr_a2dp()
3085 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_pan_edr_a2dp()
3088 btc8723b2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8723b2ant_action_pan_edr_a2dp()
3091 btc8723b2ant_power_save_state(btcoexist, BTC_PS_LPS_ON, 0x50, in btc8723b2ant_action_pan_edr_a2dp()
3093 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_pan_edr_a2dp()
3097 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 12); in btc8723b2ant_action_pan_edr_a2dp()
3099 btc8723b2ant_tdma_duration_adjust(btcoexist, false, in btc8723b2ant_action_pan_edr_a2dp()
3102 btc8723b2ant_tdma_duration_adjust(btcoexist, false, in btc8723b2ant_action_pan_edr_a2dp()
3105 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_pan_edr_a2dp()
3106 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 3); in btc8723b2ant_action_pan_edr_a2dp()
3111 btc8723b2ant_sw_mechanism(btcoexist, true, false, in btc8723b2ant_action_pan_edr_a2dp()
3114 btc8723b2ant_sw_mechanism(btcoexist, false, false, in btc8723b2ant_action_pan_edr_a2dp()
3119 static void btc8723b2ant_action_pan_edr_hid(struct btc_coexist *btcoexist) in btc8723b2ant_action_pan_edr_hid() argument
3126 btc8723b2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8723b2ant_action_pan_edr_hid()
3127 wifi_rssi_state1 = btc8723b2ant_wifi_rssi_state(btcoexist, 1, 2, in btc8723b2ant_action_pan_edr_hid()
3131 bt_rssi_state = btc8723b2ant_bt_rssi_state(btcoexist, 2, tmp, 0); in btc8723b2ant_action_pan_edr_hid()
3132 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_pan_edr_hid()
3134 btc8723b2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8723b2ant_action_pan_edr_hid()
3137 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8723b2ant_action_pan_edr_hid()
3139 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_pan_edr_hid()
3142 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_pan_edr_hid()
3143 btc8723b2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8723b2ant_action_pan_edr_hid()
3146 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 14); in btc8723b2ant_action_pan_edr_hid()
3147 btc8723b2ant_power_save_state(btcoexist, BTC_PS_LPS_ON, 0x50, in btc8723b2ant_action_pan_edr_hid()
3154 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, in btc8723b2ant_action_pan_edr_hid()
3156 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, in btc8723b2ant_action_pan_edr_hid()
3159 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, in btc8723b2ant_action_pan_edr_hid()
3161 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, in btc8723b2ant_action_pan_edr_hid()
3164 btc8723b2ant_tdma_duration_adjust(btcoexist, true, false, 2); in btc8723b2ant_action_pan_edr_hid()
3166 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_pan_edr_hid()
3167 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, in btc8723b2ant_action_pan_edr_hid()
3169 btc8723b2ant_tdma_duration_adjust(btcoexist, true, true, 2); in btc8723b2ant_action_pan_edr_hid()
3174 btc8723b2ant_sw_mechanism(btcoexist, true, true, in btc8723b2ant_action_pan_edr_hid()
3177 btc8723b2ant_sw_mechanism(btcoexist, false, true, in btc8723b2ant_action_pan_edr_hid()
3183 static void btc8723b2ant_action_hid_a2dp_pan_edr(struct btc_coexist *btcoexist) in btc8723b2ant_action_hid_a2dp_pan_edr() argument
3190 btc8723b2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8723b2ant_action_hid_a2dp_pan_edr()
3191 wifi_rssi_state1 = btc8723b2ant_wifi_rssi_state(btcoexist, 1, 2, in btc8723b2ant_action_hid_a2dp_pan_edr()
3195 bt_rssi_state = btc8723b2ant_bt_rssi_state(btcoexist, 2, tmp, 0); in btc8723b2ant_action_hid_a2dp_pan_edr()
3197 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_hid_a2dp_pan_edr()
3199 btc8723b2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8723b2ant_action_hid_a2dp_pan_edr()
3200 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_hid_a2dp_pan_edr()
3203 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8723b2ant_action_hid_a2dp_pan_edr()
3205 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_hid_a2dp_pan_edr()
3208 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_hid_a2dp_pan_edr()
3209 btc8723b2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8723b2ant_action_hid_a2dp_pan_edr()
3212 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 14); in btc8723b2ant_action_hid_a2dp_pan_edr()
3213 btc8723b2ant_power_save_state(btcoexist, BTC_PS_LPS_ON, 0x50, in btc8723b2ant_action_hid_a2dp_pan_edr()
3217 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_hid_a2dp_pan_edr()
3223 btc8723b2ant_tdma_duration_adjust(btcoexist, true, in btc8723b2ant_action_hid_a2dp_pan_edr()
3226 btc8723b2ant_tdma_duration_adjust(btcoexist, true, in btc8723b2ant_action_hid_a2dp_pan_edr()
3229 btc8723b2ant_tdma_duration_adjust(btcoexist, true, true, 3); in btc8723b2ant_action_hid_a2dp_pan_edr()
3234 btc8723b2ant_sw_mechanism(btcoexist, true, true, in btc8723b2ant_action_hid_a2dp_pan_edr()
3237 btc8723b2ant_sw_mechanism(btcoexist, false, true, in btc8723b2ant_action_hid_a2dp_pan_edr()
3242 static void btc8723b2ant_action_hid_a2dp(struct btc_coexist *btcoexist) in btc8723b2ant_action_hid_a2dp() argument
3250 btc8723b2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8723b2ant_action_hid_a2dp()
3251 wifi_rssi_state1 = btc8723b2ant_wifi_rssi_state(btcoexist, 1, 2, in btc8723b2ant_action_hid_a2dp()
3255 bt_rssi_state = btc8723b2ant_bt_rssi_state(btcoexist, 3, tmp, 37); in btc8723b2ant_action_hid_a2dp()
3257 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8723b2ant_action_hid_a2dp()
3259 btc8723b2ant_limited_rx(btcoexist, NORMAL_EXEC, false, true, 0x5); in btc8723b2ant_action_hid_a2dp()
3260 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_hid_a2dp()
3262 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8723b2ant_action_hid_a2dp()
3266 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8723b2ant_action_hid_a2dp()
3268 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8723b2ant_action_hid_a2dp()
3270 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_hid_a2dp()
3276 btc8723b2ant_dec_bt_pwr(btcoexist, in btc8723b2ant_action_hid_a2dp()
3279 btc8723b2ant_dec_bt_pwr(btcoexist, in btc8723b2ant_action_hid_a2dp()
3282 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8723b2ant_action_hid_a2dp()
3284 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_hid_a2dp()
3289 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 7); in btc8723b2ant_action_hid_a2dp()
3290 btc8723b2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8723b2ant_action_hid_a2dp()
3293 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 14); in btc8723b2ant_action_hid_a2dp()
3294 btc8723b2ant_power_save_state(btcoexist, BTC_PS_LPS_ON, 0x50, in btc8723b2ant_action_hid_a2dp()
3300 btc8723b2ant_tdma_duration_adjust(btcoexist, true, in btc8723b2ant_action_hid_a2dp()
3303 btc8723b2ant_tdma_duration_adjust(btcoexist, true, in btc8723b2ant_action_hid_a2dp()
3306 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 18); in btc8723b2ant_action_hid_a2dp()
3307 btcoexist->btc_write_1byte(btcoexist, 0x456, 0x38); in btc8723b2ant_action_hid_a2dp()
3308 btcoexist->btc_write_2byte(btcoexist, 0x42a, 0x0808); in btc8723b2ant_action_hid_a2dp()
3309 btcoexist->btc_write_4byte(btcoexist, 0x430, 0x0); in btc8723b2ant_action_hid_a2dp()
3310 btcoexist->btc_write_4byte(btcoexist, 0x434, 0x01010000); in btc8723b2ant_action_hid_a2dp()
3313 btc8723b2ant_tdma_duration_adjust(btcoexist, true, in btc8723b2ant_action_hid_a2dp()
3316 btc8723b2ant_tdma_duration_adjust(btcoexist, true, in btc8723b2ant_action_hid_a2dp()
3322 btc8723b2ant_sw_mechanism(btcoexist, true, true, in btc8723b2ant_action_hid_a2dp()
3325 btc8723b2ant_sw_mechanism(btcoexist, false, true, in btc8723b2ant_action_hid_a2dp()
3330 static void btc8723b2ant_action_wifi_multi_port(struct btc_coexist *btcoexist) in btc8723b2ant_action_wifi_multi_port() argument
3332 btc8723b2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8723b2ant_action_wifi_multi_port()
3333 btc8723b2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_wifi_multi_port()
3336 btc8723b2ant_sw_mechanism(btcoexist, false, false, false, false); in btc8723b2ant_action_wifi_multi_port()
3339 btc8723b2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8723b2ant_action_wifi_multi_port()
3341 btc8723b2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); in btc8723b2ant_action_wifi_multi_port()
3342 btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8723b2ant_action_wifi_multi_port()
3345 static void btc8723b2ant_run_coexist_mechanism(struct btc_coexist *btcoexist) in btc8723b2ant_run_coexist_mechanism() argument
3347 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8723b2ant_run_coexist_mechanism()
3351 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8723b2ant_run_coexist_mechanism()
3358 if (btcoexist->manual_control) { in btc8723b2ant_run_coexist_mechanism()
3370 algorithm = btc8723b2ant_action_algorithm(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3375 btc8723b2ant_action_bt_inquiry(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3379 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_SCAN, &scan); in btc8723b2ant_run_coexist_mechanism()
3380 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_LINK, &link); in btc8723b2ant_run_coexist_mechanism()
3381 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_ROAM, &roam); in btc8723b2ant_run_coexist_mechanism()
3386 btc8723b2ant_action_wifi_link_process(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3391 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_LINK_STATUS, in btc8723b2ant_run_coexist_mechanism()
3406 btcoexist->btc_set(btcoexist, BTC_SET_BL_MIRACAST_PLUS_BT, in btc8723b2ant_run_coexist_mechanism()
3408 btc8723b2ant_action_wifi_multi_port(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3414 btcoexist->btc_set(btcoexist, BTC_SET_BL_MIRACAST_PLUS_BT, in btc8723b2ant_run_coexist_mechanism()
3422 if (btc8723b2ant_is_common_action(btcoexist)) { in btc8723b2ant_run_coexist_mechanism()
3438 btc8723b2ant_action_sco(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3443 btc8723b2ant_action_hid(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3448 btc8723b2ant_action_a2dp(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3453 btc8723b2ant_action_a2dp_pan_hs(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3458 btc8723b2ant_action_pan_edr(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3463 btc8723b2ant_action_pan_hs(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3468 btc8723b2ant_action_pan_edr_a2dp(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3473 btc8723b2ant_action_pan_edr_hid(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3478 btc8723b2ant_action_hid_a2dp_pan_edr(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3483 btc8723b2ant_action_hid_a2dp(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3488 btc8723b2ant_coex_alloff(btcoexist); in btc8723b2ant_run_coexist_mechanism()
3495 static void btc8723b2ant_wifioff_hwcfg(struct btc_coexist *btcoexist) in btc8723b2ant_wifioff_hwcfg() argument
3502 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0x4); in btc8723b2ant_wifioff_hwcfg()
3505 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x780); in btc8723b2ant_wifioff_hwcfg()
3507 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_FW_VER, &fw_ver); in btc8723b2ant_wifioff_hwcfg()
3511 btcoexist->btc_fill_h2c(btcoexist, 0x6E, 1, h2c_parameter); in btc8723b2ant_wifioff_hwcfg()
3513 btcoexist->btc_write_1byte(btcoexist, 0x765, 0x18); in btc8723b2ant_wifioff_hwcfg()
3516 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_IS_IN_MP_MODE, in btc8723b2ant_wifioff_hwcfg()
3520 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x67, 0x20, 0x0); in btc8723b2ant_wifioff_hwcfg()
3523 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x67, 0x20, 0x1); in btc8723b2ant_wifioff_hwcfg()
3529 void ex_btc8723b2ant_init_hwconfig(struct btc_coexist *btcoexist) in ex_btc8723b2ant_init_hwconfig() argument
3531 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b2ant_init_hwconfig()
3537 btcoexist->btc_get_rf_reg(btcoexist, BTC_RF_A, 0x1e, 0xfffff); in ex_btc8723b2ant_init_hwconfig()
3540 u8tmp = btcoexist->btc_read_1byte(btcoexist, 0x790); in ex_btc8723b2ant_init_hwconfig()
3543 btcoexist->btc_write_1byte(btcoexist, 0x790, u8tmp); in ex_btc8723b2ant_init_hwconfig()
3546 btc8723b2ant_set_ant_path(btcoexist, BTC_ANT_WIFI_AT_MAIN, in ex_btc8723b2ant_init_hwconfig()
3551 btc8723b2ant_coex_table_with_type(btcoexist, FORCE_EXEC, 0); in ex_btc8723b2ant_init_hwconfig()
3555 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0x4); in ex_btc8723b2ant_init_hwconfig()
3556 btcoexist->btc_write_1byte(btcoexist, 0x778, 0x3); in ex_btc8723b2ant_init_hwconfig()
3557 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x40, 0x20, 0x1); in ex_btc8723b2ant_init_hwconfig()
3558 btcoexist->auto_report_2ant = true; in ex_btc8723b2ant_init_hwconfig()
3561 void ex_btc8723b2ant_power_on_setting(struct btc_coexist *btcoexist) in ex_btc8723b2ant_power_on_setting() argument
3563 struct btc_board_info *board_info = &btcoexist->board_info; in ex_btc8723b2ant_power_on_setting()
3567 btcoexist->btc_write_1byte(btcoexist, 0x67, 0x20); in ex_btc8723b2ant_power_on_setting()
3570 u16tmp = btcoexist->btc_read_2byte(btcoexist, 0x2); in ex_btc8723b2ant_power_on_setting()
3571 btcoexist->btc_write_2byte(btcoexist, 0x2, u16tmp | BIT0 | BIT1); in ex_btc8723b2ant_power_on_setting()
3573 btcoexist->btc_write_4byte(btcoexist, 0x948, 0x0); in ex_btc8723b2ant_power_on_setting()
3575 if (btcoexist->chip_interface == BTC_INTF_USB) { in ex_btc8723b2ant_power_on_setting()
3587 btcoexist->btc_set(btcoexist, BTC_SET_ACT_ANTPOSREGRISTRY_CTRL, in ex_btc8723b2ant_power_on_setting()
3592 void ex_btc8723b2ant_pre_load_firmware(struct btc_coexist *btcoexist) in ex_btc8723b2ant_pre_load_firmware() argument
3594 struct btc_board_info *board_info = &btcoexist->board_info; in ex_btc8723b2ant_pre_load_firmware()
3609 if (btcoexist->chip_interface == BTC_INTF_USB) { in ex_btc8723b2ant_pre_load_firmware()
3612 btcoexist->btc_write_local_reg_1byte(btcoexist, 0xfe08, u8tmp); in ex_btc8723b2ant_pre_load_firmware()
3621 if (btcoexist->chip_interface == BTC_INTF_PCI) in ex_btc8723b2ant_pre_load_firmware()
3622 btcoexist->btc_write_local_reg_1byte(btcoexist, 0x384, in ex_btc8723b2ant_pre_load_firmware()
3624 else if (btcoexist->chip_interface == BTC_INTF_SDIO) in ex_btc8723b2ant_pre_load_firmware()
3625 btcoexist->btc_write_local_reg_1byte(btcoexist, 0x60, in ex_btc8723b2ant_pre_load_firmware()
3630 void ex_btc8723b2ant_init_coex_dm(struct btc_coexist *btcoexist) in ex_btc8723b2ant_init_coex_dm() argument
3632 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b2ant_init_coex_dm()
3636 btc8723b2ant_init_coex_dm(btcoexist); in ex_btc8723b2ant_init_coex_dm()
3639 void ex_btc8723b2ant_display_coex_info(struct btc_coexist *btcoexist, in ex_btc8723b2ant_display_coex_info() argument
3642 struct btc_board_info *board_info = &btcoexist->board_info; in ex_btc8723b2ant_display_coex_info()
3643 struct btc_stack_info *stack_info = &btcoexist->stack_info; in ex_btc8723b2ant_display_coex_info()
3644 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in ex_btc8723b2ant_display_coex_info()
3658 if (btcoexist->manual_control) { in ex_btc8723b2ant_display_coex_info()
3672 btcoexist->btc_get(btcoexist, BTC_GET_U4_BT_PATCH_VER, &bt_patch_ver); in ex_btc8723b2ant_display_coex_info()
3673 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_FW_VER, &fw_ver); in ex_btc8723b2ant_display_coex_info()
3679 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in ex_btc8723b2ant_display_coex_info()
3680 btcoexist->btc_get(btcoexist, BTC_GET_U1_WIFI_DOT11_CHNL, in ex_btc8723b2ant_display_coex_info()
3682 btcoexist->btc_get(btcoexist, BTC_GET_U1_WIFI_HS_CHNL, &wifi_hs_chnl); in ex_btc8723b2ant_display_coex_info()
3691 btcoexist->btc_get(btcoexist, BTC_GET_S4_WIFI_RSSI, &wifi_rssi); in ex_btc8723b2ant_display_coex_info()
3692 btcoexist->btc_get(btcoexist, BTC_GET_S4_HS_RSSI, &bt_hs_rssi); in ex_btc8723b2ant_display_coex_info()
3693 btcoexist->btc_get(btcoexist, BTC_GET_U1_AP_NUM, &ap_num); in ex_btc8723b2ant_display_coex_info()
3697 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_SCAN, &scan); in ex_btc8723b2ant_display_coex_info()
3698 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_LINK, &link); in ex_btc8723b2ant_display_coex_info()
3699 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_ROAM, &roam); in ex_btc8723b2ant_display_coex_info()
3703 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_UNDER_5G, &wifi_under_5g); in ex_btc8723b2ant_display_coex_info()
3704 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in ex_btc8723b2ant_display_coex_info()
3705 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in ex_btc8723b2ant_display_coex_info()
3706 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_TRAFFIC_DIRECTION, in ex_btc8723b2ant_display_coex_info()
3720 btcoexist->btc_disp_dbg_msg(btcoexist, BTC_DBG_DISP_BT_LINK_INFO, m); in ex_btc8723b2ant_display_coex_info()
3740 btcoexist->btc_disp_dbg_msg(btcoexist, BTC_DBG_DISP_FW_PWR_MODE_CMD, m); in ex_btc8723b2ant_display_coex_info()
3773 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x778); in ex_btc8723b2ant_display_coex_info()
3774 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x880); in ex_btc8723b2ant_display_coex_info()
3779 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x948); in ex_btc8723b2ant_display_coex_info()
3780 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x67); in ex_btc8723b2ant_display_coex_info()
3781 u8tmp[1] = btcoexist->btc_read_1byte(btcoexist, 0x765); in ex_btc8723b2ant_display_coex_info()
3786 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x92c); in ex_btc8723b2ant_display_coex_info()
3787 u32tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0x930); in ex_btc8723b2ant_display_coex_info()
3788 u32tmp[2] = btcoexist->btc_read_4byte(btcoexist, 0x944); in ex_btc8723b2ant_display_coex_info()
3793 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x39); in ex_btc8723b2ant_display_coex_info()
3794 u8tmp[1] = btcoexist->btc_read_1byte(btcoexist, 0x40); in ex_btc8723b2ant_display_coex_info()
3795 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x4c); in ex_btc8723b2ant_display_coex_info()
3796 u8tmp[2] = btcoexist->btc_read_1byte(btcoexist, 0x64); in ex_btc8723b2ant_display_coex_info()
3802 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x550); in ex_btc8723b2ant_display_coex_info()
3803 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x522); in ex_btc8723b2ant_display_coex_info()
3807 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0xc50); in ex_btc8723b2ant_display_coex_info()
3808 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x49c); in ex_btc8723b2ant_display_coex_info()
3812 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0xda0); in ex_btc8723b2ant_display_coex_info()
3813 u32tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0xda4); in ex_btc8723b2ant_display_coex_info()
3814 u32tmp[2] = btcoexist->btc_read_4byte(btcoexist, 0xda8); in ex_btc8723b2ant_display_coex_info()
3815 u32tmp[3] = btcoexist->btc_read_4byte(btcoexist, 0xcf0); in ex_btc8723b2ant_display_coex_info()
3817 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0xa5b); in ex_btc8723b2ant_display_coex_info()
3818 u8tmp[1] = btcoexist->btc_read_1byte(btcoexist, 0xa5c); in ex_btc8723b2ant_display_coex_info()
3832 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x6c0); in ex_btc8723b2ant_display_coex_info()
3833 u32tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0x6c4); in ex_btc8723b2ant_display_coex_info()
3834 u32tmp[2] = btcoexist->btc_read_4byte(btcoexist, 0x6c8); in ex_btc8723b2ant_display_coex_info()
3835 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x6cc); in ex_btc8723b2ant_display_coex_info()
3846 if (btcoexist->auto_report_2ant) in ex_btc8723b2ant_display_coex_info()
3847 btc8723b2ant_monitor_bt_ctr(btcoexist); in ex_btc8723b2ant_display_coex_info()
3848 btcoexist->btc_disp_dbg_msg(btcoexist, BTC_DBG_DISP_COEX_STATISTICS, m); in ex_btc8723b2ant_display_coex_info()
3851 void ex_btc8723b2ant_ips_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8723b2ant_ips_notify() argument
3853 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b2ant_ips_notify()
3859 btc8723b2ant_wifioff_hwcfg(btcoexist); in ex_btc8723b2ant_ips_notify()
3860 btc8723b2ant_ignore_wlan_act(btcoexist, FORCE_EXEC, true); in ex_btc8723b2ant_ips_notify()
3861 btc8723b2ant_coex_alloff(btcoexist); in ex_btc8723b2ant_ips_notify()
3866 ex_btc8723b2ant_init_hwconfig(btcoexist); in ex_btc8723b2ant_ips_notify()
3867 btc8723b2ant_init_coex_dm(btcoexist); in ex_btc8723b2ant_ips_notify()
3868 btc8723b2ant_query_bt_info(btcoexist); in ex_btc8723b2ant_ips_notify()
3872 void ex_btc8723b2ant_lps_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8723b2ant_lps_notify() argument
3874 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b2ant_lps_notify()
3887 void ex_btc8723b2ant_scan_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8723b2ant_scan_notify() argument
3889 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b2ant_scan_notify()
3893 u32tmp = btcoexist->btc_read_4byte(btcoexist, 0x948); in ex_btc8723b2ant_scan_notify()
3894 u8tmpa = btcoexist->btc_read_1byte(btcoexist, 0x765); in ex_btc8723b2ant_scan_notify()
3895 u8tmpb = btcoexist->btc_read_1byte(btcoexist, 0x76e); in ex_btc8723b2ant_scan_notify()
3903 btcoexist->btc_get(btcoexist, BTC_GET_U1_AP_NUM, in ex_btc8723b2ant_scan_notify()
3911 void ex_btc8723b2ant_connect_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8723b2ant_connect_notify() argument
3913 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b2ant_connect_notify()
3923 void ex_btc8723b2ant_media_status_notify(struct btc_coexist *btcoexist, in ex_btc8723b2ant_media_status_notify() argument
3926 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b2ant_media_status_notify()
3940 btcoexist->btc_get(btcoexist, in ex_btc8723b2ant_media_status_notify()
3946 btcoexist->btc_get(btcoexist, in ex_btc8723b2ant_media_status_notify()
3951 btcoexist->btc_get(btcoexist, BTC_GET_U1_AP_NUM, in ex_btc8723b2ant_media_status_notify()
3969 btcoexist->btc_fill_h2c(btcoexist, 0x66, 3, h2c_parameter); in ex_btc8723b2ant_media_status_notify()
3972 void ex_btc8723b2ant_special_packet_notify(struct btc_coexist *btcoexist, in ex_btc8723b2ant_special_packet_notify() argument
3975 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b2ant_special_packet_notify()
3982 void ex_btc8723b2ant_bt_info_notify(struct btc_coexist *btcoexist, in ex_btc8723b2ant_bt_info_notify() argument
3985 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b2ant_bt_info_notify()
4013 if (btcoexist->manual_control) { in ex_btc8723b2ant_bt_info_notify()
4048 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in ex_btc8723b2ant_bt_info_notify()
4052 btcoexist, in ex_btc8723b2ant_bt_info_notify()
4056 btcoexist, in ex_btc8723b2ant_bt_info_notify()
4063 btc8723b2ant_ignore_wlan_act(btcoexist, FORCE_EXEC, in ex_btc8723b2ant_bt_info_notify()
4068 if (!btcoexist->auto_report_2ant) { in ex_btc8723b2ant_bt_info_notify()
4070 btc8723b2ant_bt_auto_report(btcoexist, in ex_btc8723b2ant_bt_info_notify()
4119 btc8723b2ant_update_bt_link_info(btcoexist); in ex_btc8723b2ant_bt_info_notify()
4155 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_TRAFFIC_BUSY, &bt_busy); in ex_btc8723b2ant_bt_info_notify()
4158 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_LIMITED_DIG, &limited_dig); in ex_btc8723b2ant_bt_info_notify()
4160 btc8723b2ant_run_coexist_mechanism(btcoexist); in ex_btc8723b2ant_bt_info_notify()
4163 void ex_btc8723b2ant_halt_notify(struct btc_coexist *btcoexist) in ex_btc8723b2ant_halt_notify() argument
4165 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b2ant_halt_notify()
4169 btc8723b2ant_wifioff_hwcfg(btcoexist); in ex_btc8723b2ant_halt_notify()
4170 btc8723b2ant_ignore_wlan_act(btcoexist, FORCE_EXEC, true); in ex_btc8723b2ant_halt_notify()
4171 ex_btc8723b2ant_media_status_notify(btcoexist, BTC_MEDIA_DISCONNECT); in ex_btc8723b2ant_halt_notify()
4174 void ex_btc8723b2ant_pnp_notify(struct btc_coexist *btcoexist, u8 pnp_state) in ex_btc8723b2ant_pnp_notify() argument
4176 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b2ant_pnp_notify()
4195 ex_btc8723b2ant_init_hwconfig(btcoexist); in ex_btc8723b2ant_pnp_notify()
4196 btc8723b2ant_init_coex_dm(btcoexist); in ex_btc8723b2ant_pnp_notify()
4197 btc8723b2ant_query_bt_info(btcoexist); in ex_btc8723b2ant_pnp_notify()
4201 void ex_btc8723b2ant_periodical(struct btc_coexist *btcoexist) in ex_btc8723b2ant_periodical() argument
4203 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8723b2ant_periodical()
4204 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in ex_btc8723b2ant_periodical()
4218 btcoexist, BTC_ANT_WIFI_AT_MAIN, false, false); in ex_btc8723b2ant_periodical()
4222 if (!btcoexist->auto_report_2ant) { in ex_btc8723b2ant_periodical()
4223 btc8723b2ant_query_bt_info(btcoexist); in ex_btc8723b2ant_periodical()
4225 btc8723b2ant_monitor_bt_ctr(btcoexist); in ex_btc8723b2ant_periodical()
4226 btc8723b2ant_monitor_wifi_ctr(btcoexist); in ex_btc8723b2ant_periodical()
4236 if (btc8723b2ant_is_wifi_status_changed(btcoexist) || in ex_btc8723b2ant_periodical()
4238 btc8723b2ant_run_coexist_mechanism(btcoexist); in ex_btc8723b2ant_periodical()