Lines Matching refs:btcoexist

62 static u8 btc8192e2ant_bt_rssi_state(struct btc_coexist *btcoexist,  in btc8192e2ant_bt_rssi_state()  argument
66 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_bt_rssi_state()
124 static u8 btc8192e2ant_wifi_rssi_state(struct btc_coexist *btcoexist, in btc8192e2ant_wifi_rssi_state() argument
128 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_wifi_rssi_state()
132 btcoexist->btc_get(btcoexist, BTC_GET_S4_WIFI_RSSI, &wifi_rssi); in btc8192e2ant_wifi_rssi_state()
191 *btcoexist) in btc8192e2ant_monitor_bt_enable_disable()
193 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_monitor_bt_enable_disable()
215 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_DISABLE, in btc8192e2ant_monitor_bt_enable_disable()
226 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_DISABLE, in btc8192e2ant_monitor_bt_enable_disable()
241 static u32 btc8192e2ant_decide_ra_mask(struct btc_coexist *btcoexist, in btc8192e2ant_decide_ra_mask() argument
272 static void btc8192e2ant_update_ra_mask(struct btc_coexist *btcoexist, in btc8192e2ant_update_ra_mask() argument
278 btcoexist->btc_set(btcoexist, BTC_SET_ACT_UPDATE_RAMASK, in btc8192e2ant_update_ra_mask()
283 static void btc8192e2ant_auto_rate_fallback_retry(struct btc_coexist *btcoexist, in btc8192e2ant_auto_rate_fallback_retry() argument
293 btcoexist->btc_write_4byte(btcoexist, 0x430, in btc8192e2ant_auto_rate_fallback_retry()
295 btcoexist->btc_write_4byte(btcoexist, 0x434, in btc8192e2ant_auto_rate_fallback_retry()
299 btcoexist->btc_get(btcoexist, in btc8192e2ant_auto_rate_fallback_retry()
303 btcoexist->btc_write_4byte(btcoexist, 0x430, in btc8192e2ant_auto_rate_fallback_retry()
305 btcoexist->btc_write_4byte(btcoexist, 0x434, in btc8192e2ant_auto_rate_fallback_retry()
308 btcoexist->btc_write_4byte(btcoexist, 0x430, in btc8192e2ant_auto_rate_fallback_retry()
310 btcoexist->btc_write_4byte(btcoexist, 0x434, in btc8192e2ant_auto_rate_fallback_retry()
322 static void btc8192e2ant_retry_limit(struct btc_coexist *btcoexist, in btc8192e2ant_retry_limit() argument
331 btcoexist->btc_write_2byte(btcoexist, 0x42a, in btc8192e2ant_retry_limit()
335 btcoexist->btc_write_2byte(btcoexist, 0x42a, 0x0808); in btc8192e2ant_retry_limit()
345 static void btc8192e2ant_ampdu_maxtime(struct btc_coexist *btcoexist, in btc8192e2ant_ampdu_maxtime() argument
354 btcoexist->btc_write_1byte(btcoexist, 0x456, in btc8192e2ant_ampdu_maxtime()
358 btcoexist->btc_write_1byte(btcoexist, 0x456, 0x38); in btc8192e2ant_ampdu_maxtime()
368 static void btc8192e2ant_limited_tx(struct btc_coexist *btcoexist, in btc8192e2ant_limited_tx() argument
377 btc8192e2ant_decide_ra_mask(btcoexist, coex_dm->cur_ss_type, in btc8192e2ant_limited_tx()
379 btc8192e2ant_update_ra_mask(btcoexist, force_exec, dis_ra_mask); in btc8192e2ant_limited_tx()
380 btc8192e2ant_auto_rate_fallback_retry(btcoexist, force_exec, arfr_type); in btc8192e2ant_limited_tx()
381 btc8192e2ant_retry_limit(btcoexist, force_exec, retry_limit_type); in btc8192e2ant_limited_tx()
382 btc8192e2ant_ampdu_maxtime(btcoexist, force_exec, ampdu_time_type); in btc8192e2ant_limited_tx()
385 static void btc8192e2ant_limited_rx(struct btc_coexist *btcoexist, in btc8192e2ant_limited_rx() argument
397 btcoexist->btc_set(btcoexist, BTC_SET_BL_TO_REJ_AP_AGG_PKT, in btc8192e2ant_limited_rx()
400 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_CTRL_AGG_SIZE, in btc8192e2ant_limited_rx()
405 btcoexist->btc_set(btcoexist, BTC_SET_U1_AGG_BUF_SIZE, &rx_agg_size); in btc8192e2ant_limited_rx()
407 btcoexist->btc_set(btcoexist, BTC_SET_ACT_AGGREGATE_CTRL, NULL); in btc8192e2ant_limited_rx()
410 static void btc8192e2ant_monitor_bt_ctr(struct btc_coexist *btcoexist) in btc8192e2ant_monitor_bt_ctr() argument
412 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_monitor_bt_ctr()
419 u32tmp = btcoexist->btc_read_4byte(btcoexist, reg_hp_txrx); in btc8192e2ant_monitor_bt_ctr()
423 u32tmp = btcoexist->btc_read_4byte(btcoexist, reg_lp_txrx); in btc8192e2ant_monitor_bt_ctr()
440 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0xc); in btc8192e2ant_monitor_bt_ctr()
443 static void btc8192e2ant_query_bt_info(struct btc_coexist *btcoexist) in btc8192e2ant_query_bt_info() argument
445 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_query_bt_info()
456 btcoexist->btc_fill_h2c(btcoexist, 0x61, 1, h2c_parameter); in btc8192e2ant_query_bt_info()
460 bool btc8192e2ant_is_wifi_status_changed(struct btc_coexist *btcoexist) in btc8192e2ant_is_wifi_status_changed() argument
467 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in btc8192e2ant_is_wifi_status_changed()
469 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in btc8192e2ant_is_wifi_status_changed()
470 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in btc8192e2ant_is_wifi_status_changed()
471 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_4_WAY_PROGRESS, in btc8192e2ant_is_wifi_status_changed()
492 static void btc8192e2ant_update_bt_link_info(struct btc_coexist *btcoexist) in btc8192e2ant_update_bt_link_info() argument
494 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8192e2ant_update_bt_link_info()
497 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in btc8192e2ant_update_bt_link_info()
548 static u8 btc8192e2ant_action_algorithm(struct btc_coexist *btcoexist) in btc8192e2ant_action_algorithm() argument
550 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_action_algorithm()
551 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8192e2ant_action_algorithm()
552 struct btc_stack_info *stack_info = &btcoexist->stack_info; in btc8192e2ant_action_algorithm()
557 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in btc8192e2ant_action_algorithm()
754 static void btc8192e2ant_set_fw_dac_swing_level(struct btc_coexist *btcoexist, in btc8192e2ant_set_fw_dac_swing_level() argument
757 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_set_fw_dac_swing_level()
770 btcoexist->btc_fill_h2c(btcoexist, 0x64, 1, h2c_parameter); in btc8192e2ant_set_fw_dac_swing_level()
773 static void btc8192e2ant_set_fw_dec_bt_pwr(struct btc_coexist *btcoexist, in btc8192e2ant_set_fw_dec_bt_pwr() argument
776 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_set_fw_dec_bt_pwr()
785 btcoexist->btc_fill_h2c(btcoexist, 0x62, 1, h2c_parameter); in btc8192e2ant_set_fw_dec_bt_pwr()
788 static void btc8192e2ant_dec_bt_pwr(struct btc_coexist *btcoexist, in btc8192e2ant_dec_bt_pwr() argument
791 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_dec_bt_pwr()
803 btc8192e2ant_set_fw_dec_bt_pwr(btcoexist, coex_dm->cur_dec_bt_pwr); in btc8192e2ant_dec_bt_pwr()
808 static void btc8192e2ant_set_bt_auto_report(struct btc_coexist *btcoexist, in btc8192e2ant_set_bt_auto_report() argument
811 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_set_bt_auto_report()
824 btcoexist->btc_fill_h2c(btcoexist, 0x68, 1, h2c_parameter); in btc8192e2ant_set_bt_auto_report()
827 static void btc8192e2ant_bt_auto_report(struct btc_coexist *btcoexist, in btc8192e2ant_bt_auto_report() argument
831 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_bt_auto_report()
848 btc8192e2ant_set_bt_auto_report(btcoexist, in btc8192e2ant_bt_auto_report()
854 static void btc8192e2ant_fw_dac_swing_lvl(struct btc_coexist *btcoexist, in btc8192e2ant_fw_dac_swing_lvl() argument
857 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_fw_dac_swing_lvl()
875 btc8192e2ant_set_fw_dac_swing_level(btcoexist, in btc8192e2ant_fw_dac_swing_lvl()
881 static void btc8192e2ant_set_sw_rf_rx_lpf_corner(struct btc_coexist *btcoexist, in btc8192e2ant_set_sw_rf_rx_lpf_corner() argument
884 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_set_sw_rf_rx_lpf_corner()
890 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1e, in btc8192e2ant_set_sw_rf_rx_lpf_corner()
896 if (btcoexist->initilized) { in btc8192e2ant_set_sw_rf_rx_lpf_corner()
899 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1e, in btc8192e2ant_set_sw_rf_rx_lpf_corner()
906 static void btc8192e2ant_rf_shrink(struct btc_coexist *btcoexist, in btc8192e2ant_rf_shrink() argument
909 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_rf_shrink()
927 btc8192e2ant_set_sw_rf_rx_lpf_corner(btcoexist, in btc8192e2ant_rf_shrink()
933 static void btc8192e2ant_set_dac_swing_reg(struct btc_coexist *btcoexist, in btc8192e2ant_set_dac_swing_reg() argument
936 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_set_dac_swing_reg()
941 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x883, 0x3e, val); in btc8192e2ant_set_dac_swing_reg()
944 static void btc8192e2ant_set_sw_full_swing(struct btc_coexist *btcoexist, in btc8192e2ant_set_sw_full_swing() argument
949 btc8192e2ant_set_dac_swing_reg(btcoexist, sw_dac_swing_lvl); in btc8192e2ant_set_sw_full_swing()
951 btc8192e2ant_set_dac_swing_reg(btcoexist, 0x18); in btc8192e2ant_set_sw_full_swing()
954 static void btc8192e2ant_dac_swing(struct btc_coexist *btcoexist, in btc8192e2ant_dac_swing() argument
958 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_dac_swing()
982 btc8192e2ant_set_sw_full_swing(btcoexist, dac_swing_on, dac_swing_lvl); in btc8192e2ant_dac_swing()
988 static void btc8192e2ant_set_agc_table(struct btc_coexist *btcoexist, in btc8192e2ant_set_agc_table() argument
991 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_set_agc_table()
997 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0x0a1A0001); in btc8192e2ant_set_agc_table()
998 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0x091B0001); in btc8192e2ant_set_agc_table()
999 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0x081C0001); in btc8192e2ant_set_agc_table()
1000 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0x071D0001); in btc8192e2ant_set_agc_table()
1001 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0x061E0001); in btc8192e2ant_set_agc_table()
1002 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0x051F0001); in btc8192e2ant_set_agc_table()
1006 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0xaa1A0001); in btc8192e2ant_set_agc_table()
1007 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0xa91B0001); in btc8192e2ant_set_agc_table()
1008 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0xa81C0001); in btc8192e2ant_set_agc_table()
1009 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0xa71D0001); in btc8192e2ant_set_agc_table()
1010 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0xa61E0001); in btc8192e2ant_set_agc_table()
1011 btcoexist->btc_write_4byte(btcoexist, 0xc78, 0xa51F0001); in btc8192e2ant_set_agc_table()
1015 static void btc8192e2ant_agc_table(struct btc_coexist *btcoexist, in btc8192e2ant_agc_table() argument
1018 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_agc_table()
1035 btc8192e2ant_set_agc_table(btcoexist, agc_table_en); in btc8192e2ant_agc_table()
1040 static void btc8192e2ant_set_coex_table(struct btc_coexist *btcoexist, in btc8192e2ant_set_coex_table() argument
1044 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_set_coex_table()
1048 btcoexist->btc_write_4byte(btcoexist, 0x6c0, val0x6c0); in btc8192e2ant_set_coex_table()
1052 btcoexist->btc_write_4byte(btcoexist, 0x6c4, val0x6c4); in btc8192e2ant_set_coex_table()
1056 btcoexist->btc_write_4byte(btcoexist, 0x6c8, val0x6c8); in btc8192e2ant_set_coex_table()
1060 btcoexist->btc_write_1byte(btcoexist, 0x6cc, val0x6cc); in btc8192e2ant_set_coex_table()
1063 static void btc8192e2ant_coex_table(struct btc_coexist *btcoexist, in btc8192e2ant_coex_table() argument
1067 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_coex_table()
1100 btc8192e2ant_set_coex_table(btcoexist, val0x6c0, val0x6c4, val0x6c8, in btc8192e2ant_coex_table()
1109 static void btc8192e2ant_coex_table_with_type(struct btc_coexist *btcoexist, in btc8192e2ant_coex_table_with_type() argument
1114 btc8192e2ant_coex_table(btcoexist, force_exec, 0x55555555, in btc8192e2ant_coex_table_with_type()
1118 btc8192e2ant_coex_table(btcoexist, force_exec, 0x5a5a5a5a, in btc8192e2ant_coex_table_with_type()
1122 btc8192e2ant_coex_table(btcoexist, force_exec, 0x55555555, in btc8192e2ant_coex_table_with_type()
1126 btc8192e2ant_coex_table(btcoexist, force_exec, 0xdfffdfff, in btc8192e2ant_coex_table_with_type()
1130 btc8192e2ant_coex_table(btcoexist, force_exec, 0xdfffdfff, in btc8192e2ant_coex_table_with_type()
1138 static void btc8192e2ant_set_fw_ignore_wlan_act(struct btc_coexist *btcoexist, in btc8192e2ant_set_fw_ignore_wlan_act() argument
1141 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_set_fw_ignore_wlan_act()
1151 btcoexist->btc_fill_h2c(btcoexist, 0x63, 1, h2c_parameter); in btc8192e2ant_set_fw_ignore_wlan_act()
1154 static void btc8192e2ant_ignore_wlan_act(struct btc_coexist *btcoexist, in btc8192e2ant_ignore_wlan_act() argument
1157 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_ignore_wlan_act()
1176 btc8192e2ant_set_fw_ignore_wlan_act(btcoexist, enable); in btc8192e2ant_ignore_wlan_act()
1181 static void btc8192e2ant_set_fw_ps_tdma(struct btc_coexist *btcoexist, u8 byte1, in btc8192e2ant_set_fw_ps_tdma() argument
1184 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_set_fw_ps_tdma()
1206 btcoexist->btc_fill_h2c(btcoexist, 0x60, 5, h2c_parameter); in btc8192e2ant_set_fw_ps_tdma()
1209 static void btc8192e2ant_sw_mechanism1(struct btc_coexist *btcoexist, in btc8192e2ant_sw_mechanism1() argument
1213 btc8192e2ant_rf_shrink(btcoexist, NORMAL_EXEC, shrink_rx_lpf); in btc8192e2ant_sw_mechanism1()
1216 static void btc8192e2ant_sw_mechanism2(struct btc_coexist *btcoexist, in btc8192e2ant_sw_mechanism2() argument
1220 btc8192e2ant_agc_table(btcoexist, NORMAL_EXEC, agc_table_shift); in btc8192e2ant_sw_mechanism2()
1221 btc8192e2ant_dac_swing(btcoexist, NORMAL_EXEC, sw_dac_swing, in btc8192e2ant_sw_mechanism2()
1225 static void btc8192e2ant_ps_tdma(struct btc_coexist *btcoexist, in btc8192e2ant_ps_tdma() argument
1228 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_ps_tdma()
1253 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1a, in btc8192e2ant_ps_tdma()
1257 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x12, in btc8192e2ant_ps_tdma()
1261 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1c, in btc8192e2ant_ps_tdma()
1265 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x10, in btc8192e2ant_ps_tdma()
1269 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1a, in btc8192e2ant_ps_tdma()
1273 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x12, in btc8192e2ant_ps_tdma()
1277 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1c, in btc8192e2ant_ps_tdma()
1281 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xa3, 0x10, in btc8192e2ant_ps_tdma()
1285 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1a, in btc8192e2ant_ps_tdma()
1289 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x12, in btc8192e2ant_ps_tdma()
1293 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1c, in btc8192e2ant_ps_tdma()
1297 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x10, in btc8192e2ant_ps_tdma()
1301 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1a, in btc8192e2ant_ps_tdma()
1305 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x12, in btc8192e2ant_ps_tdma()
1309 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1c, in btc8192e2ant_ps_tdma()
1313 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x12, in btc8192e2ant_ps_tdma()
1317 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0x61, 0x20, in btc8192e2ant_ps_tdma()
1321 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x5, in btc8192e2ant_ps_tdma()
1325 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x25, in btc8192e2ant_ps_tdma()
1329 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x25, in btc8192e2ant_ps_tdma()
1333 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x15, in btc8192e2ant_ps_tdma()
1337 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1a, in btc8192e2ant_ps_tdma()
1346 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0x8, 0x0, 0x0, in btc8192e2ant_ps_tdma()
1348 btcoexist->btc_write_1byte(btcoexist, 0x92c, 0x4); in btc8192e2ant_ps_tdma()
1351 btc8192e2ant_set_fw_ps_tdma(btcoexist, 0x0, 0x0, 0x0, in btc8192e2ant_ps_tdma()
1354 btcoexist->btc_write_1byte(btcoexist, 0x92c, 0x20); in btc8192e2ant_ps_tdma()
1364 static void btc8192e2ant_set_switch_ss_type(struct btc_coexist *btcoexist, in btc8192e2ant_set_switch_ss_type() argument
1367 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_set_switch_ss_type()
1374 dis_ra_mask = btc8192e2ant_decide_ra_mask(btcoexist, ss_type, in btc8192e2ant_set_switch_ss_type()
1376 btc8192e2ant_update_ra_mask(btcoexist, FORCE_EXEC, dis_ra_mask); in btc8192e2ant_set_switch_ss_type()
1379 btc8192e2ant_ps_tdma(btcoexist, FORCE_EXEC, false, 1); in btc8192e2ant_set_switch_ss_type()
1381 btcoexist->btc_write_1byte(btcoexist, 0xc04, 0x11); in btc8192e2ant_set_switch_ss_type()
1382 btcoexist->btc_write_1byte(btcoexist, 0xd04, 0x1); in btc8192e2ant_set_switch_ss_type()
1383 btcoexist->btc_write_4byte(btcoexist, 0x90c, 0x81111111); in btc8192e2ant_set_switch_ss_type()
1385 btcoexist->btc_write_1byte_bitmask(btcoexist, 0xe77, 0x4, 0x1); in btc8192e2ant_set_switch_ss_type()
1386 btcoexist->btc_write_1byte(btcoexist, 0xa07, 0x81); in btc8192e2ant_set_switch_ss_type()
1389 btc8192e2ant_ps_tdma(btcoexist, FORCE_EXEC, false, 0); in btc8192e2ant_set_switch_ss_type()
1390 btcoexist->btc_write_1byte(btcoexist, 0xc04, 0x33); in btc8192e2ant_set_switch_ss_type()
1391 btcoexist->btc_write_1byte(btcoexist, 0xd04, 0x3); in btc8192e2ant_set_switch_ss_type()
1392 btcoexist->btc_write_4byte(btcoexist, 0x90c, 0x81121313); in btc8192e2ant_set_switch_ss_type()
1393 btcoexist->btc_write_1byte_bitmask(btcoexist, 0xe77, 0x4, 0x0); in btc8192e2ant_set_switch_ss_type()
1394 btcoexist->btc_write_1byte(btcoexist, 0xa07, 0x41); in btc8192e2ant_set_switch_ss_type()
1398 btcoexist->btc_set(btcoexist, BTC_SET_ACT_SEND_MIMO_PS, &mimops); in btc8192e2ant_set_switch_ss_type()
1401 static void btc8192e2ant_switch_ss_type(struct btc_coexist *btcoexist, in btc8192e2ant_switch_ss_type() argument
1404 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_switch_ss_type()
1415 btc8192e2ant_set_switch_ss_type(btcoexist, coex_dm->cur_ss_type); in btc8192e2ant_switch_ss_type()
1420 static void btc8192e2ant_coex_all_off(struct btc_coexist *btcoexist) in btc8192e2ant_coex_all_off() argument
1423 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8192e2ant_coex_all_off()
1424 btc8192e2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8192e2ant_coex_all_off()
1425 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_coex_all_off()
1428 btc8192e2ant_sw_mechanism1(btcoexist, false, false, false, false); in btc8192e2ant_coex_all_off()
1429 btc8192e2ant_sw_mechanism2(btcoexist, false, false, false, 0x18); in btc8192e2ant_coex_all_off()
1432 btc8192e2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_coex_all_off()
1435 static void btc8192e2ant_init_coex_dm(struct btc_coexist *btcoexist) in btc8192e2ant_init_coex_dm() argument
1439 btc8192e2ant_ps_tdma(btcoexist, FORCE_EXEC, false, 1); in btc8192e2ant_init_coex_dm()
1440 btc8192e2ant_fw_dac_swing_lvl(btcoexist, FORCE_EXEC, 6); in btc8192e2ant_init_coex_dm()
1441 btc8192e2ant_dec_bt_pwr(btcoexist, FORCE_EXEC, 0); in btc8192e2ant_init_coex_dm()
1443 btc8192e2ant_coex_table_with_type(btcoexist, FORCE_EXEC, 0); in btc8192e2ant_init_coex_dm()
1444 btc8192e2ant_switch_ss_type(btcoexist, FORCE_EXEC, 2); in btc8192e2ant_init_coex_dm()
1446 btc8192e2ant_sw_mechanism1(btcoexist, false, false, false, false); in btc8192e2ant_init_coex_dm()
1447 btc8192e2ant_sw_mechanism2(btcoexist, false, false, false, 0x18); in btc8192e2ant_init_coex_dm()
1450 static void btc8192e2ant_action_bt_inquiry(struct btc_coexist *btcoexist) in btc8192e2ant_action_bt_inquiry() argument
1454 btcoexist->btc_set(btcoexist, BTC_SET_ACT_DISABLE_LOW_POWER, in btc8192e2ant_action_bt_inquiry()
1457 btc8192e2ant_switch_ss_type(btcoexist, NORMAL_EXEC, 1); in btc8192e2ant_action_bt_inquiry()
1459 btc8192e2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_bt_inquiry()
1460 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 3); in btc8192e2ant_action_bt_inquiry()
1461 btc8192e2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8192e2ant_action_bt_inquiry()
1462 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_action_bt_inquiry()
1464 btc8192e2ant_sw_mechanism1(btcoexist, false, false, false, false); in btc8192e2ant_action_bt_inquiry()
1465 btc8192e2ant_sw_mechanism2(btcoexist, false, false, false, 0x18); in btc8192e2ant_action_bt_inquiry()
1468 static bool btc8192e2ant_is_common_action(struct btc_coexist *btcoexist) in btc8192e2ant_is_common_action() argument
1470 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_is_common_action()
1471 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8192e2ant_is_common_action()
1475 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in btc8192e2ant_is_common_action()
1476 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in btc8192e2ant_is_common_action()
1478 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in btc8192e2ant_is_common_action()
1481 btc8192e2ant_limited_tx(btcoexist, NORMAL_EXEC, 1, 0, 0, 0); in btc8192e2ant_is_common_action()
1483 btc8192e2ant_limited_tx(btcoexist, NORMAL_EXEC, 0, 0, 0, 0); in btc8192e2ant_is_common_action()
1487 btcoexist->btc_set(btcoexist, BTC_SET_ACT_DISABLE_LOW_POWER, 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()
1502 btc8192e2ant_switch_ss_type(btcoexist, NORMAL_EXEC, 1); in btc8192e2ant_is_common_action()
1503 btc8192e2ant_coex_table_with_type(btcoexist, in btc8192e2ant_is_common_action()
1505 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8192e2ant_is_common_action()
1508 btc8192e2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8192e2ant_is_common_action()
1509 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_is_common_action()
1511 btc8192e2ant_sw_mechanism1(btcoexist, false, false, false, in btc8192e2ant_is_common_action()
1513 btc8192e2ant_sw_mechanism2(btcoexist, false, false, false, in btc8192e2ant_is_common_action()
1521 btcoexist->btc_set(btcoexist, in btc8192e2ant_is_common_action()
1528 btc8192e2ant_switch_ss_type(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_is_common_action()
1529 btc8192e2ant_coex_table_with_type(btcoexist, in btc8192e2ant_is_common_action()
1531 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 0); in btc8192e2ant_is_common_action()
1532 btc8192e2ant_fw_dac_swing_lvl(btcoexist, in btc8192e2ant_is_common_action()
1534 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_is_common_action()
1536 btc8192e2ant_sw_mechanism1(btcoexist, false, false, in btc8192e2ant_is_common_action()
1538 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_is_common_action()
1545 btcoexist->btc_set(btcoexist, in btc8192e2ant_is_common_action()
1554 btc8192e2ant_switch_ss_type(btcoexist, in btc8192e2ant_is_common_action()
1556 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, NORMAL_EXEC, 0); in btc8192e2ant_is_common_action()
1564 btc8192e2ant_sw_mechanism1(btcoexist, true, false, in btc8192e2ant_is_common_action()
1566 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_is_common_action()
1572 btcoexist->btc_set(btcoexist, in btc8192e2ant_is_common_action()
1584 btc8192e2ant_switch_ss_type(btcoexist, in btc8192e2ant_is_common_action()
1586 btc8192e2ant_coex_table_with_type(btcoexist, in btc8192e2ant_is_common_action()
1589 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8192e2ant_is_common_action()
1591 btc8192e2ant_fw_dac_swing_lvl(btcoexist, in btc8192e2ant_is_common_action()
1593 btc8192e2ant_dec_bt_pwr(btcoexist, in btc8192e2ant_is_common_action()
1595 btc8192e2ant_sw_mechanism1(btcoexist, false, in btc8192e2ant_is_common_action()
1597 btc8192e2ant_sw_mechanism2(btcoexist, false, in btc8192e2ant_is_common_action()
1606 static void btc8192e2ant_tdma_duration_adjust(struct btc_coexist *btcoexist, in btc8192e2ant_tdma_duration_adjust() argument
1610 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_tdma_duration_adjust()
1628 btc8192e2ant_ps_tdma(btcoexist, in btc8192e2ant_tdma_duration_adjust()
1633 btc8192e2ant_ps_tdma(btcoexist, in btc8192e2ant_tdma_duration_adjust()
1638 btc8192e2ant_ps_tdma(btcoexist, in btc8192e2ant_tdma_duration_adjust()
1645 btc8192e2ant_ps_tdma(btcoexist, in btc8192e2ant_tdma_duration_adjust()
1650 btc8192e2ant_ps_tdma(btcoexist, in btc8192e2ant_tdma_duration_adjust()
1655 btc8192e2ant_ps_tdma(btcoexist, in btc8192e2ant_tdma_duration_adjust()
1664 btc8192e2ant_ps_tdma(btcoexist, in btc8192e2ant_tdma_duration_adjust()
1669 btc8192e2ant_ps_tdma(btcoexist, in btc8192e2ant_tdma_duration_adjust()
1674 btc8192e2ant_ps_tdma(btcoexist, in btc8192e2ant_tdma_duration_adjust()
1681 btc8192e2ant_ps_tdma(btcoexist, in btc8192e2ant_tdma_duration_adjust()
1686 btc8192e2ant_ps_tdma(btcoexist, in btc8192e2ant_tdma_duration_adjust()
1691 btc8192e2ant_ps_tdma(btcoexist, in btc8192e2ant_tdma_duration_adjust()
1791 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_SCAN, &scan); in btc8192e2ant_tdma_duration_adjust()
1792 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_LINK, &link); in btc8192e2ant_tdma_duration_adjust()
1793 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_ROAM, &roam); in btc8192e2ant_tdma_duration_adjust()
1796 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8192e2ant_tdma_duration_adjust()
1805 static void btc8192e2ant_action_sco(struct btc_coexist *btcoexist) in btc8192e2ant_action_sco() argument
1810 wifi_rssi_state = btc8192e2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8192e2ant_action_sco()
1812 btc8192e2ant_switch_ss_type(btcoexist, NORMAL_EXEC, 1); in btc8192e2ant_action_sco()
1813 btc8192e2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8192e2ant_action_sco()
1815 btc8192e2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8192e2ant_action_sco()
1817 btc8192e2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 4); in btc8192e2ant_action_sco()
1819 bt_rssi_state = btc8192e2ant_bt_rssi_state(btcoexist, 3, 34, 42); in btc8192e2ant_action_sco()
1823 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_action_sco()
1824 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 13); in btc8192e2ant_action_sco()
1827 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_sco()
1828 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 9); in btc8192e2ant_action_sco()
1831 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 4); in btc8192e2ant_action_sco()
1832 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 9); in btc8192e2ant_action_sco()
1835 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8192e2ant_action_sco()
1841 btc8192e2ant_sw_mechanism1(btcoexist, true, true, in btc8192e2ant_action_sco()
1843 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_sco()
1846 btc8192e2ant_sw_mechanism1(btcoexist, true, true, in btc8192e2ant_action_sco()
1848 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_sco()
1854 btc8192e2ant_sw_mechanism1(btcoexist, false, true, in btc8192e2ant_action_sco()
1856 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_sco()
1859 btc8192e2ant_sw_mechanism1(btcoexist, false, true, in btc8192e2ant_action_sco()
1861 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_sco()
1867 static void btc8192e2ant_action_sco_pan(struct btc_coexist *btcoexist) in btc8192e2ant_action_sco_pan() argument
1872 wifi_rssi_state = btc8192e2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8192e2ant_action_sco_pan()
1874 btc8192e2ant_switch_ss_type(btcoexist, NORMAL_EXEC, 1); in btc8192e2ant_action_sco_pan()
1875 btc8192e2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8192e2ant_action_sco_pan()
1877 btc8192e2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8192e2ant_action_sco_pan()
1879 btc8192e2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 4); in btc8192e2ant_action_sco_pan()
1881 bt_rssi_state = btc8192e2ant_bt_rssi_state(btcoexist, 3, 34, 42); in btc8192e2ant_action_sco_pan()
1885 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_action_sco_pan()
1886 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 14); in btc8192e2ant_action_sco_pan()
1889 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_sco_pan()
1890 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 10); in btc8192e2ant_action_sco_pan()
1893 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 4); in btc8192e2ant_action_sco_pan()
1894 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 10); in btc8192e2ant_action_sco_pan()
1897 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8192e2ant_action_sco_pan()
1903 btc8192e2ant_sw_mechanism1(btcoexist, true, true, in btc8192e2ant_action_sco_pan()
1905 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_sco_pan()
1908 btc8192e2ant_sw_mechanism1(btcoexist, true, true, in btc8192e2ant_action_sco_pan()
1910 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_sco_pan()
1916 btc8192e2ant_sw_mechanism1(btcoexist, false, true, in btc8192e2ant_action_sco_pan()
1918 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_sco_pan()
1921 btc8192e2ant_sw_mechanism1(btcoexist, false, true, in btc8192e2ant_action_sco_pan()
1923 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_sco_pan()
1929 static void btc8192e2ant_action_hid(struct btc_coexist *btcoexist) in btc8192e2ant_action_hid() argument
1934 wifi_rssi_state = btc8192e2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8192e2ant_action_hid()
1935 bt_rssi_state = btc8192e2ant_bt_rssi_state(btcoexist, 3, 34, 42); in btc8192e2ant_action_hid()
1937 btc8192e2ant_switch_ss_type(btcoexist, NORMAL_EXEC, 1); in btc8192e2ant_action_hid()
1938 btc8192e2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8192e2ant_action_hid()
1940 btc8192e2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8192e2ant_action_hid()
1942 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8192e2ant_action_hid()
1944 btc8192e2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 3); in btc8192e2ant_action_hid()
1948 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_action_hid()
1949 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 13); in btc8192e2ant_action_hid()
1952 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_hid()
1953 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 9); in btc8192e2ant_action_hid()
1956 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 4); in btc8192e2ant_action_hid()
1957 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 9); in btc8192e2ant_action_hid()
1964 btc8192e2ant_sw_mechanism1(btcoexist, true, true, in btc8192e2ant_action_hid()
1966 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_hid()
1969 btc8192e2ant_sw_mechanism1(btcoexist, true, true, in btc8192e2ant_action_hid()
1971 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_hid()
1977 btc8192e2ant_sw_mechanism1(btcoexist, false, true, in btc8192e2ant_action_hid()
1979 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_hid()
1982 btc8192e2ant_sw_mechanism1(btcoexist, false, true, in btc8192e2ant_action_hid()
1984 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_hid()
1991 static void btc8192e2ant_action_a2dp(struct btc_coexist *btcoexist) in btc8192e2ant_action_a2dp() argument
1993 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_action_a2dp()
1998 wifi_rssi_state = btc8192e2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8192e2ant_action_a2dp()
1999 bt_rssi_state = btc8192e2ant_bt_rssi_state(btcoexist, 3, 34, 42); in btc8192e2ant_action_a2dp()
2010 btc8192e2ant_switch_ss_type(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_a2dp()
2011 btc8192e2ant_limited_rx(btcoexist, NORMAL_EXEC, false, true, in btc8192e2ant_action_a2dp()
2014 btc8192e2ant_switch_ss_type(btcoexist, NORMAL_EXEC, 1); in btc8192e2ant_action_a2dp()
2015 btc8192e2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, in btc8192e2ant_action_a2dp()
2019 btc8192e2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8192e2ant_action_a2dp()
2022 btc8192e2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_action_a2dp()
2024 btc8192e2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_a2dp()
2027 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 17); in btc8192e2ant_action_a2dp()
2029 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_action_a2dp()
2033 btc8192e2ant_tdma_duration_adjust(btcoexist, false, in btc8192e2ant_action_a2dp()
2035 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_action_a2dp()
2038 btc8192e2ant_tdma_duration_adjust(btcoexist, false, in btc8192e2ant_action_a2dp()
2040 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_a2dp()
2043 btc8192e2ant_tdma_duration_adjust(btcoexist, false, in btc8192e2ant_action_a2dp()
2045 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 4); in btc8192e2ant_action_a2dp()
2050 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8192e2ant_action_a2dp()
2054 btc8192e2ant_sw_mechanism1(btcoexist, true, false, in btc8192e2ant_action_a2dp()
2056 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_a2dp()
2059 btc8192e2ant_sw_mechanism1(btcoexist, true, false, in btc8192e2ant_action_a2dp()
2061 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_a2dp()
2067 btc8192e2ant_sw_mechanism1(btcoexist, false, false, in btc8192e2ant_action_a2dp()
2069 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_a2dp()
2072 btc8192e2ant_sw_mechanism1(btcoexist, false, false, in btc8192e2ant_action_a2dp()
2074 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_a2dp()
2080 static void btc8192e2ant_action_a2dp_pan_hs(struct btc_coexist *btcoexist) in btc8192e2ant_action_a2dp_pan_hs() argument
2085 wifi_rssi_state = btc8192e2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8192e2ant_action_a2dp_pan_hs()
2086 bt_rssi_state = btc8192e2ant_bt_rssi_state(btcoexist, 3, 34, 42); in btc8192e2ant_action_a2dp_pan_hs()
2088 btc8192e2ant_switch_ss_type(btcoexist, NORMAL_EXEC, 1); in btc8192e2ant_action_a2dp_pan_hs()
2089 btc8192e2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8192e2ant_action_a2dp_pan_hs()
2091 btc8192e2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8192e2ant_action_a2dp_pan_hs()
2092 btc8192e2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_a2dp_pan_hs()
2096 btc8192e2ant_tdma_duration_adjust(btcoexist, false, true, 2); in btc8192e2ant_action_a2dp_pan_hs()
2097 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_action_a2dp_pan_hs()
2100 btc8192e2ant_tdma_duration_adjust(btcoexist, false, false, 2); in btc8192e2ant_action_a2dp_pan_hs()
2101 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_a2dp_pan_hs()
2104 btc8192e2ant_tdma_duration_adjust(btcoexist, false, false, 2); in btc8192e2ant_action_a2dp_pan_hs()
2105 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 4); in btc8192e2ant_action_a2dp_pan_hs()
2109 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8192e2ant_action_a2dp_pan_hs()
2113 btc8192e2ant_sw_mechanism1(btcoexist, true, false, in btc8192e2ant_action_a2dp_pan_hs()
2115 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_a2dp_pan_hs()
2118 btc8192e2ant_sw_mechanism1(btcoexist, true, false, in btc8192e2ant_action_a2dp_pan_hs()
2120 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_a2dp_pan_hs()
2126 btc8192e2ant_sw_mechanism1(btcoexist, false, false, in btc8192e2ant_action_a2dp_pan_hs()
2128 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_a2dp_pan_hs()
2131 btc8192e2ant_sw_mechanism1(btcoexist, false, false, in btc8192e2ant_action_a2dp_pan_hs()
2133 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_a2dp_pan_hs()
2139 static void btc8192e2ant_action_pan_edr(struct btc_coexist *btcoexist) in btc8192e2ant_action_pan_edr() argument
2144 wifi_rssi_state = btc8192e2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8192e2ant_action_pan_edr()
2145 bt_rssi_state = btc8192e2ant_bt_rssi_state(btcoexist, 3, 34, 42); in btc8192e2ant_action_pan_edr()
2147 btc8192e2ant_switch_ss_type(btcoexist, NORMAL_EXEC, 1); in btc8192e2ant_action_pan_edr()
2148 btc8192e2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8192e2ant_action_pan_edr()
2150 btc8192e2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8192e2ant_action_pan_edr()
2152 btc8192e2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_pan_edr()
2156 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_action_pan_edr()
2157 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 5); in btc8192e2ant_action_pan_edr()
2160 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_pan_edr()
2161 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 1); in btc8192e2ant_action_pan_edr()
2164 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 4); in btc8192e2ant_action_pan_edr()
2165 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 1); in btc8192e2ant_action_pan_edr()
2169 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8192e2ant_action_pan_edr()
2173 btc8192e2ant_sw_mechanism1(btcoexist, true, false, in btc8192e2ant_action_pan_edr()
2175 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_pan_edr()
2178 btc8192e2ant_sw_mechanism1(btcoexist, true, false, in btc8192e2ant_action_pan_edr()
2180 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_pan_edr()
2186 btc8192e2ant_sw_mechanism1(btcoexist, false, false, in btc8192e2ant_action_pan_edr()
2188 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_pan_edr()
2191 btc8192e2ant_sw_mechanism1(btcoexist, false, false, in btc8192e2ant_action_pan_edr()
2193 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_pan_edr()
2200 static void btc8192e2ant_action_pan_hs(struct btc_coexist *btcoexist) in btc8192e2ant_action_pan_hs() argument
2205 wifi_rssi_state = btc8192e2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8192e2ant_action_pan_hs()
2206 bt_rssi_state = btc8192e2ant_bt_rssi_state(btcoexist, 3, 34, 42); in btc8192e2ant_action_pan_hs()
2208 btc8192e2ant_switch_ss_type(btcoexist, NORMAL_EXEC, 1); in btc8192e2ant_action_pan_hs()
2209 btc8192e2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8192e2ant_action_pan_hs()
2211 btc8192e2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8192e2ant_action_pan_hs()
2213 btc8192e2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_pan_hs()
2217 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_action_pan_hs()
2220 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_pan_hs()
2223 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 4); in btc8192e2ant_action_pan_hs()
2225 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 1); in btc8192e2ant_action_pan_hs()
2227 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8192e2ant_action_pan_hs()
2231 btc8192e2ant_sw_mechanism1(btcoexist, true, false, in btc8192e2ant_action_pan_hs()
2233 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_pan_hs()
2236 btc8192e2ant_sw_mechanism1(btcoexist, true, false, in btc8192e2ant_action_pan_hs()
2238 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_pan_hs()
2244 btc8192e2ant_sw_mechanism1(btcoexist, false, false, in btc8192e2ant_action_pan_hs()
2246 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_pan_hs()
2249 btc8192e2ant_sw_mechanism1(btcoexist, false, false, in btc8192e2ant_action_pan_hs()
2251 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_pan_hs()
2258 static void btc8192e2ant_action_pan_edr_a2dp(struct btc_coexist *btcoexist) in btc8192e2ant_action_pan_edr_a2dp() argument
2263 wifi_rssi_state = btc8192e2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8192e2ant_action_pan_edr_a2dp()
2264 bt_rssi_state = btc8192e2ant_bt_rssi_state(btcoexist, 3, 34, 42); in btc8192e2ant_action_pan_edr_a2dp()
2266 btc8192e2ant_switch_ss_type(btcoexist, NORMAL_EXEC, 1); in btc8192e2ant_action_pan_edr_a2dp()
2267 btc8192e2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8192e2ant_action_pan_edr_a2dp()
2269 btc8192e2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8192e2ant_action_pan_edr_a2dp()
2271 btc8192e2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_pan_edr_a2dp()
2273 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8192e2ant_action_pan_edr_a2dp()
2277 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_action_pan_edr_a2dp()
2278 btc8192e2ant_tdma_duration_adjust(btcoexist, false, true, 3); in btc8192e2ant_action_pan_edr_a2dp()
2281 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_pan_edr_a2dp()
2282 btc8192e2ant_tdma_duration_adjust(btcoexist, false, false, 3); in btc8192e2ant_action_pan_edr_a2dp()
2285 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 4); in btc8192e2ant_action_pan_edr_a2dp()
2286 btc8192e2ant_tdma_duration_adjust(btcoexist, false, false, 3); in btc8192e2ant_action_pan_edr_a2dp()
2293 btc8192e2ant_sw_mechanism1(btcoexist, true, false, in btc8192e2ant_action_pan_edr_a2dp()
2295 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_pan_edr_a2dp()
2298 btc8192e2ant_sw_mechanism1(btcoexist, true, false, in btc8192e2ant_action_pan_edr_a2dp()
2300 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_pan_edr_a2dp()
2306 btc8192e2ant_sw_mechanism1(btcoexist, false, false, in btc8192e2ant_action_pan_edr_a2dp()
2308 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_pan_edr_a2dp()
2311 btc8192e2ant_sw_mechanism1(btcoexist, false, false, in btc8192e2ant_action_pan_edr_a2dp()
2313 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_pan_edr_a2dp()
2319 static void btc8192e2ant_action_pan_edr_hid(struct btc_coexist *btcoexist) in btc8192e2ant_action_pan_edr_hid() argument
2324 wifi_rssi_state = btc8192e2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8192e2ant_action_pan_edr_hid()
2325 bt_rssi_state = btc8192e2ant_bt_rssi_state(btcoexist, 3, 34, 42); in btc8192e2ant_action_pan_edr_hid()
2327 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8192e2ant_action_pan_edr_hid()
2329 btc8192e2ant_switch_ss_type(btcoexist, NORMAL_EXEC, 1); in btc8192e2ant_action_pan_edr_hid()
2330 btc8192e2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8192e2ant_action_pan_edr_hid()
2332 btc8192e2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8192e2ant_action_pan_edr_hid()
2334 btc8192e2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 3); in btc8192e2ant_action_pan_edr_hid()
2338 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_action_pan_edr_hid()
2339 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 14); in btc8192e2ant_action_pan_edr_hid()
2342 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_pan_edr_hid()
2343 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 10); in btc8192e2ant_action_pan_edr_hid()
2346 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 4); in btc8192e2ant_action_pan_edr_hid()
2347 btc8192e2ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8192e2ant_action_pan_edr_hid()
2355 btc8192e2ant_sw_mechanism1(btcoexist, true, true, in btc8192e2ant_action_pan_edr_hid()
2357 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_pan_edr_hid()
2360 btc8192e2ant_sw_mechanism1(btcoexist, true, true, in btc8192e2ant_action_pan_edr_hid()
2362 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_pan_edr_hid()
2368 btc8192e2ant_sw_mechanism1(btcoexist, false, true, in btc8192e2ant_action_pan_edr_hid()
2370 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_pan_edr_hid()
2373 btc8192e2ant_sw_mechanism1(btcoexist, false, true, in btc8192e2ant_action_pan_edr_hid()
2375 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_pan_edr_hid()
2382 static void btc8192e2ant_action_hid_a2dp_pan_edr(struct btc_coexist *btcoexist) in btc8192e2ant_action_hid_a2dp_pan_edr() argument
2387 wifi_rssi_state = btc8192e2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8192e2ant_action_hid_a2dp_pan_edr()
2388 bt_rssi_state = btc8192e2ant_bt_rssi_state(btcoexist, 3, 34, 42); in btc8192e2ant_action_hid_a2dp_pan_edr()
2390 btc8192e2ant_switch_ss_type(btcoexist, NORMAL_EXEC, 1); in btc8192e2ant_action_hid_a2dp_pan_edr()
2391 btc8192e2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8192e2ant_action_hid_a2dp_pan_edr()
2393 btc8192e2ant_fw_dac_swing_lvl(btcoexist, NORMAL_EXEC, 6); in btc8192e2ant_action_hid_a2dp_pan_edr()
2395 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8192e2ant_action_hid_a2dp_pan_edr()
2397 btc8192e2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 3); in btc8192e2ant_action_hid_a2dp_pan_edr()
2401 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_action_hid_a2dp_pan_edr()
2402 btc8192e2ant_tdma_duration_adjust(btcoexist, true, true, 3); in btc8192e2ant_action_hid_a2dp_pan_edr()
2405 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_hid_a2dp_pan_edr()
2406 btc8192e2ant_tdma_duration_adjust(btcoexist, true, false, 3); in btc8192e2ant_action_hid_a2dp_pan_edr()
2409 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 4); in btc8192e2ant_action_hid_a2dp_pan_edr()
2410 btc8192e2ant_tdma_duration_adjust(btcoexist, true, false, 3); in btc8192e2ant_action_hid_a2dp_pan_edr()
2417 btc8192e2ant_sw_mechanism1(btcoexist, true, true, in btc8192e2ant_action_hid_a2dp_pan_edr()
2419 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_hid_a2dp_pan_edr()
2422 btc8192e2ant_sw_mechanism1(btcoexist, true, true, in btc8192e2ant_action_hid_a2dp_pan_edr()
2424 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_hid_a2dp_pan_edr()
2430 btc8192e2ant_sw_mechanism1(btcoexist, false, true, in btc8192e2ant_action_hid_a2dp_pan_edr()
2432 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_hid_a2dp_pan_edr()
2435 btc8192e2ant_sw_mechanism1(btcoexist, false, true, in btc8192e2ant_action_hid_a2dp_pan_edr()
2437 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_hid_a2dp_pan_edr()
2443 static void btc8192e2ant_action_hid_a2dp(struct btc_coexist *btcoexist) in btc8192e2ant_action_hid_a2dp() argument
2448 wifi_rssi_state = btc8192e2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8192e2ant_action_hid_a2dp()
2449 bt_rssi_state = btc8192e2ant_bt_rssi_state(btcoexist, 3, 34, 42); in btc8192e2ant_action_hid_a2dp()
2451 btc8192e2ant_switch_ss_type(btcoexist, NORMAL_EXEC, 1); in btc8192e2ant_action_hid_a2dp()
2452 btc8192e2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8192e2ant_action_hid_a2dp()
2454 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in btc8192e2ant_action_hid_a2dp()
2456 btc8192e2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 3); in btc8192e2ant_action_hid_a2dp()
2460 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8192e2ant_action_hid_a2dp()
2461 btc8192e2ant_tdma_duration_adjust(btcoexist, true, true, 2); in btc8192e2ant_action_hid_a2dp()
2464 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 2); in btc8192e2ant_action_hid_a2dp()
2465 btc8192e2ant_tdma_duration_adjust(btcoexist, true, false, 2); in btc8192e2ant_action_hid_a2dp()
2468 btc8192e2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 4); in btc8192e2ant_action_hid_a2dp()
2469 btc8192e2ant_tdma_duration_adjust(btcoexist, true, false, 2); in btc8192e2ant_action_hid_a2dp()
2476 btc8192e2ant_sw_mechanism1(btcoexist, true, true, in btc8192e2ant_action_hid_a2dp()
2478 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_hid_a2dp()
2481 btc8192e2ant_sw_mechanism1(btcoexist, true, true, in btc8192e2ant_action_hid_a2dp()
2483 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_hid_a2dp()
2489 btc8192e2ant_sw_mechanism1(btcoexist, false, true, in btc8192e2ant_action_hid_a2dp()
2491 btc8192e2ant_sw_mechanism2(btcoexist, true, false, in btc8192e2ant_action_hid_a2dp()
2494 btc8192e2ant_sw_mechanism1(btcoexist, false, true, in btc8192e2ant_action_hid_a2dp()
2496 btc8192e2ant_sw_mechanism2(btcoexist, false, false, in btc8192e2ant_action_hid_a2dp()
2502 static void btc8192e2ant_run_coexist_mechanism(struct btc_coexist *btcoexist) in btc8192e2ant_run_coexist_mechanism() argument
2504 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_run_coexist_mechanism()
2510 if (btcoexist->manual_control) { in btc8192e2ant_run_coexist_mechanism()
2522 algorithm = btc8192e2ant_action_algorithm(btcoexist); in btc8192e2ant_run_coexist_mechanism()
2527 btc8192e2ant_action_bt_inquiry(btcoexist); in btc8192e2ant_run_coexist_mechanism()
2535 if (btc8192e2ant_is_common_action(btcoexist)) { in btc8192e2ant_run_coexist_mechanism()
2551 btc8192e2ant_action_sco(btcoexist); in btc8192e2ant_run_coexist_mechanism()
2556 btc8192e2ant_action_sco_pan(btcoexist); in btc8192e2ant_run_coexist_mechanism()
2561 btc8192e2ant_action_hid(btcoexist); in btc8192e2ant_run_coexist_mechanism()
2566 btc8192e2ant_action_a2dp(btcoexist); in btc8192e2ant_run_coexist_mechanism()
2571 btc8192e2ant_action_a2dp_pan_hs(btcoexist); in btc8192e2ant_run_coexist_mechanism()
2576 btc8192e2ant_action_pan_edr(btcoexist); in btc8192e2ant_run_coexist_mechanism()
2581 btc8192e2ant_action_pan_hs(btcoexist); in btc8192e2ant_run_coexist_mechanism()
2586 btc8192e2ant_action_pan_edr_a2dp(btcoexist); in btc8192e2ant_run_coexist_mechanism()
2591 btc8192e2ant_action_pan_edr_hid(btcoexist); in btc8192e2ant_run_coexist_mechanism()
2596 btc8192e2ant_action_hid_a2dp_pan_edr(btcoexist); in btc8192e2ant_run_coexist_mechanism()
2601 btc8192e2ant_action_hid_a2dp(btcoexist); in btc8192e2ant_run_coexist_mechanism()
2613 static void btc8192e2ant_init_hwconfig(struct btc_coexist *btcoexist, in btc8192e2ant_init_hwconfig() argument
2616 struct rtl_priv *rtlpriv = btcoexist->adapter; in btc8192e2ant_init_hwconfig()
2626 btcoexist->btc_get_rf_reg(btcoexist, BTC_RF_A, in btc8192e2ant_init_hwconfig()
2629 coex_dm->backup_arfr_cnt1 = btcoexist->btc_read_4byte(btcoexist, in btc8192e2ant_init_hwconfig()
2631 coex_dm->backup_arfr_cnt2 = btcoexist->btc_read_4byte(btcoexist, in btc8192e2ant_init_hwconfig()
2633 coex_dm->backup_retry_limit = btcoexist->btc_read_2byte( in btc8192e2ant_init_hwconfig()
2634 btcoexist, in btc8192e2ant_init_hwconfig()
2636 coex_dm->backup_ampdu_maxtime = btcoexist->btc_read_1byte( in btc8192e2ant_init_hwconfig()
2637 btcoexist, in btc8192e2ant_init_hwconfig()
2642 btcoexist->btc_write_1byte(btcoexist, 0x4f, 0x6); in btc8192e2ant_init_hwconfig()
2643 btcoexist->btc_write_1byte(btcoexist, 0x944, 0x24); in btc8192e2ant_init_hwconfig()
2644 btcoexist->btc_write_4byte(btcoexist, 0x930, 0x700700); in btc8192e2ant_init_hwconfig()
2645 btcoexist->btc_write_1byte(btcoexist, 0x92c, 0x20); in btc8192e2ant_init_hwconfig()
2646 if (btcoexist->chip_interface == BTC_INTF_USB) in btc8192e2ant_init_hwconfig()
2647 btcoexist->btc_write_4byte(btcoexist, 0x64, 0x30430004); in btc8192e2ant_init_hwconfig()
2649 btcoexist->btc_write_4byte(btcoexist, 0x64, 0x30030004); in btc8192e2ant_init_hwconfig()
2651 btc8192e2ant_coex_table_with_type(btcoexist, FORCE_EXEC, 0); in btc8192e2ant_init_hwconfig()
2654 btcoexist->btc_write_4byte(btcoexist, 0x858, 0x55555555); in btc8192e2ant_init_hwconfig()
2657 btcoexist->btc_write_1byte(btcoexist, 0x778, 0x3); in btc8192e2ant_init_hwconfig()
2659 u8tmp = btcoexist->btc_read_1byte(btcoexist, 0x790); in btc8192e2ant_init_hwconfig()
2662 btcoexist->btc_write_1byte(btcoexist, 0x790, u8tmp); in btc8192e2ant_init_hwconfig()
2665 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0x4); in btc8192e2ant_init_hwconfig()
2668 btcoexist->btc_write_1byte(btcoexist, 0x40, 0x20); in btc8192e2ant_init_hwconfig()
2670 u16tmp = btcoexist->btc_read_2byte(btcoexist, 0x40); in btc8192e2ant_init_hwconfig()
2672 btcoexist->btc_write_2byte(btcoexist, 0x40, u16tmp); in btc8192e2ant_init_hwconfig()
2675 u8tmp = btcoexist->btc_read_1byte(btcoexist, 0x101); in btc8192e2ant_init_hwconfig()
2677 btcoexist->btc_write_1byte(btcoexist, 0x101, u8tmp); in btc8192e2ant_init_hwconfig()
2680 u8tmp = btcoexist->btc_read_1byte(btcoexist, 0x93); in btc8192e2ant_init_hwconfig()
2682 btcoexist->btc_write_1byte(btcoexist, 0x93, u8tmp); in btc8192e2ant_init_hwconfig()
2684 u8tmp = btcoexist->btc_read_1byte(btcoexist, 0x7); in btc8192e2ant_init_hwconfig()
2686 btcoexist->btc_write_1byte(btcoexist, 0x7, u8tmp); in btc8192e2ant_init_hwconfig()
2693 void ex_btc8192e2ant_init_hwconfig(struct btc_coexist *btcoexist) in ex_btc8192e2ant_init_hwconfig() argument
2695 btc8192e2ant_init_hwconfig(btcoexist, true); in ex_btc8192e2ant_init_hwconfig()
2698 void ex_btc8192e2ant_init_coex_dm(struct btc_coexist *btcoexist) in ex_btc8192e2ant_init_coex_dm() argument
2700 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8192e2ant_init_coex_dm()
2704 btc8192e2ant_init_coex_dm(btcoexist); in ex_btc8192e2ant_init_coex_dm()
2707 void ex_btc8192e2ant_display_coex_info(struct btc_coexist *btcoexist, in ex_btc8192e2ant_display_coex_info() argument
2710 struct btc_board_info *board_info = &btcoexist->board_info; in ex_btc8192e2ant_display_coex_info()
2711 struct btc_stack_info *stack_info = &btcoexist->stack_info; in ex_btc8192e2ant_display_coex_info()
2724 if (btcoexist->manual_control) { in ex_btc8192e2ant_display_coex_info()
2736 btcoexist->btc_get(btcoexist, BTC_GET_U4_BT_PATCH_VER, &bt_patch_ver); in ex_btc8192e2ant_display_coex_info()
2737 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_FW_VER, &fw_ver); in ex_btc8192e2ant_display_coex_info()
2743 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in ex_btc8192e2ant_display_coex_info()
2744 btcoexist->btc_get(btcoexist, BTC_GET_U1_WIFI_DOT11_CHNL, in ex_btc8192e2ant_display_coex_info()
2746 btcoexist->btc_get(btcoexist, BTC_GET_U1_WIFI_HS_CHNL, &wifi_hs_chnl); in ex_btc8192e2ant_display_coex_info()
2754 btcoexist->btc_get(btcoexist, BTC_GET_S4_WIFI_RSSI, &wifi_rssi); in ex_btc8192e2ant_display_coex_info()
2755 btcoexist->btc_get(btcoexist, BTC_GET_S4_HS_RSSI, &bt_hs_rssi); in ex_btc8192e2ant_display_coex_info()
2759 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_SCAN, &scan); in ex_btc8192e2ant_display_coex_info()
2760 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_LINK, &link); in ex_btc8192e2ant_display_coex_info()
2761 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_ROAM, &roam); in ex_btc8192e2ant_display_coex_info()
2765 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_UNDER_5G, &wifi_under_5g); in ex_btc8192e2ant_display_coex_info()
2766 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in ex_btc8192e2ant_display_coex_info()
2767 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in ex_btc8192e2ant_display_coex_info()
2768 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_TRAFFIC_DIRECTION, in ex_btc8192e2ant_display_coex_info()
2780 ((btcoexist->bt_info.bt_disabled) ? ("disabled") : in ex_btc8192e2ant_display_coex_info()
2793 btcoexist->btc_disp_dbg_msg(btcoexist, BTC_DBG_DISP_BT_LINK_INFO, m); in ex_btc8192e2ant_display_coex_info()
2813 btcoexist->btc_disp_dbg_msg(btcoexist, BTC_DBG_DISP_FW_PWR_MODE_CMD, m); in ex_btc8192e2ant_display_coex_info()
2830 btcoexist->bt_info.ra_mask); in ex_btc8192e2ant_display_coex_info()
2858 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x430); in ex_btc8192e2ant_display_coex_info()
2859 u32tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0x434); in ex_btc8192e2ant_display_coex_info()
2860 u16tmp[0] = btcoexist->btc_read_2byte(btcoexist, 0x42a); in ex_btc8192e2ant_display_coex_info()
2861 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x456); in ex_btc8192e2ant_display_coex_info()
2866 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0xc04); in ex_btc8192e2ant_display_coex_info()
2867 u32tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0xd04); in ex_btc8192e2ant_display_coex_info()
2868 u32tmp[2] = btcoexist->btc_read_4byte(btcoexist, 0x90c); in ex_btc8192e2ant_display_coex_info()
2872 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x778); in ex_btc8192e2ant_display_coex_info()
2875 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x92c); in ex_btc8192e2ant_display_coex_info()
2876 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x930); in ex_btc8192e2ant_display_coex_info()
2880 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x40); in ex_btc8192e2ant_display_coex_info()
2881 u8tmp[1] = btcoexist->btc_read_1byte(btcoexist, 0x4f); in ex_btc8192e2ant_display_coex_info()
2885 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x550); in ex_btc8192e2ant_display_coex_info()
2886 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x522); in ex_btc8192e2ant_display_coex_info()
2890 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0xc50); in ex_btc8192e2ant_display_coex_info()
2894 u32tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x6c0); in ex_btc8192e2ant_display_coex_info()
2895 u32tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0x6c4); in ex_btc8192e2ant_display_coex_info()
2896 u32tmp[2] = btcoexist->btc_read_4byte(btcoexist, 0x6c8); in ex_btc8192e2ant_display_coex_info()
2897 u8tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x6cc); in ex_btc8192e2ant_display_coex_info()
2909 if (btcoexist->auto_report_2ant) in ex_btc8192e2ant_display_coex_info()
2910 btc8192e2ant_monitor_bt_ctr(btcoexist); in ex_btc8192e2ant_display_coex_info()
2911 btcoexist->btc_disp_dbg_msg(btcoexist, BTC_DBG_DISP_COEX_STATISTICS, m); in ex_btc8192e2ant_display_coex_info()
2914 void ex_btc8192e2ant_ips_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8192e2ant_ips_notify() argument
2916 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8192e2ant_ips_notify()
2922 btc8192e2ant_coex_all_off(btcoexist); in ex_btc8192e2ant_ips_notify()
2930 void ex_btc8192e2ant_lps_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8192e2ant_lps_notify() argument
2932 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8192e2ant_lps_notify()
2945 void ex_btc8192e2ant_scan_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8192e2ant_scan_notify() argument
2947 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8192e2ant_scan_notify()
2957 void ex_btc8192e2ant_connect_notify(struct btc_coexist *btcoexist, u8 type) in ex_btc8192e2ant_connect_notify() argument
2959 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8192e2ant_connect_notify()
2969 void ex_btc8192e2ant_media_status_notify(struct btc_coexist *btcoexist, in ex_btc8192e2ant_media_status_notify() argument
2972 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8192e2ant_media_status_notify()
2977 if (btcoexist->manual_control || in ex_btc8192e2ant_media_status_notify()
2978 btcoexist->stop_coex_dm || in ex_btc8192e2ant_media_status_notify()
2979 btcoexist->bt_info.bt_disabled) in ex_btc8192e2ant_media_status_notify()
2990 btcoexist->btc_get(btcoexist, BTC_GET_U1_WIFI_CENTRAL_CHNL, in ex_btc8192e2ant_media_status_notify()
2996 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in ex_btc8192e2ant_media_status_notify()
3012 btcoexist->btc_fill_h2c(btcoexist, 0x66, 3, h2c_parameter); in ex_btc8192e2ant_media_status_notify()
3015 void ex_btc8192e2ant_special_packet_notify(struct btc_coexist *btcoexist, in ex_btc8192e2ant_special_packet_notify() argument
3018 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8192e2ant_special_packet_notify()
3025 void ex_btc8192e2ant_bt_info_notify(struct btc_coexist *btcoexist, in ex_btc8192e2ant_bt_info_notify() argument
3028 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8192e2ant_bt_info_notify()
3073 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in ex_btc8192e2ant_bt_info_notify()
3077 btcoexist, in ex_btc8192e2ant_bt_info_notify()
3081 btcoexist, in ex_btc8192e2ant_bt_info_notify()
3086 if (!btcoexist->manual_control && in ex_btc8192e2ant_bt_info_notify()
3087 !btcoexist->stop_coex_dm) { in ex_btc8192e2ant_bt_info_notify()
3090 btc8192e2ant_ignore_wlan_act(btcoexist, in ex_btc8192e2ant_bt_info_notify()
3100 if (!btcoexist->auto_report_2ant) { in ex_btc8192e2ant_bt_info_notify()
3102 btc8192e2ant_bt_auto_report(btcoexist, in ex_btc8192e2ant_bt_info_notify()
3141 btc8192e2ant_update_bt_link_info(btcoexist); in ex_btc8192e2ant_bt_info_notify()
3176 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_TRAFFIC_BUSY, &bt_busy); in ex_btc8192e2ant_bt_info_notify()
3179 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_LIMITED_DIG, &limited_dig); in ex_btc8192e2ant_bt_info_notify()
3181 btc8192e2ant_run_coexist_mechanism(btcoexist); in ex_btc8192e2ant_bt_info_notify()
3184 void ex_btc8192e2ant_halt_notify(struct btc_coexist *btcoexist) in ex_btc8192e2ant_halt_notify() argument
3186 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8192e2ant_halt_notify()
3190 btc8192e2ant_ignore_wlan_act(btcoexist, FORCE_EXEC, true); in ex_btc8192e2ant_halt_notify()
3191 ex_btc8192e2ant_media_status_notify(btcoexist, BTC_MEDIA_DISCONNECT); in ex_btc8192e2ant_halt_notify()
3194 void ex_btc8192e2ant_periodical(struct btc_coexist *btcoexist) in ex_btc8192e2ant_periodical() argument
3196 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_btc8192e2ant_periodical()
3199 struct btc_board_info *board_info = &btcoexist->board_info; in ex_btc8192e2ant_periodical()
3200 struct btc_stack_info *stack_info = &btcoexist->stack_info; in ex_btc8192e2ant_periodical()
3216 btcoexist->btc_get(btcoexist, BTC_GET_U4_BT_PATCH_VER, in ex_btc8192e2ant_periodical()
3218 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_FW_VER, &fw_ver); in ex_btc8192e2ant_periodical()
3227 if (!btcoexist->auto_report_2ant) { in ex_btc8192e2ant_periodical()
3228 btc8192e2ant_query_bt_info(btcoexist); in ex_btc8192e2ant_periodical()
3229 btc8192e2ant_monitor_bt_ctr(btcoexist); in ex_btc8192e2ant_periodical()
3230 btc8192e2ant_monitor_bt_enable_disable(btcoexist); in ex_btc8192e2ant_periodical()
3232 if (btc8192e2ant_is_wifi_status_changed(btcoexist) || in ex_btc8192e2ant_periodical()
3234 btc8192e2ant_run_coexist_mechanism(btcoexist); in ex_btc8192e2ant_periodical()