Lines Matching refs:btcoexist

151 static u8 halbtc8821a1ant_WifiRssiState(struct btc_coexist *btcoexist,  in halbtc8821a1ant_WifiRssiState()  argument
158 btcoexist->btc_get(btcoexist, BTC_GET_S4_WIFI_RSSI, &wifi_rssi); in halbtc8821a1ant_WifiRssiState()
254 static void halbtc8821a1ant_update_ra_mask(struct btc_coexist *btcoexist, in halbtc8821a1ant_update_ra_mask() argument
261 btcoexist->btc_set(btcoexist, BTC_SET_ACT_UPDATE_ra_mask, in halbtc8821a1ant_update_ra_mask()
267 static void btc8821a1ant_auto_rate_fb_retry(struct btc_coexist *btcoexist, in btc8821a1ant_auto_rate_fb_retry() argument
278 btcoexist->btc_write_4byte(btcoexist, 0x430, in btc8821a1ant_auto_rate_fb_retry()
280 btcoexist->btc_write_4byte(btcoexist, 0x434, in btc8821a1ant_auto_rate_fb_retry()
284 btcoexist->btc_get(btcoexist, in btc8821a1ant_auto_rate_fb_retry()
288 btcoexist->btc_write_4byte(btcoexist, 0x430, in btc8821a1ant_auto_rate_fb_retry()
290 btcoexist->btc_write_4byte(btcoexist, 0x434, in btc8821a1ant_auto_rate_fb_retry()
293 btcoexist->btc_write_4byte(btcoexist, 0x430, in btc8821a1ant_auto_rate_fb_retry()
295 btcoexist->btc_write_4byte(btcoexist, 0x434, in btc8821a1ant_auto_rate_fb_retry()
307 static void halbtc8821a1ant_retry_limit(struct btc_coexist *btcoexist, in halbtc8821a1ant_retry_limit() argument
316 btcoexist->btc_write_2byte(btcoexist, 0x42a, in halbtc8821a1ant_retry_limit()
320 btcoexist->btc_write_2byte(btcoexist, 0x42a, 0x0808); in halbtc8821a1ant_retry_limit()
329 static void halbtc8821a1ant_ampdu_max_time(struct btc_coexist *btcoexist, in halbtc8821a1ant_ampdu_max_time() argument
338 btcoexist->btc_write_1byte(btcoexist, 0x456, in halbtc8821a1ant_ampdu_max_time()
342 btcoexist->btc_write_1byte(btcoexist, 0x456, 0x38); in halbtc8821a1ant_ampdu_max_time()
352 static void halbtc8821a1ant_limited_tx(struct btc_coexist *btcoexist, in halbtc8821a1ant_limited_tx() argument
359 halbtc8821a1ant_update_ra_mask(btcoexist, force_exec, 0x0); in halbtc8821a1ant_limited_tx()
362 halbtc8821a1ant_update_ra_mask(btcoexist, force_exec, in halbtc8821a1ant_limited_tx()
366 halbtc8821a1ant_update_ra_mask(btcoexist, force_exec, in halbtc8821a1ant_limited_tx()
373 btc8821a1ant_auto_rate_fb_retry(btcoexist, force_exec, arfr_type); in halbtc8821a1ant_limited_tx()
374 halbtc8821a1ant_retry_limit(btcoexist, force_exec, retry_limit_type); in halbtc8821a1ant_limited_tx()
375 halbtc8821a1ant_ampdu_max_time(btcoexist, force_exec, ampdu_time_type); in halbtc8821a1ant_limited_tx()
378 static void halbtc8821a1ant_limited_rx(struct btc_coexist *btcoexist, in halbtc8821a1ant_limited_rx() argument
390 btcoexist->btc_set(btcoexist, in halbtc8821a1ant_limited_rx()
393 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_CTRL_AGG_SIZE, in halbtc8821a1ant_limited_rx()
396 btcoexist->btc_set(btcoexist, BTC_SET_U1_AGG_BUF_SIZE, &rx_agg_size); in halbtc8821a1ant_limited_rx()
398 btcoexist->btc_set(btcoexist, BTC_SET_ACT_AGGREGATE_CTRL, NULL); in halbtc8821a1ant_limited_rx()
401 static void halbtc8821a1ant_monitor_bt_ctr(struct btc_coexist *btcoexist) in halbtc8821a1ant_monitor_bt_ctr() argument
409 u4_tmp = btcoexist->btc_read_4byte(btcoexist, reg_hp_tx_rx); in halbtc8821a1ant_monitor_bt_ctr()
413 u4_tmp = btcoexist->btc_read_4byte(btcoexist, reg_lp_tx_rx); in halbtc8821a1ant_monitor_bt_ctr()
423 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0xc); in halbtc8821a1ant_monitor_bt_ctr()
426 static void halbtc8821a1ant_query_bt_info(struct btc_coexist *btcoexist) in halbtc8821a1ant_query_bt_info() argument
438 btcoexist->btc_fill_h2c(btcoexist, 0x61, 1, h2c_parameter); in halbtc8821a1ant_query_bt_info()
441 static void halbtc8821a1ant_update_bt_link_info(struct btc_coexist *btcoexist) in halbtc8821a1ant_update_bt_link_info() argument
443 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in halbtc8821a1ant_update_bt_link_info()
446 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in halbtc8821a1ant_update_bt_link_info()
497 static u8 halbtc8821a1ant_action_algorithm(struct btc_coexist *btcoexist) in halbtc8821a1ant_action_algorithm() argument
499 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in halbtc8821a1ant_action_algorithm()
504 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in halbtc8821a1ant_action_algorithm()
663 static void halbtc8821a1ant_set_bt_auto_report(struct btc_coexist *btcoexist, in halbtc8821a1ant_set_bt_auto_report() argument
678 btcoexist->btc_fill_h2c(btcoexist, 0x68, 1, h2c_parameter); in halbtc8821a1ant_set_bt_auto_report()
681 static void halbtc8821a1ant_bt_auto_report(struct btc_coexist *btcoexist, in halbtc8821a1ant_bt_auto_report() argument
700 halbtc8821a1ant_set_bt_auto_report(btcoexist, coex_dm->cur_bt_auto_report); in halbtc8821a1ant_bt_auto_report()
705 static void btc8821a1ant_set_sw_pen_tx_rate(struct btc_coexist *btcoexist, in btc8821a1ant_set_sw_pen_tx_rate() argument
725 btcoexist->btc_fill_h2c(btcoexist, 0x69, 6, h2c_parameter); in btc8821a1ant_set_sw_pen_tx_rate()
728 static void halbtc8821a1ant_low_penalty_ra(struct btc_coexist *btcoexist, in halbtc8821a1ant_low_penalty_ra() argument
737 btc8821a1ant_set_sw_pen_tx_rate(btcoexist, coex_dm->cur_low_penalty_ra); in halbtc8821a1ant_low_penalty_ra()
742 static void halbtc8821a1ant_set_coex_table(struct btc_coexist *btcoexist, in halbtc8821a1ant_set_coex_table() argument
748 btcoexist->btc_write_4byte(btcoexist, 0x6c0, val0x6c0); in halbtc8821a1ant_set_coex_table()
752 btcoexist->btc_write_4byte(btcoexist, 0x6c4, val0x6c4); in halbtc8821a1ant_set_coex_table()
756 btcoexist->btc_write_4byte(btcoexist, 0x6c8, val0x6c8); in halbtc8821a1ant_set_coex_table()
760 btcoexist->btc_write_1byte(btcoexist, 0x6cc, val0x6cc); in halbtc8821a1ant_set_coex_table()
763 static void halbtc8821a1ant_coex_table(struct btc_coexist *btcoexist, in halbtc8821a1ant_coex_table() argument
783 halbtc8821a1ant_set_coex_table(btcoexist, val0x6c0, val0x6c4, in halbtc8821a1ant_coex_table()
792 static void halbtc8821a1ant_coex_table_with_type(struct btc_coexist *btcoexist, in halbtc8821a1ant_coex_table_with_type() argument
797 halbtc8821a1ant_coex_table(btcoexist, force_exec, 0x55555555, in halbtc8821a1ant_coex_table_with_type()
801 halbtc8821a1ant_coex_table(btcoexist, force_exec, in halbtc8821a1ant_coex_table_with_type()
806 halbtc8821a1ant_coex_table(btcoexist, force_exec, 0x5a5a5a5a, in halbtc8821a1ant_coex_table_with_type()
810 halbtc8821a1ant_coex_table(btcoexist, force_exec, 0x55555555, in halbtc8821a1ant_coex_table_with_type()
814 halbtc8821a1ant_coex_table(btcoexist, force_exec, 0xffffffff, in halbtc8821a1ant_coex_table_with_type()
818 halbtc8821a1ant_coex_table(btcoexist, force_exec, 0x5fff5fff, in halbtc8821a1ant_coex_table_with_type()
822 halbtc8821a1ant_coex_table(btcoexist, force_exec, 0x55ff55ff, in halbtc8821a1ant_coex_table_with_type()
826 halbtc8821a1ant_coex_table(btcoexist, force_exec, 0x5afa5afa, in halbtc8821a1ant_coex_table_with_type()
834 static void btc8821a1ant_set_fw_ignore_wlan_act(struct btc_coexist *btcoexist, in btc8821a1ant_set_fw_ignore_wlan_act() argument
846 btcoexist->btc_fill_h2c(btcoexist, 0x63, 1, h2c_parameter); in btc8821a1ant_set_fw_ignore_wlan_act()
849 static void halbtc8821a1ant_ignore_wlan_act(struct btc_coexist *btcoexist, in halbtc8821a1ant_ignore_wlan_act() argument
867 btc8821a1ant_set_fw_ignore_wlan_act(btcoexist, enable); in halbtc8821a1ant_ignore_wlan_act()
872 static void halbtc8821a1ant_set_fw_pstdma(struct btc_coexist *btcoexist, in halbtc8821a1ant_set_fw_pstdma() argument
897 btcoexist->btc_fill_h2c(btcoexist, 0x60, 5, h2c_parameter); in halbtc8821a1ant_set_fw_pstdma()
900 static void halbtc8821a1ant_set_lps_rpwm(struct btc_coexist *btcoexist, in halbtc8821a1ant_set_lps_rpwm() argument
906 btcoexist->btc_set(btcoexist, BTC_SET_U1_LPS_VAL, &lps); in halbtc8821a1ant_set_lps_rpwm()
907 btcoexist->btc_set(btcoexist, BTC_SET_U1_RPWM_VAL, &rpwm); in halbtc8821a1ant_set_lps_rpwm()
910 static void halbtc8821a1ant_lps_rpwm(struct btc_coexist *btcoexist, in halbtc8821a1ant_lps_rpwm() argument
933 halbtc8821a1ant_set_lps_rpwm(btcoexist, lps_val, rpwm_val); in halbtc8821a1ant_lps_rpwm()
939 static void halbtc8821a1ant_sw_mechanism(struct btc_coexist *btcoexist, in halbtc8821a1ant_sw_mechanism() argument
945 halbtc8821a1ant_low_penalty_ra(btcoexist, NORMAL_EXEC, low_penalty_ra); in halbtc8821a1ant_sw_mechanism()
948 static void halbtc8821a1ant_set_ant_path(struct btc_coexist *btcoexist, in halbtc8821a1ant_set_ant_path() argument
952 struct btc_board_info *board_info = &btcoexist->board_info; in halbtc8821a1ant_set_ant_path()
958 u4_tmp = btcoexist->btc_read_4byte(btcoexist, 0x4c); in halbtc8821a1ant_set_ant_path()
961 btcoexist->btc_write_4byte(btcoexist, 0x4c, u4_tmp); in halbtc8821a1ant_set_ant_path()
963 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x975, 0x3, 0x3); in halbtc8821a1ant_set_ant_path()
964 btcoexist->btc_write_1byte(btcoexist, 0xcb4, 0x77); in halbtc8821a1ant_set_ant_path()
972 btcoexist->btc_fill_h2c(btcoexist, 0x65, 2, in halbtc8821a1ant_set_ant_path()
975 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x64, in halbtc8821a1ant_set_ant_path()
983 btcoexist->btc_fill_h2c(btcoexist, 0x65, 2, in halbtc8821a1ant_set_ant_path()
986 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x64, in halbtc8821a1ant_set_ant_path()
993 u4_tmp = btcoexist->btc_read_4byte(btcoexist, 0x4c); in halbtc8821a1ant_set_ant_path()
996 btcoexist->btc_write_4byte(btcoexist, 0x4c, u4_tmp); in halbtc8821a1ant_set_ant_path()
1003 btcoexist->btc_write_1byte_bitmask(btcoexist, 0xcb7, in halbtc8821a1ant_set_ant_path()
1006 btcoexist->btc_write_1byte_bitmask(btcoexist, 0xcb7, in halbtc8821a1ant_set_ant_path()
1011 btcoexist->btc_write_1byte_bitmask(btcoexist, 0xcb7, in halbtc8821a1ant_set_ant_path()
1014 btcoexist->btc_write_1byte_bitmask(btcoexist, 0xcb7, in halbtc8821a1ant_set_ant_path()
1020 btcoexist->btc_write_1byte_bitmask(btcoexist, 0xcb7, in halbtc8821a1ant_set_ant_path()
1023 btcoexist->btc_write_1byte_bitmask(btcoexist, 0xcb7, in halbtc8821a1ant_set_ant_path()
1029 static void halbtc8821a1ant_ps_tdma(struct btc_coexist *btcoexist, in halbtc8821a1ant_ps_tdma() argument
1054 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0x51, 0x1a, in halbtc8821a1ant_ps_tdma()
1058 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0x51, 0x3a, in halbtc8821a1ant_ps_tdma()
1063 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0x51, 0x2b, in halbtc8821a1ant_ps_tdma()
1068 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0x51, 0x1d, in halbtc8821a1ant_ps_tdma()
1072 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0x93, 0x15, in halbtc8821a1ant_ps_tdma()
1077 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0x61, 0x15, in halbtc8821a1ant_ps_tdma()
1081 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0x13, 0xa, in halbtc8821a1ant_ps_tdma()
1085 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0x13, 0xc, in halbtc8821a1ant_ps_tdma()
1089 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0x93, 0x25, in halbtc8821a1ant_ps_tdma()
1093 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0x51, 0x21, in halbtc8821a1ant_ps_tdma()
1098 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0x13, 0xa, in halbtc8821a1ant_ps_tdma()
1102 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0x51, 0x14, in halbtc8821a1ant_ps_tdma()
1107 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0x51, 0x0a, in halbtc8821a1ant_ps_tdma()
1111 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0x51, 0x18, in halbtc8821a1ant_ps_tdma()
1115 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0x51, 0x21, in halbtc8821a1ant_ps_tdma()
1119 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0x13, 0xa, in halbtc8821a1ant_ps_tdma()
1123 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0x93, 0x15, in halbtc8821a1ant_ps_tdma()
1128 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0x93, 0x25, in halbtc8821a1ant_ps_tdma()
1133 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0x61, 0x35, in halbtc8821a1ant_ps_tdma()
1137 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0x61, 0x15, in halbtc8821a1ant_ps_tdma()
1141 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0x61, 0x25, in halbtc8821a1ant_ps_tdma()
1145 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0xe3, 0x25, in halbtc8821a1ant_ps_tdma()
1150 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0xe3, 0x15, in halbtc8821a1ant_ps_tdma()
1155 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0xe3, 0xa, in halbtc8821a1ant_ps_tdma()
1160 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0xe3, 0xa, in halbtc8821a1ant_ps_tdma()
1165 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0xe3, 0x25, in halbtc8821a1ant_ps_tdma()
1170 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0x69, 0x25, in halbtc8821a1ant_ps_tdma()
1174 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0xab, 0x1a, in halbtc8821a1ant_ps_tdma()
1178 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0x51, 0x14, in halbtc8821a1ant_ps_tdma()
1182 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0xd3, 0x1a, in halbtc8821a1ant_ps_tdma()
1186 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0x61, 0xa, in halbtc8821a1ant_ps_tdma()
1190 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0xa3, 0x25, in halbtc8821a1ant_ps_tdma()
1194 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0x53, 0x1a, in halbtc8821a1ant_ps_tdma()
1198 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0x63, 0x1a, in halbtc8821a1ant_ps_tdma()
1202 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0xd3, 0x12, in halbtc8821a1ant_ps_tdma()
1210 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0x8, 0x0, 0x0, in halbtc8821a1ant_ps_tdma()
1212 halbtc8821a1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, in halbtc8821a1ant_ps_tdma()
1217 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0x0, 0x0, 0x0, in halbtc8821a1ant_ps_tdma()
1219 halbtc8821a1ant_set_ant_path(btcoexist, BTC_ANT_PATH_BT, in halbtc8821a1ant_ps_tdma()
1223 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0x0, 0x0, 0x0, in halbtc8821a1ant_ps_tdma()
1225 halbtc8821a1ant_set_ant_path(btcoexist, BTC_ANT_PATH_WIFI, in halbtc8821a1ant_ps_tdma()
1229 halbtc8821a1ant_set_fw_pstdma(btcoexist, 0x0, 0x0, 0x0, in halbtc8821a1ant_ps_tdma()
1231 halbtc8821a1ant_set_ant_path(btcoexist, BTC_ANT_PATH_BT, in halbtc8821a1ant_ps_tdma()
1237 btcoexist->btc_set(btcoexist, in halbtc8821a1ant_ps_tdma()
1245 static bool halbtc8821a1ant_is_common_action(struct btc_coexist *btcoexist) in halbtc8821a1ant_is_common_action() argument
1249 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_CONNECTED, in halbtc8821a1ant_is_common_action()
1251 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in halbtc8821a1ant_is_common_action()
1258 halbtc8821a1ant_sw_mechanism(btcoexist, false); in halbtc8821a1ant_is_common_action()
1266 halbtc8821a1ant_sw_mechanism(btcoexist, false); in halbtc8821a1ant_is_common_action()
1274 halbtc8821a1ant_sw_mechanism(btcoexist, false); in halbtc8821a1ant_is_common_action()
1282 halbtc8821a1ant_sw_mechanism(btcoexist, false); in halbtc8821a1ant_is_common_action()
1290 halbtc8821a1ant_sw_mechanism(btcoexist, false); in halbtc8821a1ant_is_common_action()
1308 static void btc8821a1ant_tdma_dur_adj(struct btc_coexist *btcoexist, in btc8821a1ant_tdma_dur_adj() argument
1329 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8821a1ant_tdma_dur_adj()
1348 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 2); in btc8821a1ant_tdma_dur_adj()
1444 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8821a1ant_tdma_dur_adj()
1448 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8821a1ant_tdma_dur_adj()
1452 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8821a1ant_tdma_dur_adj()
1456 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8821a1ant_tdma_dur_adj()
1464 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8821a1ant_tdma_dur_adj()
1468 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8821a1ant_tdma_dur_adj()
1472 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8821a1ant_tdma_dur_adj()
1476 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8821a1ant_tdma_dur_adj()
1492 halbtc8821a1ant_ps_tdma(btcoexist, in btc8821a1ant_tdma_dur_adj()
1525 static void halbtc8821a1ant_power_save_state(struct btc_coexist *btcoexist, in halbtc8821a1ant_power_save_state() argument
1535 btcoexist->btc_set(btcoexist, BTC_SET_ACT_DISABLE_LOW_POWER, in halbtc8821a1ant_power_save_state()
1537 btcoexist->btc_set(btcoexist, BTC_SET_ACT_NORMAL_LPS, NULL); in halbtc8821a1ant_power_save_state()
1540 btc8821a1ant_ps_tdma_check_for_pwr_save(btcoexist, in halbtc8821a1ant_power_save_state()
1542 halbtc8821a1ant_lps_rpwm(btcoexist, in halbtc8821a1ant_power_save_state()
1546 btcoexist->btc_set(btcoexist, BTC_SET_ACT_DISABLE_LOW_POWER, in halbtc8821a1ant_power_save_state()
1549 btcoexist->btc_set(btcoexist, BTC_SET_ACT_ENTER_LPS, NULL); in halbtc8821a1ant_power_save_state()
1552 btc8821a1ant_ps_tdma_check_for_pwr_save(btcoexist, false); in halbtc8821a1ant_power_save_state()
1553 btcoexist->btc_set(btcoexist, BTC_SET_ACT_LEAVE_LPS, NULL); in halbtc8821a1ant_power_save_state()
1560 static void halbtc8821a1ant_coex_under_5g(struct btc_coexist *btcoexist) in halbtc8821a1ant_coex_under_5g() argument
1562 halbtc8821a1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in halbtc8821a1ant_coex_under_5g()
1564 halbtc8821a1ant_ignore_wlan_act(btcoexist, NORMAL_EXEC, true); in halbtc8821a1ant_coex_under_5g()
1566 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 10); in halbtc8821a1ant_coex_under_5g()
1568 halbtc8821a1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in halbtc8821a1ant_coex_under_5g()
1570 halbtc8821a1ant_limited_tx(btcoexist, NORMAL_EXEC, 0, 0, 0, 0); in halbtc8821a1ant_coex_under_5g()
1572 halbtc8821a1ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 5); in halbtc8821a1ant_coex_under_5g()
1575 static void halbtc8821a1ant_action_wifi_only(struct btc_coexist *btcoexist) in halbtc8821a1ant_action_wifi_only() argument
1577 halbtc8821a1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in halbtc8821a1ant_action_wifi_only()
1578 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 9); in halbtc8821a1ant_action_wifi_only()
1581 static void btc8821a1ant_mon_bt_en_dis(struct btc_coexist *btcoexist) in btc8821a1ant_mon_bt_en_dis() argument
1604 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_DISABLE, in btc8821a1ant_mon_bt_en_dis()
1615 btcoexist->btc_set(btcoexist, BTC_SET_BL_BT_DISABLE, in btc8821a1ant_mon_bt_en_dis()
1619 halbtc8821a1ant_action_wifi_only(btcoexist); in btc8821a1ant_mon_bt_en_dis()
1629 btcoexist->btc_set(btcoexist, BTC_SET_ACT_LEAVE_LPS, in btc8821a1ant_mon_bt_en_dis()
1631 btcoexist->btc_set(btcoexist, BTC_SET_ACT_NORMAL_LPS, in btc8821a1ant_mon_bt_en_dis()
1644 static void halbtc8821a1ant_action_sco(struct btc_coexist *btcoexist) in halbtc8821a1ant_action_sco() argument
1646 halbtc8821a1ant_sw_mechanism(btcoexist, true); in halbtc8821a1ant_action_sco()
1649 static void halbtc8821a1ant_action_hid(struct btc_coexist *btcoexist) in halbtc8821a1ant_action_hid() argument
1651 halbtc8821a1ant_sw_mechanism(btcoexist, true); in halbtc8821a1ant_action_hid()
1655 static void halbtc8821a1ant_action_a2dp(struct btc_coexist *btcoexist) in halbtc8821a1ant_action_a2dp() argument
1657 halbtc8821a1ant_sw_mechanism(btcoexist, false); in halbtc8821a1ant_action_a2dp()
1660 static void halbtc8821a1ant_action_a2dp_pan_hs(struct btc_coexist *btcoexist) in halbtc8821a1ant_action_a2dp_pan_hs() argument
1662 halbtc8821a1ant_sw_mechanism(btcoexist, false); in halbtc8821a1ant_action_a2dp_pan_hs()
1665 static void halbtc8821a1ant_action_pan_edr(struct btc_coexist *btcoexist) in halbtc8821a1ant_action_pan_edr() argument
1667 halbtc8821a1ant_sw_mechanism(btcoexist, false); in halbtc8821a1ant_action_pan_edr()
1671 static void halbtc8821a1ant_action_pan_hs(struct btc_coexist *btcoexist) in halbtc8821a1ant_action_pan_hs() argument
1673 halbtc8821a1ant_sw_mechanism(btcoexist, false); in halbtc8821a1ant_action_pan_hs()
1677 static void halbtc8821a1ant_action_pan_edr_a2dp(struct btc_coexist *btcoexist) in halbtc8821a1ant_action_pan_edr_a2dp() argument
1679 halbtc8821a1ant_sw_mechanism(btcoexist, false); in halbtc8821a1ant_action_pan_edr_a2dp()
1682 static void halbtc8821a1ant_action_pan_edr_hid(struct btc_coexist *btcoexist) in halbtc8821a1ant_action_pan_edr_hid() argument
1684 halbtc8821a1ant_sw_mechanism(btcoexist, true); in halbtc8821a1ant_action_pan_edr_hid()
1688 static void btc8821a1ant_action_hid_a2dp_pan_edr(struct btc_coexist *btcoexist) in btc8821a1ant_action_hid_a2dp_pan_edr() argument
1690 halbtc8821a1ant_sw_mechanism(btcoexist, true); in btc8821a1ant_action_hid_a2dp_pan_edr()
1693 static void halbtc8821a1ant_action_hid_a2dp(struct btc_coexist *btcoexist) in halbtc8821a1ant_action_hid_a2dp() argument
1695 halbtc8821a1ant_sw_mechanism(btcoexist, true); in halbtc8821a1ant_action_hid_a2dp()
1704 static void halbtc8821a1ant_action_hs(struct btc_coexist *btcoexist) in halbtc8821a1ant_action_hs() argument
1706 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 5); in halbtc8821a1ant_action_hs()
1707 halbtc8821a1ant_coex_table_with_type(btcoexist, FORCE_EXEC, 2); in halbtc8821a1ant_action_hs()
1710 static void halbtc8821a1ant_action_bt_inquiry(struct btc_coexist *btcoexist) in halbtc8821a1ant_action_bt_inquiry() argument
1712 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in halbtc8821a1ant_action_bt_inquiry()
1715 btcoexist->btc_get(btcoexist, in halbtc8821a1ant_action_bt_inquiry()
1719 halbtc8821a1ant_power_save_state(btcoexist, in halbtc8821a1ant_action_bt_inquiry()
1721 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 5); in halbtc8821a1ant_action_bt_inquiry()
1722 halbtc8821a1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 1); in halbtc8821a1ant_action_bt_inquiry()
1726 halbtc8821a1ant_power_save_state(btcoexist, in halbtc8821a1ant_action_bt_inquiry()
1728 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 32); in halbtc8821a1ant_action_bt_inquiry()
1729 halbtc8821a1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 1); in halbtc8821a1ant_action_bt_inquiry()
1731 halbtc8821a1ant_power_save_state(btcoexist, BTC_PS_LPS_ON, in halbtc8821a1ant_action_bt_inquiry()
1733 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 30); in halbtc8821a1ant_action_bt_inquiry()
1734 halbtc8821a1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 1); in halbtc8821a1ant_action_bt_inquiry()
1738 static void btc8821a1ant_act_bt_sco_hid_only_busy(struct btc_coexist *btcoexist, in btc8821a1ant_act_bt_sco_hid_only_busy() argument
1741 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 5); in btc8821a1ant_act_bt_sco_hid_only_busy()
1745 halbtc8821a1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 1); in btc8821a1ant_act_bt_sco_hid_only_busy()
1747 halbtc8821a1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 1); in btc8821a1ant_act_bt_sco_hid_only_busy()
1750 static void btc8821a1ant_act_wifi_con_bt_acl_busy(struct btc_coexist *btcoexist, in btc8821a1ant_act_wifi_con_bt_acl_busy() argument
1755 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8821a1ant_act_wifi_con_bt_acl_busy()
1761 btc8821a1ant_act_bt_sco_hid_only_busy(btcoexist, in btc8821a1ant_act_wifi_con_bt_acl_busy()
1769 btc8821a1ant_tdma_dur_adj(btcoexist, wifi_status); in btc8821a1ant_act_wifi_con_bt_acl_busy()
1772 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8821a1ant_act_wifi_con_bt_acl_busy()
1777 halbtc8821a1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 1); in btc8821a1ant_act_wifi_con_bt_acl_busy()
1782 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8821a1ant_act_wifi_con_bt_acl_busy()
1787 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8821a1ant_act_wifi_con_bt_acl_busy()
1792 halbtc8821a1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 1); in btc8821a1ant_act_wifi_con_bt_acl_busy()
1796 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 3); in btc8821a1ant_act_wifi_con_bt_acl_busy()
1797 halbtc8821a1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 1); in btc8821a1ant_act_wifi_con_bt_acl_busy()
1803 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 13); in btc8821a1ant_act_wifi_con_bt_acl_busy()
1804 halbtc8821a1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 1); in btc8821a1ant_act_wifi_con_bt_acl_busy()
1807 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 11); in btc8821a1ant_act_wifi_con_bt_acl_busy()
1808 halbtc8821a1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 1); in btc8821a1ant_act_wifi_con_bt_acl_busy()
1814 struct btc_coexist *btcoexist) in halbtc8821a1ant_action_wifi_not_connected() argument
1817 halbtc8821a1ant_power_save_state(btcoexist, in halbtc8821a1ant_action_wifi_not_connected()
1821 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 8); in halbtc8821a1ant_action_wifi_not_connected()
1822 halbtc8821a1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in halbtc8821a1ant_action_wifi_not_connected()
1825 static void btc8821a1ant_act_wifi_not_conn_scan(struct btc_coexist *btcoexist) in btc8821a1ant_act_wifi_not_conn_scan() argument
1827 halbtc8821a1ant_power_save_state(btcoexist, in btc8821a1ant_act_wifi_not_conn_scan()
1830 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 22); in btc8821a1ant_act_wifi_not_conn_scan()
1831 halbtc8821a1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 1); in btc8821a1ant_act_wifi_not_conn_scan()
1835 struct btc_coexist *btcoexist) { in halbtc8821a1ant_action_wifi_connected_scan() argument
1836 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in halbtc8821a1ant_action_wifi_connected_scan()
1839 halbtc8821a1ant_power_save_state(btcoexist, in halbtc8821a1ant_action_wifi_connected_scan()
1845 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, in halbtc8821a1ant_action_wifi_connected_scan()
1847 halbtc8821a1ant_coex_table_with_type(btcoexist, in halbtc8821a1ant_action_wifi_connected_scan()
1850 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 20); in halbtc8821a1ant_action_wifi_connected_scan()
1851 halbtc8821a1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 1); in halbtc8821a1ant_action_wifi_connected_scan()
1857 btc8821a1ant_act_bt_sco_hid_only_busy(btcoexist, in halbtc8821a1ant_action_wifi_connected_scan()
1860 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 20); in halbtc8821a1ant_action_wifi_connected_scan()
1861 halbtc8821a1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 1); in halbtc8821a1ant_action_wifi_connected_scan()
1865 static void btc8821a1ant_act_wifi_conn_sp_pkt(struct btc_coexist *btcoexist) in btc8821a1ant_act_wifi_conn_sp_pkt() argument
1867 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in btc8821a1ant_act_wifi_conn_sp_pkt()
1870 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_CONNECTING, &hs_connecting); in btc8821a1ant_act_wifi_conn_sp_pkt()
1872 halbtc8821a1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in btc8821a1ant_act_wifi_conn_sp_pkt()
1878 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8821a1ant_act_wifi_conn_sp_pkt()
1880 halbtc8821a1ant_coex_table_with_type(btcoexist, in btc8821a1ant_act_wifi_conn_sp_pkt()
1883 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, in btc8821a1ant_act_wifi_conn_sp_pkt()
1885 halbtc8821a1ant_coex_table_with_type(btcoexist, in btc8821a1ant_act_wifi_conn_sp_pkt()
1889 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 20); in btc8821a1ant_act_wifi_conn_sp_pkt()
1890 halbtc8821a1ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 1); in btc8821a1ant_act_wifi_conn_sp_pkt()
1894 static void halbtc8821a1ant_action_wifi_connected(struct btc_coexist *btcoexist) in halbtc8821a1ant_action_wifi_connected() argument
1903 btcoexist->btc_get(btcoexist, in halbtc8821a1ant_action_wifi_connected()
1906 btc8821a1ant_act_wifi_conn_sp_pkt(btcoexist); in halbtc8821a1ant_action_wifi_connected()
1912 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_SCAN, &scan); in halbtc8821a1ant_action_wifi_connected()
1913 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_LINK, &link); in halbtc8821a1ant_action_wifi_connected()
1914 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_ROAM, &roam); in halbtc8821a1ant_action_wifi_connected()
1916 halbtc8821a1ant_action_wifi_connected_scan(btcoexist); in halbtc8821a1ant_action_wifi_connected()
1924 coex_dm->bt_status && !btcoexist->bt_link_info.hid_only) in halbtc8821a1ant_action_wifi_connected()
1925 halbtc8821a1ant_power_save_state(btcoexist, in halbtc8821a1ant_action_wifi_connected()
1928 halbtc8821a1ant_power_save_state(btcoexist, in halbtc8821a1ant_action_wifi_connected()
1933 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, &wifi_busy); in halbtc8821a1ant_action_wifi_connected()
1936 btc8821a1ant_act_wifi_con_bt_acl_busy(btcoexist, in halbtc8821a1ant_action_wifi_connected()
1942 btc8821a1ant_act_bt_sco_hid_only_busy(btcoexist, in halbtc8821a1ant_action_wifi_connected()
1945 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, in halbtc8821a1ant_action_wifi_connected()
1947 halbtc8821a1ant_coex_table_with_type(btcoexist, in halbtc8821a1ant_action_wifi_connected()
1952 btc8821a1ant_act_wifi_con_bt_acl_busy(btcoexist, in halbtc8821a1ant_action_wifi_connected()
1958 btc8821a1ant_act_bt_sco_hid_only_busy(btcoexist, in halbtc8821a1ant_action_wifi_connected()
1961 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, in halbtc8821a1ant_action_wifi_connected()
1963 halbtc8821a1ant_coex_table_with_type(btcoexist, in halbtc8821a1ant_action_wifi_connected()
1969 static void btc8821a1ant_run_sw_coex_mech(struct btc_coexist *btcoexist) in btc8821a1ant_run_sw_coex_mech() argument
1973 algorithm = halbtc8821a1ant_action_algorithm(btcoexist); in btc8821a1ant_run_sw_coex_mech()
1976 if (!halbtc8821a1ant_is_common_action(btcoexist)) { in btc8821a1ant_run_sw_coex_mech()
1981 halbtc8821a1ant_action_sco(btcoexist); in btc8821a1ant_run_sw_coex_mech()
1986 halbtc8821a1ant_action_hid(btcoexist); in btc8821a1ant_run_sw_coex_mech()
1991 halbtc8821a1ant_action_a2dp(btcoexist); in btc8821a1ant_run_sw_coex_mech()
1996 halbtc8821a1ant_action_a2dp_pan_hs(btcoexist); in btc8821a1ant_run_sw_coex_mech()
2001 halbtc8821a1ant_action_pan_edr(btcoexist); in btc8821a1ant_run_sw_coex_mech()
2006 halbtc8821a1ant_action_pan_hs(btcoexist); in btc8821a1ant_run_sw_coex_mech()
2011 halbtc8821a1ant_action_pan_edr_a2dp(btcoexist); in btc8821a1ant_run_sw_coex_mech()
2016 halbtc8821a1ant_action_pan_edr_hid(btcoexist); in btc8821a1ant_run_sw_coex_mech()
2021 btc8821a1ant_action_hid_a2dp_pan_edr(btcoexist); in btc8821a1ant_run_sw_coex_mech()
2026 halbtc8821a1ant_action_hid_a2dp(btcoexist); in btc8821a1ant_run_sw_coex_mech()
2038 static void halbtc8821a1ant_run_coexist_mechanism(struct btc_coexist *btcoexist) in halbtc8821a1ant_run_coexist_mechanism() argument
2040 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in halbtc8821a1ant_run_coexist_mechanism()
2051 if (btcoexist->manual_control) { in halbtc8821a1ant_run_coexist_mechanism()
2057 if (btcoexist->stop_coex_dm) { in halbtc8821a1ant_run_coexist_mechanism()
2069 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_UNDER_5G, &wifi_under_5g); in halbtc8821a1ant_run_coexist_mechanism()
2073 halbtc8821a1ant_coex_under_5g(btcoexist); in halbtc8821a1ant_run_coexist_mechanism()
2082 btcoexist->btc_set(btcoexist, BTC_SET_BL_INC_SCAN_DEV_NUM, in halbtc8821a1ant_run_coexist_mechanism()
2085 btcoexist->btc_get(btcoexist, in halbtc8821a1ant_run_coexist_mechanism()
2089 halbtc8821a1ant_limited_tx(btcoexist, NORMAL_EXEC, 0, 0, 0, 0); in halbtc8821a1ant_run_coexist_mechanism()
2093 halbtc8821a1ant_WifiRssiState(btcoexist, 1, 2, in halbtc8821a1ant_run_coexist_mechanism()
2097 halbtc8821a1ant_limited_tx(btcoexist, in halbtc8821a1ant_run_coexist_mechanism()
2101 halbtc8821a1ant_limited_tx(btcoexist, in halbtc8821a1ant_run_coexist_mechanism()
2106 halbtc8821a1ant_limited_tx(btcoexist, NORMAL_EXEC, in halbtc8821a1ant_run_coexist_mechanism()
2121 halbtc8821a1ant_limited_rx(btcoexist, NORMAL_EXEC, false, in halbtc8821a1ant_run_coexist_mechanism()
2124 btc8821a1ant_run_sw_coex_mech(btcoexist); in halbtc8821a1ant_run_coexist_mechanism()
2126 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in halbtc8821a1ant_run_coexist_mechanism()
2128 halbtc8821a1ant_action_bt_inquiry(btcoexist); in halbtc8821a1ant_run_coexist_mechanism()
2131 halbtc8821a1ant_action_hs(btcoexist); in halbtc8821a1ant_run_coexist_mechanism()
2141 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_SCAN, &scan); in halbtc8821a1ant_run_coexist_mechanism()
2142 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_LINK, &link); in halbtc8821a1ant_run_coexist_mechanism()
2143 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_ROAM, &roam); in halbtc8821a1ant_run_coexist_mechanism()
2146 btc8821a1ant_act_wifi_not_conn_scan(btcoexist); in halbtc8821a1ant_run_coexist_mechanism()
2148 halbtc8821a1ant_action_wifi_not_connected(btcoexist); in halbtc8821a1ant_run_coexist_mechanism()
2151 halbtc8821a1ant_action_wifi_connected(btcoexist); in halbtc8821a1ant_run_coexist_mechanism()
2155 static void halbtc8821a1ant_init_coex_dm(struct btc_coexist *btcoexist) in halbtc8821a1ant_init_coex_dm() argument
2159 halbtc8821a1ant_sw_mechanism(btcoexist, false); in halbtc8821a1ant_init_coex_dm()
2161 halbtc8821a1ant_ps_tdma(btcoexist, FORCE_EXEC, false, 8); in halbtc8821a1ant_init_coex_dm()
2162 halbtc8821a1ant_coex_table_with_type(btcoexist, FORCE_EXEC, 0); in halbtc8821a1ant_init_coex_dm()
2165 static void halbtc8821a1ant_init_hw_config(struct btc_coexist *btcoexist, in halbtc8821a1ant_init_hw_config() argument
2175 coex_dm->backup_arfr_cnt1 = btcoexist->btc_read_4byte(btcoexist, in halbtc8821a1ant_init_hw_config()
2177 coex_dm->backup_arfr_cnt2 = btcoexist->btc_read_4byte(btcoexist, in halbtc8821a1ant_init_hw_config()
2180 btcoexist->btc_read_2byte(btcoexist, 0x42a); in halbtc8821a1ant_init_hw_config()
2182 btcoexist->btc_read_1byte(btcoexist, 0x456); in halbtc8821a1ant_init_hw_config()
2186 u1_tmp = btcoexist->btc_read_1byte(btcoexist, 0x790); in halbtc8821a1ant_init_hw_config()
2189 btcoexist->btc_write_1byte(btcoexist, 0x790, u1_tmp); in halbtc8821a1ant_init_hw_config()
2191 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_UNDER_5G, &wifi_under_5g); in halbtc8821a1ant_init_hw_config()
2195 halbtc8821a1ant_set_ant_path(btcoexist, BTC_ANT_PATH_BT, in halbtc8821a1ant_init_hw_config()
2198 halbtc8821a1ant_set_ant_path(btcoexist, BTC_ANT_PATH_PTA, in halbtc8821a1ant_init_hw_config()
2201 halbtc8821a1ant_coex_table_with_type(btcoexist, FORCE_EXEC, 0); in halbtc8821a1ant_init_hw_config()
2205 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0xc); in halbtc8821a1ant_init_hw_config()
2206 btcoexist->btc_write_1byte(btcoexist, 0x778, 0x3); in halbtc8821a1ant_init_hw_config()
2207 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x40, 0x20, 0x1); in halbtc8821a1ant_init_hw_config()
2216 void ex_halbtc8821a1ant_init_hwconfig(struct btc_coexist *btcoexist) in ex_halbtc8821a1ant_init_hwconfig() argument
2218 halbtc8821a1ant_init_hw_config(btcoexist, true); in ex_halbtc8821a1ant_init_hwconfig()
2221 void ex_halbtc8821a1ant_init_coex_dm(struct btc_coexist *btcoexist) in ex_halbtc8821a1ant_init_coex_dm() argument
2226 btcoexist->stop_coex_dm = false; in ex_halbtc8821a1ant_init_coex_dm()
2228 halbtc8821a1ant_init_coex_dm(btcoexist); in ex_halbtc8821a1ant_init_coex_dm()
2230 halbtc8821a1ant_query_bt_info(btcoexist); in ex_halbtc8821a1ant_init_coex_dm()
2233 void ex_halbtc8821a1ant_display_coex_info(struct btc_coexist *btcoexist) in ex_halbtc8821a1ant_display_coex_info() argument
2235 struct btc_board_info *board_info = &btcoexist->board_info; in ex_halbtc8821a1ant_display_coex_info()
2236 struct btc_stack_info *stack_info = &btcoexist->stack_info; in ex_halbtc8821a1ant_display_coex_info()
2237 struct btc_bt_link_info *bt_link_info = &btcoexist->bt_link_info; in ex_halbtc8821a1ant_display_coex_info()
2238 struct rtl_priv *rtlpriv = btcoexist->adapter; in ex_halbtc8821a1ant_display_coex_info()
2252 if (btcoexist->manual_control) { in ex_halbtc8821a1ant_display_coex_info()
2258 if (btcoexist->stop_coex_dm) { in ex_halbtc8821a1ant_display_coex_info()
2282 btcoexist->btc_get(btcoexist, BTC_GET_U4_BT_PATCH_VER, in ex_halbtc8821a1ant_display_coex_info()
2284 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_FW_VER, &fw_ver); in ex_halbtc8821a1ant_display_coex_info()
2293 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, in ex_halbtc8821a1ant_display_coex_info()
2295 btcoexist->btc_get(btcoexist, BTC_GET_U1_WIFI_DOT11_CHNL, in ex_halbtc8821a1ant_display_coex_info()
2297 btcoexist->btc_get(btcoexist, BTC_GET_U1_WIFI_HS_CHNL, in ex_halbtc8821a1ant_display_coex_info()
2310 btcoexist->btc_get(btcoexist, BTC_GET_S4_WIFI_RSSI, &wifi_rssi); in ex_halbtc8821a1ant_display_coex_info()
2311 btcoexist->btc_get(btcoexist, BTC_GET_S4_HS_RSSI, &bt_hs_rssi); in ex_halbtc8821a1ant_display_coex_info()
2316 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_SCAN, &scan); in ex_halbtc8821a1ant_display_coex_info()
2317 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_LINK, &link); in ex_halbtc8821a1ant_display_coex_info()
2318 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_ROAM, &roam); in ex_halbtc8821a1ant_display_coex_info()
2323 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_UNDER_5G, in ex_halbtc8821a1ant_display_coex_info()
2325 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, in ex_halbtc8821a1ant_display_coex_info()
2327 btcoexist->btc_get(btcoexist, BTC_GET_BL_WIFI_BUSY, in ex_halbtc8821a1ant_display_coex_info()
2329 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_TRAFFIC_DIRECTION, in ex_halbtc8821a1ant_display_coex_info()
2341 ((btcoexist->bt_info.bt_disabled) ? ("disabled") : in ex_halbtc8821a1ant_display_coex_info()
2357 btcoexist->btc_disp_dbg_msg(btcoexist, BTC_DBG_DISP_BT_LINK_INFO); in ex_halbtc8821a1ant_display_coex_info()
2386 btcoexist->bt_info.lps_val, in ex_halbtc8821a1ant_display_coex_info()
2387 btcoexist->bt_info.rpwm_val); in ex_halbtc8821a1ant_display_coex_info()
2388 btcoexist->btc_disp_dbg_msg(btcoexist, BTC_DBG_DISP_FW_PWR_MODE_CMD); in ex_halbtc8821a1ant_display_coex_info()
2390 if (!btcoexist->manual_control) { in ex_halbtc8821a1ant_display_coex_info()
2402 (btcoexist->bt_info.reject_agg_pkt ? "Yes" : "No"), in ex_halbtc8821a1ant_display_coex_info()
2403 (btcoexist->bt_info.bt_ctrl_buf_size ? "Yes" : "No"), in ex_halbtc8821a1ant_display_coex_info()
2404 btcoexist->bt_info.agg_buf_size); in ex_halbtc8821a1ant_display_coex_info()
2407 btcoexist->bt_info.ra_mask); in ex_halbtc8821a1ant_display_coex_info()
2447 u4_tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x430); in ex_halbtc8821a1ant_display_coex_info()
2448 u4_tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0x434); in ex_halbtc8821a1ant_display_coex_info()
2449 u2_tmp[0] = btcoexist->btc_read_2byte(btcoexist, 0x42a); in ex_halbtc8821a1ant_display_coex_info()
2450 u1_tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x456); in ex_halbtc8821a1ant_display_coex_info()
2456 u1_tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x778); in ex_halbtc8821a1ant_display_coex_info()
2457 u4_tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0xc58); in ex_halbtc8821a1ant_display_coex_info()
2462 u1_tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x8db); in ex_halbtc8821a1ant_display_coex_info()
2467 u1_tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x975); in ex_halbtc8821a1ant_display_coex_info()
2468 u4_tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0xcb4); in ex_halbtc8821a1ant_display_coex_info()
2476 u1_tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x40); in ex_halbtc8821a1ant_display_coex_info()
2477 u4_tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x4c); in ex_halbtc8821a1ant_display_coex_info()
2478 u1_tmp[1] = btcoexist->btc_read_1byte(btcoexist, 0x64); in ex_halbtc8821a1ant_display_coex_info()
2484 u4_tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x550); in ex_halbtc8821a1ant_display_coex_info()
2485 u1_tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x522); in ex_halbtc8821a1ant_display_coex_info()
2490 u4_tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0xc50); in ex_halbtc8821a1ant_display_coex_info()
2495 u4_tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0xf48); in ex_halbtc8821a1ant_display_coex_info()
2496 u1_tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0xa5d); in ex_halbtc8821a1ant_display_coex_info()
2497 u1_tmp[1] = btcoexist->btc_read_1byte(btcoexist, 0xa5c); in ex_halbtc8821a1ant_display_coex_info()
2502 u4_tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x6c0); in ex_halbtc8821a1ant_display_coex_info()
2503 u4_tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0x6c4); in ex_halbtc8821a1ant_display_coex_info()
2504 u4_tmp[2] = btcoexist->btc_read_4byte(btcoexist, 0x6c8); in ex_halbtc8821a1ant_display_coex_info()
2505 u1_tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x6cc); in ex_halbtc8821a1ant_display_coex_info()
2518 halbtc8821a1ant_monitor_bt_ctr(btcoexist); in ex_halbtc8821a1ant_display_coex_info()
2520 btcoexist->btc_disp_dbg_msg(btcoexist, BTC_DBG_DISP_COEX_STATISTICS); in ex_halbtc8821a1ant_display_coex_info()
2523 void ex_halbtc8821a1ant_ips_notify(struct btc_coexist *btcoexist, u8 type) in ex_halbtc8821a1ant_ips_notify() argument
2525 if (btcoexist->manual_control || btcoexist->stop_coex_dm) in ex_halbtc8821a1ant_ips_notify()
2532 halbtc8821a1ant_set_ant_path(btcoexist, in ex_halbtc8821a1ant_ips_notify()
2535 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 8); in ex_halbtc8821a1ant_ips_notify()
2536 halbtc8821a1ant_coex_table_with_type(btcoexist, in ex_halbtc8821a1ant_ips_notify()
2543 halbtc8821a1ant_run_coexist_mechanism(btcoexist); in ex_halbtc8821a1ant_ips_notify()
2547 void ex_halbtc8821a1ant_lps_notify(struct btc_coexist *btcoexist, u8 type) in ex_halbtc8821a1ant_lps_notify() argument
2549 if (btcoexist->manual_control || btcoexist->stop_coex_dm) in ex_halbtc8821a1ant_lps_notify()
2563 void ex_halbtc8821a1ant_scan_notify(struct btc_coexist *btcoexist, u8 type) in ex_halbtc8821a1ant_scan_notify() argument
2567 if (btcoexist->manual_control || in ex_halbtc8821a1ant_scan_notify()
2568 btcoexist->stop_coex_dm || in ex_halbtc8821a1ant_scan_notify()
2569 btcoexist->bt_info.bt_disabled) in ex_halbtc8821a1ant_scan_notify()
2572 btcoexist->btc_get(btcoexist, in ex_halbtc8821a1ant_scan_notify()
2574 btcoexist->btc_get(btcoexist, in ex_halbtc8821a1ant_scan_notify()
2577 halbtc8821a1ant_query_bt_info(btcoexist); in ex_halbtc8821a1ant_scan_notify()
2580 halbtc8821a1ant_action_bt_inquiry(btcoexist); in ex_halbtc8821a1ant_scan_notify()
2583 halbtc8821a1ant_action_hs(btcoexist); in ex_halbtc8821a1ant_scan_notify()
2592 btc8821a1ant_act_wifi_not_conn_scan(btcoexist); in ex_halbtc8821a1ant_scan_notify()
2595 halbtc8821a1ant_action_wifi_connected_scan(btcoexist); in ex_halbtc8821a1ant_scan_notify()
2602 halbtc8821a1ant_action_wifi_not_connected(btcoexist); in ex_halbtc8821a1ant_scan_notify()
2604 halbtc8821a1ant_action_wifi_connected(btcoexist); in ex_halbtc8821a1ant_scan_notify()
2609 void ex_halbtc8821a1ant_connect_notify(struct btc_coexist *btcoexist, u8 type) in ex_halbtc8821a1ant_connect_notify() argument
2613 if (btcoexist->manual_control || in ex_halbtc8821a1ant_connect_notify()
2614 btcoexist->stop_coex_dm || in ex_halbtc8821a1ant_connect_notify()
2615 btcoexist->bt_info.bt_disabled) in ex_halbtc8821a1ant_connect_notify()
2618 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in ex_halbtc8821a1ant_connect_notify()
2620 halbtc8821a1ant_action_bt_inquiry(btcoexist); in ex_halbtc8821a1ant_connect_notify()
2623 halbtc8821a1ant_action_hs(btcoexist); in ex_halbtc8821a1ant_connect_notify()
2630 btc8821a1ant_act_wifi_not_conn_scan(btcoexist); in ex_halbtc8821a1ant_connect_notify()
2635 btcoexist->btc_get(btcoexist, in ex_halbtc8821a1ant_connect_notify()
2639 halbtc8821a1ant_action_wifi_not_connected(btcoexist); in ex_halbtc8821a1ant_connect_notify()
2641 halbtc8821a1ant_action_wifi_connected(btcoexist); in ex_halbtc8821a1ant_connect_notify()
2646 void ex_halbtc8821a1ant_media_status_notify(struct btc_coexist *btcoexist, in ex_halbtc8821a1ant_media_status_notify() argument
2653 if (btcoexist->manual_control || in ex_halbtc8821a1ant_media_status_notify()
2654 btcoexist->stop_coex_dm || in ex_halbtc8821a1ant_media_status_notify()
2655 btcoexist->bt_info.bt_disabled) in ex_halbtc8821a1ant_media_status_notify()
2667 btcoexist->btc_get(btcoexist, in ex_halbtc8821a1ant_media_status_notify()
2675 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_BW, &wifi_bw); in ex_halbtc8821a1ant_media_status_notify()
2690 btcoexist->btc_fill_h2c(btcoexist, 0x66, 3, h2c_parameter); in ex_halbtc8821a1ant_media_status_notify()
2693 void ex_halbtc8821a1ant_special_packet_notify(struct btc_coexist *btcoexist, in ex_halbtc8821a1ant_special_packet_notify() argument
2698 if (btcoexist->manual_control || in ex_halbtc8821a1ant_special_packet_notify()
2699 btcoexist->stop_coex_dm || in ex_halbtc8821a1ant_special_packet_notify()
2700 btcoexist->bt_info.bt_disabled) in ex_halbtc8821a1ant_special_packet_notify()
2705 btcoexist->btc_get(btcoexist, BTC_GET_BL_HS_OPERATION, &bt_hs_on); in ex_halbtc8821a1ant_special_packet_notify()
2707 halbtc8821a1ant_action_bt_inquiry(btcoexist); in ex_halbtc8821a1ant_special_packet_notify()
2710 halbtc8821a1ant_action_hs(btcoexist); in ex_halbtc8821a1ant_special_packet_notify()
2718 btc8821a1ant_act_wifi_conn_sp_pkt(btcoexist); in ex_halbtc8821a1ant_special_packet_notify()
2722 void ex_halbtc8821a1ant_bt_info_notify(struct btc_coexist *btcoexist, in ex_halbtc8821a1ant_bt_info_notify() argument
2733 btcoexist->btc_get(btcoexist, in ex_halbtc8821a1ant_bt_info_notify()
2772 btcoexist->btc_get(btcoexist, in ex_halbtc8821a1ant_bt_info_notify()
2776 ex_halbtc8821a1ant_media_status_notify(btcoexist, in ex_halbtc8821a1ant_bt_info_notify()
2779 ex_halbtc8821a1ant_media_status_notify(btcoexist, in ex_halbtc8821a1ant_bt_info_notify()
2785 if (!btcoexist->manual_control && in ex_halbtc8821a1ant_bt_info_notify()
2786 !btcoexist->stop_coex_dm) { in ex_halbtc8821a1ant_bt_info_notify()
2789 halbtc8821a1ant_ignore_wlan_act(btcoexist, in ex_halbtc8821a1ant_bt_info_notify()
2798 halbtc8821a1ant_bt_auto_report(btcoexist, in ex_halbtc8821a1ant_bt_info_notify()
2838 halbtc8821a1ant_update_bt_link_info(btcoexist); in ex_halbtc8821a1ant_bt_info_notify()
2872 btcoexist->btc_set(btcoexist, in ex_halbtc8821a1ant_bt_info_notify()
2875 halbtc8821a1ant_run_coexist_mechanism(btcoexist); in ex_halbtc8821a1ant_bt_info_notify()
2878 void ex_halbtc8821a1ant_halt_notify(struct btc_coexist *btcoexist) in ex_halbtc8821a1ant_halt_notify() argument
2883 btcoexist->stop_coex_dm = true; in ex_halbtc8821a1ant_halt_notify()
2885 halbtc8821a1ant_set_ant_path(btcoexist, in ex_halbtc8821a1ant_halt_notify()
2887 halbtc8821a1ant_ignore_wlan_act(btcoexist, FORCE_EXEC, true); in ex_halbtc8821a1ant_halt_notify()
2889 halbtc8821a1ant_power_save_state(btcoexist, in ex_halbtc8821a1ant_halt_notify()
2891 halbtc8821a1ant_ps_tdma(btcoexist, FORCE_EXEC, false, 0); in ex_halbtc8821a1ant_halt_notify()
2893 ex_halbtc8821a1ant_media_status_notify(btcoexist, in ex_halbtc8821a1ant_halt_notify()
2897 void ex_halbtc8821a1ant_pnp_notify(struct btc_coexist *btcoexist, u8 pnp_state) in ex_halbtc8821a1ant_pnp_notify() argument
2905 btcoexist->stop_coex_dm = true; in ex_halbtc8821a1ant_pnp_notify()
2906 halbtc8821a1ant_ignore_wlan_act(btcoexist, FORCE_EXEC, true); in ex_halbtc8821a1ant_pnp_notify()
2907 halbtc8821a1ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, in ex_halbtc8821a1ant_pnp_notify()
2909 halbtc8821a1ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 9); in ex_halbtc8821a1ant_pnp_notify()
2913 btcoexist->stop_coex_dm = false; in ex_halbtc8821a1ant_pnp_notify()
2914 halbtc8821a1ant_init_hw_config(btcoexist, false); in ex_halbtc8821a1ant_pnp_notify()
2915 halbtc8821a1ant_init_coex_dm(btcoexist); in ex_halbtc8821a1ant_pnp_notify()
2916 halbtc8821a1ant_query_bt_info(btcoexist); in ex_halbtc8821a1ant_pnp_notify()
2922 struct btc_coexist *btcoexist) { in ex_halbtc8821a1ant_periodical() argument
2925 struct btc_board_info *board_info = &btcoexist->board_info; in ex_halbtc8821a1ant_periodical()
2926 struct btc_stack_info *stack_info = &btcoexist->stack_info; in ex_halbtc8821a1ant_periodical()
2944 btcoexist->btc_get(btcoexist, BTC_GET_U4_BT_PATCH_VER, in ex_halbtc8821a1ant_periodical()
2946 btcoexist->btc_get(btcoexist, BTC_GET_U4_WIFI_FW_VER, &fw_ver); in ex_halbtc8821a1ant_periodical()
2958 halbtc8821a1ant_query_bt_info(btcoexist); in ex_halbtc8821a1ant_periodical()
2959 halbtc8821a1ant_monitor_bt_ctr(btcoexist); in ex_halbtc8821a1ant_periodical()
2960 btc8821a1ant_mon_bt_en_dis(btcoexist); in ex_halbtc8821a1ant_periodical()
2962 if (halbtc8821a1ant_Is_wifi_status_changed(btcoexist) || in ex_halbtc8821a1ant_periodical()
2965 halbtc8821a1ant_run_coexist_mechanism(btcoexist); in ex_halbtc8821a1ant_periodical()