# HG changeset patch # User Mychaela Falconia # Date 1507078145 0 # Node ID e520acd157e2b8745ae5c1c33fc4a4a478b9f0f0 # Parent 0388ecc384d67591ac9d1b3714749fc9c4e9b386 l1p_ctl.c: l1pctl_dpcma_agc_read() reconstructed diff -r 0388ecc384d6 -r e520acd157e2 chipsetsw/layer1/p_cfile/l1p_ctl.c --- a/chipsetsw/layer1/p_cfile/l1p_ctl.c Tue Oct 03 08:11:02 2017 +0000 +++ b/chipsetsw/layer1/p_cfile/l1p_ctl.c Wed Oct 04 00:49:05 2017 +0000 @@ -1111,7 +1111,8 @@ // current_IL processing if (0==pm) // Check and filter illegal pm value by using last valid IL { - current_IL = l1a_l1s_com.last_input_level[serving_index].input_level; + current_IL = l1a_l1s_com.last_input_level[serving_index].input_level + - lna_value; if (radio_freq != l1a_l1s_com.Scell_info.radio_freq) current_IL += (l1ps.read_param.dl_pwr_ctl.p0 + 10); @@ -1220,7 +1221,9 @@ &(l1a_l1s_com.last_input_level[serving_index].lna_off), l1a_l1s_com.Scell_info.radio_freq); - l1a_l1s_com.last_input_level[serving_index].input_level = new_IL; + l1a_l1s_com.last_input_level[serving_index].input_level = new_IL + + l1a_l1s_com.last_input_level[serving_index].lna_off * + l1ctl_get_lna_att(l1a_l1s_com.Scell_info.radio_freq); } // transfer_meas updating @@ -1228,7 +1231,10 @@ // IL = (min IL in FIFO) + P0 + 10 (PR = 5 format 7.1) // Input levels are always stored with lna_on - input_level = l1a_l1s_com.last_input_level[serving_index].input_level + l1ps.read_param.dl_pwr_ctl.p0 + 10; + input_level = l1a_l1s_com.last_input_level[serving_index].input_level + - l1a_l1s_com.last_input_level[serving_index].lna_off * + l1ctl_get_lna_att(l1a_l1s_com.Scell_info.radio_freq) + + l1ps.read_param.dl_pwr_ctl.p0 + 10; // IL_2_AGC_xx array size if (input_level>INDEX_MAX) input_level = INDEX_MAX; @@ -1240,7 +1246,9 @@ l1ctl_encode_lna((UWORD8)(new_calibrated_IL>>1), &(l1a_l1s_com.Scell_info.transfer_meas.lna_off), l1ps.read_param.radio_freq_for_lna); - l1a_l1s_com.Scell_info.transfer_meas.input_level = (UWORD8)input_level; + l1a_l1s_com.Scell_info.transfer_meas.input_level = input_level + + l1a_l1s_com.Scell_info.transfer_meas.lna_off * + l1ctl_get_lna_att(l1ps.read_param.radio_freq_for_lna); } // End if "burst = 3" } // End of "l1pctl_dpcma_agc_read"