Lines Matching refs:btcoexist

31 static u8 btc8192e2ant_bt_rssi_state(struct btc_coexist *btcoexist,  in btc8192e2ant_bt_rssi_state()  argument
35 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_bt_rssi_state()
93 static u8 btc8192e2ant_wifi_rssi_state(struct btc_coexist *btcoexist, in btc8192e2ant_wifi_rssi_state() argument
97 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_wifi_rssi_state()
101 btcoexist->btc_get(btcoexist, BTC_GET_S4_WIFI_RSSI, &wifi_rssi); in btc8192e2ant_wifi_rssi_state()
160 *btcoexist) in btc8192e2ant_monitor_bt_enable_disable()
162 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_monitor_bt_enable_disable()
184 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_DISABLE, in btc8192e2ant_monitor_bt_enable_disable()
195 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_DISABLE, in btc8192e2ant_monitor_bt_enable_disable()
210 static u32 btc8192e2ant_decide_ra_mask(struct btc_coexist *btcoexist, in btc8192e2ant_decide_ra_mask() argument
241 static void btc8192e2ant_update_ra_mask(struct btc_coexist *btcoexist, in btc8192e2ant_update_ra_mask() argument
247 btcoexist->btc_set(btcoexist, BTC_SET_ACT_UPDATE_RAMASK, in btc8192e2ant_update_ra_mask()
252 static void btc8192e2ant_auto_rate_fallback_retry(struct btc_coexist *btcoexist, in btc8192e2ant_auto_rate_fallback_retry() argument
262 btcoexist->btc_write_4byte(btcoexist, 0x430, in btc8192e2ant_auto_rate_fallback_retry()
264 btcoexist->btc_write_4byte(btcoexist, 0x434, in btc8192e2ant_auto_rate_fallback_retry()
268 btcoexist->btc_get(btcoexist, in btc8192e2ant_auto_rate_fallback_retry()
272 btcoexist->btc_write_4byte(btcoexist, 0x430, in btc8192e2ant_auto_rate_fallback_retry()
274 btcoexist->btc_write_4byte(btcoexist, 0x434, in btc8192e2ant_auto_rate_fallback_retry()
277 btcoexist->btc_write_4byte(btcoexist, 0x430, in btc8192e2ant_auto_rate_fallback_retry()
279 btcoexist->btc_write_4byte(btcoexist, 0x434, in btc8192e2ant_auto_rate_fallback_retry()
291 static void btc8192e2ant_retry_limit(struct btc_coexist *btcoexist, in btc8192e2ant_retry_limit() argument
300 btcoexist->btc_write_2byte(btcoexist, 0x42a, in btc8192e2ant_retry_limit()
304 btcoexist->btc_write_2byte(btcoexist, 0x42a, 0x0808); in btc8192e2ant_retry_limit()
314 static void btc8192e2ant_ampdu_maxtime(struct btc_coexist *btcoexist, in btc8192e2ant_ampdu_maxtime() argument
323 btcoexist->btc_write_1byte(btcoexist, 0x456, in btc8192e2ant_ampdu_maxtime()
327 btcoexist->btc_write_1byte(btcoexist, 0x456, 0x38); in btc8192e2ant_ampdu_maxtime()
337 static void btc8192e2ant_limited_tx(struct btc_coexist *btcoexist, in btc8192e2ant_limited_tx() argument
346 btc8192e2ant_decide_ra_mask(btcoexist, coex_dm->cur_ss_type, in btc8192e2ant_limited_tx()
348 btc8192e2ant_update_ra_mask(btcoexist, force_exec, dis_ra_mask); in btc8192e2ant_limited_tx()
349 btc8192e2ant_auto_rate_fallback_retry(btcoexist, force_exec, arfr_type); in btc8192e2ant_limited_tx()
350 btc8192e2ant_retry_limit(btcoexist, force_exec, retry_limit_type); in btc8192e2ant_limited_tx()
351 btc8192e2ant_ampdu_maxtime(btcoexist, force_exec, ampdu_time_type); in btc8192e2ant_limited_tx()
354 static void btc8192e2ant_limited_rx(struct btc_coexist *btcoexist, in btc8192e2ant_limited_rx() argument
366 btcoexist->btc_set(btcoexist, BTC_SET_BL_TO_REJ_AP_AGG_PKT, in btc8192e2ant_limited_rx()
369 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_CTRL_AGG_SIZE, in btc8192e2ant_limited_rx()
374 btcoexist->btc_set(btcoexist, BTC_SET_U1_AGG_BUF_SIZE, &rx_agg_size); in btc8192e2ant_limited_rx()
376 btcoexist->btc_set(btcoexist, BTC_SET_ACT_AGGREGATE_CTRL, NULL); in btc8192e2ant_limited_rx()
379 static void btc8192e2ant_monitor_bt_ctr(struct btc_coexist *btcoexist) in btc8192e2ant_monitor_bt_ctr() argument
381 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_monitor_bt_ctr()
388 u32tmp = btcoexist->btc_read_4byte(btcoexist, reg_hp_txrx); in btc8192e2ant_monitor_bt_ctr()
392 u32tmp = btcoexist->btc_read_4byte(btcoexist, reg_lp_txrx); in btc8192e2ant_monitor_bt_ctr()
409 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0xc); in btc8192e2ant_monitor_bt_ctr()
412 static void btc8192e2ant_query_bt_info(struct btc_coexist *btcoexist) in btc8192e2ant_query_bt_info() argument
414 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_query_bt_info()
425 btcoexist->btc_fill_h2c(btcoexist, 0x61, 1, h2c_parameter); in btc8192e2ant_query_bt_info()
429 bool btc8192e2ant_is_wifi_status_changed(struct btc_coexist *btcoexist) in btc8192e2ant_is_wifi_status_changed() argument
436 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in btc8192e2ant_is_wifi_status_changed()
438 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in btc8192e2ant_is_wifi_status_changed()
439 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in btc8192e2ant_is_wifi_status_changed()
440 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_4_WAY_PROGRESS, in btc8192e2ant_is_wifi_status_changed()
461 static void btc8192e2ant_update_bt_link_info(struct btc_coexist *btcoexist) in btc8192e2ant_update_bt_link_info() argument
463 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8192e2ant_update_bt_link_info()
466 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in btc8192e2ant_update_bt_link_info()
517 static u8 btc8192e2ant_action_algorithm(struct btc_coexist *btcoexist) in btc8192e2ant_action_algorithm() argument
519 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_action_algorithm()
520 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8192e2ant_action_algorithm()
521 struct btc_stack_info *stack_info = &btcoexist->stack_info; in btc8192e2ant_action_algorithm()
526 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in btc8192e2ant_action_algorithm()
723 static void btc8192e2ant_set_fw_dac_swing_level(struct btc_coexist *btcoexist, in btc8192e2ant_set_fw_dac_swing_level() argument
726 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_set_fw_dac_swing_level()
739 btcoexist->btc_fill_h2c(btcoexist, 0x64, 1, h2c_parameter); in btc8192e2ant_set_fw_dac_swing_level()
742 static void btc8192e2ant_set_fw_dec_bt_pwr(struct btc_coexist *btcoexist, in btc8192e2ant_set_fw_dec_bt_pwr() argument
745 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_set_fw_dec_bt_pwr()
754 btcoexist->btc_fill_h2c(btcoexist, 0x62, 1, h2c_parameter); in btc8192e2ant_set_fw_dec_bt_pwr()
757 static void btc8192e2ant_dec_bt_pwr(struct btc_coexist *btcoexist, in btc8192e2ant_dec_bt_pwr() argument
760 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_dec_bt_pwr()
772 btc8192e2ant_set_fw_dec_bt_pwr(btcoexist, coex_dm->cur_dec_bt_pwr); in btc8192e2ant_dec_bt_pwr()
777 static void btc8192e2ant_set_bt_auto_report(struct btc_coexist *btcoexist, in btc8192e2ant_set_bt_auto_report() argument
780 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_set_bt_auto_report()
793 btcoexist->btc_fill_h2c(btcoexist, 0x68, 1, h2c_parameter); in btc8192e2ant_set_bt_auto_report()
796 static void btc8192e2ant_bt_auto_report(struct btc_coexist *btcoexist, in btc8192e2ant_bt_auto_report() argument
800 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_bt_auto_report()
817 btc8192e2ant_set_bt_auto_report(btcoexist, in btc8192e2ant_bt_auto_report()
823 static void btc8192e2ant_fw_dac_swing_lvl(struct btc_coexist *btcoexist, in btc8192e2ant_fw_dac_swing_lvl() argument
826 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_fw_dac_swing_lvl()
844 btc8192e2ant_set_fw_dac_swing_level(btcoexist, in btc8192e2ant_fw_dac_swing_lvl()
850 static void btc8192e2ant_set_sw_rf_rx_lpf_corner(struct btc_coexist *btcoexist, in btc8192e2ant_set_sw_rf_rx_lpf_corner() argument
853 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_set_sw_rf_rx_lpf_corner()
859 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1e, in btc8192e2ant_set_sw_rf_rx_lpf_corner()
865 if (btcoexist->initialized) { in btc8192e2ant_set_sw_rf_rx_lpf_corner()
868 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1e, in btc8192e2ant_set_sw_rf_rx_lpf_corner()
875 static void btc8192e2ant_rf_shrink(struct btc_coexist *btcoexist, in btc8192e2ant_rf_shrink() argument
878 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_rf_shrink()
896 btc8192e2ant_set_sw_rf_rx_lpf_corner(btcoexist, in btc8192e2ant_rf_shrink()
902 static void btc8192e2ant_set_dac_swing_reg(struct btc_coexist *btcoexist, in btc8192e2ant_set_dac_swing_reg() argument
905 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_set_dac_swing_reg()
910 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x883, 0x3e, val); in btc8192e2ant_set_dac_swing_reg()
913 static void btc8192e2ant_set_sw_full_swing(struct btc_coexist *btcoexist, in btc8192e2ant_set_sw_full_swing() argument
918 btc8192e2ant_set_dac_swing_reg(btcoexist, sw_dac_swing_lvl); in btc8192e2ant_set_sw_full_swing()
920 btc8192e2ant_set_dac_swing_reg(btcoexist, 0x18); in btc8192e2ant_set_sw_full_swing()
923 static void btc8192e2ant_dac_swing(struct btc_coexist *btcoexist, in btc8192e2ant_dac_swing() argument
927 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_dac_swing()
951 btc8192e2ant_set_sw_full_swing(btcoexist, dac_swing_on, dac_swing_lvl); in btc8192e2ant_dac_swing()
957 static void btc8192e2ant_set_agc_table(struct btc_coexist *btcoexist, in btc8192e2ant_set_agc_table() argument
960 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_set_agc_table()
966 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0x0a1A0001); in btc8192e2ant_set_agc_table()
967 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0x091B0001); in btc8192e2ant_set_agc_table()
968 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0x081C0001); in btc8192e2ant_set_agc_table()
969 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0x071D0001); in btc8192e2ant_set_agc_table()
970 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0x061E0001); in btc8192e2ant_set_agc_table()
971 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0x051F0001); in btc8192e2ant_set_agc_table()
975 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0xaa1A0001); in btc8192e2ant_set_agc_table()
976 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0xa91B0001); in btc8192e2ant_set_agc_table()
977 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0xa81C0001); in btc8192e2ant_set_agc_table()
978 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0xa71D0001); in btc8192e2ant_set_agc_table()
979 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0xa61E0001); in btc8192e2ant_set_agc_table()
980 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0xa51F0001); in btc8192e2ant_set_agc_table()
984 static void btc8192e2ant_agc_table(struct btc_coexist *btcoexist, in btc8192e2ant_agc_table() argument
987 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_agc_table()
1004 btc8192e2ant_set_agc_table(btcoexist, agc_table_en); in btc8192e2ant_agc_table()
1009 static void btc8192e2ant_set_coex_table(struct btc_coexist *btcoexist, in btc8192e2ant_set_coex_table() argument
1013 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_set_coex_table()
1017 btcoexist->btc_write_4byte(btcoexist, 0x6c0, val0x6c0); in btc8192e2ant_set_coex_table()
1021 btcoexist->btc_write_4byte(btcoexist, 0x6c4, val0x6c4); in btc8192e2ant_set_coex_table()
1025 btcoexist->btc_write_4byte(btcoexist, 0x6c8, val0x6c8); in btc8192e2ant_set_coex_table()
1029 btcoexist->btc_write_1byte(btcoexist, 0x6cc, val0x6cc); in btc8192e2ant_set_coex_table()
1032 static void btc8192e2ant_coex_table(struct btc_coexist *btcoexist, in btc8192e2ant_coex_table() argument
1036 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_coex_table()
1069 btc8192e2ant_set_coex_table(btcoexist, val0x6c0, val0x6c4, val0x6c8, in btc8192e2ant_coex_table()
1078 static void btc8192e2ant_coex_table_with_type(struct btc_coexist *btcoexist, in btc8192e2ant_coex_table_with_type() argument
1083 btc8192e2ant_coex_table(btcoexist, force_exec, 0x55555555, in btc8192e2ant_coex_table_with_type()
1087 btc8192e2ant_coex_table(btcoexist, force_exec, 0x5a5a5a5a, in btc8192e2ant_coex_table_with_type()
1091 btc8192e2ant_coex_table(btcoexist, force_exec, 0x55555555, in btc8192e2ant_coex_table_with_type()
1095 btc8192e2ant_coex_table(btcoexist, force_exec, 0xdfffdfff, in btc8192e2ant_coex_table_with_type()
1099 btc8192e2ant_coex_table(btcoexist, force_exec, 0xdfffdfff, in btc8192e2ant_coex_table_with_type()
1107 static void btc8192e2ant_set_fw_ignore_wlan_act(struct btc_coexist *btcoexist, in btc8192e2ant_set_fw_ignore_wlan_act() argument
1110 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_set_fw_ignore_wlan_act()
1120 btcoexist->btc_fill_h2c(btcoexist, 0x63, 1, h2c_parameter); in btc8192e2ant_set_fw_ignore_wlan_act()
1123 static void btc8192e2ant_ignore_wlan_act(struct btc_coexist *btcoexist, in btc8192e2ant_ignore_wlan_act() argument
1126 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_ignore_wlan_act()
1145 btc8192e2ant_set_fw_ignore_wlan_act(btcoexist, enable); in btc8192e2ant_ignore_wlan_act()
1150 static void btc8192e2ant_set_fw_ps_tdma(struct btc_coexist *btcoexist, u8 byte1, in btc8192e2ant_set_fw_ps_tdma() argument
1153 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_set_fw_ps_tdma()
1175 btcoexist->btc_fill_h2c(btcoexist, 0x60, 5, h2c_parameter); in btc8192e2ant_set_fw_ps_tdma()
1178 static void btc8192e2ant_sw_mechanism1(struct btc_coexist *btcoexist, in btc8192e2ant_sw_mechanism1() argument
1182 btc8192e2ant_rf_shrink(btcoexist, NORMAL_EXEC, shrink_rx_lpf); in btc8192e2ant_sw_mechanism1()
1185 static void btc8192e2ant_sw_mechanism2(struct btc_coexist *btcoexist, in btc8192e2ant_sw_mechanism2() argument
1189 btc8192e2ant_agc_table(btcoexist, NORMAL_EXEC, agc_table_shift); in btc8192e2ant_sw_mechanism2()
1190 btc8192e2ant_dac_swing(btcoexist, NORMAL_EXEC, sw_dac_swing, in btc8192e2ant_sw_mechanism2()
1194 static void btc8192e2ant_ps_tdma(struct btc_coexist *btcoexist, in btc8192e2ant_ps_tdma() argument
1197 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_ps_tdma()
1222 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1a, in btc8192e2ant_ps_tdma()
1226 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x12, in btc8192e2ant_ps_tdma()
1230 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1c, in btc8192e2ant_ps_tdma()
1234 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x10, in btc8192e2ant_ps_tdma()
1238 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1a, in btc8192e2ant_ps_tdma()
1242 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x12, in btc8192e2ant_ps_tdma()
1246 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1c, in btc8192e2ant_ps_tdma()
1250 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xa3, 0x10, in btc8192e2ant_ps_tdma()
1254 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1a, in btc8192e2ant_ps_tdma()
1258 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x12, in btc8192e2ant_ps_tdma()
1262 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1c, in btc8192e2ant_ps_tdma()
1266 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x10, in btc8192e2ant_ps_tdma()
1270 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1a, in btc8192e2ant_ps_tdma()
1274 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x12, in btc8192e2ant_ps_tdma()
1278 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1c, in btc8192e2ant_ps_tdma()
1282 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x12, in btc8192e2ant_ps_tdma()
1286 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0x61, 0x20, in btc8192e2ant_ps_tdma()
1290 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x5, in btc8192e2ant_ps_tdma()
1294 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x25, in btc8192e2ant_ps_tdma()
1298 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x25, in btc8192e2ant_ps_tdma()
1302 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x15, in btc8192e2ant_ps_tdma()
1306 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1a, in btc8192e2ant_ps_tdma()
1315 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0x8, 0x0, 0x0, in btc8192e2ant_ps_tdma()
1317 btcoexist->btc_write_1byte(btcoexist, 0x92c, 0x4); in btc8192e2ant_ps_tdma()
1320 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0x0, 0x0, 0x0, in btc8192e2ant_ps_tdma()
1323 btcoexist->btc_write_1byte(btcoexist, 0x92c, 0x20); in btc8192e2ant_ps_tdma()
1333 static void btc8192e2ant_set_switch_ss_type(struct btc_coexist *btcoexist, in btc8192e2ant_set_switch_ss_type() argument
1336 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_set_switch_ss_type()
1343 dis_ra_mask = btc8192e2ant_decide_ra_mask(btcoexist, ss_type, in btc8192e2ant_set_switch_ss_type()
1345 btc8192e2ant_update_ra_mask(btcoexist, FORCE_EXEC, dis_ra_mask); in btc8192e2ant_set_switch_ss_type()
1348 btc8192e2ant_ps_tdma(btcoexist, FORCE_EXEC, false, 1); in btc8192e2ant_set_switch_ss_type()
1350 btcoexist->btc_write_1byte(btcoexist, 0xc04, 0x11); in btc8192e2ant_set_switch_ss_type()
1351 btcoexist->btc_write_1byte(btcoexist, 0xd04, 0x1); in btc8192e2ant_set_switch_ss_type()
1352 btcoexist->btc_write_4byte(btcoexist, 0x90c, 0x81111111); in btc8192e2ant_set_switch_ss_type()
1354 btcoexist->btc_write_1byte_bitmask(btcoexist, 0xe77, 0x4, 0x1); in btc8192e2ant_set_switch_ss_type()
1355 btcoexist->btc_write_1byte(btcoexist, 0xa07, 0x81); in btc8192e2ant_set_switch_ss_type()
1358 btc8192e2ant_ps_tdma(btcoexist, FORCE_EXEC, false, 0); in btc8192e2ant_set_switch_ss_type()
1359 btcoexist->btc_write_1byte(btcoexist, 0xc04, 0x33); in btc8192e2ant_set_switch_ss_type()
1360 btcoexist->btc_write_1byte(btcoexist, 0xd04, 0x3); in btc8192e2ant_set_switch_ss_type()
1361 btcoexist->btc_write_4byte(btcoexist, 0x90c, 0x81121313); in btc8192e2ant_set_switch_ss_type()
1362 btcoexist->btc_write_1byte_bitmask(btcoexist, 0xe77, 0x4, 0x0); in btc8192e2ant_set_switch_ss_type()
1363 btcoexist->btc_write_1byte(btcoexist, 0xa07, 0x41); in btc8192e2ant_set_switch_ss_type()
1367 btcoexist->btc_set(btcoexist, BTC_SET_ACT_SEND_MIMO_PS, &mimops); in btc8192e2ant_set_switch_ss_type()
1370 static void btc8192e2ant_switch_ss_type(struct btc_coexist *btcoexist, in btc8192e2ant_switch_ss_type() argument
1373 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_switch_ss_type()
1384 btc8192e2ant_set_switch_ss_type(btcoexist, coex_dm->cur_ss_type); in btc8192e2ant_switch_ss_type()
1389 static void btc8192e2ant_coex_all_off(struct btc_coexist *btcoexist) in btc8192e2ant_coex_all_off() argument
1392 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8192e2ant_coex_all_off()
1393 btc8192e2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8192e2ant_coex_all_off()
1394 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_coex_all_off()
1397 btc8192e2ant_sw_mechanism1(btcoexist, false, false, false, false); in btc8192e2ant_coex_all_off()
1398 btc8192e2ant_sw_mechanism2(btcoexist, false, false, false, 0x18); in btc8192e2ant_coex_all_off()
1401 btc8192e2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_coex_all_off()
1404 static void btc8192e2ant_init_coex_dm(struct btc_coexist *btcoexist) in btc8192e2ant_init_coex_dm() argument
1408 btc8192e2ant_ps_tdma(btcoexist, FORCE_EXEC, false, 1); in btc8192e2ant_init_coex_dm()
1409 btc8192e2ant_fw_dac_swing_lvl(btcoexist, FORCE_EXEC, 6); in btc8192e2ant_init_coex_dm()
1410 btc8192e2ant_dec_bt_pwr(btcoexist, FORCE_EXEC, 0); in btc8192e2ant_init_coex_dm()
1412 btc8192e2ant_coex_table_with_type(btcoexist, FORCE_EXEC, 0); in btc8192e2ant_init_coex_dm()
1413 btc8192e2ant_switch_ss_type(btcoexist, FORCE_EXEC, 2); in btc8192e2ant_init_coex_dm()
1415 btc8192e2ant_sw_mechanism1(btcoexist, false, false, false, false); in btc8192e2ant_init_coex_dm()
1416 btc8192e2ant_sw_mechanism2(btcoexist, false, false, false, 0x18); in btc8192e2ant_init_coex_dm()
1419 static void btc8192e2ant_action_bt_inquiry(struct btc_coexist *btcoexist) in btc8192e2ant_action_bt_inquiry() argument
1423 btcoexist->btc_set(btcoexist, BTC_SET_ACT_DISABLE_LOW_POWER, in btc8192e2ant_action_bt_inquiry()
1426 btc8192e2ant_switch_ss_type(btcoexist, NORMAL_EXEC, 1); in btc8192e2ant_action_bt_inquiry()
1428 btc8192e2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_bt_inquiry()
1429 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 3); in btc8192e2ant_action_bt_inquiry()
1430 btc8192e2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8192e2ant_action_bt_inquiry()
1431 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_action_bt_inquiry()
1433 btc8192e2ant_sw_mechanism1(btcoexist, false, false, false, false); in btc8192e2ant_action_bt_inquiry()
1434 btc8192e2ant_sw_mechanism2(btcoexist, false, false, false, 0x18); in btc8192e2ant_action_bt_inquiry()
1437 static bool btc8192e2ant_is_common_action(struct btc_coexist *btcoexist) in btc8192e2ant_is_common_action() argument
1439 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_is_common_action()
1440 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8192e2ant_is_common_action()
1444 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in btc8192e2ant_is_common_action()
1445 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in btc8192e2ant_is_common_action()
1447 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in btc8192e2ant_is_common_action()
1450 btc8192e2ant_limited_tx(btcoexist, NORMAL_EXEC, 1, 0, 0, 0); in btc8192e2ant_is_common_action()
1452 btc8192e2ant_limited_tx(btcoexist, NORMAL_EXEC, 0, 0, 0, 0); in btc8192e2ant_is_common_action()
1456 btcoexist->btc_set(btcoexist, BTC_SET_ACT_DISABLE_LOW_POWER, in btc8192e2ant_is_common_action()
1466 btc8192e2ant_switch_ss_type(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_is_common_action()
1467 btc8192e2ant_coex_table_with_type(btcoexist, in btc8192e2ant_is_common_action()
1469 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 0); in btc8192e2ant_is_common_action()
1471 btc8192e2ant_switch_ss_type(btcoexist, NORMAL_EXEC, 1); in btc8192e2ant_is_common_action()
1472 btc8192e2ant_coex_table_with_type(btcoexist, in btc8192e2ant_is_common_action()
1474 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8192e2ant_is_common_action()
1477 btc8192e2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8192e2ant_is_common_action()
1478 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_is_common_action()
1480 btc8192e2ant_sw_mechanism1(btcoexist, false, false, false, in btc8192e2ant_is_common_action()
1482 btc8192e2ant_sw_mechanism2(btcoexist, false, false, false, in btc8192e2ant_is_common_action()
1490 btcoexist->btc_set(btcoexist, in btc8192e2ant_is_common_action()
1497 btc8192e2ant_switch_ss_type(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_is_common_action()
1498 btc8192e2ant_coex_table_with_type(btcoexist, in btc8192e2ant_is_common_action()
1500 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 0); in btc8192e2ant_is_common_action()
1501 btc8192e2ant_fw_dac_swing_lvl(btcoexist, in btc8192e2ant_is_common_action()
1503 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_is_common_action()
1505 btc8192e2ant_sw_mechanism1(btcoexist, false, false, in btc8192e2ant_is_common_action()
1507 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_is_common_action()
1514 btcoexist->btc_set(btcoexist, in btc8192e2ant_is_common_action()
1523 btc8192e2ant_switch_ss_type(btcoexist, in btc8192e2ant_is_common_action()
1525 btc8192e2ant_coex_table_with_type(btcoexist, in btc8192e2ant_is_common_action()
1527 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8192e2ant_is_common_action()
1529 btc8192e2ant_fw_dac_swing_lvl(btcoexist, in btc8192e2ant_is_common_action()
1531 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_is_common_action()
1533 btc8192e2ant_sw_mechanism1(btcoexist, true, false, in btc8192e2ant_is_common_action()
1535 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_is_common_action()
1541 btcoexist->btc_set(btcoexist, in btc8192e2ant_is_common_action()
1553 btc8192e2ant_switch_ss_type(btcoexist, in btc8192e2ant_is_common_action()
1555 btc8192e2ant_coex_table_with_type(btcoexist, in btc8192e2ant_is_common_action()
1558 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8192e2ant_is_common_action()
1560 btc8192e2ant_fw_dac_swing_lvl(btcoexist, in btc8192e2ant_is_common_action()
1562 btc8192e2ant_dec_bt_pwr(btcoexist, in btc8192e2ant_is_common_action()
1564 btc8192e2ant_sw_mechanism1(btcoexist, false, in btc8192e2ant_is_common_action()
1566 btc8192e2ant_sw_mechanism2(btcoexist, false, in btc8192e2ant_is_common_action()
1575 static void btc8192e2ant_tdma_duration_adjust(struct btc_coexist *btcoexist, in btc8192e2ant_tdma_duration_adjust() argument
1579 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_tdma_duration_adjust()
1593 btc8192e2ant_ps_tdma(btcoexist, in btc8192e2ant_tdma_duration_adjust()
1598 btc8192e2ant_ps_tdma(btcoexist, in btc8192e2ant_tdma_duration_adjust()
1603 btc8192e2ant_ps_tdma(btcoexist, in btc8192e2ant_tdma_duration_adjust()
1610 btc8192e2ant_ps_tdma(btcoexist, in btc8192e2ant_tdma_duration_adjust()
1615 btc8192e2ant_ps_tdma(btcoexist, in btc8192e2ant_tdma_duration_adjust()
1620 btc8192e2ant_ps_tdma(btcoexist, in btc8192e2ant_tdma_duration_adjust()
1629 btc8192e2ant_ps_tdma(btcoexist, in btc8192e2ant_tdma_duration_adjust()
1634 btc8192e2ant_ps_tdma(btcoexist, in btc8192e2ant_tdma_duration_adjust()
1639 btc8192e2ant_ps_tdma(btcoexist, in btc8192e2ant_tdma_duration_adjust()
1646 btc8192e2ant_ps_tdma(btcoexist, in btc8192e2ant_tdma_duration_adjust()
1651 btc8192e2ant_ps_tdma(btcoexist, in btc8192e2ant_tdma_duration_adjust()
1656 btc8192e2ant_ps_tdma(btcoexist, in btc8192e2ant_tdma_duration_adjust()
1751 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_SCAN, &scan); in btc8192e2ant_tdma_duration_adjust()
1752 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_LINK, &link); in btc8192e2ant_tdma_duration_adjust()
1753 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_ROAM, &roam); in btc8192e2ant_tdma_duration_adjust()
1756 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8192e2ant_tdma_duration_adjust()
1765 static void btc8192e2ant_action_sco(struct btc_coexist *btcoexist) in btc8192e2ant_action_sco() argument
1770 wifi_rssi_state = btc8192e2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8192e2ant_action_sco()
1772 btc8192e2ant_switch_ss_type(btcoexist, NORMAL_EXEC, 1); in btc8192e2ant_action_sco()
1773 btc8192e2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8192e2ant_action_sco()
1775 btc8192e2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8192e2ant_action_sco()
1777 btc8192e2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 4); in btc8192e2ant_action_sco()
1779 bt_rssi_state = btc8192e2ant_bt_rssi_state(btcoexist, 3, 34, 42); in btc8192e2ant_action_sco()
1783 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_action_sco()
1784 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 13); in btc8192e2ant_action_sco()
1787 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_sco()
1788 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 9); in btc8192e2ant_action_sco()
1791 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 4); in btc8192e2ant_action_sco()
1792 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 9); in btc8192e2ant_action_sco()
1795 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8192e2ant_action_sco()
1801 btc8192e2ant_sw_mechanism1(btcoexist, true, true, in btc8192e2ant_action_sco()
1803 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_sco()
1806 btc8192e2ant_sw_mechanism1(btcoexist, true, true, in btc8192e2ant_action_sco()
1808 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_sco()
1814 btc8192e2ant_sw_mechanism1(btcoexist, false, true, in btc8192e2ant_action_sco()
1816 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_sco()
1819 btc8192e2ant_sw_mechanism1(btcoexist, false, true, in btc8192e2ant_action_sco()
1821 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_sco()
1827 static void btc8192e2ant_action_sco_pan(struct btc_coexist *btcoexist) in btc8192e2ant_action_sco_pan() argument
1832 wifi_rssi_state = btc8192e2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8192e2ant_action_sco_pan()
1834 btc8192e2ant_switch_ss_type(btcoexist, NORMAL_EXEC, 1); in btc8192e2ant_action_sco_pan()
1835 btc8192e2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8192e2ant_action_sco_pan()
1837 btc8192e2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8192e2ant_action_sco_pan()
1839 btc8192e2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 4); in btc8192e2ant_action_sco_pan()
1841 bt_rssi_state = btc8192e2ant_bt_rssi_state(btcoexist, 3, 34, 42); in btc8192e2ant_action_sco_pan()
1845 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_action_sco_pan()
1846 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 14); in btc8192e2ant_action_sco_pan()
1849 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_sco_pan()
1850 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 10); in btc8192e2ant_action_sco_pan()
1853 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 4); in btc8192e2ant_action_sco_pan()
1854 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 10); in btc8192e2ant_action_sco_pan()
1857 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8192e2ant_action_sco_pan()
1863 btc8192e2ant_sw_mechanism1(btcoexist, true, true, in btc8192e2ant_action_sco_pan()
1865 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_sco_pan()
1868 btc8192e2ant_sw_mechanism1(btcoexist, true, true, in btc8192e2ant_action_sco_pan()
1870 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_sco_pan()
1876 btc8192e2ant_sw_mechanism1(btcoexist, false, true, in btc8192e2ant_action_sco_pan()
1878 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_sco_pan()
1881 btc8192e2ant_sw_mechanism1(btcoexist, false, true, in btc8192e2ant_action_sco_pan()
1883 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_sco_pan()
1889 static void btc8192e2ant_action_hid(struct btc_coexist *btcoexist) in btc8192e2ant_action_hid() argument
1894 wifi_rssi_state = btc8192e2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8192e2ant_action_hid()
1895 bt_rssi_state = btc8192e2ant_bt_rssi_state(btcoexist, 3, 34, 42); in btc8192e2ant_action_hid()
1897 btc8192e2ant_switch_ss_type(btcoexist, NORMAL_EXEC, 1); in btc8192e2ant_action_hid()
1898 btc8192e2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8192e2ant_action_hid()
1900 btc8192e2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8192e2ant_action_hid()
1902 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8192e2ant_action_hid()
1904 btc8192e2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 3); in btc8192e2ant_action_hid()
1908 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_action_hid()
1909 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 13); in btc8192e2ant_action_hid()
1912 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_hid()
1913 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 9); in btc8192e2ant_action_hid()
1916 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 4); in btc8192e2ant_action_hid()
1917 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 9); in btc8192e2ant_action_hid()
1924 btc8192e2ant_sw_mechanism1(btcoexist, true, true, in btc8192e2ant_action_hid()
1926 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_hid()
1929 btc8192e2ant_sw_mechanism1(btcoexist, true, true, in btc8192e2ant_action_hid()
1931 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_hid()
1937 btc8192e2ant_sw_mechanism1(btcoexist, false, true, in btc8192e2ant_action_hid()
1939 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_hid()
1942 btc8192e2ant_sw_mechanism1(btcoexist, false, true, in btc8192e2ant_action_hid()
1944 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_hid()
1951 static void btc8192e2ant_action_a2dp(struct btc_coexist *btcoexist) in btc8192e2ant_action_a2dp() argument
1953 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_action_a2dp()
1958 wifi_rssi_state = btc8192e2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8192e2ant_action_a2dp()
1959 bt_rssi_state = btc8192e2ant_bt_rssi_state(btcoexist, 3, 34, 42); in btc8192e2ant_action_a2dp()
1970 btc8192e2ant_switch_ss_type(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_a2dp()
1971 btc8192e2ant_limited_rx(btcoexist, NORMAL_EXEC, false, true, in btc8192e2ant_action_a2dp()
1974 btc8192e2ant_switch_ss_type(btcoexist, NORMAL_EXEC, 1); in btc8192e2ant_action_a2dp()
1975 btc8192e2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, in btc8192e2ant_action_a2dp()
1979 btc8192e2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8192e2ant_action_a2dp()
1982 btc8192e2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_action_a2dp()
1984 btc8192e2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_a2dp()
1987 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 17); in btc8192e2ant_action_a2dp()
1989 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_action_a2dp()
1993 btc8192e2ant_tdma_duration_adjust(btcoexist, false, in btc8192e2ant_action_a2dp()
1995 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_action_a2dp()
1998 btc8192e2ant_tdma_duration_adjust(btcoexist, false, in btc8192e2ant_action_a2dp()
2000 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_a2dp()
2003 btc8192e2ant_tdma_duration_adjust(btcoexist, false, in btc8192e2ant_action_a2dp()
2005 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 4); in btc8192e2ant_action_a2dp()
2010 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8192e2ant_action_a2dp()
2014 btc8192e2ant_sw_mechanism1(btcoexist, true, false, in btc8192e2ant_action_a2dp()
2016 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_a2dp()
2019 btc8192e2ant_sw_mechanism1(btcoexist, true, false, in btc8192e2ant_action_a2dp()
2021 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_a2dp()
2027 btc8192e2ant_sw_mechanism1(btcoexist, false, false, in btc8192e2ant_action_a2dp()
2029 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_a2dp()
2032 btc8192e2ant_sw_mechanism1(btcoexist, false, false, in btc8192e2ant_action_a2dp()
2034 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_a2dp()
2040 static void btc8192e2ant_action_a2dp_pan_hs(struct btc_coexist *btcoexist) in btc8192e2ant_action_a2dp_pan_hs() argument
2045 wifi_rssi_state = btc8192e2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8192e2ant_action_a2dp_pan_hs()
2046 bt_rssi_state = btc8192e2ant_bt_rssi_state(btcoexist, 3, 34, 42); in btc8192e2ant_action_a2dp_pan_hs()
2048 btc8192e2ant_switch_ss_type(btcoexist, NORMAL_EXEC, 1); in btc8192e2ant_action_a2dp_pan_hs()
2049 btc8192e2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8192e2ant_action_a2dp_pan_hs()
2051 btc8192e2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8192e2ant_action_a2dp_pan_hs()
2052 btc8192e2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_a2dp_pan_hs()
2056 btc8192e2ant_tdma_duration_adjust(btcoexist, false, true, 2); in btc8192e2ant_action_a2dp_pan_hs()
2057 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_action_a2dp_pan_hs()
2060 btc8192e2ant_tdma_duration_adjust(btcoexist, false, false, 2); in btc8192e2ant_action_a2dp_pan_hs()
2061 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_a2dp_pan_hs()
2064 btc8192e2ant_tdma_duration_adjust(btcoexist, false, false, 2); in btc8192e2ant_action_a2dp_pan_hs()
2065 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 4); in btc8192e2ant_action_a2dp_pan_hs()
2069 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8192e2ant_action_a2dp_pan_hs()
2073 btc8192e2ant_sw_mechanism1(btcoexist, true, false, in btc8192e2ant_action_a2dp_pan_hs()
2075 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_a2dp_pan_hs()
2078 btc8192e2ant_sw_mechanism1(btcoexist, true, false, in btc8192e2ant_action_a2dp_pan_hs()
2080 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_a2dp_pan_hs()
2086 btc8192e2ant_sw_mechanism1(btcoexist, false, false, in btc8192e2ant_action_a2dp_pan_hs()
2088 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_a2dp_pan_hs()
2091 btc8192e2ant_sw_mechanism1(btcoexist, false, false, in btc8192e2ant_action_a2dp_pan_hs()
2093 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_a2dp_pan_hs()
2099 static void btc8192e2ant_action_pan_edr(struct btc_coexist *btcoexist) in btc8192e2ant_action_pan_edr() argument
2104 wifi_rssi_state = btc8192e2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8192e2ant_action_pan_edr()
2105 bt_rssi_state = btc8192e2ant_bt_rssi_state(btcoexist, 3, 34, 42); in btc8192e2ant_action_pan_edr()
2107 btc8192e2ant_switch_ss_type(btcoexist, NORMAL_EXEC, 1); in btc8192e2ant_action_pan_edr()
2108 btc8192e2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8192e2ant_action_pan_edr()
2110 btc8192e2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8192e2ant_action_pan_edr()
2112 btc8192e2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_pan_edr()
2116 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_action_pan_edr()
2117 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 5); in btc8192e2ant_action_pan_edr()
2120 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_pan_edr()
2121 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 1); in btc8192e2ant_action_pan_edr()
2124 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 4); in btc8192e2ant_action_pan_edr()
2125 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 1); in btc8192e2ant_action_pan_edr()
2129 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8192e2ant_action_pan_edr()
2133 btc8192e2ant_sw_mechanism1(btcoexist, true, false, in btc8192e2ant_action_pan_edr()
2135 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_pan_edr()
2138 btc8192e2ant_sw_mechanism1(btcoexist, true, false, in btc8192e2ant_action_pan_edr()
2140 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_pan_edr()
2146 btc8192e2ant_sw_mechanism1(btcoexist, false, false, in btc8192e2ant_action_pan_edr()
2148 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_pan_edr()
2151 btc8192e2ant_sw_mechanism1(btcoexist, false, false, in btc8192e2ant_action_pan_edr()
2153 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_pan_edr()
2160 static void btc8192e2ant_action_pan_hs(struct btc_coexist *btcoexist) in btc8192e2ant_action_pan_hs() argument
2165 wifi_rssi_state = btc8192e2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8192e2ant_action_pan_hs()
2166 bt_rssi_state = btc8192e2ant_bt_rssi_state(btcoexist, 3, 34, 42); in btc8192e2ant_action_pan_hs()
2168 btc8192e2ant_switch_ss_type(btcoexist, NORMAL_EXEC, 1); in btc8192e2ant_action_pan_hs()
2169 btc8192e2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8192e2ant_action_pan_hs()
2171 btc8192e2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8192e2ant_action_pan_hs()
2173 btc8192e2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_pan_hs()
2177 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_action_pan_hs()
2180 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_pan_hs()
2183 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 4); in btc8192e2ant_action_pan_hs()
2185 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8192e2ant_action_pan_hs()
2187 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8192e2ant_action_pan_hs()
2191 btc8192e2ant_sw_mechanism1(btcoexist, true, false, in btc8192e2ant_action_pan_hs()
2193 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_pan_hs()
2196 btc8192e2ant_sw_mechanism1(btcoexist, true, false, in btc8192e2ant_action_pan_hs()
2198 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_pan_hs()
2204 btc8192e2ant_sw_mechanism1(btcoexist, false, false, in btc8192e2ant_action_pan_hs()
2206 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_pan_hs()
2209 btc8192e2ant_sw_mechanism1(btcoexist, false, false, in btc8192e2ant_action_pan_hs()
2211 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_pan_hs()
2218 static void btc8192e2ant_action_pan_edr_a2dp(struct btc_coexist *btcoexist) in btc8192e2ant_action_pan_edr_a2dp() argument
2223 wifi_rssi_state = btc8192e2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8192e2ant_action_pan_edr_a2dp()
2224 bt_rssi_state = btc8192e2ant_bt_rssi_state(btcoexist, 3, 34, 42); in btc8192e2ant_action_pan_edr_a2dp()
2226 btc8192e2ant_switch_ss_type(btcoexist, NORMAL_EXEC, 1); in btc8192e2ant_action_pan_edr_a2dp()
2227 btc8192e2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8192e2ant_action_pan_edr_a2dp()
2229 btc8192e2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8192e2ant_action_pan_edr_a2dp()
2231 btc8192e2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_pan_edr_a2dp()
2233 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8192e2ant_action_pan_edr_a2dp()
2237 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_action_pan_edr_a2dp()
2238 btc8192e2ant_tdma_duration_adjust(btcoexist, false, true, 3); in btc8192e2ant_action_pan_edr_a2dp()
2241 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_pan_edr_a2dp()
2242 btc8192e2ant_tdma_duration_adjust(btcoexist, false, false, 3); in btc8192e2ant_action_pan_edr_a2dp()
2245 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 4); in btc8192e2ant_action_pan_edr_a2dp()
2246 btc8192e2ant_tdma_duration_adjust(btcoexist, false, false, 3); in btc8192e2ant_action_pan_edr_a2dp()
2253 btc8192e2ant_sw_mechanism1(btcoexist, true, false, in btc8192e2ant_action_pan_edr_a2dp()
2255 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_pan_edr_a2dp()
2258 btc8192e2ant_sw_mechanism1(btcoexist, true, false, in btc8192e2ant_action_pan_edr_a2dp()
2260 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_pan_edr_a2dp()
2266 btc8192e2ant_sw_mechanism1(btcoexist, false, false, in btc8192e2ant_action_pan_edr_a2dp()
2268 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_pan_edr_a2dp()
2271 btc8192e2ant_sw_mechanism1(btcoexist, false, false, in btc8192e2ant_action_pan_edr_a2dp()
2273 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_pan_edr_a2dp()
2279 static void btc8192e2ant_action_pan_edr_hid(struct btc_coexist *btcoexist) in btc8192e2ant_action_pan_edr_hid() argument
2284 wifi_rssi_state = btc8192e2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8192e2ant_action_pan_edr_hid()
2285 bt_rssi_state = btc8192e2ant_bt_rssi_state(btcoexist, 3, 34, 42); in btc8192e2ant_action_pan_edr_hid()
2287 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8192e2ant_action_pan_edr_hid()
2289 btc8192e2ant_switch_ss_type(btcoexist, NORMAL_EXEC, 1); in btc8192e2ant_action_pan_edr_hid()
2290 btc8192e2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8192e2ant_action_pan_edr_hid()
2292 btc8192e2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8192e2ant_action_pan_edr_hid()
2294 btc8192e2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 3); in btc8192e2ant_action_pan_edr_hid()
2298 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_action_pan_edr_hid()
2299 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 14); in btc8192e2ant_action_pan_edr_hid()
2302 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_pan_edr_hid()
2303 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 10); in btc8192e2ant_action_pan_edr_hid()
2306 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 4); in btc8192e2ant_action_pan_edr_hid()
2307 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8192e2ant_action_pan_edr_hid()
2315 btc8192e2ant_sw_mechanism1(btcoexist, true, true, in btc8192e2ant_action_pan_edr_hid()
2317 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_pan_edr_hid()
2320 btc8192e2ant_sw_mechanism1(btcoexist, true, true, in btc8192e2ant_action_pan_edr_hid()
2322 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_pan_edr_hid()
2328 btc8192e2ant_sw_mechanism1(btcoexist, false, true, in btc8192e2ant_action_pan_edr_hid()
2330 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_pan_edr_hid()
2333 btc8192e2ant_sw_mechanism1(btcoexist, false, true, in btc8192e2ant_action_pan_edr_hid()
2335 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_pan_edr_hid()
2342 static void btc8192e2ant_action_hid_a2dp_pan_edr(struct btc_coexist *btcoexist) in btc8192e2ant_action_hid_a2dp_pan_edr() argument
2347 wifi_rssi_state = btc8192e2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8192e2ant_action_hid_a2dp_pan_edr()
2348 bt_rssi_state = btc8192e2ant_bt_rssi_state(btcoexist, 3, 34, 42); in btc8192e2ant_action_hid_a2dp_pan_edr()
2350 btc8192e2ant_switch_ss_type(btcoexist, NORMAL_EXEC, 1); in btc8192e2ant_action_hid_a2dp_pan_edr()
2351 btc8192e2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8192e2ant_action_hid_a2dp_pan_edr()
2353 btc8192e2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8192e2ant_action_hid_a2dp_pan_edr()
2355 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8192e2ant_action_hid_a2dp_pan_edr()
2357 btc8192e2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 3); in btc8192e2ant_action_hid_a2dp_pan_edr()
2361 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_action_hid_a2dp_pan_edr()
2362 btc8192e2ant_tdma_duration_adjust(btcoexist, true, true, 3); in btc8192e2ant_action_hid_a2dp_pan_edr()
2365 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_hid_a2dp_pan_edr()
2366 btc8192e2ant_tdma_duration_adjust(btcoexist, true, false, 3); in btc8192e2ant_action_hid_a2dp_pan_edr()
2369 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 4); in btc8192e2ant_action_hid_a2dp_pan_edr()
2370 btc8192e2ant_tdma_duration_adjust(btcoexist, true, false, 3); in btc8192e2ant_action_hid_a2dp_pan_edr()
2377 btc8192e2ant_sw_mechanism1(btcoexist, true, true, in btc8192e2ant_action_hid_a2dp_pan_edr()
2379 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_hid_a2dp_pan_edr()
2382 btc8192e2ant_sw_mechanism1(btcoexist, true, true, in btc8192e2ant_action_hid_a2dp_pan_edr()
2384 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_hid_a2dp_pan_edr()
2390 btc8192e2ant_sw_mechanism1(btcoexist, false, true, in btc8192e2ant_action_hid_a2dp_pan_edr()
2392 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_hid_a2dp_pan_edr()
2395 btc8192e2ant_sw_mechanism1(btcoexist, false, true, in btc8192e2ant_action_hid_a2dp_pan_edr()
2397 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_hid_a2dp_pan_edr()
2403 static void btc8192e2ant_action_hid_a2dp(struct btc_coexist *btcoexist) in btc8192e2ant_action_hid_a2dp() argument
2408 wifi_rssi_state = btc8192e2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8192e2ant_action_hid_a2dp()
2409 bt_rssi_state = btc8192e2ant_bt_rssi_state(btcoexist, 3, 34, 42); in btc8192e2ant_action_hid_a2dp()
2411 btc8192e2ant_switch_ss_type(btcoexist, NORMAL_EXEC, 1); in btc8192e2ant_action_hid_a2dp()
2412 btc8192e2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8192e2ant_action_hid_a2dp()
2414 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8192e2ant_action_hid_a2dp()
2416 btc8192e2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 3); in btc8192e2ant_action_hid_a2dp()
2420 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_action_hid_a2dp()
2421 btc8192e2ant_tdma_duration_adjust(btcoexist, true, true, 2); in btc8192e2ant_action_hid_a2dp()
2424 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_hid_a2dp()
2425 btc8192e2ant_tdma_duration_adjust(btcoexist, true, false, 2); in btc8192e2ant_action_hid_a2dp()
2428 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 4); in btc8192e2ant_action_hid_a2dp()
2429 btc8192e2ant_tdma_duration_adjust(btcoexist, true, false, 2); in btc8192e2ant_action_hid_a2dp()
2436 btc8192e2ant_sw_mechanism1(btcoexist, true, true, in btc8192e2ant_action_hid_a2dp()
2438 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_hid_a2dp()
2441 btc8192e2ant_sw_mechanism1(btcoexist, true, true, in btc8192e2ant_action_hid_a2dp()
2443 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_hid_a2dp()
2449 btc8192e2ant_sw_mechanism1(btcoexist, false, true, in btc8192e2ant_action_hid_a2dp()
2451 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_hid_a2dp()
2454 btc8192e2ant_sw_mechanism1(btcoexist, false, true, in btc8192e2ant_action_hid_a2dp()
2456 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_hid_a2dp()
2462 static void btc8192e2ant_run_coexist_mechanism(struct btc_coexist *btcoexist) in btc8192e2ant_run_coexist_mechanism() argument
2464 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_run_coexist_mechanism()
2470 if (btcoexist->manual_control) { in btc8192e2ant_run_coexist_mechanism()
2482 algorithm = btc8192e2ant_action_algorithm(btcoexist); in btc8192e2ant_run_coexist_mechanism()
2487 btc8192e2ant_action_bt_inquiry(btcoexist); in btc8192e2ant_run_coexist_mechanism()
2495 if (btc8192e2ant_is_common_action(btcoexist)) { in btc8192e2ant_run_coexist_mechanism()
2511 btc8192e2ant_action_sco(btcoexist); in btc8192e2ant_run_coexist_mechanism()
2516 btc8192e2ant_action_sco_pan(btcoexist); in btc8192e2ant_run_coexist_mechanism()
2521 btc8192e2ant_action_hid(btcoexist); in btc8192e2ant_run_coexist_mechanism()
2526 btc8192e2ant_action_a2dp(btcoexist); in btc8192e2ant_run_coexist_mechanism()
2531 btc8192e2ant_action_a2dp_pan_hs(btcoexist); in btc8192e2ant_run_coexist_mechanism()
2536 btc8192e2ant_action_pan_edr(btcoexist); in btc8192e2ant_run_coexist_mechanism()
2541 btc8192e2ant_action_pan_hs(btcoexist); in btc8192e2ant_run_coexist_mechanism()
2546 btc8192e2ant_action_pan_edr_a2dp(btcoexist); in btc8192e2ant_run_coexist_mechanism()
2551 btc8192e2ant_action_pan_edr_hid(btcoexist); in btc8192e2ant_run_coexist_mechanism()
2556 btc8192e2ant_action_hid_a2dp_pan_edr(btcoexist); in btc8192e2ant_run_coexist_mechanism()
2561 btc8192e2ant_action_hid_a2dp(btcoexist); in btc8192e2ant_run_coexist_mechanism()
2573 static void btc8192e2ant_init_hwconfig(struct btc_coexist *btcoexist, in btc8192e2ant_init_hwconfig() argument
2576 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_init_hwconfig()
2586 btcoexist->btc_get_rf_reg(btcoexist, BTC_RF_A, in btc8192e2ant_init_hwconfig()
2589 coex_dm->backup_arfr_cnt1 = btcoexist->btc_read_4byte(btcoexist, in btc8192e2ant_init_hwconfig()
2591 coex_dm->backup_arfr_cnt2 = btcoexist->btc_read_4byte(btcoexist, in btc8192e2ant_init_hwconfig()
2593 coex_dm->backup_retry_limit = btcoexist->btc_read_2byte( in btc8192e2ant_init_hwconfig()
2594 btcoexist, in btc8192e2ant_init_hwconfig()
2596 coex_dm->backup_ampdu_maxtime = btcoexist->btc_read_1byte( in btc8192e2ant_init_hwconfig()
2597 btcoexist, in btc8192e2ant_init_hwconfig()
2602 btcoexist->btc_write_1byte(btcoexist, 0x4f, 0x6); in btc8192e2ant_init_hwconfig()
2603 btcoexist->btc_write_1byte(btcoexist, 0x944, 0x24); in btc8192e2ant_init_hwconfig()
2604 btcoexist->btc_write_4byte(btcoexist, 0x930, 0x700700); in btc8192e2ant_init_hwconfig()
2605 btcoexist->btc_write_1byte(btcoexist, 0x92c, 0x20); in btc8192e2ant_init_hwconfig()
2606 if (btcoexist->chip_interface == BTC_INTF_USB) in btc8192e2ant_init_hwconfig()
2607 btcoexist->btc_write_4byte(btcoexist, 0x64, 0x30430004); in btc8192e2ant_init_hwconfig()
2609 btcoexist->btc_write_4byte(btcoexist, 0x64, 0x30030004); in btc8192e2ant_init_hwconfig()
2611 btc8192e2ant_coex_table_with_type(btcoexist, FORCE_EXEC, 0); in btc8192e2ant_init_hwconfig()
2614 btcoexist->btc_write_4byte(btcoexist, 0x858, 0x55555555); in btc8192e2ant_init_hwconfig()
2617 btcoexist->btc_write_1byte(btcoexist, 0x778, 0x3); in btc8192e2ant_init_hwconfig()
2619 u8tmp = btcoexist->btc_read_1byte(btcoexist, 0x790); in btc8192e2ant_init_hwconfig()
2622 btcoexist->btc_write_1byte(btcoexist, 0x790, u8tmp); in btc8192e2ant_init_hwconfig()
2625 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0x4); in btc8192e2ant_init_hwconfig()
2628 btcoexist->btc_write_1byte(btcoexist, 0x40, 0x20); in btc8192e2ant_init_hwconfig()
2630 u16tmp = btcoexist->btc_read_2byte(btcoexist, 0x40); in btc8192e2ant_init_hwconfig()
2632 btcoexist->btc_write_2byte(btcoexist, 0x40, u16tmp); in btc8192e2ant_init_hwconfig()
2635 u8tmp = btcoexist->btc_read_1byte(btcoexist, 0x101); in btc8192e2ant_init_hwconfig()
2637 btcoexist->btc_write_1byte(btcoexist, 0x101, u8tmp); in btc8192e2ant_init_hwconfig()
2640 u8tmp = btcoexist->btc_read_1byte(btcoexist, 0x93); in btc8192e2ant_init_hwconfig()
2642 btcoexist->btc_write_1byte(btcoexist, 0x93, u8tmp); in btc8192e2ant_init_hwconfig()
2644 u8tmp = btcoexist->btc_read_1byte(btcoexist, 0x7); in btc8192e2ant_init_hwconfig()
2646 btcoexist->btc_write_1byte(btcoexist, 0x7, u8tmp); in btc8192e2ant_init_hwconfig()
2653 void ex_btc8192e2ant_init_hwconfig(struct btc_coexist *btcoexist) in ex_btc8192e2ant_init_hwconfig() argument
2655 btc8192e2ant_init_hwconfig(btcoexist, true); in ex_btc8192e2ant_init_hwconfig()
2658 void ex_btc8192e2ant_init_coex_dm(struct btc_coexist *btcoexist) in ex_btc8192e2ant_init_coex_dm() argument
2660 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8192e2ant_init_coex_dm()
2664 btc8192e2ant_init_coex_dm(btcoexist); in ex_btc8192e2ant_init_coex_dm()
2667 void ex_btc8192e2ant_display_coex_info(struct btc_coexist *btcoexist, in ex_btc8192e2ant_display_coex_info() argument
2670 struct btc_board_info *board_info = &btcoexist->board_info; in ex_btc8192e2ant_display_coex_info()
2671 struct btc_stack_info *stack_info = &btcoexist->stack_info; in ex_btc8192e2ant_display_coex_info()
2684 if (btcoexist->manual_control) { in ex_btc8192e2ant_display_coex_info()
2696 btcoexist->btc_get(btcoexist, BTC_GET_U4_BT_PATCH_VER, &bt_patch_ver); in ex_btc8192e2ant_display_coex_info()
2697 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_FW_VER, &fw_ver); in ex_btc8192e2ant_display_coex_info()
2703 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in ex_btc8192e2ant_display_coex_info()
2704 btcoexist->btc_get(btcoexist, BTC_GET_U1_WIFI_DOT11_CHNL, in ex_btc8192e2ant_display_coex_info()
2706 btcoexist->btc_get(btcoexist, BTC_GET_U1_WIFI_HS_CHNL, &wifi_hs_chnl); in ex_btc8192e2ant_display_coex_info()
2714 btcoexist->btc_get(btcoexist, BTC_GET_S4_WIFI_RSSI, &wifi_rssi); in ex_btc8192e2ant_display_coex_info()
2715 btcoexist->btc_get(btcoexist, BTC_GET_S4_HS_RSSI, &bt_hs_rssi); in ex_btc8192e2ant_display_coex_info()
2719 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_SCAN, &scan); in ex_btc8192e2ant_display_coex_info()
2720 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_LINK, &link); in ex_btc8192e2ant_display_coex_info()
2721 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_ROAM, &roam); in ex_btc8192e2ant_display_coex_info()
2725 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_UNDER_5G, &wifi_under_5g); in ex_btc8192e2ant_display_coex_info()
2726 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in ex_btc8192e2ant_display_coex_info()
2727 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in ex_btc8192e2ant_display_coex_info()
2728 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_TRAFFIC_DIRECTION, in ex_btc8192e2ant_display_coex_info()
2740 ((btcoexist->bt_info.bt_disabled) ? ("disabled") : in ex_btc8192e2ant_display_coex_info()
2753 btcoexist->btc_disp_dbg_msg(btcoexist, BTC_DBG_DISP_BT_LINK_INFO, m); in ex_btc8192e2ant_display_coex_info()
2773 btcoexist->btc_disp_dbg_msg(btcoexist, BTC_DBG_DISP_FW_PWR_MODE_CMD, m); in ex_btc8192e2ant_display_coex_info()
2790 btcoexist->bt_info.ra_mask); in ex_btc8192e2ant_display_coex_info()
2818 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x430); in ex_btc8192e2ant_display_coex_info()
2819 u32tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0x434); in ex_btc8192e2ant_display_coex_info()
2820 u16tmp[0] = btcoexist->btc_read_2byte(btcoexist, 0x42a); in ex_btc8192e2ant_display_coex_info()
2821 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x456); in ex_btc8192e2ant_display_coex_info()
2826 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0xc04); in ex_btc8192e2ant_display_coex_info()
2827 u32tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0xd04); in ex_btc8192e2ant_display_coex_info()
2828 u32tmp[2] = btcoexist->btc_read_4byte(btcoexist, 0x90c); in ex_btc8192e2ant_display_coex_info()
2832 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x778); in ex_btc8192e2ant_display_coex_info()
2835 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x92c); in ex_btc8192e2ant_display_coex_info()
2836 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x930); in ex_btc8192e2ant_display_coex_info()
2840 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x40); in ex_btc8192e2ant_display_coex_info()
2841 u8tmp[1] = btcoexist->btc_read_1byte(btcoexist, 0x4f); in ex_btc8192e2ant_display_coex_info()
2845 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x550); in ex_btc8192e2ant_display_coex_info()
2846 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x522); in ex_btc8192e2ant_display_coex_info()
2850 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0xc50); in ex_btc8192e2ant_display_coex_info()
2854 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x6c0); in ex_btc8192e2ant_display_coex_info()
2855 u32tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0x6c4); in ex_btc8192e2ant_display_coex_info()
2856 u32tmp[2] = btcoexist->btc_read_4byte(btcoexist, 0x6c8); in ex_btc8192e2ant_display_coex_info()
2857 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x6cc); in ex_btc8192e2ant_display_coex_info()
2869 if (btcoexist->auto_report_2ant) in ex_btc8192e2ant_display_coex_info()
2870 btc8192e2ant_monitor_bt_ctr(btcoexist); in ex_btc8192e2ant_display_coex_info()
2871 btcoexist->btc_disp_dbg_msg(btcoexist, BTC_DBG_DISP_COEX_STATISTICS, m); in ex_btc8192e2ant_display_coex_info()
2874 void ex_btc8192e2ant_ips_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8192e2ant_ips_notify() argument
2876 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8192e2ant_ips_notify()
2882 btc8192e2ant_coex_all_off(btcoexist); in ex_btc8192e2ant_ips_notify()
2890 void ex_btc8192e2ant_lps_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8192e2ant_lps_notify() argument
2892 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8192e2ant_lps_notify()
2905 void ex_btc8192e2ant_scan_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8192e2ant_scan_notify() argument
2907 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8192e2ant_scan_notify()
2917 void ex_btc8192e2ant_connect_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8192e2ant_connect_notify() argument
2919 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8192e2ant_connect_notify()
2929 void ex_btc8192e2ant_media_status_notify(struct btc_coexist *btcoexist, in ex_btc8192e2ant_media_status_notify() argument
2932 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8192e2ant_media_status_notify()
2937 if (btcoexist->manual_control || in ex_btc8192e2ant_media_status_notify()
2938 btcoexist->stop_coex_dm || in ex_btc8192e2ant_media_status_notify()
2939 btcoexist->bt_info.bt_disabled) in ex_btc8192e2ant_media_status_notify()
2950 btcoexist->btc_get(btcoexist, BTC_GET_U1_WIFI_CENTRAL_CHNL, in ex_btc8192e2ant_media_status_notify()
2956 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in ex_btc8192e2ant_media_status_notify()
2972 btcoexist->btc_fill_h2c(btcoexist, 0x66, 3, h2c_parameter); in ex_btc8192e2ant_media_status_notify()
2975 void ex_btc8192e2ant_special_packet_notify(struct btc_coexist *btcoexist, in ex_btc8192e2ant_special_packet_notify() argument
2978 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8192e2ant_special_packet_notify()
2985 void ex_btc8192e2ant_bt_info_notify(struct btc_coexist *btcoexist, in ex_btc8192e2ant_bt_info_notify() argument
2988 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8192e2ant_bt_info_notify()
3033 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in ex_btc8192e2ant_bt_info_notify()
3037 btcoexist, in ex_btc8192e2ant_bt_info_notify()
3041 btcoexist, in ex_btc8192e2ant_bt_info_notify()
3046 if (!btcoexist->manual_control && in ex_btc8192e2ant_bt_info_notify()
3047 !btcoexist->stop_coex_dm) { in ex_btc8192e2ant_bt_info_notify()
3050 btc8192e2ant_ignore_wlan_act(btcoexist, in ex_btc8192e2ant_bt_info_notify()
3060 if (!btcoexist->auto_report_2ant) { in ex_btc8192e2ant_bt_info_notify()
3062 btc8192e2ant_bt_auto_report(btcoexist, in ex_btc8192e2ant_bt_info_notify()
3101 btc8192e2ant_update_bt_link_info(btcoexist); in ex_btc8192e2ant_bt_info_notify()
3136 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_TRAFFIC_BUSY, &bt_busy); in ex_btc8192e2ant_bt_info_notify()
3139 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_LIMITED_DIG, &limited_dig); in ex_btc8192e2ant_bt_info_notify()
3141 btc8192e2ant_run_coexist_mechanism(btcoexist); in ex_btc8192e2ant_bt_info_notify()
3144 void ex_btc8192e2ant_halt_notify(struct btc_coexist *btcoexist) in ex_btc8192e2ant_halt_notify() argument
3146 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8192e2ant_halt_notify()
3150 btc8192e2ant_ignore_wlan_act(btcoexist, FORCE_EXEC, true); in ex_btc8192e2ant_halt_notify()
3151 ex_btc8192e2ant_media_status_notify(btcoexist, BTC_MEDIA_DISCONNECT); in ex_btc8192e2ant_halt_notify()
3154 void ex_btc8192e2ant_periodical(struct btc_coexist *btcoexist) in ex_btc8192e2ant_periodical() argument
3156 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8192e2ant_periodical()
3159 struct btc_board_info *board_info = &btcoexist->board_info; in ex_btc8192e2ant_periodical()
3160 struct btc_stack_info *stack_info = &btcoexist->stack_info; in ex_btc8192e2ant_periodical()
3176 btcoexist->btc_get(btcoexist, BTC_GET_U4_BT_PATCH_VER, in ex_btc8192e2ant_periodical()
3178 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_FW_VER, &fw_ver); in ex_btc8192e2ant_periodical()
3187 if (!btcoexist->auto_report_2ant) { in ex_btc8192e2ant_periodical()
3188 btc8192e2ant_query_bt_info(btcoexist); in ex_btc8192e2ant_periodical()
3189 btc8192e2ant_monitor_bt_ctr(btcoexist); in ex_btc8192e2ant_periodical()
3190 btc8192e2ant_monitor_bt_enable_disable(btcoexist); in ex_btc8192e2ant_periodical()
3192 if (btc8192e2ant_is_wifi_status_changed(btcoexist) || in ex_btc8192e2ant_periodical()
3194 btc8192e2ant_run_coexist_mechanism(btcoexist); in ex_btc8192e2ant_periodical()