changeset 89:2a56451df569

l1_ctl.c: l1ctl_pgc2() reconstructed
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Thu, 07 Apr 2016 03:00:32 +0000
parents 4a2ba7076906
children 1bcd93a7c518
files chipsetsw/layer1/cfile/l1_ctl.c
diffstat 1 files changed, 12 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/chipsetsw/layer1/cfile/l1_ctl.c	Thu Apr 07 02:52:54 2016 +0000
+++ b/chipsetsw/layer1/cfile/l1_ctl.c	Thu Apr 07 03:00:32 2016 +0000
@@ -2221,11 +2221,13 @@
    WORD16   delta_low_drp_gain=0;
    WORD32   index;
    UWORD16  g_magic;
-   UWORD16  arfcn;
+   #if (RF_RAM == 61) && (CODE_VERSION != SIMULATION)
+     UWORD16  arfcn;
+   #endif
    UWORD16 dco_algo_ctl_pw_temp = 0;
    UWORD8 if_ctl = 0;
    #if (RF_RAM == 61) && (CODE_VERSION != SIMULATION)
-   UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM;
+     UWORD8 if_threshold = C_IF_ZERO_LOW_THRESHOLD_GSM;
    #endif
 
 #if (L1_FF_MULTIBAND == 0)
@@ -2248,11 +2250,13 @@
    // lna_off was set to 0 during CTRL, so lna_value = 0 do not appear in the following
    // formula.
 
-#if (L1_FF_MULTIBAND == 0)  
+#if (RF_RAM == 61) && (CODE_VERSION != SIMULATION)
+#if (L1_FF_MULTIBAND == 0)
   arfcn = Convert_l1_radio_freq(radio_freq);
 #else
-  arfcn=radio_freq;
-#endif 
+  arfcn = radio_freq;
+#endif
+#endif
 
    if ((0==pm_high_agc) || (0==pm_low_agc))  // Check and filter illegal pm value(s) by using last valid IL
      new_IL      = l1a_l1s_com.last_input_level[index].input_level;
@@ -2345,7 +2349,9 @@
                     &(l1a_l1s_com.last_input_level[index].lna_off),
                     radio_freq);
 
-   l1a_l1s_com.last_input_level[index].input_level = (UWORD8)new_IL;
+   l1a_l1s_com.last_input_level[index].input_level = (UWORD8)new_IL +
+      l1ctl_get_lna_att(radio_freq) *
+	l1a_l1s_com.last_input_level[index].lna_off;
 }