diff src/ui/mfw/mfw_gprs.c @ 188:92abb46dc1ba

src/ui/mfw/*.[ch]: rm trailing white space
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 19 Jan 2021 06:10:27 +0000
parents 67bfe9f274f6
children
line wrap: on
line diff
--- a/src/ui/mfw/mfw_gprs.c	Tue Jan 19 05:41:26 2021 +0000
+++ b/src/ui/mfw/mfw_gprs.c	Tue Jan 19 06:10:27 2021 +0000
@@ -8,7 +8,7 @@
 
    MODULE  : MFW_GPRS
 
-   PURPOSE : This modul contains functions needed for the GPRS 
+   PURPOSE : This modul contains functions needed for the GPRS
              management in MFW.
 
 $History: Mfw_gprs.c
@@ -17,8 +17,8 @@
 	Description: GPRS attach icon - MMI follow up issue of OMAPS00051034
 	solution: Added the function p_gprs_status() to querry the gprs status and to
 	store the status info in the structure variable stat.
-	
-$End	
+
+$End
 */
 
 /* include necessary header files ----------------------------------*/
@@ -84,7 +84,7 @@
 
 /* definition of internal functions --------------------------------*/
 
-static BOOL gprs_sign_exec ( T_MFW_HDR *cur_elem, T_MFW_EVENT event, 
+static BOOL gprs_sign_exec ( T_MFW_HDR *cur_elem, T_MFW_EVENT event,
                              T_MFW_GPRS_PARA *para );
 
 /*
@@ -101,8 +101,8 @@
 {
   TRACE_FUNCTION ("gprs_init()");
 
-  /* 
-   * set callback for MFW commands 
+  /*
+   * set callback for MFW commands
    */
   mfwCommand[MfwTypGprs] = (MfwCb) gprsCommand;
 }
@@ -143,12 +143,12 @@
 {
   T_MFW_HDR      *hdr;
   T_MFW_GPRS     *gprs_data;
- 
+
 /*a0393213 compiler warnings removal - variables state ,cls, regState, lac, ci removed*/
- 
- 
- 
- 
+
+
+
+
 
   MfwHdr *insert_status =0;
 
@@ -160,28 +160,28 @@
   if ( !hdr OR !gprs_data )
   	{
     	TRACE_ERROR("ERROR: gprs_create() Mem Alloc Failed.");
-			
+
 	   	if(hdr)
    			mfwFree((U8*)hdr,sizeof(MfwHdr));
 
    		if(gprs_data)
    			mfwFree((U8*)gprs_data,sizeof(T_MFW_GPRS));
-   		
+
 	   	return FALSE;
   	}
 
   /*
-   * initialisation of the handler 
+   * initialisation of the handler
    */
   gprs_data->emask   = event;
   gprs_data->handler = cbfunc;
-  
+
   hdr->data = gprs_data;      /* store gprs control block in node */
   hdr->type = MfwTypGprs;     /* store type of event handler      */
 
 
   /*
-   * initialisation of gprs data 
+   * initialisation of gprs data
    */
   gprs_data->data.numContexts = 0;
 
@@ -190,14 +190,14 @@
   gprs_data->data.Reg_state.regState = (T_CGREG_STAT)NULL;
   gprs_data->data.attached = (T_CGATT_STATE)NULL;
 
-  gprs_data->data.contexts = 
+  gprs_data->data.contexts =
     (T_MFW_GPRS_CONTEXT *) mfwAlloc(sizeof(T_MFW_GPRS_CONTEXT) * MAX_CID_PLUS_EINS);
 
-  /* 
-   * installation of the handler 
+  /*
+   * installation of the handler
    */
   insert_status = mfwInsert((T_MFW_HDR *)h, hdr);
-  
+
   if(!insert_status)
 	{
   		TRACE_ERROR("ERROR: gprs_create() Failed to Install Handler. ");
@@ -233,7 +233,7 @@
   if ( !h OR !((T_MFW_HDR *)h)->data )
     return MFW_RES_ILL_HND;
 
-  /* 
+  /*
    * deinstallation of the handler
    */
 
@@ -301,23 +301,23 @@
              *para : pointer to the event parameters
 
 */
-void gprs_signal( T_MFW_EVENT event, 
+void gprs_signal( T_MFW_EVENT event,
                   void       *para)
-{/*MC, SPR 1389, we have to enable the display whenever 
+{/*MC, SPR 1389, we have to enable the display whenever
 	we send an event up to the MMI*/
   UBYTE temp = dspl_Enable(0);
-	
+
   TRACE_FUNCTION ("gprs_signal()");
 
   if ( mfwSignallingMethod EQ 0 )
   {
-    /* 
+    /*
      * focus is on a window
      */
     if ( mfwFocus )
     {
       /*
-       * send event to sim management handler if available 
+       * send event to sim management handler if available
        */
       if (gprs_sign_exec (mfwFocus, event, para))
      { dspl_Enable(temp);/*MC, SPR 1389*/
@@ -325,10 +325,10 @@
 	 }
     }
 
-    /* 
-     * acutal focussed window is not available or has no 
-     * network management registration handler, then search 
-     * all nodes from the root.     
+    /*
+     * acutal focussed window is not available or has no
+     * network management registration handler, then search
+     * all nodes from the root.
      */
     if ( mfwRoot )
       gprs_sign_exec (mfwRoot, event, para);
@@ -337,46 +337,46 @@
   {
     MfwHdr *h = 0;
 
-    /* 
+    /*
      * Focus set, then start here
      */
     if ( mfwFocus )
     h = mfwFocus;
 
-    /* 
-     * Focus not set, then start at root 
+    /*
+     * Focus not set, then start at root
      */
     if ( !h )
     h = mfwRoot;
 
-    /* 
+    /*
      * while elements found
      */
     while ( h )
     {
       /*
-       * Signal consumed, then return 
+       * Signal consumed, then return
        */
       if ( gprs_sign_exec (h, event, para) )
       { dspl_Enable(temp);/*MC, SPR 1389*/
 	        return;
 	  }
 
-      /* 
-       * All windows tried inclusive root 
+      /*
+       * All windows tried inclusive root
        */
       if ( h == mfwRoot )
    	  { dspl_Enable(temp);/*MC, SPR 1389*/
 	        return;
 	  }
 
-      /* 
-       * get parent window 
+      /*
+       * get parent window
        */
       h = mfwParent(mfwParent(h));
 
-      /* 
-       * look for next element 
+      /*
+       * look for next element
        */
       if ( h )
         h = ((MfwWin * )(h->data))->elems;
@@ -399,12 +399,12 @@
 
    PARAMETERS :
 
-   RETURNS : 
+   RETURNS :
              TRUE,  if signal is processed
              FALSE, if signal is not processed
 */
-BOOL gprs_sign_exec ( T_MFW_HDR     *cur_elem, 
-                      T_MFW_EVENT    event, 
+BOOL gprs_sign_exec ( T_MFW_HDR     *cur_elem,
+                      T_MFW_EVENT    event,
                       T_MFW_GPRS_PARA *para )
 {
   int i,j;
@@ -419,8 +419,8 @@
 
   TRACE_FUNCTION ("gprs_sign_exec()");
 
-  /* 
-   * while event handler is available 
+  /*
+   * while event handler is available
    */
   while ( cur_elem )
   {
@@ -432,7 +432,7 @@
       T_MFW_GPRS *gprs_data;
       gprs_data = (T_MFW_GPRS *)cur_elem->data;
 
-      /* 
+      /*
        * if event is expected by the call back function
        */
       if ( gprs_data->emask & event )
@@ -448,15 +448,15 @@
              */
 #ifndef FF_2TO1_PS
             qAT_PlusCGDCONT(CMD_SRC_LCL, tst_ctrc, &tst_cid);
-#endif            
-  
+#endif
+
             if ( tst_cid >= gprs_data->data.numContexts + 1)
             {
 
-              /* 
+              /*
                * insert the new context
-               */ 
-              memcpy (&(gprs_data->data.contexts[gprs_data->data.numContexts]), para, 
+               */
+              memcpy (&(gprs_data->data.contexts[gprs_data->data.numContexts]), para,
                 sizeof (T_MFW_GPRS_CONTEXT));
               gprs_data->data.numContexts++;
             }
@@ -468,9 +468,9 @@
 			 * Don't check if unchanged, as this rejects some cases
 			 * where signal needs to be sent to BMI
 			 */
-			 
+
             gprs_data->data.attached = para->attached;
-            
+
             /*
              * set all contexts to deactivated after detach
              */
@@ -499,14 +499,14 @@
             /*
              * search in the known context for the context ids given
              * in the parameter
-             */ 
+             */
             for ( i=0; i > gprs_data->data.numContexts; i++)
             {
               j=0;
 
               do
               {
-                /* 
+                /*
                  * set the new activation state for the found context id
                  */
                 if ( para->contextAct.ids[j] == gprs_data->data.contexts[i].id)
@@ -514,32 +514,32 @@
                   gprs_data->data.contexts[i].activated = para->contextAct.state;
                 }
               }
-              while ( j < MAX_CID && 
+              while ( j < MAX_CID &&
                 (para->contextAct.ids[j] != gprs_data->data.contexts[i].id) );
             }
             break;
 
           case E_MFW_GPRS_S_DATA:
-            /* 
+            /*
              * if attached mode was detached, set mode to attached
-             */ 
+             */
               if ( gprs_data->data.attached == CGATT_STATE_DETACHED )
               {
-                gprs_data->data.attached = CGATT_STATE_ATTACHED; 
+                gprs_data->data.attached = CGATT_STATE_ATTACHED;
               }
-            
+
             /*
              * search in the known context for the context ids given
              * in the parameter
-             */ 
+             */
              for ( i=0; i < gprs_data->data.numContexts; i++)
             {
               j=0;
 
               do
               {
-                /* 
-                 * if context id of parameter is known, set the activation state 
+                /*
+                 * if context id of parameter is known, set the activation state
                  * to activated when it was detached and copy L2P value
                  */
                 if ( para->contextL2P.ids[j] == gprs_data->data.contexts[i].id)
@@ -548,9 +548,9 @@
                   {
                     gprs_data->data.contexts[j].activated = CGACT_STATE_ACTIVATED;
                   }
-          
+
                   if (!(gprs_data->data.contexts[i].L2P) )
-                    gprs_data->data.contexts[i].L2P = 
+                    gprs_data->data.contexts[i].L2P =
                      (char *)  mfwAlloc(sizeof(char) * strlen(para->contextL2P.L2P));
 
                   memcpy (gprs_data->data.contexts[i].L2P, para->contextL2P.L2P,
@@ -558,7 +558,7 @@
                 }
                 j++;
               }
-              while ( j < MAX_CID && 
+              while ( j < MAX_CID &&
                 ( para->contextL2P.ids[j]!= gprs_data->data.contexts[i].id) );
             }
             break;
@@ -571,31 +571,31 @@
 
           case E_MFW_GPRS_S_QOS:
           case E_MFW_GPRS_R_QOS:
-            for ( i=0; (i > gprs_data->data.numContexts) && 
+            for ( i=0; (i > gprs_data->data.numContexts) &&
                 (gprs_data->data.contexts[i].id == para->context.id); i++);
 
-            if (gprs_data->data.contexts[i].id == para->context.id) 
-              memcpy (&(gprs_data->data.contexts[i].data.qos), 
+            if (gprs_data->data.contexts[i].id == para->context.id)
+              memcpy (&(gprs_data->data.contexts[i].data.qos),
 #ifdef FF_2TO1_PS
                       &(para->context.data.qos), sizeof(T_PS_qos));
 #else
                       &(para->context.data.qos), sizeof(T_PS_qos));
-#endif            
+#endif
             else
               TRACE_ERROR("context id not defined");
             break;
 
           case E_MFW_GPRS_S_QOS_MIN:
-            for ( i=0; (i > gprs_data->data.numContexts) && 
+            for ( i=0; (i > gprs_data->data.numContexts) &&
                 (gprs_data->data.contexts[i].id == para->context.id); i++);
 
-            if (gprs_data->data.contexts[i].id == para->context.id) 
-              memcpy (&(gprs_data->data.contexts[i].data.min_qos), 
+            if (gprs_data->data.contexts[i].id == para->context.id)
+              memcpy (&(gprs_data->data.contexts[i].data.min_qos),
 #ifdef FF_2TO1_PS
                 &(para->context.data.min_qos), sizeof(T_PS_qos));
 #else
                 &(para->context.data.min_qos), sizeof(T_PS_qos));
-#endif            
+#endif
             else
               TRACE_ERROR("context id not defined");
             break;
@@ -610,26 +610,26 @@
              * search for context
              */
             /* SPR#2243 - SH - Changed 'para->context' to 'para->erepAct' */
-            for ( i=0; (i > gprs_data->data.numContexts) && 
+            for ( i=0; (i > gprs_data->data.numContexts) &&
                 (gprs_data->data.contexts[i].id == para->erepAct.cid); i++);
 
             /*
              * if context found, copy PDP address data to MFW data
              */
             /* SPR#2243 - SH - Changed 'para->context' to 'para->erepAct' */
-            if (gprs_data->data.contexts[i].id == para->erepAct.cid) 
+            if (gprs_data->data.contexts[i].id == para->erepAct.cid)
             {
 #ifdef FF_2TO1_PS
-              memcpy (&(gprs_data->data.contexts[i].data.attributes.pdp_addr), 
+              memcpy (&(gprs_data->data.contexts[i].data.attributes.pdp_addr),
                 &para->erepAct.pdp_addr, sizeof(T_NAS_ip));
-              memcpy (&(gprs_data->data.contexts[i].data.attributes.pdp_type), 
+              memcpy (&(gprs_data->data.contexts[i].data.attributes.pdp_type),
                 &para->erepAct.pdp_type, sizeof(T_NAS_ip));
 #else
-              memcpy (&(gprs_data->data.contexts[i].data.attributes.pdp_addr), 
+              memcpy (&(gprs_data->data.contexts[i].data.attributes.pdp_addr),
                 &para->erepAct.pdp_addr, sizeof(T_NAS_ip));
-              memcpy (&(gprs_data->data.contexts[i].data.attributes.pdp_type), 
+              memcpy (&(gprs_data->data.contexts[i].data.attributes.pdp_type),
                 &para->erepAct.pdp_type, sizeof(T_PDP_TYPE));
-#endif              
+#endif
               gprs_data->data.contexts[i].activated = CGACT_STATE_ACTIVATED;
             }
             else
@@ -643,12 +643,12 @@
                   para->erepAct.pdp_type, sizeof (T_PDP_TYPE));
                 gprs_data->data.contexts[gprs_data->data.numContexts].id = (U8)para->erepAct.cid;
 #else
-                memcpy (&(gprs_data->data.contexts[gprs_data->data.numContexts].data.attributes.pdp_addr), &para->erepAct.pdp_addr, 
+                memcpy (&(gprs_data->data.contexts[gprs_data->data.numContexts].data.attributes.pdp_addr), &para->erepAct.pdp_addr,
                   sizeof (T_NAS_ip));
-                memcpy (&(gprs_data->data.contexts[gprs_data->data.numContexts].data.attributes.pdp_type),para->erepAct.pdp_type, 
+                memcpy (&(gprs_data->data.contexts[gprs_data->data.numContexts].data.attributes.pdp_type),para->erepAct.pdp_type,
                   sizeof (T_PDP_TYPE));
                 gprs_data->data.contexts[gprs_data->data.numContexts].id = para->erepAct.cid;
-#endif                
+#endif
                 gprs_data->data.contexts[gprs_data->data.numContexts].activated = CGACT_STATE_ACTIVATED;
                 gprs_data->data.numContexts++;
               }
@@ -663,25 +663,25 @@
             /*
              * search for context
              */
-              for ( i=0; (i > gprs_data->data.numContexts) && 
+              for ( i=0; (i > gprs_data->data.numContexts) &&
                 (gprs_data->data.contexts[i].id == para->context.id); i++);
 
             /*
              * if context found, copy PDP address data to MFW data
              */
-              if (gprs_data->data.contexts[i].id == para->context.id) 
+              if (gprs_data->data.contexts[i].id == para->context.id)
             {
 #ifdef FF_2TO1_PS
-              memcpy (&(gprs_data->data.contexts[i].data.attributes.pdp_addr), 
+              memcpy (&(gprs_data->data.contexts[i].data.attributes.pdp_addr),
                 &para->context.data.attributes.pdp_addr, sizeof(T_NAS_ip));
-              memcpy (&(gprs_data->data.contexts[i].data.attributes.pdp_type), 
+              memcpy (&(gprs_data->data.contexts[i].data.attributes.pdp_type),
                 &para->context.data.attributes.pdp_type, sizeof(T_PDP_TYPE));
 #else
-              memcpy (&(gprs_data->data.contexts[i].data.attributes.pdp_addr), 
+              memcpy (&(gprs_data->data.contexts[i].data.attributes.pdp_addr),
                 &para->context.data.attributes.pdp_addr, sizeof(T_NAS_ip));
-              memcpy (&(gprs_data->data.contexts[i].data.attributes.pdp_type), 
+              memcpy (&(gprs_data->data.contexts[i].data.attributes.pdp_type),
                 &para->context.data.attributes.pdp_type, sizeof(T_PDP_TYPE));
-#endif              
+#endif
               gprs_data->data.contexts[i].activated = para->context.activated;
             }
             else
@@ -700,7 +700,7 @@
                 memcpy (&(gprs_data->data.contexts[gprs_data->data.numContexts].data.attributes.pdp_type),
                   &para->context.data.attributes.pdp_type, sizeof (T_PDP_TYPE));
                 gprs_data->data.contexts[gprs_data->data.numContexts].id = para->context.id;
-#endif                
+#endif
                 gprs_data->data.contexts[gprs_data->data.numContexts].activated = para->context.activated;
                 gprs_data->data.numContexts++;
               }
@@ -713,19 +713,19 @@
             /*
              * search for context
              */
-            for ( i=0; (i < gprs_data->data.numContexts) && 
+            for ( i=0; (i < gprs_data->data.numContexts) &&
                 (gprs_data->data.contexts[i].id != para->erepAct.cid); i++);
 
             /*
              * if context found, set mode to deactivated
              */
-            if (gprs_data->data.contexts[i].id == para->erepAct.cid) 
+            if (gprs_data->data.contexts[i].id == para->erepAct.cid)
             {
               gprs_data->data.contexts[i].activated = CGACT_STATE_DEACTIVATED;
             }
             else
             {
-              for ( i=0; (i < gprs_data->data.numContexts) && 
+              for ( i=0; (i < gprs_data->data.numContexts) &&
 #ifdef FF_2TO1_PS
               ( strcmp(gprs_data->data.contexts[i].data.attributes.pdp_type, para->erepAct.pdp_type) ||
 				    strcmp((const char *)&gprs_data->data.contexts[i].data.attributes.pdp_addr.ip_address.ipv4_addr.a4,
@@ -735,23 +735,23 @@
                   ( strcmp(gprs_data->data.contexts[i].data.attributes.pdp_type, para->erepAct.pdp_type) ||
 				    strcmp((const char *)&gprs_data->data.contexts[i].data.attributes.pdp_addr.ip_address.ipv4_addr.a4
 				    , (const char *)&para->erepAct.pdp_addr.ip_address.ipv4_addr.a4 )); i++);
-#endif              
+#endif
 
               /*
                * if context found, set mode to deactivated
                */
 #ifdef FF_2TO1_PS
               if (!strcmp((const char *)&gprs_data->data.contexts[i].data.attributes.pdp_type, (const char *)&para->erepAct.pdp_type) &&
-                  !strcmp((const char *)&gprs_data->data.contexts[i].data.attributes.pdp_addr.ip_address.ipv4_addr.a4, (const char *)&para->erepAct.pdp_addr.ip_address.ipv4_addr.a4) ) 
+                  !strcmp((const char *)&gprs_data->data.contexts[i].data.attributes.pdp_addr.ip_address.ipv4_addr.a4, (const char *)&para->erepAct.pdp_addr.ip_address.ipv4_addr.a4) )
 #else
    if (!strcmp((const char *)&gprs_data->data.contexts[i].data.attributes.pdp_type, (const char *)&para->erepAct.pdp_type) &&
-                  !strcmp((const char *)&gprs_data->data.contexts[i].data.attributes.pdp_addr.ip_address.ipv4_addr.a4, (const char *)&para->erepAct.pdp_addr.ip_address.ipv4_addr.a4) ) 
-#endif                  
+                  !strcmp((const char *)&gprs_data->data.contexts[i].data.attributes.pdp_addr.ip_address.ipv4_addr.a4, (const char *)&para->erepAct.pdp_addr.ip_address.ipv4_addr.a4) )
+#endif
               {
                 gprs_data->data.contexts[i].activated = CGACT_STATE_DEACTIVATED;
 			  }
             }
-            
+
             break;
 
           case E_MFW_GPRS_S_AUTORESP:
@@ -766,7 +766,7 @@
              * copy new event reporting settings to MFW data
              */
             gprs_data->data.eventRep.mode = para->eventRep.mode;
-            gprs_data->data.eventRep.bfr  = para->eventRep.bfr;            
+            gprs_data->data.eventRep.bfr  = para->eventRep.bfr;
             break;
 
           case E_MFW_GPRS_R_EREP_RJ:
@@ -818,23 +818,23 @@
             TRACE_EVENT("mfw_gprs.gprs_sign_exec: unused event");
             break;
         }
-  
-        /* 
-         * if callback defined, call it 
+
+        /*
+         * if callback defined, call it
          */
         if ( gprs_data->handler )
         {
           current_mfw_elem = cur_elem;
 
-          if ( (*(gprs_data->handler))( gprs_data->event, 
+          if ( (*(gprs_data->handler))( gprs_data->event,
                                       (void*)&gprs_data->data ) )
             return TRUE;
         }
       }
     }
 
-    /* 
-     * look for next element 
+    /*
+     * look for next element
      */
     cur_elem = cur_elem->next;
   }
@@ -848,7 +848,7 @@
 | STATE  : code                         ROUTINE: gprs_ok             |
 +--------------------------------------------------------------------+
 
-   PURPOSE : success indication from ACI 
+   PURPOSE : success indication from ACI
              (This function is called by rAT_OK)
 
    PARAMETERS : AT command ID
@@ -858,7 +858,7 @@
   TRACE_FUNCTION("mfw_gprs.gprs_ok");
 
   gprs_signal(E_MFW_GPRS_OK, &cmdId);
-  
+
   return;
 }
 
@@ -869,7 +869,7 @@
 | STATE  : code                         ROUTINE: gprs_error          |
 +--------------------------------------------------------------------+
 
-   PURPOSE : failure indication from ACI 
+   PURPOSE : failure indication from ACI
              (This function is called by rAT_PlusCME)
 
    PARAMETERS : AT command ID
@@ -877,9 +877,9 @@
 void gprs_error(T_ACI_AT_CMD cmdId, T_ACI_CME_ERR err)
 {
   TRACE_FUNCTION("mfw_gprs.gprs_error");
- 
+
   gprs_signal(E_MFW_GPRS_ERROR, &cmdId);
-  
+
   return;
 }
 
@@ -935,8 +935,8 @@
 +---------------------------------------------------------------------+
 
 
-   PURPOSE : Define PDP context. If the contexts for cid does not 
-             exist in the contexts list, the new context will be 
+   PURPOSE : Define PDP context. If the contexts for cid does not
+             exist in the contexts list, the new context will be
              inserted in the contexts list.
 
    PARAMETERS :
@@ -946,7 +946,7 @@
 #ifdef FF_2TO1_PS
 T_MFW_RES gprs_definePDPContext(SHORT cid, T_PDP_CONTEXT *inputCtxt)
 {
-  T_MFW_GPRS_CONTEXT *context; 
+  T_MFW_GPRS_CONTEXT *context;
 
   TRACE_FUNCTION ("gprs_definePDPContext()");
 
@@ -977,7 +977,7 @@
 #else
 T_MFW_RES gprs_definePDPContext(SHORT cid, T_PDP_CONTEXT *inputCtxt)
 {
-  T_MFW_GPRS_CONTEXT *context; 
+  T_MFW_GPRS_CONTEXT *context;
 
   TRACE_FUNCTION ("gprs_definePDPContext()");
 
@@ -1016,8 +1016,8 @@
 +---------------------------------------------------------------------+
 
 
-   PURPOSE : Set the Quality of Service Profile for the context 
-             specified by cid. The Quality of Service Profile is given 
+   PURPOSE : Set the Quality of Service Profile for the context
+             specified by cid. The Quality of Service Profile is given
              in the pointer parameter qos.
 
    PARAMETERS :
@@ -1027,7 +1027,7 @@
 #ifdef FF_2TO1_PS
 T_MFW_RES gprs_setQOS(SHORT cid ,T_PS_qos *inputQos)
 {
-  T_MFW_GPRS_CONTEXT *cntxt; 
+  T_MFW_GPRS_CONTEXT *cntxt;
 
   TRACE_FUNCTION ("gprs_setQOS()");
 
@@ -1055,7 +1055,7 @@
 #else
 T_MFW_RES gprs_setQOS(SHORT cid ,T_PS_qos *inputQos)
 {
-  T_MFW_GPRS_CONTEXT *cntxt; 
+  T_MFW_GPRS_CONTEXT *cntxt;
 
   TRACE_FUNCTION ("gprs_setQOS()");
 
@@ -1090,7 +1090,7 @@
 +---------------------------------------------------------------------+
 
 
-   PURPOSE : Set the minimum acceptable Quality of Service Profile for 
+   PURPOSE : Set the minimum acceptable Quality of Service Profile for
              the context specified by cid.
 
    PARAMETERS :
@@ -1100,7 +1100,7 @@
 #ifdef FF_2TO1_PS
 T_MFW_RES gprs_setQOSMin(SHORT cid ,T_PS_qos *inputQos)
 {
-  T_MFW_GPRS_CONTEXT *cntxt; 
+  T_MFW_GPRS_CONTEXT *cntxt;
 
   TRACE_FUNCTION ("gprs_setQOSMin()");
 
@@ -1128,7 +1128,7 @@
 #else
 T_MFW_RES gprs_setQOSMin(SHORT cid ,T_PS_qos *inputQos)
 {
-  T_MFW_GPRS_CONTEXT *cntxt; 
+  T_MFW_GPRS_CONTEXT *cntxt;
 
   TRACE_FUNCTION ("gprs_setQOSMin()");
 
@@ -1163,8 +1163,8 @@
 +---------------------------------------------------------------------+
 
 
-   PURPOSE : Attach to or detach from the GPRS Service. The parameter 
-             state indicates the state of GPRS attchement 
+   PURPOSE : Attach to or detach from the GPRS Service. The parameter
+             state indicates the state of GPRS attchement
 
    PARAMETERS :
              state    : attachement state ( 0 - detached, 1 - attached)
@@ -1173,7 +1173,7 @@
 T_MFW_RES gprs_attach(T_CGATT_STATE state)
 {
   T_ACI_RETURN result;
-  
+
   TRACE_FUNCTION ("gprs_attach()");
 
   /*
@@ -1186,7 +1186,7 @@
   TRACE_EVENT("MFW_GPRS: Error. sAT_PlusCGATT failed");
     return MFW_RES_ERR;
   	}
-  
+
   /*
    * change attachement state in MFW GPRS data
    */
@@ -1206,16 +1206,16 @@
 
    PURPOSE : Cancel attachment to or detachment from GPRS service
    SPR#1983 - SH - Added.
-              
+
    PARAMETERS : None.
-   
+
 */
 T_MFW_RES gprs_attach_abort(void)
 {
 	T_ACI_RETURN result;
 
 	TRACE_EVENT("gprs_attach_abort()");
-	
+
 	result = sAT_Abort(CMD_SRC_LCL, AT_CMD_CGATT);
 
 	if (result==AT_FAIL)
@@ -1232,12 +1232,12 @@
 +----------------------------------------------------------------------+
 
 
-   PURPOSE : Activate or Deactivate PDP contexts. The parameter state 
+   PURPOSE : Activate or Deactivate PDP contexts. The parameter state
              indicates the state of GPRS activation.
-             The parameter cids points to a list of contexts definitions. 
-             If the list is empty all contexts will be attached or 
-             detached. If the mobile is not attached before, a GPRS 
-             attach is first performed. 
+             The parameter cids points to a list of contexts definitions.
+             If the list is empty all contexts will be attached or
+             detached. If the mobile is not attached before, a GPRS
+             attach is first performed.
 
    PARAMETERS :
              state    : activation state ( 0 - deactivated, 1 - activated)
@@ -1245,7 +1245,7 @@
 */
 T_MFW_RES gprs_contextActivation(T_CGACT_STATE state, SHORT *cids)
 {
-  T_MFW_GPRS_CNTXT_ACT *cntxtAct; 
+  T_MFW_GPRS_CNTXT_ACT *cntxtAct;
 
   TRACE_FUNCTION ("gprs_contextActivation()");
 
@@ -1256,7 +1256,7 @@
   if (sAT_PlusCGACT(CMD_SRC_LCL, state, (U8 *)cids) == AT_FAIL)
 #else
   if (sAT_PlusCGACT(CMD_SRC_LCL, state, cids) == AT_FAIL)
-#endif      
+#endif
   {
   TRACE_EVENT("MFW_GPRS: Error. sAT_PlusCGCACT failed");
     return MFW_RES_ERR;
@@ -1284,8 +1284,8 @@
 +---------------------------------------------------------------------+
 
 
-   PURPOSE : Enter data state. Whatever actions are necessary to 
-             establish communication between the TE and the network 
+   PURPOSE : Enter data state. Whatever actions are necessary to
+             establish communication between the TE and the network
              will be performed (e.g. attach, context activate)
    PARAMETERS :
              L2P      : Layer 2 protocoll
@@ -1295,7 +1295,7 @@
 #ifdef FF_2TO1_PS
 T_MFW_RES gprs_setData(char *L2P, SHORT *cids)
 {
-  T_MFW_GPRS_CNTXT_L2P *cntxtL2P; 
+  T_MFW_GPRS_CNTXT_L2P *cntxtL2P;
 
   TRACE_FUNCTION ("gprs_setData()");
 
@@ -1329,7 +1329,7 @@
 #else
 T_MFW_RES gprs_setData(char *L2P, SHORT *cids)
 {
-  T_MFW_GPRS_CNTXT_L2P *cntxtL2P; 
+  T_MFW_GPRS_CNTXT_L2P *cntxtL2P;
 
   TRACE_FUNCTION ("gprs_setData()");
 
@@ -1371,13 +1371,13 @@
 +-----------------------------------------------------------------------+
 
 
-   PURPOSE : Show PDP address. The Function sets the pointer pdp_adress 
-             to a list of PDP addresses for the specified context 
+   PURPOSE : Show PDP address. The Function sets the pointer pdp_adress
+             to a list of PDP addresses for the specified context
              identifiers in the parameter cids.
 
    PARAMETERS :
              pdp_address: list of contexts
-   
+
    RETURNS:
              MFW_RES_OK:  On success
        MFW_RES_ERR: On failure
@@ -1387,7 +1387,7 @@
 {
   int i;
 
-  T_MFW_GPRS_CONTEXT *cntxt; 
+  T_MFW_GPRS_CONTEXT *cntxt;
 
   TRACE_FUNCTION ("gprs_showPDPAddress()");
 
@@ -1421,7 +1421,7 @@
 {
   int i;
 
-  T_MFW_GPRS_CONTEXT *cntxt; 
+  T_MFW_GPRS_CONTEXT *cntxt;
 
   TRACE_FUNCTION ("gprs_showPDPAddress()");
 
@@ -1460,9 +1460,9 @@
 +----------------------------------------------------------------------+
 
 
-   PURPOSE : Enable or Disable an automatic positive response to the 
-             receipt of Context Activation Requests from the network. 
-             The parameter mode indicates if the automatic response will 
+   PURPOSE : Enable or Disable an automatic positive response to the
+             receipt of Context Activation Requests from the network.
+             The parameter mode indicates if the automatic response will
              be enabled or disabled.
 
    PARAMETERS :
@@ -1498,8 +1498,8 @@
 +----------------------------------------------------------------------+
 
 
-   PURPOSE : This Function is for a manual response to network request 
-             for PDP context activation. The parameter response 
+   PURPOSE : This Function is for a manual response to network request
+             for PDP context activation. The parameter response
              indicates if the request will be accepted or rejected.
    PARAMETERS :
              response : ( 0 - rejected, 1 - accepted)
@@ -1533,7 +1533,7 @@
 +----------------------------------------------------------------------+
 
 
-   PURPOSE : Set the mobile to operate according to a GPRS mobile class. 
+   PURPOSE : Set the mobile to operate according to a GPRS mobile class.
 
    PARAMETERS :
              m_class : GPRS mobile class
@@ -1579,17 +1579,17 @@
 +----------------------------------------------------------------------+
 
 
-   PURPOSE : Enables or Disables  the sending of certain events 
-             occuring in the GPRS ME or the network to the TE. 
+   PURPOSE : Enables or Disables  the sending of certain events
+             occuring in the GPRS ME or the network to the TE.
 
    PARAMETERS :
-             mode : mode to specifies if the event reporting will be 
+             mode : mode to specifies if the event reporting will be
                     enabled or disabled
-             bfr  : controls the effect on buffered events. 
+             bfr  : controls the effect on buffered events.
 */
 T_MFW_RES gprs_setEventReporting(T_CGEREP_MODE mode, T_CGEREP_BFR bfr)
 {
-  T_MFW_GPRS_EVENTREP *eventRep; 
+  T_MFW_GPRS_EVENTREP *eventRep;
 
   TRACE_FUNCTION ("gprs_setEventReporting()");
 
@@ -1619,12 +1619,12 @@
 +----------------------------------------------------------------------+
 
 
-   PURPOSE : The function specifies the service or service preference 
-             to be used for SMS. 
- 
+   PURPOSE : The function specifies the service or service preference
+             to be used for SMS.
+
 
    PARAMETERS :
-             n : service to use for SMS ( 0 - GPRS, 1 - circuit switch, 
+             n : service to use for SMS ( 0 - GPRS, 1 - circuit switch,
                  2 - GPRS preferred, 3 circuit switch preferred)
 */
 
@@ -1656,17 +1656,17 @@
 
 
    PURPOSE : This function returns the service preference to be used for SMS.
- 
+
 
    PARAMETERS :
-             n : service to use for SMS ( 0 - GPRS, 1 - circuit switch, 
+             n : service to use for SMS ( 0 - GPRS, 1 - circuit switch,
                  2 - GPRS preferred, 3 circuit switch preferred)
 */
 
 T_CGSMS_SERVICE gprs_getServiceSMS(void)
-{	
+{
 	T_CGSMS_SERVICE service;
-	
+
  if (qAT_PlusCGSMS(CMD_SRC_LCL, &service) != AT_FAIL )
     return service;
   else
@@ -1694,13 +1694,13 @@
 	TRACE_FUNCTION("gprs_counter");
 
 	result = sAT_PercentSNCNT(CMD_SRC_LCL, reset_counter);
-	
+
 	if (result!=AT_EXCT && result!=AT_CMPL)
 		return MFW_RES_ERR;
 
 	if (result==AT_CMPL)
 		return MfwResDone;		/* No response expected */
-		
+
 	return MFW_RES_OK;
 }
 
@@ -1714,15 +1714,15 @@
 
    PURPOSE : Cancel request for data count
    SPR#1983 - SH - Added.
-              
+
    PARAMETERS : None.
-   
+
 */
 
 T_MFW_RES gprs_counter_abort(void)
 {
 	T_ACI_RETURN result;
-	
+
 	result = sAT_Abort(CMD_SRC_LCL, AT_CMD_SNCNT);
 
 	if (result==AT_FAIL)
@@ -1746,23 +1746,23 @@
 /* =========================================================== */
 int mfw_gprs_edge_status(int *iStatus)
 {
-       /* Get the registered status */ 
+       /* Get the registered status */
 	T_P_CGREG_STAT status = (T_P_CGREG_STAT)0;
-	T_ACI_CREG_STAT stat = (T_ACI_CREG_STAT)0; 
+	T_ACI_CREG_STAT stat = (T_ACI_CREG_STAT)0;
 	USHORT lac = 0;
 	USHORT cid = 0;
 	U8 rat          = 0;
 	U8 gprs_ind = 0;
 	/* char temp[TEMP_STRING_SIZE]; */
 
- 
+
        /* Get the GPRS registered status */
 	if (qAT_PercentCGREG(CMD_SRC_LCL, &status, &lac, &cid) == AT_FAIL )
  	{
     	     TRACE_EVENT("MFW_GPRS: Error. qAT_PercentCGREG failed");
 
-	      *iStatus = (int)0; /* GSM only */  
-		return 0;            /* rat - returned as GSM only */			 
+	      *iStatus = (int)0; /* GSM only */
+		return 0;            /* rat - returned as GSM only */
 	}
 
 
@@ -1775,7 +1775,7 @@
 	if(qAT_PercentCREG(CMD_SRC_LCL, &stat, &lac, &cid, &gprs_ind, &rat) NEQ AT_CMPL)
 	{
     	     TRACE_EVENT("MFW_GPRS: Error. qAT_PercentCREG failed");
-	       
+
 	      *iStatus = (int)status;
 		return 0;                    /* rat - returned as GSM only */
 	}
@@ -1805,14 +1805,14 @@
 
 	T_CGREG_STAT status = (T_CGREG_STAT)0;
 	USHORT lac, ci;
-	
+
 	TRACE_FUNCTION("gprs_status");
 
 	if (qAT_PlusCGREG(CMD_SRC_LCL, &status, &lac, &ci) == AT_FAIL )
  	{
     	TRACE_EVENT("MFW_GPRS: Error. qAT_PlusCGREG failed");
 	}
-		
+
 	return status;
 }
 //x0035544 Feb 23, 2006 DR:OMAPS00068976
@@ -1826,20 +1826,20 @@
 
 T_P_CGREG_STAT status = (T_P_CGREG_STAT)0;
 	USHORT lac, ci;
-	
+
 	TRACE_FUNCTION("p_gprs_status");
 
 	if (qAT_PercentCGREG(CMD_SRC_LCL, &status, &lac, &ci) == AT_FAIL )
 	{
 		TRACE_EVENT("MFW_GPRS: Error. qAT_PercentCGREG failed");
 	}
-			  
+
 	return status;
 }
 
 
 /*--------------------------------------------------------------------
-  ACI callback functions 
+  ACI callback functions
 --------------------------------------------------------------------*/
 
 /*
@@ -1849,12 +1849,12 @@
 +--------------------------------------------------------------------+
 
 
-   PURPOSE : The function rAt_PlusCGACT informs the application about 
+   PURPOSE : The function rAt_PlusCGACT informs the application about
              the link identifier for the data transfer.
              ( ACI callback funtion )
 
    PARAMETERS :
-             link_id: Link identifier                 
+             link_id: Link identifier
 
 */
 void rAT_PlusCGACT ( SHORT link_id )
@@ -1875,13 +1875,13 @@
 +--------------------------------------------------------------------+
 
 
-   PURPOSE : The function rAt_PlusCGDATA informs the application about 
-             the link identifier for the data transfer after 
+   PURPOSE : The function rAt_PlusCGDATA informs the application about
+             the link identifier for the data transfer after
              activation/deactivation (without connect).
              ( ACI callback funtion )
 
    PARAMETERS :
-             link_id: Link identifier                 
+             link_id: Link identifier
 */
 void rAT_PlusCGDATA ( SHORT link_id )
 {
@@ -1901,14 +1901,14 @@
 +--------------------------------------------------------------------+
 
 
-   PURPOSE : The function rAt_PlusCGANS informs the application about 
-             the link identifier for the data transfer. It is a 
-             manual reponse to a network request for PDP context 
+   PURPOSE : The function rAt_PlusCGANS informs the application about
+             the link identifier for the data transfer. It is a
+             manual reponse to a network request for PDP context
              activation (after request by +CRING or RING).
              ( ACI callback funtion )
 
    PARAMETERS :
-             link_id: Link identifier                 
+             link_id: Link identifier
 */
 void rAT_PlusCGANS ( SHORT link_id )
 {
@@ -1928,16 +1928,16 @@
 +--------------------------------------------------------------------+
 
 
-   PURPOSE : The function rAt_PlusCGEREP informs the application about 
-             GPRS events connect. 
+   PURPOSE : The function rAt_PlusCGEREP informs the application about
+             GPRS events connect.
              ( ACI callback funtion )
 
    PARAMETERS :
-             event  : GPRS event       
-             param  : event parameter 
-             
+             event  : GPRS event
+             param  : event parameter
+
 */
-void rAT_PlusCGEREP ( T_CGEREP_EVENT            event, 
+void rAT_PlusCGEREP ( T_CGEREP_EVENT            event,
                       T_CGEREP_EVENT_REP_PARAM *param )
 {
 
@@ -2007,7 +2007,7 @@
 
     case CGEREP_EVENT_NW_DETACH:
     case CGEREP_EVENT_ME_DETACH:
-    
+
       /* gprs_signal(E_MFW_GPRS_R_EREP_ATT, &state);   - Use a different event for %CGEV */
       break;
 
@@ -2048,19 +2048,19 @@
 +--------------------------------------------------------------------+
 
 
-   PURPOSE : The function rAt_PlusCGREG informs the application about 
+   PURPOSE : The function rAt_PlusCGREG informs the application about
              the GPRS registration status and location information.
              ( ACI callback funtion )
 
    PARAMETERS :
              stat   : indicates the current registration
-             lac    : two byte location area code   
-             ci     : two byte cell ID    
+             lac    : two byte location area code
+             ci     : two byte cell ID
 */
-void rAT_PlusCGREG  ( T_CGREG_STAT stat, 
-                      USHORT       lac, 
+void rAT_PlusCGREG  ( T_CGREG_STAT stat,
+                      USHORT       lac,
                       USHORT       ci )
-{ 
+{
   T_MFW_GPRS_CELL_STRUCT cell;
 
   TRACE_FUNCTION ("rAT_PlusCGREG()");
@@ -2093,7 +2093,7 @@
 GLOBAL void rAT_PercentCGREG ( T_P_CGREG_STAT stat, USHORT lac, USHORT ci, BOOL bActiveContext )
 
 {
-  
+
   T_MFW_GPRS_CELL_STRUCT_P cell;
 
   TRACE_FUNCTION ("rAT_PercentCGREG()");
@@ -2121,20 +2121,20 @@
 +--------------------------------------------------------------------+
 
 
-   PURPOSE : The function rAt_changedQOS informs the application about 
+   PURPOSE : The function rAt_changedQOS informs the application about
              changes for the Quality of Service Profiles.
              ( ACI callback funtion )
 
    PARAMETERS :
-             cid    : 
-            *qos    : 
+             cid    :
+            *qos    :
 */
 // ADDED - 1-11-2005
 #ifdef FF_2TO1_PS
-void rAT_changedQOS ( U8  cid, 
+void rAT_changedQOS ( U8  cid,
                       T_PS_qos *qos )
 {
-  T_MFW_GPRS_CONTEXT *cntxt; 
+  T_MFW_GPRS_CONTEXT *cntxt;
 
   TRACE_FUNCTION ("rAT_changedQOS()");
 
@@ -2151,10 +2151,10 @@
 }
 
 #else
-void rAT_changedQOS ( SHORT cid, 
+void rAT_changedQOS ( SHORT cid,
                       T_PS_qos *qos )
 {
-  T_MFW_GPRS_CONTEXT *cntxt; 
+  T_MFW_GPRS_CONTEXT *cntxt;
 
   TRACE_FUNCTION ("rAT_changedQOS()");
 
@@ -2192,13 +2192,13 @@
 	T_MFW_GPRS_COUNTER	counter;
 
 	TRACE_FUNCTION("rAT_PercentSNCNT()");
-		
+
 	counter.octets_uplink = octets_uplink;
 	counter.octets_downlink = octets_downlink;
 	counter.packets_uplink = packets_uplink;
 	counter.packets_downlink = packets_downlink;
 
 	gprs_signal(E_MFW_GPRS_COUNTER, &counter);
-	
+
 	return;
 }