Lines Matching refs:btcoexist
41 static u8 btc8821a2ant_bt_rssi_state(struct btc_coexist *btcoexist, in btc8821a2ant_bt_rssi_state() argument
45 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8821a2ant_bt_rssi_state()
132 static u8 btc8821a2ant_wifi_rssi_state(struct btc_coexist *btcoexist, in btc8821a2ant_wifi_rssi_state() argument
136 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8821a2ant_wifi_rssi_state()
140 btcoexist->btc_get(btcoexist, BTC_GET_S4_WIFI_RSSI, &wifi_rssi); in btc8821a2ant_wifi_rssi_state()
226 void btc8821a2ant_limited_rx(struct btc_coexist *btcoexist, bool force_exec, in btc8821a2ant_limited_rx() argument
235 btcoexist->btc_set(btcoexist, BTC_SET_BL_TO_REJ_AP_AGG_PKT, in btc8821a2ant_limited_rx()
238 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_CTRL_AGG_SIZE, in btc8821a2ant_limited_rx()
241 btcoexist->btc_set(btcoexist, BTC_SET_U1_AGG_BUF_SIZE, &rx_agg_size); in btc8821a2ant_limited_rx()
243 btcoexist->btc_set(btcoexist, BTC_SET_ACT_AGGREGATE_CTRL, NULL); in btc8821a2ant_limited_rx()
246 static void btc8821a2ant_monitor_bt_ctr(struct btc_coexist *btcoexist) in btc8821a2ant_monitor_bt_ctr() argument
248 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8821a2ant_monitor_bt_ctr()
249 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8821a2ant_monitor_bt_ctr()
256 u4tmp = btcoexist->btc_read_4byte(btcoexist, reg_hp_txrx); in btc8821a2ant_monitor_bt_ctr()
260 u4tmp = btcoexist->btc_read_4byte(btcoexist, reg_lp_txrx); in btc8821a2ant_monitor_bt_ctr()
284 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0xc); in btc8821a2ant_monitor_bt_ctr()
287 static void btc8821a2ant_monitor_wifi_ctr(struct btc_coexist *btcoexist) in btc8821a2ant_monitor_wifi_ctr() argument
301 btcoexist->btc_read_4byte(btcoexist, 0xf88); in btc8821a2ant_monitor_wifi_ctr()
303 btcoexist->btc_read_2byte(btcoexist, 0xf94); in btc8821a2ant_monitor_wifi_ctr()
305 btcoexist->btc_read_2byte(btcoexist, 0xf90); in btc8821a2ant_monitor_wifi_ctr()
307 btcoexist->btc_read_2byte(btcoexist, 0xfb8); in btc8821a2ant_monitor_wifi_ctr()
310 btcoexist->btc_read_4byte(btcoexist, 0xf84); in btc8821a2ant_monitor_wifi_ctr()
312 btcoexist->btc_read_2byte(btcoexist, 0xf96); in btc8821a2ant_monitor_wifi_ctr()
314 btcoexist->btc_read_2byte(btcoexist, 0xf92); in btc8821a2ant_monitor_wifi_ctr()
316 btcoexist->btc_read_2byte(btcoexist, 0xfba); in btc8821a2ant_monitor_wifi_ctr()
320 btcoexist->btc_write_1byte_bitmask(btcoexist, 0xf16, 0x1, 0x1); in btc8821a2ant_monitor_wifi_ctr()
321 btcoexist->btc_write_1byte_bitmask(btcoexist, 0xf16, 0x1, 0x0); in btc8821a2ant_monitor_wifi_ctr()
324 static void btc8821a2ant_query_bt_info(struct btc_coexist *btcoexist) in btc8821a2ant_query_bt_info() argument
326 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8821a2ant_query_bt_info()
337 btcoexist->btc_fill_h2c(btcoexist, 0x61, 1, h2c_parameter); in btc8821a2ant_query_bt_info()
340 static bool btc8821a2ant_is_wifi_status_changed(struct btc_coexist *btcoexist) in btc8821a2ant_is_wifi_status_changed() argument
349 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in btc8821a2ant_is_wifi_status_changed()
351 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in btc8821a2ant_is_wifi_status_changed()
352 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in btc8821a2ant_is_wifi_status_changed()
353 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_4_WAY_PROGRESS, in btc8821a2ant_is_wifi_status_changed()
370 wifi_rssi_state = btc8821a2ant_wifi_rssi_state(btcoexist, 3, 2, in btc8821a2ant_is_wifi_status_changed()
381 static void btc8821a2ant_update_bt_link_info(struct btc_coexist *btcoexist) in btc8821a2ant_update_bt_link_info() argument
383 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8821a2ant_update_bt_link_info()
386 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in btc8821a2ant_update_bt_link_info()
429 static u8 btc8821a2ant_action_algorithm(struct btc_coexist *btcoexist) in btc8821a2ant_action_algorithm() argument
431 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8821a2ant_action_algorithm()
432 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8821a2ant_action_algorithm()
437 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in btc8821a2ant_action_algorithm()
617 static void btc8821a2ant_set_fw_dac_swing_lvl(struct btc_coexist *btcoexist, in btc8821a2ant_set_fw_dac_swing_lvl() argument
620 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8821a2ant_set_fw_dac_swing_lvl()
633 btcoexist->btc_fill_h2c(btcoexist, 0x64, 1, h2c_parameter); in btc8821a2ant_set_fw_dac_swing_lvl()
636 static void btc8821a2ant_set_fw_dec_bt_pwr(struct btc_coexist *btcoexist, in btc8821a2ant_set_fw_dec_bt_pwr() argument
639 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8821a2ant_set_fw_dec_bt_pwr()
648 btcoexist->btc_fill_h2c(btcoexist, 0x62, 1, h2c_parameter); in btc8821a2ant_set_fw_dec_bt_pwr()
651 static void btc8821a2ant_dec_bt_pwr(struct btc_coexist *btcoexist, in btc8821a2ant_dec_bt_pwr() argument
654 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8821a2ant_dec_bt_pwr()
670 btc8821a2ant_set_fw_dec_bt_pwr(btcoexist, coex_dm->cur_dec_bt_pwr_lvl); in btc8821a2ant_dec_bt_pwr()
675 static void btc8821a2ant_fw_dac_swing_lvl(struct btc_coexist *btcoexist, in btc8821a2ant_fw_dac_swing_lvl() argument
678 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8821a2ant_fw_dac_swing_lvl()
696 btc8821a2ant_set_fw_dac_swing_lvl(btcoexist, in btc8821a2ant_fw_dac_swing_lvl()
703 struct btc_coexist *btcoexist, bool low_penalty_ra) in btc8821a2ant_set_sw_penalty_tx_rate_adaptive() argument
705 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8821a2ant_set_sw_penalty_tx_rate_adaptive()
726 btcoexist->btc_fill_h2c(btcoexist, 0x69, 6, h2c_parameter); in btc8821a2ant_set_sw_penalty_tx_rate_adaptive()
729 static void btc8821a2ant_low_penalty_ra(struct btc_coexist *btcoexist, in btc8821a2ant_low_penalty_ra() argument
732 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8821a2ant_low_penalty_ra()
749 btc8821a2ant_set_sw_penalty_tx_rate_adaptive(btcoexist, in btc8821a2ant_low_penalty_ra()
755 static void btc8821a2ant_set_dac_swing_reg(struct btc_coexist *btcoexist, in btc8821a2ant_set_dac_swing_reg() argument
758 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8821a2ant_set_dac_swing_reg()
763 btcoexist->btc_write_1byte_bitmask(btcoexist, 0xc5b, 0x3e, val); in btc8821a2ant_set_dac_swing_reg()
766 static void btc8821a2ant_set_sw_full_dac_swing(struct btc_coexist *btcoexist, in btc8821a2ant_set_sw_full_dac_swing() argument
771 btc8821a2ant_set_dac_swing_reg(btcoexist, sw_dac_swing_lvl); in btc8821a2ant_set_sw_full_dac_swing()
773 btc8821a2ant_set_dac_swing_reg(btcoexist, 0x18); in btc8821a2ant_set_sw_full_dac_swing()
776 static void btc8821a2ant_dac_swing(struct btc_coexist *btcoexist, in btc8821a2ant_dac_swing() argument
780 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8821a2ant_dac_swing()
804 btc8821a2ant_set_sw_full_dac_swing(btcoexist, dac_swing_on, in btc8821a2ant_dac_swing()
811 static void btc8821a2ant_set_coex_table(struct btc_coexist *btcoexist, in btc8821a2ant_set_coex_table() argument
815 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8821a2ant_set_coex_table()
819 btcoexist->btc_write_4byte(btcoexist, 0x6c0, val0x6c0); in btc8821a2ant_set_coex_table()
823 btcoexist->btc_write_4byte(btcoexist, 0x6c4, val0x6c4); in btc8821a2ant_set_coex_table()
827 btcoexist->btc_write_4byte(btcoexist, 0x6c8, val0x6c8); in btc8821a2ant_set_coex_table()
831 btcoexist->btc_write_1byte(btcoexist, 0x6cc, val0x6cc); in btc8821a2ant_set_coex_table()
834 static void btc8821a2ant_coex_table(struct btc_coexist *btcoexist, in btc8821a2ant_coex_table() argument
838 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8821a2ant_coex_table()
869 btc8821a2ant_set_coex_table(btcoexist, val0x6c0, val0x6c4, val0x6c8, in btc8821a2ant_coex_table()
878 static void btc8821a2ant_coex_table_with_type(struct btc_coexist *btcoexist, in btc8821a2ant_coex_table_with_type() argument
885 btc8821a2ant_coex_table(btcoexist, force_exec, 0x55555555, in btc8821a2ant_coex_table_with_type()
889 btc8821a2ant_coex_table(btcoexist, force_exec, 0x55555555, in btc8821a2ant_coex_table_with_type()
893 btc8821a2ant_coex_table(btcoexist, force_exec, 0x5ada5ada, in btc8821a2ant_coex_table_with_type()
897 btc8821a2ant_coex_table(btcoexist, force_exec, 0xaaaaaaaa, in btc8821a2ant_coex_table_with_type()
901 btc8821a2ant_coex_table(btcoexist, force_exec, 0xffffffff, in btc8821a2ant_coex_table_with_type()
905 btc8821a2ant_coex_table(btcoexist, force_exec, 0x5fff5fff, in btc8821a2ant_coex_table_with_type()
909 btc8821a2ant_coex_table(btcoexist, force_exec, 0x55ff55ff, in btc8821a2ant_coex_table_with_type()
913 btc8821a2ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in btc8821a2ant_coex_table_with_type()
917 btc8821a2ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in btc8821a2ant_coex_table_with_type()
921 btc8821a2ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in btc8821a2ant_coex_table_with_type()
925 btc8821a2ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in btc8821a2ant_coex_table_with_type()
929 btc8821a2ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in btc8821a2ant_coex_table_with_type()
933 btc8821a2ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in btc8821a2ant_coex_table_with_type()
937 btc8821a2ant_coex_table(btcoexist, force_exec, 0x5fff5fff, in btc8821a2ant_coex_table_with_type()
941 btc8821a2ant_coex_table(btcoexist, force_exec, 0x5fff5fff, in btc8821a2ant_coex_table_with_type()
945 btc8821a2ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in btc8821a2ant_coex_table_with_type()
949 btc8821a2ant_coex_table(btcoexist, force_exec, 0x5fdf5fdf, in btc8821a2ant_coex_table_with_type()
953 btc8821a2ant_coex_table(btcoexist, force_exec, 0xfafafafa, in btc8821a2ant_coex_table_with_type()
977 static void btc8821a2ant_set_lps_rpwm(struct btc_coexist *btcoexist, u8 lps_val, in btc8821a2ant_set_lps_rpwm() argument
983 btcoexist->btc_set(btcoexist, BTC_SET_U1_LPS_VAL, &lps); in btc8821a2ant_set_lps_rpwm()
984 btcoexist->btc_set(btcoexist, BTC_SET_U1_RPWM_VAL, &rpwm); in btc8821a2ant_set_lps_rpwm()
987 static void btc8821a2ant_lps_rpwm(struct btc_coexist *btcoexist, in btc8821a2ant_lps_rpwm() argument
998 btc8821a2ant_set_lps_rpwm(btcoexist, lps_val, rpwm_val); in btc8821a2ant_lps_rpwm()
1004 static void btc8821a2ant_ignore_wlan_act(struct btc_coexist *btcoexist, in btc8821a2ant_ignore_wlan_act() argument
1007 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8821a2ant_ignore_wlan_act()
1024 btc8821a2ant_set_fw_ignore_wlan_act(btcoexist, enable); in btc8821a2ant_ignore_wlan_act()
1029 static void btc8821a2ant_set_fw_ps_tdma(struct btc_coexist *btcoexist, in btc8821a2ant_set_fw_ps_tdma() argument
1033 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8821a2ant_set_fw_ps_tdma()
1056 btcoexist->btc_fill_h2c(btcoexist, 0x60, 5, h2c_parameter); in btc8821a2ant_set_fw_ps_tdma()
1059 static void btc8821a2ant_sw_mechanism1(struct btc_coexist *btcoexist, in btc8821a2ant_sw_mechanism1() argument
1063 btc8821a2ant_low_penalty_ra(btcoexist, NORMAL_EXEC, low_penalty_ra); in btc8821a2ant_sw_mechanism1()
1066 static void btc8821a2ant_sw_mechanism2(struct btc_coexist *btcoexist, in btc8821a2ant_sw_mechanism2() argument
1070 btc8821a2ant_dac_swing(btcoexist, NORMAL_EXEC, sw_dac_swing, in btc8821a2ant_sw_mechanism2()
1074 static void btc8821a2ant_set_ant_path(struct btc_coexist *btcoexist, in btc8821a2ant_set_ant_path() argument
1078 struct btc_board_info *board_info = &btcoexist->board_info; in btc8821a2ant_set_ant_path()
1084 u4tmp = btcoexist->btc_read_4byte(btcoexist, 0x4c); in btc8821a2ant_set_ant_path()
1087 btcoexist->btc_write_4byte(btcoexist, 0x4c, u4tmp); in btc8821a2ant_set_ant_path()
1089 btcoexist->btc_write_4byte(btcoexist, 0x974, 0x3ff); in btc8821a2ant_set_ant_path()
1097 btcoexist->btc_fill_h2c(btcoexist, 0x65, 2, in btc8821a2ant_set_ant_path()
1105 btcoexist->btc_fill_h2c(btcoexist, 0x65, 2, in btc8821a2ant_set_ant_path()
1113 btcoexist->btc_write_1byte_bitmask(btcoexist, 0xcb7, 0x30, 0x1); in btc8821a2ant_set_ant_path()
1116 btcoexist->btc_write_1byte_bitmask(btcoexist, 0xcb7, 0x30, 0x2); in btc8821a2ant_set_ant_path()
1121 static void btc8821a2ant_ps_tdma(struct btc_coexist *btcoexist, in btc8821a2ant_ps_tdma() argument
1124 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8821a2ant_ps_tdma()
1128 wifi_rssi_state = btc8821a2ant_wifi_rssi_state(btcoexist, 1, 2, in btc8821a2ant_ps_tdma()
1130 bt_rssi_state = btc8821a2ant_bt_rssi_state(btcoexist, 2, in btc8821a2ant_ps_tdma()
1163 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x3c, in btc8821a2ant_ps_tdma()
1167 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x2d, in btc8821a2ant_ps_tdma()
1171 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1c, in btc8821a2ant_ps_tdma()
1175 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x10, in btc8821a2ant_ps_tdma()
1179 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x3c, in btc8821a2ant_ps_tdma()
1183 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x2d, in btc8821a2ant_ps_tdma()
1187 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1c, in btc8821a2ant_ps_tdma()
1191 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xa3, 0x10, in btc8821a2ant_ps_tdma()
1195 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x3c, in btc8821a2ant_ps_tdma()
1199 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x2d, in btc8821a2ant_ps_tdma()
1203 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1c, in btc8821a2ant_ps_tdma()
1207 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x10, in btc8821a2ant_ps_tdma()
1211 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x3c, in btc8821a2ant_ps_tdma()
1215 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x2d, in btc8821a2ant_ps_tdma()
1219 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1c, in btc8821a2ant_ps_tdma()
1223 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x10, in btc8821a2ant_ps_tdma()
1227 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xa3, 0x2f, in btc8821a2ant_ps_tdma()
1231 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x5, 0x5, in btc8821a2ant_ps_tdma()
1235 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x25, in btc8821a2ant_ps_tdma()
1239 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x25, in btc8821a2ant_ps_tdma()
1243 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x15, in btc8821a2ant_ps_tdma()
1247 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1e, in btc8821a2ant_ps_tdma()
1252 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xd3, 0x3c, in btc8821a2ant_ps_tdma()
1256 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x14, in btc8821a2ant_ps_tdma()
1260 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x30, in btc8821a2ant_ps_tdma()
1264 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x3c, in btc8821a2ant_ps_tdma()
1270 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xd3, 0x3a, in btc8821a2ant_ps_tdma()
1277 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xd3, 0x2d, in btc8821a2ant_ps_tdma()
1284 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xd3, 0x1c, in btc8821a2ant_ps_tdma()
1291 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xd3, 0x10, in btc8821a2ant_ps_tdma()
1295 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x3c, in btc8821a2ant_ps_tdma()
1299 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x3c, in btc8821a2ant_ps_tdma()
1303 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x15, in btc8821a2ant_ps_tdma()
1308 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x35, in btc8821a2ant_ps_tdma()
1312 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xd3, 0x1c, in btc8821a2ant_ps_tdma()
1316 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xd3, 0x14, in btc8821a2ant_ps_tdma()
1320 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xd3, 0x30, in btc8821a2ant_ps_tdma()
1328 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0x0, 0x0, 0x0, in btc8821a2ant_ps_tdma()
1332 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0x0, 0x0, 0x0, in btc8821a2ant_ps_tdma()
1336 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0x0, 0x0, 0x0, in btc8821a2ant_ps_tdma()
1348 btc8821a2ant_ps_tdma_check_for_power_save_state(struct btc_coexist *btcoexist, in btc8821a2ant_ps_tdma_check_for_power_save_state() argument
1353 btcoexist->btc_get(btcoexist, BTC_GET_U1_LPS_MODE, &lps_mode); in btc8821a2ant_ps_tdma_check_for_power_save_state()
1361 btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8821a2ant_ps_tdma_check_for_power_save_state()
1367 btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8821a2ant_ps_tdma_check_for_power_save_state()
1374 static void btc8821a2ant_power_save_state(struct btc_coexist *btcoexist, in btc8821a2ant_power_save_state() argument
1383 btcoexist->btc_set(btcoexist, BTC_SET_ACT_DISABLE_LOW_POWER, in btc8821a2ant_power_save_state()
1385 btcoexist->btc_set(btcoexist, BTC_SET_ACT_NORMAL_LPS, NULL); in btc8821a2ant_power_save_state()
1389 btc8821a2ant_ps_tdma_check_for_power_save_state(btcoexist, in btc8821a2ant_power_save_state()
1391 btc8821a2ant_lps_rpwm(btcoexist, NORMAL_EXEC, lps_val, in btc8821a2ant_power_save_state()
1395 btcoexist->btc_set(btcoexist, BTC_SET_ACT_DISABLE_LOW_POWER, in btc8821a2ant_power_save_state()
1398 btcoexist->btc_set(btcoexist, BTC_SET_ACT_ENTER_LPS, NULL); in btc8821a2ant_power_save_state()
1402 btc8821a2ant_ps_tdma_check_for_power_save_state(btcoexist, in btc8821a2ant_power_save_state()
1404 btcoexist->btc_set(btcoexist, BTC_SET_ACT_LEAVE_LPS, NULL); in btc8821a2ant_power_save_state()
1412 static void btc8821a2ant_coex_all_off(struct btc_coexist *btcoexist) in btc8821a2ant_coex_all_off() argument
1415 btc8821a2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); in btc8821a2ant_coex_all_off()
1416 btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8821a2ant_coex_all_off()
1417 btc8821a2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8821a2ant_coex_all_off()
1418 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_coex_all_off()
1421 btc8821a2ant_sw_mechanism1(btcoexist, false, false, false, false); in btc8821a2ant_coex_all_off()
1422 btc8821a2ant_sw_mechanism2(btcoexist, false, false, false, 0x18); in btc8821a2ant_coex_all_off()
1425 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_coex_all_off()
1428 static void btc8821a2ant_coex_under_5g(struct btc_coexist *btcoexist) in btc8821a2ant_coex_under_5g() argument
1430 btc8821a2ant_coex_all_off(btcoexist); in btc8821a2ant_coex_under_5g()
1431 btc8821a2ant_ignore_wlan_act(btcoexist, NORMAL_EXEC, true); in btc8821a2ant_coex_under_5g()
1434 static void btc8821a2ant_init_coex_dm(struct btc_coexist *btcoexist) in btc8821a2ant_init_coex_dm() argument
1437 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_init_coex_dm()
1439 btc8821a2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); in btc8821a2ant_init_coex_dm()
1440 btc8821a2ant_ps_tdma(btcoexist, FORCE_EXEC, false, 1); in btc8821a2ant_init_coex_dm()
1441 btc8821a2ant_fw_dac_swing_lvl(btcoexist, FORCE_EXEC, 6); in btc8821a2ant_init_coex_dm()
1442 btc8821a2ant_dec_bt_pwr(btcoexist, FORCE_EXEC, 0); in btc8821a2ant_init_coex_dm()
1444 btc8821a2ant_sw_mechanism1(btcoexist, false, false, false, false); in btc8821a2ant_init_coex_dm()
1445 btc8821a2ant_sw_mechanism2(btcoexist, false, false, false, 0x18); in btc8821a2ant_init_coex_dm()
1448 static void btc8821a2ant_action_bt_inquiry(struct btc_coexist *btcoexist) in btc8821a2ant_action_bt_inquiry() argument
1450 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8821a2ant_action_bt_inquiry()
1455 btc8821a2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8821a2ant_action_bt_inquiry()
1456 btc8821a2ant_wifi_rssi_state(btcoexist, 1, 2, in btc8821a2ant_action_bt_inquiry()
1458 btc8821a2ant_bt_rssi_state(btcoexist, in btc8821a2ant_action_bt_inquiry()
1461 btcoexist->btc_set(btcoexist, BTC_SET_ACT_DISABLE_LOW_POWER, in btc8821a2ant_action_bt_inquiry()
1463 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in btc8821a2ant_action_bt_inquiry()
1466 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_SCAN, &scan); in btc8821a2ant_action_bt_inquiry()
1467 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_LINK, &link); in btc8821a2ant_action_bt_inquiry()
1468 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_ROAM, &roam); in btc8821a2ant_action_bt_inquiry()
1470 btc8821a2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); in btc8821a2ant_action_bt_inquiry()
1475 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 15); in btc8821a2ant_action_bt_inquiry()
1476 btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 22); in btc8821a2ant_action_bt_inquiry()
1480 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 15); in btc8821a2ant_action_bt_inquiry()
1481 btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 22); in btc8821a2ant_action_bt_inquiry()
1485 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_action_bt_inquiry()
1486 btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8821a2ant_action_bt_inquiry()
1489 btc8821a2ant_fw_dac_swing_lvl(btcoexist, FORCE_EXEC, 6); in btc8821a2ant_action_bt_inquiry()
1490 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_action_bt_inquiry()
1492 btc8821a2ant_sw_mechanism1(btcoexist, false, false, false, false); in btc8821a2ant_action_bt_inquiry()
1493 btc8821a2ant_sw_mechanism2(btcoexist, false, false, false, 0x18); in btc8821a2ant_action_bt_inquiry()
1496 static void btc8821a2ant_action_wifi_link_process(struct btc_coexist *btcoexist) in btc8821a2ant_action_wifi_link_process() argument
1498 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8821a2ant_action_wifi_link_process()
1501 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 15); in btc8821a2ant_action_wifi_link_process()
1502 btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 22); in btc8821a2ant_action_wifi_link_process()
1504 btc8821a2ant_sw_mechanism1(btcoexist, false, false, false, false); in btc8821a2ant_action_wifi_link_process()
1505 btc8821a2ant_sw_mechanism2(btcoexist, false, false, false, 0x18); in btc8821a2ant_action_wifi_link_process()
1507 u8tmpa = btcoexist->btc_read_1byte(btcoexist, 0x765); in btc8821a2ant_action_wifi_link_process()
1508 u8tmpb = btcoexist->btc_read_1byte(btcoexist, 0x76e); in btc8821a2ant_action_wifi_link_process()
1514 static bool btc8821a2ant_action_wifi_idle_process(struct btc_coexist *btcoexist) in btc8821a2ant_action_wifi_idle_process() argument
1516 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8821a2ant_action_wifi_idle_process()
1520 btc8821a2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8821a2ant_action_wifi_idle_process()
1521 wifi_rssi_state1 = btc8821a2ant_wifi_rssi_state(btcoexist, 1, 2, in btc8821a2ant_action_wifi_idle_process()
1523 btc8821a2ant_bt_rssi_state(btcoexist, in btc8821a2ant_action_wifi_idle_process()
1526 btcoexist->btc_get(btcoexist, BTC_GET_U1_AP_NUM, &ap_num); in btc8821a2ant_action_wifi_idle_process()
1534 btc8821a2ant_dac_swing(btcoexist, NORMAL_EXEC, true, 0x6); in btc8821a2ant_action_wifi_idle_process()
1535 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_action_wifi_idle_process()
1538 btc8821a2ant_sw_mechanism1(btcoexist, false, false, false, in btc8821a2ant_action_wifi_idle_process()
1540 btc8821a2ant_sw_mechanism2(btcoexist, false, false, false, in btc8821a2ant_action_wifi_idle_process()
1543 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_action_wifi_idle_process()
1544 btc8821a2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8821a2ant_action_wifi_idle_process()
1546 btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8821a2ant_action_wifi_idle_process()
1553 btc8821a2ant_dac_swing(btcoexist, NORMAL_EXEC, true, 0x6); in btc8821a2ant_action_wifi_idle_process()
1554 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_action_wifi_idle_process()
1557 btc8821a2ant_sw_mechanism1(btcoexist, false, false, false, in btc8821a2ant_action_wifi_idle_process()
1559 btc8821a2ant_sw_mechanism2(btcoexist, false, false, false, in btc8821a2ant_action_wifi_idle_process()
1562 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_action_wifi_idle_process()
1563 btc8821a2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8821a2ant_action_wifi_idle_process()
1565 btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8821a2ant_action_wifi_idle_process()
1569 btc8821a2ant_dac_swing(btcoexist, NORMAL_EXEC, true, 0x18); in btc8821a2ant_action_wifi_idle_process()
1573 static bool btc8821a2ant_is_common_action(struct btc_coexist *btcoexist) in btc8821a2ant_is_common_action() argument
1575 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8821a2ant_is_common_action()
1580 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in btc8821a2ant_is_common_action()
1581 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in btc8821a2ant_is_common_action()
1583 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in btc8821a2ant_is_common_action()
1587 btcoexist->btc_set(btcoexist, BTC_SET_ACT_DISABLE_LOW_POWER, in btc8821a2ant_is_common_action()
1589 btc8821a2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, in btc8821a2ant_is_common_action()
1595 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, in btc8821a2ant_is_common_action()
1597 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_is_common_action()
1598 btc8821a2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8821a2ant_is_common_action()
1600 btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8821a2ant_is_common_action()
1601 btc8821a2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8821a2ant_is_common_action()
1602 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_is_common_action()
1604 btc8821a2ant_sw_mechanism1(btcoexist, false, false, false, in btc8821a2ant_is_common_action()
1606 btc8821a2ant_sw_mechanism2(btcoexist, false, false, false, in btc8821a2ant_is_common_action()
1614 btcoexist->btc_set(btcoexist, in btc8821a2ant_is_common_action()
1617 btc8821a2ant_limited_rx(btcoexist, NORMAL_EXEC, in btc8821a2ant_is_common_action()
1623 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, in btc8821a2ant_is_common_action()
1625 btc8821a2ant_coex_table_with_type(btcoexist, in btc8821a2ant_is_common_action()
1629 btcoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); in btc8821a2ant_is_common_action()
1630 btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8821a2ant_is_common_action()
1631 btc8821a2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, in btc8821a2ant_is_common_action()
1633 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_is_common_action()
1635 btc8821a2ant_sw_mechanism1(btcoexist, false, false, in btc8821a2ant_is_common_action()
1637 btc8821a2ant_sw_mechanism2(btcoexist, false, false, in btc8821a2ant_is_common_action()
1644 btcoexist->btc_set(btcoexist, in btc8821a2ant_is_common_action()
1652 btc8821a2ant_limited_rx(btcoexist, NORMAL_EXEC, in btc8821a2ant_is_common_action()
1655 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, in btc8821a2ant_is_common_action()
1657 btc8821a2ant_coex_table_with_type(btcoexist, in btc8821a2ant_is_common_action()
1661 btcoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); in btc8821a2ant_is_common_action()
1662 btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8821a2ant_is_common_action()
1663 btc8821a2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, in btc8821a2ant_is_common_action()
1665 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_is_common_action()
1667 btc8821a2ant_sw_mechanism1(btcoexist, true, false, in btc8821a2ant_is_common_action()
1669 btc8821a2ant_sw_mechanism2(btcoexist, false, false, in btc8821a2ant_is_common_action()
1674 btcoexist->btc_set(btcoexist, in btc8821a2ant_is_common_action()
1687 btcoexist); in btc8821a2ant_is_common_action()
1694 static void btc8821a2ant_tdma_duration_adjust(struct btc_coexist *btcoexist, in btc8821a2ant_tdma_duration_adjust() argument
1698 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8821a2ant_tdma_duration_adjust()
1717 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
1721 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
1725 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
1731 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
1735 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
1739 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
1747 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
1751 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
1755 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
1761 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
1765 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
1769 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
1872 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
1876 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
1880 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
1884 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
1888 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
1893 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
1897 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
1901 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
1905 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
1913 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
1919 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
1925 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
1931 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
1937 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
1943 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
1951 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
1957 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
1963 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
1969 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
1975 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
1981 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
1989 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
1993 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
1997 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2001 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2006 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2010 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2014 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2018 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2026 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2032 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2038 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2044 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2050 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2056 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2062 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2070 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2076 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2082 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2088 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2094 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2100 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2106 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2116 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2120 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2124 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2128 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2133 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2137 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2141 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2145 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2152 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2158 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2164 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2170 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2176 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2182 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2190 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2196 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2202 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2208 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2214 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2220 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2228 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2232 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2236 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2240 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2245 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2249 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2253 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2257 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2264 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2270 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2276 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2282 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2288 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2294 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2302 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2308 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2314 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2320 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2326 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2332 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2342 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2346 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2350 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2354 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2359 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2363 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2367 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2371 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2378 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2384 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2390 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2396 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2402 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2408 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2416 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2422 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2428 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2434 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2440 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2446 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2454 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2458 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2462 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2466 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2471 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2475 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2479 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2483 btc8821a2ant_ps_tdma(btcoexist, in btc8821a2ant_tdma_duration_adjust()
2490 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2496 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2502 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2508 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2514 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2520 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2528 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2534 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2540 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2546 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2552 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2558 btcoexist, NORMAL_EXEC, in btc8821a2ant_tdma_duration_adjust()
2579 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_SCAN, &scan); in btc8821a2ant_tdma_duration_adjust()
2580 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_LINK, &link); in btc8821a2ant_tdma_duration_adjust()
2581 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_ROAM, &roam); in btc8821a2ant_tdma_duration_adjust()
2584 btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, in btc8821a2ant_tdma_duration_adjust()
2594 static void btc8821a2ant_action_sco(struct btc_coexist *btcoexist) in btc8821a2ant_action_sco() argument
2596 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8821a2ant_action_sco()
2600 wifi_rssi_state = btc8821a2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8821a2ant_action_sco()
2601 bt_rssi_state = btc8821a2ant_bt_rssi_state(btcoexist, 2, 35, 0); in btc8821a2ant_action_sco()
2603 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8821a2ant_action_sco()
2605 btc8821a2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8821a2ant_action_sco()
2606 btc8821a2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 4); in btc8821a2ant_action_sco()
2609 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, true); in btc8821a2ant_action_sco()
2611 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8821a2ant_action_sco()
2613 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8821a2ant_action_sco()
2617 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 2); in btc8821a2ant_action_sco()
2621 btc8821a2ant_coex_table_with_type(btcoexist, in btc8821a2ant_action_sco()
2626 btcoexist, NORMAL_EXEC, 17); in btc8821a2ant_action_sco()
2629 btcoexist, NORMAL_EXEC, 12); in btc8821a2ant_action_sco()
2633 btc8821a2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); in btc8821a2ant_action_sco()
2635 btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 0); in btc8821a2ant_action_sco()
2641 btc8821a2ant_sw_mechanism1(btcoexist, true, true, in btc8821a2ant_action_sco()
2643 btc8821a2ant_sw_mechanism2(btcoexist, true, false, in btc8821a2ant_action_sco()
2646 btc8821a2ant_sw_mechanism1(btcoexist, true, true, in btc8821a2ant_action_sco()
2648 btc8821a2ant_sw_mechanism2(btcoexist, false, false, in btc8821a2ant_action_sco()
2654 btc8821a2ant_sw_mechanism1(btcoexist, false, true, in btc8821a2ant_action_sco()
2656 btc8821a2ant_sw_mechanism2(btcoexist, true, false, in btc8821a2ant_action_sco()
2659 btc8821a2ant_sw_mechanism1(btcoexist, false, true, in btc8821a2ant_action_sco()
2661 btc8821a2ant_sw_mechanism2(btcoexist, false, false, in btc8821a2ant_action_sco()
2667 static void btc8821a2ant_action_hid(struct btc_coexist *btcoexist) in btc8821a2ant_action_hid() argument
2672 wifi_rssi_state = btc8821a2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8821a2ant_action_hid()
2673 bt_rssi_state = btc8821a2ant_bt_rssi_state(btcoexist, in btc8821a2ant_action_hid()
2676 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8821a2ant_action_hid()
2678 btc8821a2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8821a2ant_action_hid()
2679 btc8821a2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8821a2ant_action_hid()
2682 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, true); in btc8821a2ant_action_hid()
2684 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8821a2ant_action_hid()
2686 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8821a2ant_action_hid()
2690 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 7); in btc8821a2ant_action_hid()
2693 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 2); in btc8821a2ant_action_hid()
2696 btc8821a2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); in btc8821a2ant_action_hid()
2697 btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 24); in btc8821a2ant_action_hid()
2703 btc8821a2ant_sw_mechanism1(btcoexist, true, true, in btc8821a2ant_action_hid()
2705 btc8821a2ant_sw_mechanism2(btcoexist, true, false, in btc8821a2ant_action_hid()
2708 btc8821a2ant_sw_mechanism1(btcoexist, true, true, in btc8821a2ant_action_hid()
2710 btc8821a2ant_sw_mechanism2(btcoexist, false, false, in btc8821a2ant_action_hid()
2717 btc8821a2ant_sw_mechanism1(btcoexist, false, true, in btc8821a2ant_action_hid()
2719 btc8821a2ant_sw_mechanism2(btcoexist, true, false, in btc8821a2ant_action_hid()
2722 btc8821a2ant_sw_mechanism1(btcoexist, false, true, in btc8821a2ant_action_hid()
2724 btc8821a2ant_sw_mechanism2(btcoexist, false, false, in btc8821a2ant_action_hid()
2731 static void btc8821a2ant_action_a2dp(struct btc_coexist *btcoexist) in btc8821a2ant_action_a2dp() argument
2737 wifi_rssi_state = btc8821a2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8821a2ant_action_a2dp()
2738 wifi_rssi_state1 = btc8821a2ant_wifi_rssi_state(btcoexist, 1, 2, in btc8821a2ant_action_a2dp()
2740 bt_rssi_state = btc8821a2ant_bt_rssi_state(btcoexist, in btc8821a2ant_action_a2dp()
2745 btc8821a2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8821a2ant_action_a2dp()
2748 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, in btc8821a2ant_action_a2dp()
2750 btc8821a2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, in btc8821a2ant_action_a2dp()
2752 btc8821a2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8821a2ant_action_a2dp()
2753 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8821a2ant_action_a2dp()
2755 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_action_a2dp()
2757 btc8821a2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8821a2ant_action_a2dp()
2759 btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 23); in btc8821a2ant_action_a2dp()
2762 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8821a2ant_action_a2dp()
2764 btc8821a2ant_sw_mechanism1(btcoexist, true, false, in btc8821a2ant_action_a2dp()
2766 btc8821a2ant_sw_mechanism2(btcoexist, true, false, in btc8821a2ant_action_a2dp()
2769 btc8821a2ant_sw_mechanism1(btcoexist, false, false, in btc8821a2ant_action_a2dp()
2771 btc8821a2ant_sw_mechanism2(btcoexist, true, false, in btc8821a2ant_action_a2dp()
2777 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8821a2ant_action_a2dp()
2778 btc8821a2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8821a2ant_action_a2dp()
2780 btc8821a2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8821a2ant_action_a2dp()
2783 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8821a2ant_action_a2dp()
2785 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_action_a2dp()
2788 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 7); in btc8821a2ant_action_a2dp()
2789 btc8821a2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8821a2ant_action_a2dp()
2792 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 13); in btc8821a2ant_action_a2dp()
2793 btc8821a2ant_power_save_state(btcoexist, BTC_PS_LPS_ON, 0x50, in btc8821a2ant_action_a2dp()
2800 btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 23); in btc8821a2ant_action_a2dp()
2802 btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 23); in btc8821a2ant_action_a2dp()
2806 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8821a2ant_action_a2dp()
2810 btc8821a2ant_sw_mechanism1(btcoexist, true, false, in btc8821a2ant_action_a2dp()
2812 btc8821a2ant_sw_mechanism2(btcoexist, true, false, in btc8821a2ant_action_a2dp()
2815 btc8821a2ant_sw_mechanism1(btcoexist, true, false, in btc8821a2ant_action_a2dp()
2817 btc8821a2ant_sw_mechanism2(btcoexist, false, false, in btc8821a2ant_action_a2dp()
2823 btc8821a2ant_sw_mechanism1(btcoexist, false, false, in btc8821a2ant_action_a2dp()
2825 btc8821a2ant_sw_mechanism2(btcoexist, true, false, in btc8821a2ant_action_a2dp()
2828 btc8821a2ant_sw_mechanism1(btcoexist, false, false, in btc8821a2ant_action_a2dp()
2830 btc8821a2ant_sw_mechanism2(btcoexist, false, false, in btc8821a2ant_action_a2dp()
2836 static void btc8821a2ant_action_a2dp_pan_hs(struct btc_coexist *btcoexist) in btc8821a2ant_action_a2dp_pan_hs() argument
2841 wifi_rssi_state = btc8821a2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8821a2ant_action_a2dp_pan_hs()
2842 wifi_rssi_state1 = btc8821a2ant_wifi_rssi_state(btcoexist, 1, 2, in btc8821a2ant_action_a2dp_pan_hs()
2844 bt_rssi_state = btc8821a2ant_bt_rssi_state(btcoexist, in btc8821a2ant_action_a2dp_pan_hs()
2847 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8821a2ant_action_a2dp_pan_hs()
2849 btc8821a2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8821a2ant_action_a2dp_pan_hs()
2850 btc8821a2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8821a2ant_action_a2dp_pan_hs()
2853 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8821a2ant_action_a2dp_pan_hs()
2855 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_action_a2dp_pan_hs()
2858 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 7); in btc8821a2ant_action_a2dp_pan_hs()
2859 btc8821a2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8821a2ant_action_a2dp_pan_hs()
2862 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 13); in btc8821a2ant_action_a2dp_pan_hs()
2863 btc8821a2ant_power_save_state(btcoexist, BTC_PS_LPS_ON, 0x50, in btc8821a2ant_action_a2dp_pan_hs()
2867 btc8821a2ant_tdma_duration_adjust(btcoexist, false, true, 2); in btc8821a2ant_action_a2dp_pan_hs()
2870 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8821a2ant_action_a2dp_pan_hs()
2874 btc8821a2ant_sw_mechanism1(btcoexist, true, false, in btc8821a2ant_action_a2dp_pan_hs()
2876 btc8821a2ant_sw_mechanism2(btcoexist, true, false, in btc8821a2ant_action_a2dp_pan_hs()
2879 btc8821a2ant_sw_mechanism1(btcoexist, true, false, in btc8821a2ant_action_a2dp_pan_hs()
2881 btc8821a2ant_sw_mechanism2(btcoexist, false, false, in btc8821a2ant_action_a2dp_pan_hs()
2887 btc8821a2ant_sw_mechanism1(btcoexist, false, false, in btc8821a2ant_action_a2dp_pan_hs()
2889 btc8821a2ant_sw_mechanism2(btcoexist, true, false, in btc8821a2ant_action_a2dp_pan_hs()
2892 btc8821a2ant_sw_mechanism1(btcoexist, false, false, in btc8821a2ant_action_a2dp_pan_hs()
2894 btc8821a2ant_sw_mechanism2(btcoexist, false, false, in btc8821a2ant_action_a2dp_pan_hs()
2900 static void btc8821a2ant_action_pan_edr(struct btc_coexist *btcoexist) in btc8821a2ant_action_pan_edr() argument
2905 wifi_rssi_state = btc8821a2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8821a2ant_action_pan_edr()
2906 wifi_rssi_state1 = btc8821a2ant_wifi_rssi_state(btcoexist, 1, 2, in btc8821a2ant_action_pan_edr()
2908 bt_rssi_state = btc8821a2ant_bt_rssi_state(btcoexist, in btc8821a2ant_action_pan_edr()
2911 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8821a2ant_action_pan_edr()
2913 btc8821a2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8821a2ant_action_pan_edr()
2915 btc8821a2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8821a2ant_action_pan_edr()
2918 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, true); in btc8821a2ant_action_pan_edr()
2920 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8821a2ant_action_pan_edr()
2923 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 10); in btc8821a2ant_action_pan_edr()
2924 btc8821a2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8821a2ant_action_pan_edr()
2927 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 13); in btc8821a2ant_action_pan_edr()
2928 btc8821a2ant_power_save_state(btcoexist, BTC_PS_LPS_ON, 0x50, in btc8821a2ant_action_pan_edr()
2935 btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 26); in btc8821a2ant_action_pan_edr()
2937 btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 26); in btc8821a2ant_action_pan_edr()
2940 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8821a2ant_action_pan_edr()
2944 btc8821a2ant_sw_mechanism1(btcoexist, true, false, in btc8821a2ant_action_pan_edr()
2946 btc8821a2ant_sw_mechanism2(btcoexist, true, false, in btc8821a2ant_action_pan_edr()
2949 btc8821a2ant_sw_mechanism1(btcoexist, true, false, in btc8821a2ant_action_pan_edr()
2951 btc8821a2ant_sw_mechanism2(btcoexist, false, false, in btc8821a2ant_action_pan_edr()
2957 btc8821a2ant_sw_mechanism1(btcoexist, false, false, in btc8821a2ant_action_pan_edr()
2959 btc8821a2ant_sw_mechanism2(btcoexist, true, false, in btc8821a2ant_action_pan_edr()
2962 btc8821a2ant_sw_mechanism1(btcoexist, false, false, in btc8821a2ant_action_pan_edr()
2964 btc8821a2ant_sw_mechanism2(btcoexist, false, false, in btc8821a2ant_action_pan_edr()
2971 static void btc8821a2ant_action_pan_hs(struct btc_coexist *btcoexist) in btc8821a2ant_action_pan_hs() argument
2976 wifi_rssi_state = btc8821a2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8821a2ant_action_pan_hs()
2977 btc8821a2ant_wifi_rssi_state(btcoexist, 1, 2, in btc8821a2ant_action_pan_hs()
2979 bt_rssi_state = btc8821a2ant_bt_rssi_state(btcoexist, in btc8821a2ant_action_pan_hs()
2982 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8821a2ant_action_pan_hs()
2984 btc8821a2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8821a2ant_action_pan_hs()
2985 btc8821a2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8821a2ant_action_pan_hs()
2988 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8821a2ant_action_pan_hs()
2990 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_action_pan_hs()
2992 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 7); in btc8821a2ant_action_pan_hs()
2993 btc8821a2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); in btc8821a2ant_action_pan_hs()
2994 btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8821a2ant_action_pan_hs()
2996 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8821a2ant_action_pan_hs()
3000 btc8821a2ant_sw_mechanism1(btcoexist, true, false, in btc8821a2ant_action_pan_hs()
3002 btc8821a2ant_sw_mechanism2(btcoexist, true, false, in btc8821a2ant_action_pan_hs()
3005 btc8821a2ant_sw_mechanism1(btcoexist, true, false, in btc8821a2ant_action_pan_hs()
3007 btc8821a2ant_sw_mechanism2(btcoexist, false, false, in btc8821a2ant_action_pan_hs()
3013 btc8821a2ant_sw_mechanism1(btcoexist, false, false, in btc8821a2ant_action_pan_hs()
3015 btc8821a2ant_sw_mechanism2(btcoexist, true, false, in btc8821a2ant_action_pan_hs()
3018 btc8821a2ant_sw_mechanism1(btcoexist, false, false, in btc8821a2ant_action_pan_hs()
3020 btc8821a2ant_sw_mechanism2(btcoexist, false, false, in btc8821a2ant_action_pan_hs()
3027 static void btc8821a2ant_action_pan_edr_a2dp(struct btc_coexist *btcoexist) in btc8821a2ant_action_pan_edr_a2dp() argument
3032 wifi_rssi_state = btc8821a2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8821a2ant_action_pan_edr_a2dp()
3033 wifi_rssi_state1 = btc8821a2ant_wifi_rssi_state(btcoexist, 1, 2, in btc8821a2ant_action_pan_edr_a2dp()
3035 bt_rssi_state = btc8821a2ant_bt_rssi_state(btcoexist, in btc8821a2ant_action_pan_edr_a2dp()
3038 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8821a2ant_action_pan_edr_a2dp()
3040 btc8821a2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8821a2ant_action_pan_edr_a2dp()
3042 btc8821a2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8821a2ant_action_pan_edr_a2dp()
3045 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8821a2ant_action_pan_edr_a2dp()
3047 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_action_pan_edr_a2dp()
3050 btc8821a2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8821a2ant_action_pan_edr_a2dp()
3053 btc8821a2ant_power_save_state(btcoexist, BTC_PS_LPS_ON, 0x50, in btc8821a2ant_action_pan_edr_a2dp()
3056 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8821a2ant_action_pan_edr_a2dp()
3060 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 12); in btc8821a2ant_action_pan_edr_a2dp()
3063 btc8821a2ant_tdma_duration_adjust(btcoexist, false, in btc8821a2ant_action_pan_edr_a2dp()
3066 btc8821a2ant_tdma_duration_adjust(btcoexist, false, in btc8821a2ant_action_pan_edr_a2dp()
3069 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 13); in btc8821a2ant_action_pan_edr_a2dp()
3070 btc8821a2ant_tdma_duration_adjust(btcoexist, false, true, 3); in btc8821a2ant_action_pan_edr_a2dp()
3077 btc8821a2ant_sw_mechanism1(btcoexist, true, false, in btc8821a2ant_action_pan_edr_a2dp()
3079 btc8821a2ant_sw_mechanism2(btcoexist, true, false, in btc8821a2ant_action_pan_edr_a2dp()
3082 btc8821a2ant_sw_mechanism1(btcoexist, true, false, in btc8821a2ant_action_pan_edr_a2dp()
3084 btc8821a2ant_sw_mechanism2(btcoexist, false, false, in btc8821a2ant_action_pan_edr_a2dp()
3090 btc8821a2ant_sw_mechanism1(btcoexist, false, false, in btc8821a2ant_action_pan_edr_a2dp()
3092 btc8821a2ant_sw_mechanism2(btcoexist, true, false, in btc8821a2ant_action_pan_edr_a2dp()
3095 btc8821a2ant_sw_mechanism1(btcoexist, false, false, in btc8821a2ant_action_pan_edr_a2dp()
3097 btc8821a2ant_sw_mechanism2(btcoexist, false, false, in btc8821a2ant_action_pan_edr_a2dp()
3103 static void btc8821a2ant_action_pan_edr_hid(struct btc_coexist *btcoexist) in btc8821a2ant_action_pan_edr_hid() argument
3108 wifi_rssi_state = btc8821a2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8821a2ant_action_pan_edr_hid()
3109 bt_rssi_state = btc8821a2ant_bt_rssi_state(btcoexist, in btc8821a2ant_action_pan_edr_hid()
3112 btc8821a2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8821a2ant_action_pan_edr_hid()
3115 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, true); in btc8821a2ant_action_pan_edr_hid()
3117 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, false); in btc8821a2ant_action_pan_edr_hid()
3119 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8821a2ant_action_pan_edr_hid()
3124 btc8821a2ant_coex_table(btcoexist, NORMAL_EXEC, 0x55ff55ff, in btc8821a2ant_action_pan_edr_hid()
3128 btc8821a2ant_coex_table(btcoexist, NORMAL_EXEC, 0x55ff55ff, in btc8821a2ant_action_pan_edr_hid()
3133 btc8821a2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 3); in btc8821a2ant_action_pan_edr_hid()
3137 btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8821a2ant_action_pan_edr_hid()
3140 btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 14); in btc8821a2ant_action_pan_edr_hid()
3146 btc8821a2ant_sw_mechanism1(btcoexist, true, true, in btc8821a2ant_action_pan_edr_hid()
3148 btc8821a2ant_sw_mechanism2(btcoexist, true, false, in btc8821a2ant_action_pan_edr_hid()
3151 btc8821a2ant_sw_mechanism1(btcoexist, true, true, in btc8821a2ant_action_pan_edr_hid()
3153 btc8821a2ant_sw_mechanism2(btcoexist, false, false, in btc8821a2ant_action_pan_edr_hid()
3157 btc8821a2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8821a2ant_action_pan_edr_hid()
3161 btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 10); in btc8821a2ant_action_pan_edr_hid()
3163 btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 14); in btc8821a2ant_action_pan_edr_hid()
3169 btc8821a2ant_sw_mechanism1(btcoexist, false, true, in btc8821a2ant_action_pan_edr_hid()
3171 btc8821a2ant_sw_mechanism2(btcoexist, true, false, in btc8821a2ant_action_pan_edr_hid()
3174 btc8821a2ant_sw_mechanism1(btcoexist, false, true, in btc8821a2ant_action_pan_edr_hid()
3176 btc8821a2ant_sw_mechanism2(btcoexist, false, false, in btc8821a2ant_action_pan_edr_hid()
3183 static void btc8821a2ant_act_hid_a2dp_pan_edr(struct btc_coexist *btcoexist) in btc8821a2ant_act_hid_a2dp_pan_edr() argument
3188 wifi_rssi_state = btc8821a2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8821a2ant_act_hid_a2dp_pan_edr()
3189 wifi_rssi_state1 = btc8821a2ant_wifi_rssi_state(btcoexist, 1, 2, in btc8821a2ant_act_hid_a2dp_pan_edr()
3191 bt_rssi_state = btc8821a2ant_bt_rssi_state(btcoexist, in btc8821a2ant_act_hid_a2dp_pan_edr()
3194 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8821a2ant_act_hid_a2dp_pan_edr()
3196 btc8821a2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8821a2ant_act_hid_a2dp_pan_edr()
3197 btc8821a2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8821a2ant_act_hid_a2dp_pan_edr()
3200 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8821a2ant_act_hid_a2dp_pan_edr()
3202 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_act_hid_a2dp_pan_edr()
3205 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 7); in btc8821a2ant_act_hid_a2dp_pan_edr()
3206 btc8821a2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8821a2ant_act_hid_a2dp_pan_edr()
3209 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 14); in btc8821a2ant_act_hid_a2dp_pan_edr()
3210 btc8821a2ant_power_save_state(btcoexist, BTC_PS_LPS_ON, 0x50, in btc8821a2ant_act_hid_a2dp_pan_edr()
3214 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8821a2ant_act_hid_a2dp_pan_edr()
3219 btc8821a2ant_tdma_duration_adjust(btcoexist, true, in btc8821a2ant_act_hid_a2dp_pan_edr()
3222 btc8821a2ant_tdma_duration_adjust(btcoexist, true, in btc8821a2ant_act_hid_a2dp_pan_edr()
3225 btc8821a2ant_tdma_duration_adjust(btcoexist, true, true, 3); in btc8821a2ant_act_hid_a2dp_pan_edr()
3232 btc8821a2ant_sw_mechanism1(btcoexist, true, true, in btc8821a2ant_act_hid_a2dp_pan_edr()
3234 btc8821a2ant_sw_mechanism2(btcoexist, true, false, in btc8821a2ant_act_hid_a2dp_pan_edr()
3237 btc8821a2ant_sw_mechanism1(btcoexist, true, true, in btc8821a2ant_act_hid_a2dp_pan_edr()
3239 btc8821a2ant_sw_mechanism2(btcoexist, false, false, in btc8821a2ant_act_hid_a2dp_pan_edr()
3245 btc8821a2ant_sw_mechanism1(btcoexist, false, true, in btc8821a2ant_act_hid_a2dp_pan_edr()
3247 btc8821a2ant_sw_mechanism2(btcoexist, true, false, in btc8821a2ant_act_hid_a2dp_pan_edr()
3250 btc8821a2ant_sw_mechanism1(btcoexist, false, true, in btc8821a2ant_act_hid_a2dp_pan_edr()
3252 btc8821a2ant_sw_mechanism2(btcoexist, false, false, in btc8821a2ant_act_hid_a2dp_pan_edr()
3258 static void btc8821a2ant_action_hid_a2dp(struct btc_coexist *btcoexist) in btc8821a2ant_action_hid_a2dp() argument
3264 wifi_rssi_state = btc8821a2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8821a2ant_action_hid_a2dp()
3265 btc8821a2ant_wifi_rssi_state(btcoexist, 1, 2, in btc8821a2ant_action_hid_a2dp()
3267 bt_rssi_state = btc8821a2ant_bt_rssi_state(btcoexist, in btc8821a2ant_action_hid_a2dp()
3270 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8821a2ant_action_hid_a2dp()
3272 btc8821a2ant_limited_rx(btcoexist, NORMAL_EXEC, false, true, 0x5); in btc8821a2ant_action_hid_a2dp()
3273 btc8821a2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8821a2ant_action_hid_a2dp()
3275 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8821a2ant_action_hid_a2dp()
3278 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8821a2ant_action_hid_a2dp()
3280 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8821a2ant_action_hid_a2dp()
3282 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_action_hid_a2dp()
3286 btcoexist->btc_get(btcoexist, BTC_GET_U1_AP_NUM, in btc8821a2ant_action_hid_a2dp()
3289 btc8821a2ant_dec_bt_pwr(btcoexist, in btc8821a2ant_action_hid_a2dp()
3292 btc8821a2ant_dec_bt_pwr(btcoexist, in btc8821a2ant_action_hid_a2dp()
3295 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8821a2ant_action_hid_a2dp()
3297 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_action_hid_a2dp()
3302 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 7); in btc8821a2ant_action_hid_a2dp()
3303 btc8821a2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8821a2ant_action_hid_a2dp()
3306 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 14); in btc8821a2ant_action_hid_a2dp()
3307 btc8821a2ant_power_save_state(btcoexist, BTC_PS_LPS_ON, 0x50, in btc8821a2ant_action_hid_a2dp()
3314 btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 23); in btc8821a2ant_action_hid_a2dp()
3316 btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 23); in btc8821a2ant_action_hid_a2dp()
3323 btc8821a2ant_sw_mechanism1(btcoexist, true, true, in btc8821a2ant_action_hid_a2dp()
3325 btc8821a2ant_sw_mechanism2(btcoexist, true, false, in btc8821a2ant_action_hid_a2dp()
3328 btc8821a2ant_sw_mechanism1(btcoexist, true, true, in btc8821a2ant_action_hid_a2dp()
3330 btc8821a2ant_sw_mechanism2(btcoexist, false, false, in btc8821a2ant_action_hid_a2dp()
3336 btc8821a2ant_sw_mechanism1(btcoexist, false, true, in btc8821a2ant_action_hid_a2dp()
3338 btc8821a2ant_sw_mechanism2(btcoexist, true, false, in btc8821a2ant_action_hid_a2dp()
3341 btc8821a2ant_sw_mechanism1(btcoexist, false, true, in btc8821a2ant_action_hid_a2dp()
3343 btc8821a2ant_sw_mechanism2(btcoexist, false, false, in btc8821a2ant_action_hid_a2dp()
3349 static void btc8821a2ant_action_wifi_multi_port(struct btc_coexist *btcoexist) in btc8821a2ant_action_wifi_multi_port() argument
3351 btc8821a2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8821a2ant_action_wifi_multi_port()
3352 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_action_wifi_multi_port()
3355 btc8821a2ant_sw_mechanism1(btcoexist, false, false, false, false); in btc8821a2ant_action_wifi_multi_port()
3356 btc8821a2ant_sw_mechanism2(btcoexist, false, false, false, 0x18); in btc8821a2ant_action_wifi_multi_port()
3359 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_action_wifi_multi_port()
3361 btc8821a2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); in btc8821a2ant_action_wifi_multi_port()
3362 btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8821a2ant_action_wifi_multi_port()
3365 static void btc8821a2ant_run_coexist_mechanism(struct btc_coexist *btcoexist) in btc8821a2ant_run_coexist_mechanism() argument
3367 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8821a2ant_run_coexist_mechanism()
3368 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8821a2ant_run_coexist_mechanism()
3376 if (btcoexist->manual_control) { in btc8821a2ant_run_coexist_mechanism()
3382 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_UNDER_5G, &wifi_under_5g); in btc8821a2ant_run_coexist_mechanism()
3387 btc8821a2ant_coex_under_5g(btcoexist); in btc8821a2ant_run_coexist_mechanism()
3397 algorithm = btc8821a2ant_action_algorithm(btcoexist); in btc8821a2ant_run_coexist_mechanism()
3402 btc8821a2ant_action_bt_inquiry(btcoexist); in btc8821a2ant_run_coexist_mechanism()
3406 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_SCAN, &scan); in btc8821a2ant_run_coexist_mechanism()
3407 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_LINK, &link); in btc8821a2ant_run_coexist_mechanism()
3408 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_ROAM, &roam); in btc8821a2ant_run_coexist_mechanism()
3413 btc8821a2ant_action_wifi_link_process(btcoexist); in btc8821a2ant_run_coexist_mechanism()
3418 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_LINK_STATUS, in btc8821a2ant_run_coexist_mechanism()
3433 btcoexist->btc_set(btcoexist, BTC_SET_BL_MIRACAST_PLUS_BT, in btc8821a2ant_run_coexist_mechanism()
3435 btc8821a2ant_action_wifi_multi_port(btcoexist); in btc8821a2ant_run_coexist_mechanism()
3441 btcoexist->btc_set(btcoexist, BTC_SET_BL_MIRACAST_PLUS_BT, in btc8821a2ant_run_coexist_mechanism()
3448 if (btc8821a2ant_is_common_action(btcoexist)) { in btc8821a2ant_run_coexist_mechanism()
3464 btc8821a2ant_action_sco(btcoexist); in btc8821a2ant_run_coexist_mechanism()
3469 btc8821a2ant_action_hid(btcoexist); in btc8821a2ant_run_coexist_mechanism()
3474 btc8821a2ant_action_a2dp(btcoexist); in btc8821a2ant_run_coexist_mechanism()
3479 btc8821a2ant_action_a2dp_pan_hs(btcoexist); in btc8821a2ant_run_coexist_mechanism()
3484 btc8821a2ant_action_pan_edr(btcoexist); in btc8821a2ant_run_coexist_mechanism()
3489 btc8821a2ant_action_pan_hs(btcoexist); in btc8821a2ant_run_coexist_mechanism()
3494 btc8821a2ant_action_pan_edr_a2dp(btcoexist); in btc8821a2ant_run_coexist_mechanism()
3499 btc8821a2ant_action_pan_edr_hid(btcoexist); in btc8821a2ant_run_coexist_mechanism()
3504 btc8821a2ant_act_hid_a2dp_pan_edr(btcoexist); in btc8821a2ant_run_coexist_mechanism()
3509 btc8821a2ant_action_hid_a2dp(btcoexist); in btc8821a2ant_run_coexist_mechanism()
3514 btc8821a2ant_coex_all_off(btcoexist); in btc8821a2ant_run_coexist_mechanism()
3521 static void btc8821a2ant_wifi_off_hw_cfg(struct btc_coexist *btcoexist) in btc8821a2ant_wifi_off_hw_cfg() argument
3527 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0x4); in btc8821a2ant_wifi_off_hw_cfg()
3530 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x780); in btc8821a2ant_wifi_off_hw_cfg()
3531 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_FW_VER, &fw_ver); in btc8821a2ant_wifi_off_hw_cfg()
3535 btcoexist->btc_fill_h2c(btcoexist, 0x6E, 1, h2c_parameter); in btc8821a2ant_wifi_off_hw_cfg()
3537 btcoexist->btc_write_1byte(btcoexist, 0x765, 0x18); in btc8821a2ant_wifi_off_hw_cfg()
3544 void ex_btc8821a2ant_init_hwconfig(struct btc_coexist *btcoexist) in ex_btc8821a2ant_init_hwconfig() argument
3546 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8821a2ant_init_hwconfig()
3554 btcoexist->btc_get_rf_reg(btcoexist, BTC_RF_A, 0x1e, 0xfffff); in ex_btc8821a2ant_init_hwconfig()
3557 u1tmp = btcoexist->btc_read_1byte(btcoexist, 0x790); in ex_btc8821a2ant_init_hwconfig()
3560 btcoexist->btc_write_1byte(btcoexist, 0x790, u1tmp); in ex_btc8821a2ant_init_hwconfig()
3563 btc8821a2ant_set_ant_path(btcoexist, BTC_ANT_WIFI_AT_MAIN, true, false); in ex_btc8821a2ant_init_hwconfig()
3567 btc8821a2ant_coex_table_with_type(btcoexist, FORCE_EXEC, 0); in ex_btc8821a2ant_init_hwconfig()
3571 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0x4); in ex_btc8821a2ant_init_hwconfig()
3572 btcoexist->btc_write_1byte(btcoexist, 0x778, 0x3); in ex_btc8821a2ant_init_hwconfig()
3573 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x40, 0x20, 0x1); in ex_btc8821a2ant_init_hwconfig()
3576 void ex_btc8821a2ant_pre_load_firmware(struct btc_coexist *btcoexist) in ex_btc8821a2ant_pre_load_firmware() argument
3578 struct btc_board_info *board_info = &btcoexist->board_info; in ex_btc8821a2ant_pre_load_firmware()
3592 if (btcoexist->chip_interface == BTC_INTF_USB) { in ex_btc8821a2ant_pre_load_firmware()
3595 btcoexist->btc_write_local_reg_1byte(btcoexist, 0xfe08, u8tmp); in ex_btc8821a2ant_pre_load_firmware()
3604 if (btcoexist->chip_interface == BTC_INTF_PCI) in ex_btc8821a2ant_pre_load_firmware()
3605 btcoexist->btc_write_local_reg_1byte(btcoexist, 0x384, in ex_btc8821a2ant_pre_load_firmware()
3607 else if (btcoexist->chip_interface == BTC_INTF_SDIO) in ex_btc8821a2ant_pre_load_firmware()
3608 btcoexist->btc_write_local_reg_1byte(btcoexist, 0x60, in ex_btc8821a2ant_pre_load_firmware()
3613 void ex_btc8821a2ant_init_coex_dm(struct btc_coexist *btcoexist) in ex_btc8821a2ant_init_coex_dm() argument
3615 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8821a2ant_init_coex_dm()
3620 btc8821a2ant_init_coex_dm(btcoexist); in ex_btc8821a2ant_init_coex_dm()
3623 void ex_btc8821a2ant_display_coex_info(struct btc_coexist *btcoexist, in ex_btc8821a2ant_display_coex_info() argument
3626 struct btc_board_info *board_info = &btcoexist->board_info; in ex_btc8821a2ant_display_coex_info()
3627 struct btc_stack_info *stack_info = &btcoexist->stack_info; in ex_btc8821a2ant_display_coex_info()
3642 if (btcoexist->manual_control) { in ex_btc8821a2ant_display_coex_info()
3650 btcoexist->btc_get(btcoexist, BTC_GET_U4_BT_PATCH_VER, &bt_patch_ver); in ex_btc8821a2ant_display_coex_info()
3651 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_FW_VER, &fw_ver); in ex_btc8821a2ant_display_coex_info()
3657 btcoexist->btc_get(btcoexist, in ex_btc8821a2ant_display_coex_info()
3659 btcoexist->btc_get(btcoexist, in ex_btc8821a2ant_display_coex_info()
3661 btcoexist->btc_get(btcoexist, in ex_btc8821a2ant_display_coex_info()
3671 btcoexist->btc_get(btcoexist, BTC_GET_S4_WIFI_RSSI, &wifi_rssi); in ex_btc8821a2ant_display_coex_info()
3672 btcoexist->btc_get(btcoexist, BTC_GET_S4_HS_RSSI, &bt_hs_rssi); in ex_btc8821a2ant_display_coex_info()
3676 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_SCAN, &scan); in ex_btc8821a2ant_display_coex_info()
3677 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_LINK, &link); in ex_btc8821a2ant_display_coex_info()
3678 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_ROAM, &roam); in ex_btc8821a2ant_display_coex_info()
3682 btcoexist->btc_get(btcoexist, in ex_btc8821a2ant_display_coex_info()
3684 btcoexist->btc_get(btcoexist, in ex_btc8821a2ant_display_coex_info()
3686 btcoexist->btc_get(btcoexist, in ex_btc8821a2ant_display_coex_info()
3688 btcoexist->btc_get(btcoexist, in ex_btc8821a2ant_display_coex_info()
3704 btcoexist->btc_disp_dbg_msg(btcoexist, in ex_btc8821a2ant_display_coex_info()
3726 btcoexist->btc_disp_dbg_msg(btcoexist, BTC_DBG_DISP_FW_PWR_MODE_CMD, m); in ex_btc8821a2ant_display_coex_info()
3740 if (!btcoexist->manual_control) { in ex_btc8821a2ant_display_coex_info()
3757 u1tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x778); in ex_btc8821a2ant_display_coex_info()
3758 u1tmp[1] = btcoexist->btc_read_1byte(btcoexist, 0x6cc); in ex_btc8821a2ant_display_coex_info()
3763 u1tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x8db); in ex_btc8821a2ant_display_coex_info()
3764 u1tmp[1] = btcoexist->btc_read_1byte(btcoexist, 0xc5b); in ex_btc8821a2ant_display_coex_info()
3769 u4tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0xcb4); in ex_btc8821a2ant_display_coex_info()
3774 u1tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x40); in ex_btc8821a2ant_display_coex_info()
3775 u4tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x4c); in ex_btc8821a2ant_display_coex_info()
3776 u4tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0x974); in ex_btc8821a2ant_display_coex_info()
3781 u4tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x550); in ex_btc8821a2ant_display_coex_info()
3782 u1tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x522); in ex_btc8821a2ant_display_coex_info()
3787 u4tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0xc50); in ex_btc8821a2ant_display_coex_info()
3788 u1tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0xa0a); in ex_btc8821a2ant_display_coex_info()
3793 u4tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0xf48); in ex_btc8821a2ant_display_coex_info()
3794 u1tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0xa5b); in ex_btc8821a2ant_display_coex_info()
3795 u1tmp[1] = btcoexist->btc_read_1byte(btcoexist, 0xa5c); in ex_btc8821a2ant_display_coex_info()
3800 u4tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x6c0); in ex_btc8821a2ant_display_coex_info()
3801 u4tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0x6c4); in ex_btc8821a2ant_display_coex_info()
3802 u4tmp[2] = btcoexist->btc_read_4byte(btcoexist, 0x6c8); in ex_btc8821a2ant_display_coex_info()
3815 u1tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x41b); in ex_btc8821a2ant_display_coex_info()
3820 btcoexist->btc_disp_dbg_msg(btcoexist, BTC_DBG_DISP_COEX_STATISTICS, m); in ex_btc8821a2ant_display_coex_info()
3823 void ex_btc8821a2ant_ips_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8821a2ant_ips_notify() argument
3825 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8821a2ant_ips_notify()
3831 btc8821a2ant_wifi_off_hw_cfg(btcoexist); in ex_btc8821a2ant_ips_notify()
3832 btc8821a2ant_ignore_wlan_act(btcoexist, FORCE_EXEC, true); in ex_btc8821a2ant_ips_notify()
3833 btc8821a2ant_coex_all_off(btcoexist); in ex_btc8821a2ant_ips_notify()
3838 ex_btc8821a2ant_init_hwconfig(btcoexist); in ex_btc8821a2ant_ips_notify()
3839 btc8821a2ant_init_coex_dm(btcoexist); in ex_btc8821a2ant_ips_notify()
3840 btc8821a2ant_query_bt_info(btcoexist); in ex_btc8821a2ant_ips_notify()
3844 void ex_btc8821a2ant_lps_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8821a2ant_lps_notify() argument
3846 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8821a2ant_lps_notify()
3859 void ex_btc8821a2ant_scan_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8821a2ant_scan_notify() argument
3861 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8821a2ant_scan_notify()
3872 void ex_btc8821a2ant_connect_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8821a2ant_connect_notify() argument
3874 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8821a2ant_connect_notify()
3885 void ex_btc8821a2ant_media_status_notify(struct btc_coexist *btcoexist, in ex_btc8821a2ant_media_status_notify() argument
3888 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8821a2ant_media_status_notify()
3903 btcoexist->btc_get(btcoexist, BTC_GET_U1_WIFI_CENTRAL_CHNL, in ex_btc8821a2ant_media_status_notify()
3909 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in ex_btc8821a2ant_media_status_notify()
3931 btcoexist->btc_fill_h2c(btcoexist, 0x66, 3, h2c_parameter); in ex_btc8821a2ant_media_status_notify()
3934 void ex_btc8821a2ant_special_packet_notify(struct btc_coexist *btcoexist, in ex_btc8821a2ant_special_packet_notify() argument
3937 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8821a2ant_special_packet_notify()
3945 void ex_btc8821a2ant_bt_info_notify(struct btc_coexist *btcoexist, in ex_btc8821a2ant_bt_info_notify() argument
3948 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8821a2ant_bt_info_notify()
3955 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_UNDER_5G, &wifi_under_5g); in ex_btc8821a2ant_bt_info_notify()
3956 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in ex_btc8821a2ant_bt_info_notify()
3980 if (btcoexist->manual_control) { in ex_btc8821a2ant_bt_info_notify()
3998 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_TX_RX_MASK, in ex_btc8821a2ant_bt_info_notify()
4006 btcoexist->btc_set_bt_reg(btcoexist, BTC_BT_REG_RF, in ex_btc8821a2ant_bt_info_notify()
4014 btcoexist->btc_get(btcoexist, in ex_btc8821a2ant_bt_info_notify()
4017 ex_btc8821a2ant_media_status_notify(btcoexist, in ex_btc8821a2ant_bt_info_notify()
4020 ex_btc8821a2ant_media_status_notify(btcoexist, in ex_btc8821a2ant_bt_info_notify()
4026 if (!btcoexist->manual_control && !wifi_under_5g) { in ex_btc8821a2ant_bt_info_notify()
4038 btc8821a2ant_ignore_wlan_act(btcoexist, in ex_btc8821a2ant_bt_info_notify()
4054 btcoexist, FORCE_EXEC, true); in ex_btc8821a2ant_bt_info_notify()
4101 btc8821a2ant_update_bt_link_info(btcoexist); in ex_btc8821a2ant_bt_info_notify()
4137 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_TRAFFIC_BUSY, &bt_busy); in ex_btc8821a2ant_bt_info_notify()
4140 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_LIMITED_DIG, &limited_dig); in ex_btc8821a2ant_bt_info_notify()
4142 btc8821a2ant_run_coexist_mechanism(btcoexist); in ex_btc8821a2ant_bt_info_notify()
4145 void ex_btc8821a2ant_halt_notify(struct btc_coexist *btcoexist) in ex_btc8821a2ant_halt_notify() argument
4147 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8821a2ant_halt_notify()
4152 btc8821a2ant_wifi_off_hw_cfg(btcoexist); in ex_btc8821a2ant_halt_notify()
4153 btc8821a2ant_ignore_wlan_act(btcoexist, FORCE_EXEC, true); in ex_btc8821a2ant_halt_notify()
4154 ex_btc8821a2ant_media_status_notify(btcoexist, BTC_MEDIA_DISCONNECT); in ex_btc8821a2ant_halt_notify()
4157 void ex_btc8821a2ant_pnp_notify(struct btc_coexist *btcoexist, u8 pnp_state) in ex_btc8821a2ant_pnp_notify() argument
4159 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8821a2ant_pnp_notify()
4169 ex_btc8821a2ant_init_hwconfig(btcoexist); in ex_btc8821a2ant_pnp_notify()
4170 btc8821a2ant_init_coex_dm(btcoexist); in ex_btc8821a2ant_pnp_notify()
4171 btc8821a2ant_query_bt_info(btcoexist); in ex_btc8821a2ant_pnp_notify()
4175 void ex_btc8821a2ant_periodical(struct btc_coexist *btcoexist) in ex_btc8821a2ant_periodical() argument
4177 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8821a2ant_periodical()
4190 btc8821a2ant_set_ant_path(btcoexist, in ex_btc8821a2ant_periodical()
4195 if (btcoexist->auto_report_2ant) { in ex_btc8821a2ant_periodical()
4196 btc8821a2ant_query_bt_info(btcoexist); in ex_btc8821a2ant_periodical()
4198 btc8821a2ant_monitor_bt_ctr(btcoexist); in ex_btc8821a2ant_periodical()
4199 btc8821a2ant_monitor_wifi_ctr(btcoexist); in ex_btc8821a2ant_periodical()
4201 if (btc8821a2ant_is_wifi_status_changed(btcoexist) || in ex_btc8821a2ant_periodical()
4203 btc8821a2ant_run_coexist_mechanism(btcoexist); in ex_btc8821a2ant_periodical()