# HG changeset patch # User Mychaela Falconia # Date 1507018262 0 # Node ID 0388ecc384d67591ac9d1b3714749fc9c4e9b386 # Parent 701fb324243299f2aceffd2adf718c68a712ecbe l1p_ctl.c: l1pctl_npc_agc_read() reconstructed diff -r 701fb3242432 -r 0388ecc384d6 chipsetsw/layer1/p_cfile/l1p_ctl.c --- a/chipsetsw/layer1/p_cfile/l1p_ctl.c Tue Oct 03 06:38:07 2017 +0000 +++ b/chipsetsw/layer1/p_cfile/l1p_ctl.c Tue Oct 03 08:11:02 2017 +0000 @@ -689,9 +689,11 @@ if (0==pm) // Check and filter illegal pm value by using last valid IL { if (radio_freq == l1a_l1s_com.Scell_info.radio_freq) - 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; else - current_IL = l1a_l1s_com.Scell_info.transfer_meas.input_level; + current_IL = l1a_l1s_com.Scell_info.transfer_meas.input_level + - lna_value; } else { @@ -810,7 +812,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); } // End of "beacon frequency input level updating" @@ -832,7 +836,9 @@ // No block was correctly received else { - UWORD8 input_level_ref = l1a_l1s_com.Scell_info.transfer_meas.input_level; + UWORD8 input_level_ref = l1a_l1s_com.Scell_info.transfer_meas.input_level + - l1a_l1s_com.Scell_info.transfer_meas.lna_off * + l1ctl_get_lna_att(radio_freq); // SEARCH phase if (l1ps.phase == SEARCH) { @@ -881,8 +887,11 @@ WORD16 input_level; // IL initialized to "beacon level - Pb" - input_level = (WORD16) (l1a_l1s_com.last_input_level[serving_index].input_level + l1a_l1s_com.Scell_info.pb); - + input_level = (WORD16) + ((l1a_l1s_com.last_input_level[serving_index].input_level + + l1a_l1s_com.Scell_info.pb) - + (l1a_l1s_com.last_input_level[serving_index].lna_off * + l1ctl_get_lna_att(l1a_l1s_com.Scell_info.radio_freq))); if (input_level>INDEX_MAX) input_level = INDEX_MAX; l1a_l1s_com.Scell_info.transfer_meas.input_level = (UWORD8)input_level; @@ -895,7 +904,9 @@ { WORD16 input_level; - input_level = l1a_l1s_com.Scell_info.transfer_meas.input_level; + input_level = l1a_l1s_com.Scell_info.transfer_meas.input_level - + l1a_l1s_com.Scell_info.transfer_meas.lna_off * + l1ctl_get_lna_att(l1ps.read_param.radio_freq_for_lna); if (input_level>INDEX_MAX) input_level = INDEX_MAX; @@ -910,6 +921,10 @@ if (new_calibrated_IL>INDEX_MAX) new_calibrated_IL = INDEX_MAX; 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 += + 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_npc_agc_read"