changeset 91:51f3b9364365

l1_ctl.c: l1ctl_dpagc() reconstructed
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Thu, 07 Apr 2016 14:46:04 +0000
parents 1bcd93a7c518
children 3ef2a5f83a8e
files chipsetsw/layer1/cfile/l1_ctl.c
diffstat 1 files changed, 12 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/chipsetsw/layer1/cfile/l1_ctl.c	Thu Apr 07 03:16:52 2016 +0000
+++ b/chipsetsw/layer1/cfile/l1_ctl.c	Thu Apr 07 14:46:04 2016 +0000
@@ -2520,12 +2520,14 @@
   UWORD8      *tab_ptr;
   T_DEDIC_SET *aset;
   WORD32       lna_value;
-  UWORD16      arfcn;
+  #if (RF_RAM == 61) && (CODE_VERSION != SIMULATION)
+    UWORD16      arfcn;
+  #endif
   UWORD8       lna_off;
   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
 
   delta1_freq = l1ctl_encode_delta1(radio_freq);
@@ -2566,11 +2568,13 @@
       lna_value = l1a_l1s_com.Scell_used_IL_dd.lna_off * l1ctl_get_lna_att(radio_freq);
     }
 
-#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(RF_FAM == 61)
    #if (CODE_VERSION != SIMULATION)
@@ -2591,7 +2595,7 @@
 #endif
 
   if (0==pm)  // Check and filter illegal pm value by using last valid IL
-    new_IL    = IL_info_ptr->input_level;
+    new_IL    = IL_info_ptr->input_level - lna_value;
   else
     new_IL    = -(pm - (last_known_agc - delta_drp_gain) + lna_value - l1ctl_get_g_magic(radio_freq));
 
@@ -2678,7 +2682,8 @@
                     &(IL_info_ptr->lna_off),
                     radio_freq );
 
-  IL_info_ptr->input_level = (UWORD8)new_IL ;
+  IL_info_ptr->input_level = (UWORD8)new_IL + l1ctl_get_lna_att(radio_freq) *
+					IL_info_ptr->lna_off;
 
   #if L2_L3_SIMUL
     #if (DEBUG_TRACE==BUFFER_TRACE_DPAGC)