changeset 681:461ab5b255f5

alr_nc.c compiles
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Mon, 29 Sep 2014 19:57:11 +0000
parents 04d1b20eb7b0
children 7ddec309313d
files gsm-fw/g23m-gsm/alr/Makefile gsm-fw/g23m-gsm/alr/alr_nc.c
diffstat 2 files changed, 54 insertions(+), 74 deletions(-) [+]
line wrap: on
line diff
--- a/gsm-fw/g23m-gsm/alr/Makefile	Mon Sep 29 17:47:47 2014 +0000
+++ b/gsm-fw/g23m-gsm/alr/Makefile	Mon Sep 29 19:57:11 2014 +0000
@@ -5,7 +5,7 @@
 CPPFLAGS=-I. -I../../include -I../../include/condat -I../../gpf/inc \
 	-I../../cdginc
 
-OBJS=	alr_cbch.o alr_cs.o alr_csf.o alr_dedi.o alr_em.o alr_main.o
+OBJS=	alr_cbch.o alr_cs.o alr_csf.o alr_dedi.o alr_em.o alr_main.o alr_nc.o
 
 all:	${OBJS}
 
--- a/gsm-fw/g23m-gsm/alr/alr_nc.c	Mon Sep 29 17:47:47 2014 +0000
+++ b/gsm-fw/g23m-gsm/alr/alr_nc.c	Mon Sep 29 19:57:11 2014 +0000
@@ -18,9 +18,13 @@
 +-----------------------------------------------------------------------------
 */
 
-#ifndef ALR_NC_C 
+#ifndef ALR_NC_C
 #define ALR_NC_C
 
+#include "config.h"
+#include "fixedconf.h"
+#include "condat-features.h"
+
 #define ENTITY_PL
 
 /*==== INCLUDES ===================================================*/
@@ -330,13 +334,6 @@
 #endif  /* _SIMULATION_ */
 
 /*
- * Defining Locosto flag for 20.7 for Simulation build
- */
-#if defined (_SIMULATION_) && defined SIMU_LOCOSTO_CT_GCF_20_7
-#define CHIPSET 15
-#endif
-
-/*
  * some traces
  */
 #if defined (TRACING)
@@ -4484,22 +4481,19 @@
               break;
             case IDLE:
               if (pcell->one_of_twelve)
-						//Nina modify to avoid frequent NSY_R
-
-#if 0
+#if 0	//Nina modify to avoid frequent NSY_R
                 nc_set_status (i, READ_FB_SB);
-
 #else
-if(pcell->rank_of_the_six < 2)
-							{
-                nc_set_status (i, READ_FB_SB);
-							}
-						else
-							{
-							pcell->one_of_six = 0;
-							pcell->one_of_twelve =0;
-							}
-						#endif
+	      {
+		if (pcell->rank_of_the_six < 2)
+                  nc_set_status (i, READ_FB_SB);
+		else
+		{
+		  pcell->one_of_six = 0;
+		  pcell->one_of_twelve =0;
+		}
+	      }
+#endif
               if (start_list EQ CHECK_FOR_CONFIRM)
               {
                 if (pcell->tim_valid EQ TV_VALID_TIMING_INFO)
@@ -4544,27 +4538,23 @@
               }
               break;
             case FB_SB_FAILED:
-				//Nina add to judge the syn failure times
-			if(pcell->syn_failure_times > 2)
-			{
-				nc_set_status (i, EXCLUDED);
-				break;
- 
-			}
+	      //Nina add to judge the syn failure times
+	      if(pcell->syn_failure_times > 2)
+	      {
+		nc_set_status (i, EXCLUDED);
+		break;
+	      }
               if (pcell->one_of_twelve EQ FALSE)
                 nc_set_status (i, IDLE);
               else if (pcell->c_sync EQ 0)
-              	{
+	      {
               	if(pcell->rank_of_the_six < 4)
-              		{
-				nc_set_status (i, READ_FB_SB);
-              		}
-				else
-					{
-							pcell->one_of_six = 0;
-							pcell->one_of_twelve =0;
-
-					}
+		  nc_set_status (i, READ_FB_SB);
+		else
+		{
+		  pcell->one_of_six = 0;
+		  pcell->one_of_twelve =0;
+		}
               }
               break;
             case IDLE_SYNC:
@@ -4856,8 +4846,7 @@
         hyst_rxlev = alr_data->nc_data.cell[i].rxlev_average;
     }
 
-	alr_data->nc_data.cell[i].one_of_six = FALSE;
-
+    alr_data->nc_data.cell[i].one_of_six = FALSE;
   }
 
   if(num_1of6 < MAX_RR_NCELL_CNT)
@@ -4993,7 +4982,7 @@
   BOOL    limit;
   int     index;
 
-UBYTE      rank = 0;
+  UBYTE   rank = 0;
 
   USHORT  c_ba_arfcn = alr_data->nc_data.c_ba_arfcn;
   T_NC*   pcell;
@@ -5074,8 +5063,8 @@
     if (index NEQ NOT_PRESENT_16BIT)
     {
       alr_data->nc_data.cell[index].one_of_six = TRUE;
-	  alr_data->nc_data.cell[index].rank_of_the_six = rank;
-	  rank++;
+      alr_data->nc_data.cell[index].rank_of_the_six = rank;
+      rank++;
       (*c_found)++;
     }
   }
@@ -5312,7 +5301,6 @@
       }
 #endif
 
-
 #if defined(TRACING)
       TRACE_EVENT_P4("NC%u[%d] rx=%d av=%d",
         index,
@@ -5864,17 +5852,15 @@
 #endif
 
     if (p_ncell->tim_valid EQ TV_INVALID_TIMING_INFO) 
-	{
-
+    {
       sync_req->fn_offset      = 0;
       sync_req->time_alignment = 0;
-
-	}
+    }
     else
-	{
+    {
       sync_req->fn_offset      = p_ncell->frame_offset;
       sync_req->time_alignment = p_ncell->time_align;
-	}
+    }
 
     sync_req->timing_validity = p_ncell->tim_valid;
     TRACE_EVENT_P4("nc_build_sync_req[%d] timing_validity=%d fn_offset=%ld, time_alignment=%ld",
@@ -5886,11 +5872,9 @@
     alr_data->nc_data.c_sync_req++;
   }
 
-
   ALR_EM_READ_NEIGHBOURCELL_SB;
 
   nc_set_status (index, READ_FB_SB_PENDING);
-
 }
 
 
@@ -5962,7 +5946,6 @@
   GET_INSTANCE_DATA;
   T_NC* pbsic = &alr_data->nc_data.cell[LAST_BSIC_REQ];
 
-
   switch (pbsic->status)
   {
     case READ_FB_SB:
@@ -6052,8 +6035,6 @@
 
 */
 
-
-
 LOCAL void nc_process_status_sync(void)
 {
   GET_INSTANCE_DATA;
@@ -7166,15 +7147,17 @@
       pcell->tim_valid       = TV_INVALID_TIMING_INFO;
       pcell->blocks_required = 0;
       pcell->c_error         = 0;
-	  pcell->syn_failure_times= 0;
+      pcell->syn_failure_times= 0;
       nc_clean_store_bcch (index);
       break;
 
     case IDLE:
       pcell->bsic            = NOT_PRESENT_8BIT;
-/*      pcell->frame_offset    = 0;
+#if 0
+      pcell->frame_offset    = 0;
       pcell->time_align      = 0;
-      pcell->last_rxlev      = 0;  */
+      pcell->last_rxlev      = 0;
+#endif
       pcell->one_of_six      = FALSE;
       pcell->one_of_twelve   = FALSE;
       /*pcell->c_attempt       = 0;*/
@@ -7188,8 +7171,10 @@
     case READ_FB_SB:
     case READ_FB_SB_PENDING:
       pcell->bsic            = NOT_PRESENT_8BIT;
-/*      pcell->frame_offset    = 0;
-      pcell->time_align      = 0;  */
+#if 0
+      pcell->frame_offset    = 0;
+      pcell->time_align      = 0;
+#endif
       pcell->last_rxlev      = 0;
       pcell->c_bcch          = C_INVALID_BCCH;
       pcell->c_sync          = C_INVALID_SYNC;
@@ -7226,11 +7211,11 @@
       break;
 
     case FB_SB_SYNC:
-		if((pcell->status == READ_FB_SB) || (pcell->status == READ_FB_SB_PENDING))
-			{
-			if(pcell->syn_failure_times > 0)
-				pcell->syn_failure_times --;
-			}
+      if((pcell->status == READ_FB_SB) || (pcell->status == READ_FB_SB_PENDING))
+      {
+	if (pcell->syn_failure_times > 0)
+	  pcell->syn_failure_times --;
+      }
       pcell->last_rxlev      = 0;
       pcell->blocks_required = 0;
       if (!pcell->one_of_six)
@@ -7276,10 +7261,8 @@
       break;
 
     case FB_SB_FAILED:
-		if((pcell->status == READ_FB_SB) || (pcell->status == READ_FB_SB_PENDING))
-			{
-				pcell->syn_failure_times ++;
-			}
+      if((pcell->status == READ_FB_SB) || (pcell->status == READ_FB_SB_PENDING))
+	pcell->syn_failure_times ++;
       pcell->bsic            = NOT_PRESENT_8BIT;
       if (pcell->status EQ READ_FB_SB_PENDING)
       {
@@ -8027,9 +8010,6 @@
   UBYTE     max_rxlev;
   UBYTE     k;
 
-
-
-  
   for (i = 0; i < (p_bin->num_valid ) ; i++)
   {
     if ( (n < MAX_NUM_CELLS_IN_REPORT) AND (nbr_rpt > 0) )