changeset 723:1f78e5fda218

mm_mmp.c compiles
author Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
date Sat, 04 Oct 2014 20:36:23 +0000
parents 0e4567b020b9
children 9e777968b08f
files gsm-fw/g23m-gsm/mm/Makefile gsm-fw/g23m-gsm/mm/mm_mmp.c
diffstat 2 files changed, 76 insertions(+), 74 deletions(-) [+]
line wrap: on
line diff
--- a/gsm-fw/g23m-gsm/mm/Makefile	Sat Oct 04 17:35:45 2014 +0000
+++ b/gsm-fw/g23m-gsm/mm/Makefile	Sat Oct 04 20:36:23 2014 +0000
@@ -5,7 +5,7 @@
 CPPFLAGS=-I. -I../../include -I../../include/condat -I../../gpf/inc \
 	-I../../cdginc
 
-OBJS=	mm_csf.o mm_em.o mm_forf.o mm_forp.o mm_fors.o mm_mmf.o
+OBJS=	mm_csf.o mm_em.o mm_forf.o mm_forp.o mm_fors.o mm_mmf.o mm_mmp.o
 
 all:	${OBJS}
 
--- a/gsm-fw/g23m-gsm/mm/mm_mmp.c	Sat Oct 04 17:35:45 2014 +0000
+++ b/gsm-fw/g23m-gsm/mm/mm_mmp.c	Sat Oct 04 20:36:23 2014 +0000
@@ -22,6 +22,10 @@
 #ifndef MM_MMP_C
 #define MM_MMP_C
 
+#include "config.h"
+#include "fixedconf.h"
+#include "condat-features.h"
+
 #define ENTITY_MM
 
 /*==== INCLUDES ===================================================*/
@@ -297,25 +301,25 @@
             /*check the flag rrlp_lcs_started value. True if rrlp is running, False if no rrlp is runnig.*/
             if(mm_data->rrlp_lcs_started EQ TRUE)
             {
-             /*
-              * Enter state MM_RR_CONN_RELEASE_NOT_ALLOWED only if the last
-              * active MM connection has been released by the CM layer
-              * and there is rrlp service on going.
-              */
+              /*
+               * Enter state MM_RR_CONN_RELEASE_NOT_ALLOWED only if the last
+               * active MM connection has been released by the CM layer
+               * and there is rrlp service on going.
+               */
               TIMERSTART (T3241, T_3241_VALUE);
               SET_STATE (STATE_MM, MM_RR_CONN_RELEASE_NOT_ALLOWED);
             }
             else
 #endif /* (FF_EOTD) AND defined (REL99) */
             {
-            /*
-             * Enter state MM_WAIT_FOR_NW_CMD only if the last
-             * active MM connection has been released by the CM layer
-             * and there is no pending connection. Otherwise keep state.
-             */
-            TIMERSTART (T3240, T_3240_VALUE);
-            SET_STATE (STATE_MM, MM_WAIT_FOR_NW_CMD);
-          }
+              /*
+               * Enter state MM_WAIT_FOR_NW_CMD only if the last
+               * active MM connection has been released by the CM layer
+               * and there is no pending connection. Otherwise keep state.
+               */
+              TIMERSTART (T3240, T_3240_VALUE);
+              SET_STATE (STATE_MM, MM_WAIT_FOR_NW_CMD);
+            }
           }
           break;
 
@@ -396,13 +400,13 @@
             }
             else
             {
-             /*
-              * RR has already signalled a cell which is
-              * suitable for call reestablishment
-              * This could be explained to me. Why is in the release
-              * routine reestablishment performed. I never understood
-              * the problem which was solved here. Implementation problem? ...
-              */
+              /*
+               * RR has already signalled a cell which is
+               * suitable for call reestablishment
+               * This could be explained to me. Why is in the release
+               * routine reestablishment performed. I never understood
+               * the problem which was solved here. Implementation problem? ...
+               */
               if (mm_data->reest_cell_avail)
                 mm_reest (mm_data->reest_ti);
             }
@@ -832,10 +836,10 @@
   {
     case MMCM_ORG_ENTITY_CC:
 
-  mm_mmxx_establish_req (CC_COMP,
-                         mmcm_establish_req->ti,
-                         mmcm_establish_req->estcs,
-                         UNSPEC);
+      mm_mmxx_establish_req (CC_COMP,
+                             mmcm_establish_req->ti,
+                             mmcm_establish_req->estcs,
+                             UNSPEC);
       break;
 
     case MMCM_ORG_ENTITY_SS:
@@ -1092,8 +1096,6 @@
   }
 
 
-  
-    
   if (rr_abort_ind->op.service EQ LIMITED_SERVICE)
     mm_data->rf_power = rr_abort_ind->power;
 
@@ -1174,35 +1176,35 @@
          * The RR_ABORT_IND is not indicating the end of a search for 
          * available networks.
          */
-      TIMERSTOP (T3210);
-      mm_mdl_rel_req ();
-      if (rr_abort_ind->cause EQ RRCS_ABORT_CEL_SEL_FAIL)
-      {
-        TIMERSTOP (T3211);
-        TIMERSTOP (T3213);
-        mm_data->t3213_restart = 0;
-        mm_mmxx_rel_ind (rr_abort_ind->cause, CM_NOT_IDLE);
-        mm_mmgmm_cm_release_ind (MMGMM_RESUMPTION_FAILURE);
-        switch (rr_abort_ind->op.service)
+        TIMERSTOP (T3210);
+        mm_mdl_rel_req ();
+        if (rr_abort_ind->cause EQ RRCS_ABORT_CEL_SEL_FAIL)
         {
-          case NO_SERVICE:
-            SET_STATE (STATE_MM, MM_IDLE_NO_CELL_AVAILABLE);
-            break;
-
-          case LIMITED_SERVICE:
-            SET_STATE (STATE_MM, MM_IDLE_LIMITED_SERVICE);
-            break;
-
-          default: /* eg. FULL_SERVICE and reg_rr_failure => nonsense */
-            TRACE_ERROR (UNEXPECTED_DEFAULT);
-            break;
+          TIMERSTOP (T3211);
+          TIMERSTOP (T3213);
+          mm_data->t3213_restart = 0;
+          mm_mmxx_rel_ind (rr_abort_ind->cause, CM_NOT_IDLE);
+          mm_mmgmm_cm_release_ind (MMGMM_RESUMPTION_FAILURE);
+          switch (rr_abort_ind->op.service)
+          {
+            case NO_SERVICE:
+              SET_STATE (STATE_MM, MM_IDLE_NO_CELL_AVAILABLE);
+              break;
+
+            case LIMITED_SERVICE:
+              SET_STATE (STATE_MM, MM_IDLE_LIMITED_SERVICE);
+              break;
+
+            default: /* eg. FULL_SERVICE and reg_rr_failure => nonsense */
+              TRACE_ERROR (UNEXPECTED_DEFAULT);
+              break;
+          }
+          reg_rr_failure (rr_abort_ind);
         }
-        reg_rr_failure (rr_abort_ind);
-      }
-      else
-      {
-        mm_lup_restart ();
-      }
+        else
+        {
+          mm_lup_restart ();
+        }
       }
       break;
 
@@ -1239,12 +1241,12 @@
           {
             if (mm_data->pend_conn.cause EQ MMCM_ESTCS_EMERGE)
             {
-              /*
-               * Clash RR_ESTABLISH_REQ (emergency call) /
-               * RR_ABORT_IND (limited service).
-               * RR dropped the RR_ESTABLISH_REQ.
-               * Repeat the emergency call attempt.
-               */
+               /*
+                * Clash RR_ESTABLISH_REQ (emergency call) /
+                * RR_ABORT_IND (limited service).
+                * RR dropped the RR_ESTABLISH_REQ.
+                * Repeat the emergency call attempt.
+                */
                mm_rr_est_req (mm_data->pend_conn.cause,
                               mm_data->pend_conn.service,
                               mm_data->pend_conn.ti);
@@ -1429,20 +1431,22 @@
           {
             if(mm_data->net_search_count < 2)
             {
-            /* Since GPRS is in PTM there seems to be no need to inform
-             * ACI of the Network list
+              /*
+               * Since GPRS is in PTM there seems to be no need to inform
+               * ACI of the Network list
                * Also,MM  should start with 10 secs timer and on the expiry of 
-             * this timer should initiate the plmn scan search again
-             */
+               * this timer should initiate the plmn scan search again
+               */
               TIMERSTART(T_HPLMN,10000);
               mm_data->net_search_count++;
             }
             else
             {
-              /* The user initiated network search should be repeated only twice 
+	      /*
+               * The user initiated network search should be repeated only twice
                * and empty PLMN list should be returned. But if the search was 
-               * other than user initiated network scan allow repetions till PLMN
-               * search is a success. This should be tried every 2 mins.
+               * other than user initiated network scan allow repetions till
+	       * PLMN search is a success. This should be tried every 2 mins.
                */ 
               if ( mm_data->plmn_scan_mmi )
                 reg_net_list (rr_abort_ind);
@@ -1455,8 +1459,7 @@
             mm_data->net_search_count = 0;/*Network Scan successful,reset couter*/
             reg_net_list (rr_abort_ind); /* Build and send the list */
           }
-                    
-		  
+
           if (GET_STATE (STATE_MM) NEQ MM_WAIT_FOR_RR_ACTIVE)
           {
             /*
@@ -2137,8 +2140,8 @@
     case MM_LOCATION_UPDATING_PENDING:
     case MM_IMSI_DETACH_PENDING:
       /*
-        *What to do here?...
-        */
+       * What to do here?...
+       */
       assert (GET_STATE (STATE_REG_TYPE) EQ REG_CELL_SEARCH_ONLY);
       TRACE_EVENT ("This needs still discussion");
       /*FALLTHROUGH*/
@@ -2219,7 +2222,7 @@
             case RRCS_MM_ABORTED:         /* GSM 04.08 4.4.4.9 e), T3210 */
             case RRCS_ABNORM_UNSPEC:      /* GSM 04.08 4.4.4.9 f), ABNORM */
               /*
-               * donīt start normal location updating if the state
+               * don't start normal location updating if the state
                * has been entered after T3210 timeout or the network
                * released the RR connection with RR cause RRCS_ABNORM_UNSPEC.
                */
@@ -3381,7 +3384,7 @@
         break;
     }
     PFREE (rr_rrlp_start_ind);
- }
+}
 
 
 /*
@@ -3626,5 +3629,4 @@
   }
 }
 
-
 #endif