changeset 340:9f3ff430307a

macs.c reconstructed, perfect match to original TCS211 object
author Mychaela Falconia <falcon@freecalypso.org>
date Sun, 29 Oct 2017 23:36:00 +0000
parents 3c3b9bdd206b
children 01b78eaf67e2
files chipsetsw/layer1/cmacs/macs.c
diffstat 1 files changed, 6 insertions(+), 39 deletions(-) [+]
line wrap: on
line diff
--- a/chipsetsw/layer1/cmacs/macs.c	Sun Oct 29 19:06:19 2017 +0000
+++ b/chipsetsw/layer1/cmacs/macs.c	Sun Oct 29 23:36:00 2017 +0000
@@ -1400,7 +1400,7 @@
       #endif
           #endif
 
-      //i = 0;//OMAPS00090550
+      i = 0;
 
       /*---------------------------------------------------------*/
       /* Poll responses processing                               */
@@ -1410,11 +1410,10 @@
           #endif
 
       /* While a poll response is requested */
-      for(i=0;i<=3;i++) //OMAPS00090550
-      {
-      	if( ((((UWORD8) NDB_PTR->a_pu_gprs[i][0]) & 0xF) == CS1_TYPE_POLL)
-           || ((((UWORD8) NDB_PTR->a_pu_gprs[i][0]) & 0xF) == CS_PAB8_TYPE)
-           || ((((UWORD8) NDB_PTR->a_pu_gprs[i][0]) & 0xF) == CS_PAB11_TYPE))
+      while (  (   ((((UWORD8) NDB_PTR->a_pu_gprs[i][0]) & 0xF) == CS1_TYPE_POLL)
+                || ((((UWORD8) NDB_PTR->a_pu_gprs[i][0]) & 0xF) == CS_PAB8_TYPE)
+                || ((((UWORD8) NDB_PTR->a_pu_gprs[i][0]) & 0xF) == CS_PAB11_TYPE))
+             && (i < 4))
       {
         poll = TRUE;
 
@@ -1645,17 +1644,13 @@
           #endif
 
           // a_ul_buffer_gprs updating
-          if(poll_resp_ts < 8)
           macs.ul_buffer_index[poll_resp_ts] = i + 8;
 
           #if ((TRACE_TYPE == 1) || (TRACE_TYPE == 4))
             if (trace_info.current_config->l1_dyn_trace & 1<<L1_DYN_TRACE_CONDENSED_PDTCH)
             {
-			  if(poll_resp_ts < 8)
-			  {
               trace_info.pdtch_trace.ul_status[poll_resp_ts] |= cs_type << 4;
               trace_info.pdtch_trace.ul_status[poll_resp_ts] |= 1;
-			  }
             }
           #endif
         } // End if the poll response is processed
@@ -1672,22 +1667,9 @@
           highest_ul_ts      = highest_ul_ts_s;
           lowest_ul_ts       = lowest_ul_ts_s;
 
-              #if FF_TBF
-                #if ((TRACE_TYPE == 1) || (TRACE_TYPE == 4))
-                  if (trace_info.current_config->l1_dyn_trace & 1<<L1_DYN_TRACE_CONDENSED_PDTCH)
-                    trace_info.pdtch_trace.blk_status |= 0x01;
-                #endif
-              #else
         #if ((TRACE_TYPE == 1) || (TRACE_TYPE == 4))
           if (trace_info.current_config->l1_dyn_trace & 1<<L1_DYN_TRACE_CONDENSED_PDTCH)
-          	{
             trace_info.pdtch_trace.blk_status |= 0x01;
-            if(poll_resp_ts < 8)
-           trace_info.pdtch_trace.ul_status[poll_resp_ts] |= 0x08;
-                //Set the poll reject bit (bit3) of ul_status to 1 to indicate that the
-                //requested poll response has been rejected by MACS.
-          	}
-        #endif
         #endif
 
         #if MACS_STATUS
@@ -1719,7 +1701,6 @@
         i ++;
 
       } /* End while a poll response is requested and can be mapped */
-  } // End of for loop
 
       /*---------------------------------------------------------*/
       /* Uplink RLC/MAC data blocks processing                   */
@@ -1776,22 +1757,8 @@
               if (trace_info.current_config->l1_dyn_trace & 1<<L1_DYN_TRACE_CONDENSED_PDTCH)
               {
                 trace_info.pdtch_trace.ul_status[ts] |= ((UWORD8) cs_type) << 4;
-                if (cs_type == CS1_TYPE_DATA)
-                {
-                  //If it is CS1 block, find out whether is it is DATA or CONTROL block.
-                  UWORD8 payload = (((UWORD8) NDB_PTR->a_du_gprs[i][0]) & 0xc0);
-                  if (payload == DATA_BLOCK)
-                  {
-                    //This is a CS1 DATA block. So fillup 10 for the payload field of ul_status
                 trace_info.pdtch_trace.ul_status[ts] |= 2;
-               }
-                  else
-                  {
-                    //This is a CS1 CONTROL block. So fillup 01 for the payload field of ul_status
-                    trace_info.pdtch_trace.ul_status[ts] |= 1;
-                  }
-                }
-               }
+              }
             #endif
 
             /* A data block is assigned to timeslot ts */