Lines Matching +full:0 +full:xe3
34 static u32 glcoex_ver_8821a_2ant = 0x5050;
46 long bt_rssi = 0; in btc8821a2ant_bt_rssi_state()
137 long wifi_rssi = 0; in btc8821a2ant_wifi_rssi_state()
251 u32 reg_hp_tx = 0, reg_hp_rx = 0, reg_lp_tx = 0, reg_lp_rx = 0; in btc8821a2ant_monitor_bt_ctr()
253 reg_hp_txrx = 0x770; in btc8821a2ant_monitor_bt_ctr()
254 reg_lp_txrx = 0x774; in btc8821a2ant_monitor_bt_ctr()
277 "[BTCoex], High Priority Tx/Rx (reg 0x%x) = 0x%x(%d)/0x%x(%d)\n", in btc8821a2ant_monitor_bt_ctr()
280 "[BTCoex], Low Priority Tx/Rx (reg 0x%x) = 0x%x(%d)/0x%x(%d)\n", in btc8821a2ant_monitor_bt_ctr()
284 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0xc); in btc8821a2ant_monitor_bt_ctr()
290 coex_sta->crc_ok_cck = 0; in btc8821a2ant_monitor_wifi_ctr()
291 coex_sta->crc_ok_11g = 0; in btc8821a2ant_monitor_wifi_ctr()
292 coex_sta->crc_ok_11n = 0; in btc8821a2ant_monitor_wifi_ctr()
293 coex_sta->crc_ok_11n_agg = 0; in btc8821a2ant_monitor_wifi_ctr()
295 coex_sta->crc_err_cck = 0; in btc8821a2ant_monitor_wifi_ctr()
296 coex_sta->crc_err_11g = 0; in btc8821a2ant_monitor_wifi_ctr()
297 coex_sta->crc_err_11n = 0; in btc8821a2ant_monitor_wifi_ctr()
298 coex_sta->crc_err_11n_agg = 0; in btc8821a2ant_monitor_wifi_ctr()
301 btcoexist->btc_read_4byte(btcoexist, 0xf88); in btc8821a2ant_monitor_wifi_ctr()
303 btcoexist->btc_read_2byte(btcoexist, 0xf94); in btc8821a2ant_monitor_wifi_ctr()
305 btcoexist->btc_read_2byte(btcoexist, 0xf90); in btc8821a2ant_monitor_wifi_ctr()
307 btcoexist->btc_read_2byte(btcoexist, 0xfb8); in btc8821a2ant_monitor_wifi_ctr()
310 btcoexist->btc_read_4byte(btcoexist, 0xf84); in btc8821a2ant_monitor_wifi_ctr()
312 btcoexist->btc_read_2byte(btcoexist, 0xf96); in btc8821a2ant_monitor_wifi_ctr()
314 btcoexist->btc_read_2byte(btcoexist, 0xf92); in btc8821a2ant_monitor_wifi_ctr()
316 btcoexist->btc_read_2byte(btcoexist, 0xfba); in btc8821a2ant_monitor_wifi_ctr()
320 btcoexist->btc_write_1byte_bitmask(btcoexist, 0xf16, 0x1, 0x1); in btc8821a2ant_monitor_wifi_ctr()
321 btcoexist->btc_write_1byte_bitmask(btcoexist, 0xf16, 0x1, 0x0); in btc8821a2ant_monitor_wifi_ctr()
327 u8 h2c_parameter[1] = {0}; in btc8821a2ant_query_bt_info()
331 h2c_parameter[0] |= BIT0; /* trigger */ in btc8821a2ant_query_bt_info()
334 "[BTCoex], Query Bt Info, FW write 0x61 = 0x%x\n", in btc8821a2ant_query_bt_info()
335 h2c_parameter[0]); in btc8821a2ant_query_bt_info()
337 btcoexist->btc_fill_h2c(btcoexist, 0x61, 1, h2c_parameter); in btc8821a2ant_query_bt_info()
371 BT_8821A_2ANT_WIFI_RSSI_COEXSWITCH_THRES, 0); in btc8821a2ant_is_wifi_status_changed()
435 u8 num_of_diff_profile = 0; in btc8821a2ant_action_algorithm()
621 u8 h2c_parameter[1] = {0}; in btc8821a2ant_set_fw_dac_swing_lvl()
624 * 0x18/ 0x10/ 0xc/ 0x8/ 0x4/ 0x6 in btc8821a2ant_set_fw_dac_swing_lvl()
626 h2c_parameter[0] = dac_swing_lvl; in btc8821a2ant_set_fw_dac_swing_lvl()
629 "[BTCoex], Set Dac Swing Level = 0x%x\n", dac_swing_lvl); in btc8821a2ant_set_fw_dac_swing_lvl()
631 "[BTCoex], FW write 0x64 = 0x%x\n", h2c_parameter[0]); in btc8821a2ant_set_fw_dac_swing_lvl()
633 btcoexist->btc_fill_h2c(btcoexist, 0x64, 1, h2c_parameter); in btc8821a2ant_set_fw_dac_swing_lvl()
640 u8 h2c_parameter[1] = {0}; in btc8821a2ant_set_fw_dec_bt_pwr()
642 h2c_parameter[0] = dec_bt_pwr_lvl; in btc8821a2ant_set_fw_dec_bt_pwr()
645 "[BTCoex], decrease Bt Power Level : %u, FW write 0x62 = 0x%x\n", in btc8821a2ant_set_fw_dec_bt_pwr()
646 dec_bt_pwr_lvl, h2c_parameter[0]); in btc8821a2ant_set_fw_dec_bt_pwr()
648 btcoexist->btc_fill_h2c(btcoexist, 0x62, 1, h2c_parameter); in btc8821a2ant_set_fw_dec_bt_pwr()
706 u8 h2c_parameter[6] = {0}; in btc8821a2ant_set_sw_penalty_tx_rate_adaptive()
708 h2c_parameter[0] = 0x6; /* opCode, 0x6 = Retry_Penalty */ in btc8821a2ant_set_sw_penalty_tx_rate_adaptive()
713 h2c_parameter[2] = 0x00; in btc8821a2ant_set_sw_penalty_tx_rate_adaptive()
715 h2c_parameter[3] = 0xf5; in btc8821a2ant_set_sw_penalty_tx_rate_adaptive()
717 h2c_parameter[4] = 0xa0; in btc8821a2ant_set_sw_penalty_tx_rate_adaptive()
719 h2c_parameter[5] = 0xa0; in btc8821a2ant_set_sw_penalty_tx_rate_adaptive()
726 btcoexist->btc_fill_h2c(btcoexist, 0x69, 6, h2c_parameter); in btc8821a2ant_set_sw_penalty_tx_rate_adaptive()
762 "[BTCoex], Write SwDacSwing = 0x%x\n", level); in btc8821a2ant_set_dac_swing_reg()
763 btcoexist->btc_write_1byte_bitmask(btcoexist, 0xc5b, 0x3e, val); in btc8821a2ant_set_dac_swing_reg()
773 btc8821a2ant_set_dac_swing_reg(btcoexist, 0x18); in btc8821a2ant_set_sw_full_dac_swing()
783 "[BTCoex], %s turn DacSwing = %s, dac_swing_lvl = 0x%x\n", in btc8821a2ant_dac_swing()
792 …TCoex], pre_dac_swing_on = %d, pre_dac_swing_lvl = 0x%x, cur_dac_swing_on = %d, cur_dac_swing_lvl … in btc8821a2ant_dac_swing()
818 "[BTCoex], set coex table, set 0x6c0 = 0x%x\n", val0x6c0); in btc8821a2ant_set_coex_table()
819 btcoexist->btc_write_4byte(btcoexist, 0x6c0, val0x6c0); in btc8821a2ant_set_coex_table()
822 "[BTCoex], set coex table, set 0x6c4 = 0x%x\n", val0x6c4); in btc8821a2ant_set_coex_table()
823 btcoexist->btc_write_4byte(btcoexist, 0x6c4, val0x6c4); in btc8821a2ant_set_coex_table()
826 "[BTCoex], set coex table, set 0x6c8 = 0x%x\n", val0x6c8); in btc8821a2ant_set_coex_table()
827 btcoexist->btc_write_4byte(btcoexist, 0x6c8, val0x6c8); in btc8821a2ant_set_coex_table()
830 "[BTCoex], set coex table, set 0x6cc = 0x%x\n", val0x6cc); in btc8821a2ant_set_coex_table()
831 btcoexist->btc_write_1byte(btcoexist, 0x6cc, val0x6cc); in btc8821a2ant_set_coex_table()
841 "[BTCoex], %s write Coex Table 0x6c0 = 0x%x, 0x6c4 = 0x%x, 0x6c8 = 0x%x, 0x6cc = 0x%x\n", in btc8821a2ant_coex_table()
851 …"[BTCoex], pre_val0x6c0 = 0x%x, pre_val0x6c4 = 0x%x, pre_val0x6c8 = 0x%x, pre_val0x6cc = 0x%x !!\n… in btc8821a2ant_coex_table()
857 …"[BTCoex], cur_val0x6c0 = 0x%x, cur_val0x6c4 = 0x%x, cur_val0x6c8 = 0x%x, cur_val0x6cc = 0x%x !!\n… in btc8821a2ant_coex_table()
884 case 0: in btc8821a2ant_coex_table_with_type()
885 btc8821a2ant_coex_table(btcoexist, force_exec, 0x55555555, in btc8821a2ant_coex_table_with_type()
886 0x55555555, 0xffffff, 0x3); in btc8821a2ant_coex_table_with_type()
889 btc8821a2ant_coex_table(btcoexist, force_exec, 0x55555555, in btc8821a2ant_coex_table_with_type()
890 0x5afa5afa, 0xffffff, 0x3); in btc8821a2ant_coex_table_with_type()
893 btc8821a2ant_coex_table(btcoexist, force_exec, 0x5ada5ada, in btc8821a2ant_coex_table_with_type()
894 0x5ada5ada, 0xffffff, 0x3); in btc8821a2ant_coex_table_with_type()
897 btc8821a2ant_coex_table(btcoexist, force_exec, 0xaaaaaaaa, in btc8821a2ant_coex_table_with_type()
898 0xaaaaaaaa, 0xffffff, 0x3); in btc8821a2ant_coex_table_with_type()
901 btc8821a2ant_coex_table(btcoexist, force_exec, 0xffffffff, in btc8821a2ant_coex_table_with_type()
902 0xffffffff, 0xffffff, 0x3); in btc8821a2ant_coex_table_with_type()
905 btc8821a2ant_coex_table(btcoexist, force_exec, 0x5fff5fff, in btc8821a2ant_coex_table_with_type()
906 0x5fff5fff, 0xffffff, 0x3); in btc8821a2ant_coex_table_with_type()
909 btc8821a2ant_coex_table(btcoexist, force_exec, 0x55ff55ff, in btc8821a2ant_coex_table_with_type()
910 0x5a5a5a5a, 0xffffff, 0x3); in btc8821a2ant_coex_table_with_type()
913 btc8821a2ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in btc8821a2ant_coex_table_with_type()
914 0x5ada5ada, 0xffffff, 0x3); in btc8821a2ant_coex_table_with_type()
917 btc8821a2ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in btc8821a2ant_coex_table_with_type()
918 0x5ada5ada, 0xffffff, 0x3); in btc8821a2ant_coex_table_with_type()
921 btc8821a2ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in btc8821a2ant_coex_table_with_type()
922 0x5ada5ada, 0xffffff, 0x3); in btc8821a2ant_coex_table_with_type()
925 btc8821a2ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in btc8821a2ant_coex_table_with_type()
926 0x5ada5ada, 0xffffff, 0x3); in btc8821a2ant_coex_table_with_type()
929 btc8821a2ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in btc8821a2ant_coex_table_with_type()
930 0x5ada5ada, 0xffffff, 0x3); in btc8821a2ant_coex_table_with_type()
933 btc8821a2ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in btc8821a2ant_coex_table_with_type()
934 0x5ada5ada, 0xffffff, 0x3); in btc8821a2ant_coex_table_with_type()
937 btc8821a2ant_coex_table(btcoexist, force_exec, 0x5fff5fff, in btc8821a2ant_coex_table_with_type()
938 0xaaaaaaaa, 0xffffff, 0x3); in btc8821a2ant_coex_table_with_type()
941 btc8821a2ant_coex_table(btcoexist, force_exec, 0x5fff5fff, in btc8821a2ant_coex_table_with_type()
942 0x5ada5ada, 0xffffff, 0x3); in btc8821a2ant_coex_table_with_type()
945 btc8821a2ant_coex_table(btcoexist, force_exec, 0x55dd55dd, in btc8821a2ant_coex_table_with_type()
946 0xaaaaaaaa, 0xffffff, 0x3); in btc8821a2ant_coex_table_with_type()
949 btc8821a2ant_coex_table(btcoexist, force_exec, 0x5fdf5fdf, in btc8821a2ant_coex_table_with_type()
950 0x5fdb5fdb, 0xffffff, 0x3); in btc8821a2ant_coex_table_with_type()
953 btc8821a2ant_coex_table(btcoexist, force_exec, 0xfafafafa, in btc8821a2ant_coex_table_with_type()
954 0xfafafafa, 0xffffff, 0x3); in btc8821a2ant_coex_table_with_type()
965 u8 h2c_parameter[1] = {0}; in btc8821a2ant_set_fw_ignore_wlan_act()
968 h2c_parameter[0] |= BIT0; /* function enable */ in btc8821a2ant_set_fw_ignore_wlan_act()
971 "[BTCoex], set FW for BT Ignore Wlan_Act, FW write 0x63 = 0x%x\n", in btc8821a2ant_set_fw_ignore_wlan_act()
972 h2c_parameter[0]); in btc8821a2ant_set_fw_ignore_wlan_act()
974 btcoex->btc_fill_h2c(btcoex, 0x63, 1, h2c_parameter); in btc8821a2ant_set_fw_ignore_wlan_act()
1036 h2c_parameter[0] = byte1; in btc8821a2ant_set_fw_ps_tdma()
1042 coex_dm->ps_tdma_para[0] = byte1; in btc8821a2ant_set_fw_ps_tdma()
1049 "[BTCoex], FW write 0x60(5bytes) = 0x%x%08x\n", in btc8821a2ant_set_fw_ps_tdma()
1050 h2c_parameter[0], in btc8821a2ant_set_fw_ps_tdma()
1056 btcoexist->btc_fill_h2c(btcoexist, 0x60, 5, h2c_parameter); in btc8821a2ant_set_fw_ps_tdma()
1079 u32 u4tmp = 0; in btc8821a2ant_set_ant_path()
1080 u8 h2c_parameter[2] = {0}; in btc8821a2ant_set_ant_path()
1083 /* 0x4c[23] = 0, 0x4c[24] = 1 Antenna control by WL/BT */ in btc8821a2ant_set_ant_path()
1084 u4tmp = btcoexist->btc_read_4byte(btcoexist, 0x4c); in btc8821a2ant_set_ant_path()
1087 btcoexist->btc_write_4byte(btcoexist, 0x4c, u4tmp); in btc8821a2ant_set_ant_path()
1089 btcoexist->btc_write_4byte(btcoexist, 0x974, 0x3ff); in btc8821a2ant_set_ant_path()
1095 h2c_parameter[0] = 1; in btc8821a2ant_set_ant_path()
1097 btcoexist->btc_fill_h2c(btcoexist, 0x65, 2, in btc8821a2ant_set_ant_path()
1103 h2c_parameter[0] = 0; in btc8821a2ant_set_ant_path()
1105 btcoexist->btc_fill_h2c(btcoexist, 0x65, 2, in btc8821a2ant_set_ant_path()
1113 btcoexist->btc_write_1byte_bitmask(btcoexist, 0xcb7, 0x30, 0x1); in btc8821a2ant_set_ant_path()
1116 btcoexist->btc_write_1byte_bitmask(btcoexist, 0xcb7, 0x30, 0x2); in btc8821a2ant_set_ant_path()
1129 BT_8821A_2ANT_WIFI_RSSI_COEXSWITCH_THRES, 0); in btc8821a2ant_ps_tdma()
1131 BT_8821A_2ANT_BT_RSSI_COEXSWITCH_THRES, 0); in btc8821a2ant_ps_tdma()
1163 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x3c, in btc8821a2ant_ps_tdma()
1164 0x03, 0xf1, 0x90); in btc8821a2ant_ps_tdma()
1167 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x2d, in btc8821a2ant_ps_tdma()
1168 0x03, 0xf1, 0x90); in btc8821a2ant_ps_tdma()
1171 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1c, in btc8821a2ant_ps_tdma()
1172 0x3, 0xf1, 0x90); in btc8821a2ant_ps_tdma()
1175 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x10, in btc8821a2ant_ps_tdma()
1176 0x03, 0xf1, 0x90); in btc8821a2ant_ps_tdma()
1179 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x3c, in btc8821a2ant_ps_tdma()
1180 0x3, 0x70, 0x90); in btc8821a2ant_ps_tdma()
1183 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x2d, in btc8821a2ant_ps_tdma()
1184 0x3, 0x70, 0x90); in btc8821a2ant_ps_tdma()
1187 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1c, in btc8821a2ant_ps_tdma()
1188 0x3, 0x70, 0x90); in btc8821a2ant_ps_tdma()
1191 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xa3, 0x10, in btc8821a2ant_ps_tdma()
1192 0x3, 0x70, 0x90); in btc8821a2ant_ps_tdma()
1195 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x3c, in btc8821a2ant_ps_tdma()
1196 0x03, 0xf1, 0x90); in btc8821a2ant_ps_tdma()
1199 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x2d, in btc8821a2ant_ps_tdma()
1200 0x03, 0xf1, 0x90); in btc8821a2ant_ps_tdma()
1203 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1c, in btc8821a2ant_ps_tdma()
1204 0x3, 0xf1, 0x90); in btc8821a2ant_ps_tdma()
1207 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x10, in btc8821a2ant_ps_tdma()
1208 0x3, 0xf1, 0x90); in btc8821a2ant_ps_tdma()
1211 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x3c, in btc8821a2ant_ps_tdma()
1212 0x3, 0x70, 0x90); in btc8821a2ant_ps_tdma()
1215 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x2d, in btc8821a2ant_ps_tdma()
1216 0x3, 0x70, 0x90); in btc8821a2ant_ps_tdma()
1219 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1c, in btc8821a2ant_ps_tdma()
1220 0x3, 0x70, 0x90); in btc8821a2ant_ps_tdma()
1223 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x10, in btc8821a2ant_ps_tdma()
1224 0x3, 0x70, 0x90); in btc8821a2ant_ps_tdma()
1227 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xa3, 0x2f, in btc8821a2ant_ps_tdma()
1228 0x2f, 0x60, 0x90); in btc8821a2ant_ps_tdma()
1231 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x5, 0x5, in btc8821a2ant_ps_tdma()
1232 0xe1, 0x90); in btc8821a2ant_ps_tdma()
1235 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x25, in btc8821a2ant_ps_tdma()
1236 0x25, 0xe1, 0x90); in btc8821a2ant_ps_tdma()
1239 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x25, in btc8821a2ant_ps_tdma()
1240 0x25, 0x60, 0x90); in btc8821a2ant_ps_tdma()
1243 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x15, in btc8821a2ant_ps_tdma()
1244 0x03, 0x70, 0x90); in btc8821a2ant_ps_tdma()
1247 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1e, in btc8821a2ant_ps_tdma()
1248 0x03, 0xf0, 0x14); in btc8821a2ant_ps_tdma()
1252 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xd3, 0x3c, in btc8821a2ant_ps_tdma()
1253 0x03, 0x70, 0x50); in btc8821a2ant_ps_tdma()
1256 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x14, in btc8821a2ant_ps_tdma()
1257 0x03, 0xf1, 0x90); in btc8821a2ant_ps_tdma()
1260 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x30, in btc8821a2ant_ps_tdma()
1261 0x03, 0xf1, 0x90); in btc8821a2ant_ps_tdma()
1264 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x3c, in btc8821a2ant_ps_tdma()
1265 0x03, 0xf1, 0x90); in btc8821a2ant_ps_tdma()
1270 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xd3, 0x3a, in btc8821a2ant_ps_tdma()
1271 0x03, 0x70, 0x50); in btc8821a2ant_ps_tdma()
1277 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xd3, 0x2d, in btc8821a2ant_ps_tdma()
1278 0x03, 0x70, 0x50); in btc8821a2ant_ps_tdma()
1284 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xd3, 0x1c, in btc8821a2ant_ps_tdma()
1285 0x03, 0x70, 0x50); in btc8821a2ant_ps_tdma()
1291 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xd3, 0x10, in btc8821a2ant_ps_tdma()
1292 0x03, 0x70, 0x50); in btc8821a2ant_ps_tdma()
1295 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x3c, in btc8821a2ant_ps_tdma()
1296 0x03, 0xf1, 0x90); in btc8821a2ant_ps_tdma()
1299 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x3c, in btc8821a2ant_ps_tdma()
1300 0x03, 0x70, 0x90); in btc8821a2ant_ps_tdma()
1303 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x15, in btc8821a2ant_ps_tdma()
1304 0x03, 0x70, 0x90); in btc8821a2ant_ps_tdma()
1308 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x35, in btc8821a2ant_ps_tdma()
1309 0x03, 0x71, 0x11); in btc8821a2ant_ps_tdma()
1312 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xd3, 0x1c, in btc8821a2ant_ps_tdma()
1313 0x03, 0x70, 0x54); in btc8821a2ant_ps_tdma()
1316 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xd3, 0x14, in btc8821a2ant_ps_tdma()
1317 0x03, 0x70, 0x50); in btc8821a2ant_ps_tdma()
1320 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0xd3, 0x30, in btc8821a2ant_ps_tdma()
1321 0x03, 0x70, 0x50); in btc8821a2ant_ps_tdma()
1327 case 0: in btc8821a2ant_ps_tdma()
1328 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0x0, 0x0, 0x0, in btc8821a2ant_ps_tdma()
1329 0x40, 0x0); in btc8821a2ant_ps_tdma()
1332 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0x0, 0x0, 0x0, in btc8821a2ant_ps_tdma()
1333 0x48, 0x0); in btc8821a2ant_ps_tdma()
1336 btc8821a2ant_set_fw_ps_tdma(btcoexist, 0x0, 0x0, 0x0, in btc8821a2ant_ps_tdma()
1337 0x40, 0x0); in btc8821a2ant_ps_tdma()
1351 u8 lps_mode = 0x0; in btc8821a2ant_ps_tdma_check_for_power_save_state()
1415 btc8821a2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); in btc8821a2ant_coex_all_off()
1418 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_coex_all_off()
1422 btc8821a2ant_sw_mechanism2(btcoexist, false, false, false, 0x18); in btc8821a2ant_coex_all_off()
1425 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_coex_all_off()
1437 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_init_coex_dm()
1439 btc8821a2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); in btc8821a2ant_init_coex_dm()
1442 btc8821a2ant_dec_bt_pwr(btcoexist, FORCE_EXEC, 0); in btc8821a2ant_init_coex_dm()
1445 btc8821a2ant_sw_mechanism2(btcoexist, false, false, false, 0x18); in btc8821a2ant_init_coex_dm()
1455 btc8821a2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8821a2ant_action_bt_inquiry()
1457 BT_8821A_2ANT_WIFI_RSSI_COEXSWITCH_THRES, 0); in btc8821a2ant_action_bt_inquiry()
1459 2, BT_8821A_2ANT_BT_RSSI_COEXSWITCH_THRES, 0); in btc8821a2ant_action_bt_inquiry()
1470 btc8821a2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); in btc8821a2ant_action_bt_inquiry()
1485 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_action_bt_inquiry()
1490 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_action_bt_inquiry()
1493 btc8821a2ant_sw_mechanism2(btcoexist, false, false, false, 0x18); in btc8821a2ant_action_bt_inquiry()
1505 btc8821a2ant_sw_mechanism2(btcoexist, false, false, false, 0x18); in btc8821a2ant_action_wifi_link_process()
1507 u8tmpa = btcoexist->btc_read_1byte(btcoexist, 0x765); in btc8821a2ant_action_wifi_link_process()
1508 u8tmpb = btcoexist->btc_read_1byte(btcoexist, 0x76e); in btc8821a2ant_action_wifi_link_process()
1511 "[BTCoex], 0x765=0x%x, 0x76e=0x%x\n", u8tmpa, u8tmpb); in btc8821a2ant_action_wifi_link_process()
1518 u8 ap_num = 0; in btc8821a2ant_action_wifi_idle_process()
1520 btc8821a2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8821a2ant_action_wifi_idle_process()
1522 BT_8821A_2ANT_WIFI_RSSI_COEXSWITCH_THRES - 20, 0); in btc8821a2ant_action_wifi_idle_process()
1524 2, BT_8821A_2ANT_BT_RSSI_COEXSWITCH_THRES, 0); in btc8821a2ant_action_wifi_idle_process()
1534 btc8821a2ant_dac_swing(btcoexist, NORMAL_EXEC, true, 0x6); in btc8821a2ant_action_wifi_idle_process()
1535 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_action_wifi_idle_process()
1541 0x18); in btc8821a2ant_action_wifi_idle_process()
1543 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_action_wifi_idle_process()
1545 0x0, 0x0); in btc8821a2ant_action_wifi_idle_process()
1553 btc8821a2ant_dac_swing(btcoexist, NORMAL_EXEC, true, 0x6); in btc8821a2ant_action_wifi_idle_process()
1554 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_action_wifi_idle_process()
1560 0x18); in btc8821a2ant_action_wifi_idle_process()
1562 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_action_wifi_idle_process()
1564 0x0, 0x0); in btc8821a2ant_action_wifi_idle_process()
1569 btc8821a2ant_dac_swing(btcoexist, NORMAL_EXEC, true, 0x18); in btc8821a2ant_action_wifi_idle_process()
1590 0x8); in btc8821a2ant_is_common_action()
1595 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, in btc8821a2ant_is_common_action()
1596 0x0); in btc8821a2ant_is_common_action()
1597 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_is_common_action()
1599 0x0, 0x0); in btc8821a2ant_is_common_action()
1602 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_is_common_action()
1607 0x18); in btc8821a2ant_is_common_action()
1618 false, false, 0x8); in btc8821a2ant_is_common_action()
1623 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, in btc8821a2ant_is_common_action()
1624 0xfffff, 0x0); in btc8821a2ant_is_common_action()
1626 NORMAL_EXEC, 0); in btc8821a2ant_is_common_action()
1629 btcoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); in btc8821a2ant_is_common_action()
1632 0xb); in btc8821a2ant_is_common_action()
1633 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_is_common_action()
1638 false, 0x18); in btc8821a2ant_is_common_action()
1653 false, false, 0x8); in btc8821a2ant_is_common_action()
1655 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, in btc8821a2ant_is_common_action()
1656 0xfffff, 0x0); in btc8821a2ant_is_common_action()
1658 NORMAL_EXEC, 0); in btc8821a2ant_is_common_action()
1661 btcoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); in btc8821a2ant_is_common_action()
1664 0xb); in btc8821a2ant_is_common_action()
1665 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_is_common_action()
1670 false, 0x18); in btc8821a2ant_is_common_action()
1700 /* 0 : no change in btc8821a2ant_tdma_duration_adjust()
1705 u8 retry_count = 0; in btc8821a2ant_tdma_duration_adjust()
1776 up = 0; in btc8821a2ant_tdma_duration_adjust()
1777 dn = 0; in btc8821a2ant_tdma_duration_adjust()
1780 result = 0; in btc8821a2ant_tdma_duration_adjust()
1781 wait_count = 0; in btc8821a2ant_tdma_duration_adjust()
1790 result = 0; in btc8821a2ant_tdma_duration_adjust()
1793 if (retry_count == 0) { in btc8821a2ant_tdma_duration_adjust()
1798 if (dn <= 0) in btc8821a2ant_tdma_duration_adjust()
1799 dn = 0; in btc8821a2ant_tdma_duration_adjust()
1802 /* if (retry count == 0) for 2*n seconds, in btc8821a2ant_tdma_duration_adjust()
1805 wait_count = 0; in btc8821a2ant_tdma_duration_adjust()
1807 up = 0; in btc8821a2ant_tdma_duration_adjust()
1808 dn = 0; in btc8821a2ant_tdma_duration_adjust()
1818 if (up <= 0) in btc8821a2ant_tdma_duration_adjust()
1819 up = 0; in btc8821a2ant_tdma_duration_adjust()
1836 up = 0; in btc8821a2ant_tdma_duration_adjust()
1837 dn = 0; in btc8821a2ant_tdma_duration_adjust()
1838 wait_count = 0; in btc8821a2ant_tdma_duration_adjust()
1858 up = 0; in btc8821a2ant_tdma_duration_adjust()
1859 dn = 0; in btc8821a2ant_tdma_duration_adjust()
1860 wait_count = 0; in btc8821a2ant_tdma_duration_adjust()
2600 wifi_rssi_state = btc8821a2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8821a2ant_action_sco()
2601 bt_rssi_state = btc8821a2ant_bt_rssi_state(btcoexist, 2, 35, 0); in btc8821a2ant_action_sco()
2603 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8821a2ant_action_sco()
2605 btc8821a2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8821a2ant_action_sco()
2633 btc8821a2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); in btc8821a2ant_action_sco()
2635 btc8821a2ant_ps_tdma(btcoexist, NORMAL_EXEC, false, 0); in btc8821a2ant_action_sco()
2644 true, 0x18); in btc8821a2ant_action_sco()
2649 true, 0x18); in btc8821a2ant_action_sco()
2657 true, 0x18); in btc8821a2ant_action_sco()
2662 true, 0x18); in btc8821a2ant_action_sco()
2672 wifi_rssi_state = btc8821a2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8821a2ant_action_hid()
2674 2, BT_8821A_2ANT_BT_RSSI_COEXSWITCH_THRES, 0); in btc8821a2ant_action_hid()
2676 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8821a2ant_action_hid()
2678 btc8821a2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8821a2ant_action_hid()
2696 btc8821a2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); in btc8821a2ant_action_hid()
2706 false, 0x18); in btc8821a2ant_action_hid()
2711 false, 0x18); in btc8821a2ant_action_hid()
2720 false, 0x18); in btc8821a2ant_action_hid()
2725 false, 0x18); in btc8821a2ant_action_hid()
2734 u8 ap_num = 0; in btc8821a2ant_action_a2dp()
2737 wifi_rssi_state = btc8821a2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8821a2ant_action_a2dp()
2739 BT_8821A_2ANT_WIFI_RSSI_COEXSWITCH_THRES, 0); in btc8821a2ant_action_a2dp()
2741 2, BT_8821A_2ANT_BT_RSSI_COEXSWITCH_THRES, 0); in btc8821a2ant_action_a2dp()
2746 0x0, 0x0); in btc8821a2ant_action_a2dp()
2748 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, in btc8821a2ant_action_a2dp()
2749 0x0); in btc8821a2ant_action_a2dp()
2751 0x8); in btc8821a2ant_action_a2dp()
2755 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_action_a2dp()
2758 0x0, 0x0); in btc8821a2ant_action_a2dp()
2767 true, 0x6); in btc8821a2ant_action_a2dp()
2772 true, 0x6); in btc8821a2ant_action_a2dp()
2777 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8821a2ant_action_a2dp()
2778 btc8821a2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8821a2ant_action_a2dp()
2785 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_action_a2dp()
2790 0x0, 0x0); in btc8821a2ant_action_a2dp()
2793 btc8821a2ant_power_save_state(btcoexist, BTC_PS_LPS_ON, 0x50, in btc8821a2ant_action_a2dp()
2794 0x4); in btc8821a2ant_action_a2dp()
2813 false, 0x18); in btc8821a2ant_action_a2dp()
2818 false, 0x18); in btc8821a2ant_action_a2dp()
2826 false, 0x18); in btc8821a2ant_action_a2dp()
2831 false, 0x18); in btc8821a2ant_action_a2dp()
2841 wifi_rssi_state = btc8821a2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8821a2ant_action_a2dp_pan_hs()
2843 BT_8821A_2ANT_WIFI_RSSI_COEXSWITCH_THRES, 0); in btc8821a2ant_action_a2dp_pan_hs()
2845 2, BT_8821A_2ANT_BT_RSSI_COEXSWITCH_THRES, 0); in btc8821a2ant_action_a2dp_pan_hs()
2847 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8821a2ant_action_a2dp_pan_hs()
2849 btc8821a2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8821a2ant_action_a2dp_pan_hs()
2855 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_action_a2dp_pan_hs()
2860 0x0, 0x0); in btc8821a2ant_action_a2dp_pan_hs()
2863 btc8821a2ant_power_save_state(btcoexist, BTC_PS_LPS_ON, 0x50, in btc8821a2ant_action_a2dp_pan_hs()
2864 0x4); in btc8821a2ant_action_a2dp_pan_hs()
2877 false, 0x18); in btc8821a2ant_action_a2dp_pan_hs()
2882 false, 0x18); in btc8821a2ant_action_a2dp_pan_hs()
2890 false, 0x18); in btc8821a2ant_action_a2dp_pan_hs()
2895 false, 0x18); in btc8821a2ant_action_a2dp_pan_hs()
2905 wifi_rssi_state = btc8821a2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8821a2ant_action_pan_edr()
2907 BT_8821A_2ANT_WIFI_RSSI_COEXSWITCH_THRES, 0); in btc8821a2ant_action_pan_edr()
2909 2, BT_8821A_2ANT_BT_RSSI_COEXSWITCH_THRES, 0); in btc8821a2ant_action_pan_edr()
2911 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8821a2ant_action_pan_edr()
2913 btc8821a2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8821a2ant_action_pan_edr()
2925 0x0, 0x0); in btc8821a2ant_action_pan_edr()
2928 btc8821a2ant_power_save_state(btcoexist, BTC_PS_LPS_ON, 0x50, in btc8821a2ant_action_pan_edr()
2929 0x4); in btc8821a2ant_action_pan_edr()
2947 false, 0x18); in btc8821a2ant_action_pan_edr()
2952 false, 0x18); in btc8821a2ant_action_pan_edr()
2960 false, 0x18); in btc8821a2ant_action_pan_edr()
2965 false, 0x18); in btc8821a2ant_action_pan_edr()
2976 wifi_rssi_state = btc8821a2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8821a2ant_action_pan_hs()
2978 BT_8821A_2ANT_WIFI_RSSI_COEXSWITCH_THRES, 0); in btc8821a2ant_action_pan_hs()
2980 2, BT_8821A_2ANT_BT_RSSI_COEXSWITCH_THRES, 0); in btc8821a2ant_action_pan_hs()
2982 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8821a2ant_action_pan_hs()
2984 btc8821a2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8821a2ant_action_pan_hs()
2990 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_action_pan_hs()
2993 btc8821a2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); in btc8821a2ant_action_pan_hs()
3003 false, 0x18); in btc8821a2ant_action_pan_hs()
3008 false, 0x18); in btc8821a2ant_action_pan_hs()
3016 false, 0x18); in btc8821a2ant_action_pan_hs()
3021 false, 0x18); in btc8821a2ant_action_pan_hs()
3032 wifi_rssi_state = btc8821a2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8821a2ant_action_pan_edr_a2dp()
3034 BT_8821A_2ANT_WIFI_RSSI_COEXSWITCH_THRES, 0); in btc8821a2ant_action_pan_edr_a2dp()
3036 2, BT_8821A_2ANT_BT_RSSI_COEXSWITCH_THRES, 0); in btc8821a2ant_action_pan_edr_a2dp()
3038 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8821a2ant_action_pan_edr_a2dp()
3040 btc8821a2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8821a2ant_action_pan_edr_a2dp()
3047 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_action_pan_edr_a2dp()
3051 0x0, 0x0); in btc8821a2ant_action_pan_edr_a2dp()
3053 btc8821a2ant_power_save_state(btcoexist, BTC_PS_LPS_ON, 0x50, in btc8821a2ant_action_pan_edr_a2dp()
3054 0x4); in btc8821a2ant_action_pan_edr_a2dp()
3080 false, 0x18); in btc8821a2ant_action_pan_edr_a2dp()
3085 false, 0x18); in btc8821a2ant_action_pan_edr_a2dp()
3093 false, 0x18); in btc8821a2ant_action_pan_edr_a2dp()
3098 false, 0x18); in btc8821a2ant_action_pan_edr_a2dp()
3108 wifi_rssi_state = btc8821a2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8821a2ant_action_pan_edr_hid()
3110 2, BT_8821A_2ANT_BT_RSSI_COEXSWITCH_THRES, 0); in btc8821a2ant_action_pan_edr_hid()
3124 btc8821a2ant_coex_table(btcoexist, NORMAL_EXEC, 0x55ff55ff, in btc8821a2ant_action_pan_edr_hid()
3125 0x5a5f5a5f, 0xffff, 0x3); in btc8821a2ant_action_pan_edr_hid()
3128 btc8821a2ant_coex_table(btcoexist, NORMAL_EXEC, 0x55ff55ff, in btc8821a2ant_action_pan_edr_hid()
3129 0x5a5f5a5f, 0xffff, 0x3); in btc8821a2ant_action_pan_edr_hid()
3149 false, 0x18); in btc8821a2ant_action_pan_edr_hid()
3154 false, 0x18); in btc8821a2ant_action_pan_edr_hid()
3172 false, 0x18); in btc8821a2ant_action_pan_edr_hid()
3177 false, 0x18); in btc8821a2ant_action_pan_edr_hid()
3188 wifi_rssi_state = btc8821a2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8821a2ant_act_hid_a2dp_pan_edr()
3190 BT_8821A_2ANT_WIFI_RSSI_COEXSWITCH_THRES, 0); in btc8821a2ant_act_hid_a2dp_pan_edr()
3192 2, BT_8821A_2ANT_BT_RSSI_COEXSWITCH_THRES, 0); in btc8821a2ant_act_hid_a2dp_pan_edr()
3194 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8821a2ant_act_hid_a2dp_pan_edr()
3196 btc8821a2ant_limited_rx(btcoexist, NORMAL_EXEC, false, false, 0x8); in btc8821a2ant_act_hid_a2dp_pan_edr()
3202 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_act_hid_a2dp_pan_edr()
3207 0x0, 0x0); in btc8821a2ant_act_hid_a2dp_pan_edr()
3210 btc8821a2ant_power_save_state(btcoexist, BTC_PS_LPS_ON, 0x50, in btc8821a2ant_act_hid_a2dp_pan_edr()
3211 0x4); in btc8821a2ant_act_hid_a2dp_pan_edr()
3235 false, 0x18); in btc8821a2ant_act_hid_a2dp_pan_edr()
3240 false, 0x18); in btc8821a2ant_act_hid_a2dp_pan_edr()
3248 false, 0x18); in btc8821a2ant_act_hid_a2dp_pan_edr()
3253 false, 0x18); in btc8821a2ant_act_hid_a2dp_pan_edr()
3262 u8 ap_num = 0; in btc8821a2ant_action_hid_a2dp()
3264 wifi_rssi_state = btc8821a2ant_wifi_rssi_state(btcoexist, 0, 2, 15, 0); in btc8821a2ant_action_hid_a2dp()
3266 BT_8821A_2ANT_WIFI_RSSI_COEXSWITCH_THRES, 0); in btc8821a2ant_action_hid_a2dp()
3270 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x0); in btc8821a2ant_action_hid_a2dp()
3272 btc8821a2ant_limited_rx(btcoexist, NORMAL_EXEC, false, true, 0x5); in btc8821a2ant_action_hid_a2dp()
3282 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_action_hid_a2dp()
3297 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_action_hid_a2dp()
3304 0x0, 0x0); in btc8821a2ant_action_hid_a2dp()
3307 btc8821a2ant_power_save_state(btcoexist, BTC_PS_LPS_ON, 0x50, in btc8821a2ant_action_hid_a2dp()
3308 0x4); in btc8821a2ant_action_hid_a2dp()
3326 false, 0x18); in btc8821a2ant_action_hid_a2dp()
3331 false, 0x18); in btc8821a2ant_action_hid_a2dp()
3339 false, 0x18); in btc8821a2ant_action_hid_a2dp()
3344 false, 0x18); in btc8821a2ant_action_hid_a2dp()
3352 btc8821a2ant_dec_bt_pwr(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_action_wifi_multi_port()
3356 btc8821a2ant_sw_mechanism2(btcoexist, false, false, false, 0x18); in btc8821a2ant_action_wifi_multi_port()
3359 btc8821a2ant_coex_table_with_type(btcoexist, NORMAL_EXEC, 0); in btc8821a2ant_action_wifi_multi_port()
3361 btc8821a2ant_power_save_state(btcoexist, BTC_PS_WIFI_NATIVE, 0x0, 0x0); in btc8821a2ant_action_wifi_multi_port()
3370 u8 algorithm = 0; in btc8821a2ant_run_coexist_mechanism()
3371 u32 num_of_wifi_link = 0; in btc8821a2ant_run_coexist_mechanism()
3372 u32 wifi_link_status = 0; in btc8821a2ant_run_coexist_mechanism()
3425 "############# [BTCoex], Multi-Port num_of_wifi_link = %d, wifi_link_status = 0x%x\n", in btc8821a2ant_run_coexist_mechanism()
3523 u8 h2c_parameter[2] = {0}; in btc8821a2ant_wifi_off_hw_cfg()
3524 u32 fw_ver = 0; in btc8821a2ant_wifi_off_hw_cfg()
3527 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0x4); in btc8821a2ant_wifi_off_hw_cfg()
3529 /* WiFi goto standby while GNT_BT 0-->1 */ in btc8821a2ant_wifi_off_hw_cfg()
3530 btcoexist->btc_set_rf_reg(btcoexist, BTC_RF_A, 0x1, 0xfffff, 0x780); in btc8821a2ant_wifi_off_hw_cfg()
3532 if (fw_ver >= 0x180000) { in btc8821a2ant_wifi_off_hw_cfg()
3534 h2c_parameter[0] = 1; in btc8821a2ant_wifi_off_hw_cfg()
3535 btcoexist->btc_fill_h2c(btcoexist, 0x6E, 1, h2c_parameter); in btc8821a2ant_wifi_off_hw_cfg()
3537 btcoexist->btc_write_1byte(btcoexist, 0x765, 0x18); in btc8821a2ant_wifi_off_hw_cfg()
3547 u8 u1tmp = 0; in ex_btc8821a2ant_init_hwconfig()
3552 /* backup rf 0x1e value */ in ex_btc8821a2ant_init_hwconfig()
3554 btcoexist->btc_get_rf_reg(btcoexist, BTC_RF_A, 0x1e, 0xfffff); in ex_btc8821a2ant_init_hwconfig()
3556 /* 0x790[5:0] = 0x5 */ in ex_btc8821a2ant_init_hwconfig()
3557 u1tmp = btcoexist->btc_read_1byte(btcoexist, 0x790); in ex_btc8821a2ant_init_hwconfig()
3558 u1tmp &= 0xc0; in ex_btc8821a2ant_init_hwconfig()
3559 u1tmp |= 0x5; in ex_btc8821a2ant_init_hwconfig()
3560 btcoexist->btc_write_1byte(btcoexist, 0x790, u1tmp); in ex_btc8821a2ant_init_hwconfig()
3564 coex_sta->dis_ver_info_cnt = 0; in ex_btc8821a2ant_init_hwconfig()
3567 btc8821a2ant_coex_table_with_type(btcoexist, FORCE_EXEC, 0); in ex_btc8821a2ant_init_hwconfig()
3570 /* 0x76e[3] = 1, WLAN_Act control by PTA */ in ex_btc8821a2ant_init_hwconfig()
3571 btcoexist->btc_write_1byte(btcoexist, 0x76e, 0x4); in ex_btc8821a2ant_init_hwconfig()
3572 btcoexist->btc_write_1byte(btcoexist, 0x778, 0x3); in ex_btc8821a2ant_init_hwconfig()
3573 btcoexist->btc_write_1byte_bitmask(btcoexist, 0x40, 0x20, 0x1); in ex_btc8821a2ant_init_hwconfig()
3579 u8 u8tmp = 0x4; /* Set BIT2 by default since it's 2ant case */ in ex_btc8821a2ant_pre_load_firmware()
3586 * BIT0: "0" for no antenna inverse; "1" for antenna inverse in ex_btc8821a2ant_pre_load_firmware()
3587 * BIT1: "0" for internal switch; "1" for external switch in ex_btc8821a2ant_pre_load_firmware()
3588 * BIT2: "0" for one antenna; "1" for two antenna in ex_btc8821a2ant_pre_load_firmware()
3589 * NOTE: here default all internal switch and 1-antenna ==> BIT1=0 and in ex_btc8821a2ant_pre_load_firmware()
3590 * BIT2=0 in ex_btc8821a2ant_pre_load_firmware()
3594 u8tmp |= 0x1; /* antenna inverse */ in ex_btc8821a2ant_pre_load_firmware()
3595 btcoexist->btc_write_local_reg_1byte(btcoexist, 0xfe08, u8tmp); in ex_btc8821a2ant_pre_load_firmware()
3597 /* for PCIE and SDIO interface, we check efuse 0xc3[6] */ in ex_btc8821a2ant_pre_load_firmware()
3598 if (board_info->single_ant_path == 0) { in ex_btc8821a2ant_pre_load_firmware()
3601 u8tmp |= 0x1; /* antenna inverse */ in ex_btc8821a2ant_pre_load_firmware()
3605 btcoexist->btc_write_local_reg_1byte(btcoexist, 0x384, in ex_btc8821a2ant_pre_load_firmware()
3608 btcoexist->btc_write_local_reg_1byte(btcoexist, 0x60, in ex_btc8821a2ant_pre_load_firmware()
3628 u8 u1tmp[4], i, bt_info_ext, ps_tdma_case = 0; in ex_btc8821a2ant_display_coex_info()
3632 long wifi_rssi = 0, bt_hs_rssi = 0; in ex_btc8821a2ant_display_coex_info()
3635 u32 fw_ver = 0, bt_patch_ver = 0; in ex_btc8821a2ant_display_coex_info()
3652 seq_printf(m, "\n %-35s = %d_%d/ 0x%x/ 0x%x(%d)", in ex_btc8821a2ant_display_coex_info()
3713 for (i = 0; i < BT_INFO_SRC_8821A_2ANT_MAX; i++) { in ex_btc8821a2ant_display_coex_info()
3731 seq_printf(m, "\n %-35s = %d/ %d/ %d(0x%x) ", in ex_btc8821a2ant_display_coex_info()
3754 seq_printf(m, "\n %-35s = 0x%x", "RF-A, 0x1e initVal", in ex_btc8821a2ant_display_coex_info()
3757 u1tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x778); in ex_btc8821a2ant_display_coex_info()
3758 u1tmp[1] = btcoexist->btc_read_1byte(btcoexist, 0x6cc); in ex_btc8821a2ant_display_coex_info()
3759 seq_printf(m, "\n %-35s = 0x%x/ 0x%x ", in ex_btc8821a2ant_display_coex_info()
3760 "0x778 (W_Act)/ 0x6cc (CoTab Sel)", in ex_btc8821a2ant_display_coex_info()
3761 u1tmp[0], u1tmp[1]); in ex_btc8821a2ant_display_coex_info()
3763 u1tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x8db); in ex_btc8821a2ant_display_coex_info()
3764 u1tmp[1] = btcoexist->btc_read_1byte(btcoexist, 0xc5b); in ex_btc8821a2ant_display_coex_info()
3765 seq_printf(m, "\n %-35s = 0x%x/ 0x%x", in ex_btc8821a2ant_display_coex_info()
3766 "0x8db(ADC)/0xc5b[29:25](DAC)", in ex_btc8821a2ant_display_coex_info()
3767 ((u1tmp[0] & 0x60) >> 5), ((u1tmp[1] & 0x3e) >> 1)); in ex_btc8821a2ant_display_coex_info()
3769 u4tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0xcb4); in ex_btc8821a2ant_display_coex_info()
3770 seq_printf(m, "\n %-35s = 0x%x/ 0x%x", in ex_btc8821a2ant_display_coex_info()
3771 "0xcb4[7:0](ctrl)/ 0xcb4[29:28](val)", in ex_btc8821a2ant_display_coex_info()
3772 u4tmp[0] & 0xff, ((u4tmp[0] & 0x30000000) >> 28)); in ex_btc8821a2ant_display_coex_info()
3774 u1tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x40); in ex_btc8821a2ant_display_coex_info()
3775 u4tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x4c); in ex_btc8821a2ant_display_coex_info()
3776 u4tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0x974); in ex_btc8821a2ant_display_coex_info()
3777 seq_printf(m, "\n %-35s = 0x%x/ 0x%x/ 0x%x", in ex_btc8821a2ant_display_coex_info()
3778 "0x40/ 0x4c[24:23]/ 0x974", in ex_btc8821a2ant_display_coex_info()
3779 u1tmp[0], ((u4tmp[0] & 0x01800000) >> 23), u4tmp[1]); in ex_btc8821a2ant_display_coex_info()
3781 u4tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x550); in ex_btc8821a2ant_display_coex_info()
3782 u1tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x522); in ex_btc8821a2ant_display_coex_info()
3783 seq_printf(m, "\n %-35s = 0x%x/ 0x%x", in ex_btc8821a2ant_display_coex_info()
3784 "0x550(bcn ctrl)/0x522", in ex_btc8821a2ant_display_coex_info()
3785 u4tmp[0], u1tmp[0]); in ex_btc8821a2ant_display_coex_info()
3787 u4tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0xc50); in ex_btc8821a2ant_display_coex_info()
3788 u1tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0xa0a); in ex_btc8821a2ant_display_coex_info()
3789 seq_printf(m, "\n %-35s = 0x%x/ 0x%x", in ex_btc8821a2ant_display_coex_info()
3790 "0xc50(DIG)/0xa0a(CCK-TH)", in ex_btc8821a2ant_display_coex_info()
3791 u4tmp[0], u1tmp[0]); in ex_btc8821a2ant_display_coex_info()
3793 u4tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0xf48); in ex_btc8821a2ant_display_coex_info()
3794 u1tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0xa5b); in ex_btc8821a2ant_display_coex_info()
3795 u1tmp[1] = btcoexist->btc_read_1byte(btcoexist, 0xa5c); in ex_btc8821a2ant_display_coex_info()
3796 seq_printf(m, "\n %-35s = 0x%x/ 0x%x", in ex_btc8821a2ant_display_coex_info()
3798 u4tmp[0], (u1tmp[0] << 8) + u1tmp[1]); in ex_btc8821a2ant_display_coex_info()
3800 u4tmp[0] = btcoexist->btc_read_4byte(btcoexist, 0x6c0); in ex_btc8821a2ant_display_coex_info()
3801 u4tmp[1] = btcoexist->btc_read_4byte(btcoexist, 0x6c4); in ex_btc8821a2ant_display_coex_info()
3802 u4tmp[2] = btcoexist->btc_read_4byte(btcoexist, 0x6c8); in ex_btc8821a2ant_display_coex_info()
3803 seq_printf(m, "\n %-35s = 0x%x/ 0x%x/ 0x%x", in ex_btc8821a2ant_display_coex_info()
3804 "0x6c0/0x6c4/0x6c8", in ex_btc8821a2ant_display_coex_info()
3805 u4tmp[0], u4tmp[1], u4tmp[2]); in ex_btc8821a2ant_display_coex_info()
3808 "0x770 (hi-pri Rx/Tx)", in ex_btc8821a2ant_display_coex_info()
3811 "0x774(low-pri Rx/Tx)", in ex_btc8821a2ant_display_coex_info()
3814 /* Tx mgnt queue hang or not, 0x41b should = 0xf, ex: 0xd ==>hang*/ in ex_btc8821a2ant_display_coex_info()
3815 u1tmp[0] = btcoexist->btc_read_1byte(btcoexist, 0x41b); in ex_btc8821a2ant_display_coex_info()
3816 seq_printf(m, "\n %-35s = 0x%x", in ex_btc8821a2ant_display_coex_info()
3817 "0x41b (mgntQ hang chk == 0xf)", in ex_btc8821a2ant_display_coex_info()
3818 u1tmp[0]); in ex_btc8821a2ant_display_coex_info()
3889 u8 h2c_parameter[3] = {0}; in ex_btc8821a2ant_media_status_notify()
3892 u8 ap_num = 0; in ex_btc8821a2ant_media_status_notify()
3907 h2c_parameter[0] = 0x1; in ex_btc8821a2ant_media_status_notify()
3911 h2c_parameter[2] = 0x30; in ex_btc8821a2ant_media_status_notify()
3913 h2c_parameter[2] = 0x20; in ex_btc8821a2ant_media_status_notify()
3915 h2c_parameter[2] = 0x30; in ex_btc8821a2ant_media_status_notify()
3917 h2c_parameter[2] = 0x20; in ex_btc8821a2ant_media_status_notify()
3921 coex_dm->wifi_chnl_info[0] = h2c_parameter[0]; in ex_btc8821a2ant_media_status_notify()
3926 "[BTCoex], FW write 0x66 = 0x%x\n", in ex_btc8821a2ant_media_status_notify()
3927 h2c_parameter[0] << 16 | in ex_btc8821a2ant_media_status_notify()
3931 btcoexist->btc_fill_h2c(btcoexist, 0x66, 3, h2c_parameter); in ex_btc8821a2ant_media_status_notify()
3949 u8 bt_info = 0; in ex_btc8821a2ant_bt_info_notify()
3950 u8 i, rsp_source = 0; in ex_btc8821a2ant_bt_info_notify()
3959 rsp_source = tmp_buf[0] & 0xf; in ex_btc8821a2ant_bt_info_notify()
3967 for (i = 0; i < length; i++) { in ex_btc8821a2ant_bt_info_notify()
3973 "0x%02x]\n", tmp_buf[i]); in ex_btc8821a2ant_bt_info_notify()
3976 "0x%02x, ", tmp_buf[i]); in ex_btc8821a2ant_bt_info_notify()
3987 /* [3:0] */ in ex_btc8821a2ant_bt_info_notify()
3989 coex_sta->bt_info_c2h[rsp_source][2]&0xf; in ex_btc8821a2ant_bt_info_notify()
3997 (coex_sta->bt_info_c2h[rsp_source][2] & 0x40); in ex_btc8821a2ant_bt_info_notify()
4001 /* BT into is responded by BT FW and BT RF REG 0x3C != in ex_btc8821a2ant_bt_info_notify()
4002 * 0x01 => Need to switch BT TRx Mask in ex_btc8821a2ant_bt_info_notify()
4005 "[BTCoex], Switch BT TRx Mask since BT RF REG 0x3C != 0x01\n"); in ex_btc8821a2ant_bt_info_notify()
4007 0x3c, 0x01); in ex_btc8821a2ant_bt_info_notify()
4028 "[BTCoex], BT ext info = 0x%x!!\n", in ex_btc8821a2ant_bt_info_notify()
4044 "[BTCoex], BT ext info bit3=0, wifi_connected=%d\n", in ex_btc8821a2ant_bt_info_notify()
4185 /* Antenna config to set 0x765 = 0x0 (GNT_BT control by in ex_btc8821a2ant_periodical()