RLC BO, BO response and DL Data handling. [Issue-ID: ODUHIGH-181]
[o-du/l2.git] / src / cm / rgu.c
index df5714d..3639297 100755 (executable)
@@ -398,286 +398,6 @@ Buffer *mBuf;
    return ((*func)(pst, suId, status));
 }
 
-\f
-/**
-* @brief Request from RLC to MAC for forwarding SDUs on 
- * dedicated channel for transmission
-*
-* @details
-*
-*     Function : packDlData
-*
-*  @param[in]   Pst*  pst
-*  @param[in]   SpId  spId
-*  @param[in]   RguDDatReqInfo  *  datReq
-*  @return   S16
-*      -# ROK
-**/
-uint16_t packDlData
-(
-Pst* pst,
-SpId spId,
-RlcMacData  *dlData
-)
-{
-   Buffer *mBuf = NULLP;
-   TRC3(packDlData)
-
-   if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)      
-      SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-          __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-          (ErrVal)ERGU022, (ErrVal)0, "Packing failed");
-#endif      
-      SPutSBuf(pst->region, pst->pool, (Data *)dlData, sizeof(RlcMacData));
-      return RFAILED;
-   }
-
-   if (pst->selector == ODU_SELECTOR_LWLC)
-   {
-      CMCHKPK(oduPackPointer,(PTR) dlData, mBuf);
-   }
-   else
-   {
-      /*rgu_c_001.main_5 - ADD - L2M Support */
-#ifdef LTE_L2_MEAS
-      if (packRlcMacDataInfo(pst, dlData, mBuf) != ROK)
-#else
-      if (packRlcMacDataInfo(dlData, mBuf) != ROK) 
-#endif
-      {
-#if (ERRCLASS & ERRCLS_ADD_RES)      
-         SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-          __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-          (ErrVal)ERGU023, (ErrVal)0, "Packing failed");
-#endif      
-         SPutSBuf(pst->region, pst->pool, (Data *)dlData,
-                                       sizeof(RlcMacData));
-         SPutMsg(mBuf);
-         return RFAILED;
-      }
-
-      if (SPutSBuf(pst->region, pst->pool, 
-                   (Data *)dlData, sizeof(RlcMacData)) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)      
-         SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-              __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-             (ErrVal)ERGU025, (ErrVal)0, "Packing failed");
-#endif      
-         SPutMsg(mBuf);
-         return RFAILED;
-      }
-      dlData = NULLP;
-   }
-   if (SPkS16(spId, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)      
-      SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-          __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-          (ErrVal)ERGU024, (ErrVal)0, "Packing failed");
-#endif      
-      if (dlData != NULLP)
-      {
-         SPutSBuf(pst->region, pst->pool, 
-                  (Data *)dlData, sizeof(RlcMacData));
-      }
-      SPutMsg(mBuf);
-      return RFAILED;
-   }
-   pst->event = (Event) EVTRLCDLDAT;
-   return (SPstTsk(pst,mBuf));
-}
-
-\f
-/**
-* @brief Request from RLC to MAC for forwarding SDUs on 
- * dedicated channel for transmission
-*
-* @details
-*
-*     Function : unpackDlData
-*
-*  @param[in]   Pst*  pst
-*  @param[in]   SpId  spId
-*  @param[in]   RguDDatReqInfo  *  datReq
-*  @return   S16
-*      -# ROK
-**/
-S16 unpackDlData
-(
-RlcMacDlData func,
-Pst *pst,
-Buffer *mBuf
-)
-{
-   SpId spId;
-   RlcMacData *dlData;
-   
-   TRC3(unpackDlData)
-
-   if (SUnpkS16(&spId, mBuf) != ROK) {
-      SPutMsg(mBuf);
-      return RFAILED;
-   }
-
-   if (pst->selector == ODU_SELECTOR_LWLC)
-   {
-      CMCHKUNPK(oduUnpackPointer,(PTR *) &dlData, mBuf);
-   }
-   else 
-   {
-      if ((SGetSBuf(pst->region, pst->pool, 
-                     (Data **)&dlData, sizeof(RlcMacData))) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)      
-         SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-             __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-             (ErrVal)ERGU026, (ErrVal)0, "UnPacking failed");
-#endif      
-         SPutMsg(mBuf);
-         return RFAILED;
-      }
-      cmMemset((U8*)dlData, (U8)0, sizeof(RlcMacData));
-  /*rgu_c_001.main_5 - ADD - L2M Support */
-#ifdef LTE_L2_MEAS
-      if (unpackRlcMacDataInfo(pst,dlData, mBuf) != ROK)
-#else
-      if (unpackRlcMacDataInfo(dlData, mBuf) != ROK) 
-#endif
-      {
-#if (ERRCLASS & ERRCLS_ADD_RES)      
-         SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-             __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-             (ErrVal)ERGU027, (ErrVal)0, "UnPacking failed");
-#endif      
-         SPutMsg(mBuf);
-         SPutSBuf(pst->region, pst->pool, (Data *)dlData,
-                                     sizeof(RlcMacData));
-         return RFAILED;
-      }
-   }
-   SPutMsg(mBuf);
-
-   /* TODO : change function call to send RlcMacData as below: */
-   return ((*func)(pst, spId, dlData));
-   
-   //return ((*func)(pst, spId, datReq));
-}
-
-\f
-/**
-* @brief Data Indication from MAC to RLC to 
- * forward the data received for dedicated channels
-*
-* @details
-*
-*     Function : packRcvdUlData
-*
-*  @param[in]   Pst*  pst
-*  @param[in]   SuId  suId
-*  @param[in]   RlcMacData *ulData
-*  @return   S16
-*      -# ROK
-**/
-uint8_t packRlcUlData(Pst* pst, RlcMacData  *ulData)
-{
-   Buffer *mBuf = NULLP;
-
-   if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)      
-      SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-          __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-          (ErrVal)ERGU035, (ErrVal)0, "Packing failed");
-#endif      
-      SPutStaticBuffer(pst->region, pst->pool, (Data *)ulData, sizeof(RlcMacData),0);
-      return RFAILED;
-   }
-
-   if (pst->selector == ODU_SELECTOR_LWLC)
-   {
-      CMCHKPK(oduPackPointer,(PTR)ulData, mBuf);
-   }
-   else
-   {
-      if (packRlcMacDataInfo(ulData, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)      
-            SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-                __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-                (ErrVal)ERGU036, (ErrVal)0, "Packing failed");
-#endif            
-         SPutStaticBuffer(pst->region, pst->pool, (Data *)ulData, sizeof(RlcMacData),0);
-         SPutMsg(mBuf);
-         return RFAILED;
-      }
-
-      if (SPutStaticBuffer(pst->region, pst->pool, 
-                      (Data *)ulData, sizeof(RlcMacData),0) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)      
-         SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-             __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-             (ErrVal)ERGU038, (ErrVal)0, "Packing failed");
-#endif      
-         SPutMsg(mBuf);
-         return RFAILED;
-      }
-      ulData = NULLP;
-   }
-   pst->event = (Event) EVTRLCULDAT;
-   return (SPstTsk(pst,mBuf));
-}
-
-\f
-/**
-* @brief Data Indication from MAC to RLC to 
- * forward the data received for dedicated channels
-*
-* @details
-*
-*     Function : unpackRcvdUlData
-*
-*  @param[in]   Pst*  pst
-*  @param[in]   SuId  suId
-*  @param[in]   RlcMacData  *ulData
-*  @return   S16
-*      -# ROK
-**/
-uint8_t unpackRcvdUlData(RlcMacUlDataFunc func, Pst *pst, Buffer *mBuf)
-{
-   RlcMacData *ulData;
-   
-   TRC3(unpackRcvdUlData)
-
-   if (pst->selector == ODU_SELECTOR_LWLC)
-   {
-      CMCHKUNPK(oduUnpackPointer,(PTR *) &ulData, mBuf);
-   }
-   else 
-   {
-       if ((SGetStaticBuffer(pst->region, pst->pool, 
-                    (Data **)&ulData, sizeof(RlcMacData),0)) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)      
-         SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-             __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-             (ErrVal)ERGU040, (ErrVal)0, "UnPacking failed");
-#endif      
-         SPutMsg(mBuf);
-         return RFAILED;
-      }
-      if (unpackRlcMacDataInfo(ulData, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)      
-         SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-             __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-             (ErrVal)ERGU041, (ErrVal)0, "UnPacking failed");
-#endif      
-         SPutMsg(mBuf);
-         SPutStaticBuffer(pst->region, pst->pool, 
-                    (Data *)ulData, sizeof(RlcMacData),0);
-         return RFAILED;
-      }
-   }
-   SPutMsg(mBuf);
-   return ((*func)(pst, ulData));
-}
-
-
 /*rgu_c_001.main_5 - ADD - L2M & R9 Support */
 #ifdef LTE_L2_MEAS
 
@@ -936,165 +656,6 @@ Buffer *mBuf;
 #endif
 
 
-
-\f
-/**
-* @brief Primitive invoked from RLC to MAC to 
- * inform the BO report for dedicated channels
-*
-* @details
-*
-*     Function : packBOStatus,
-*
-*  @param[in]   Pst*  pst
-*  @param[in]   SpId  spId
-*  @param[in]   RlcMacBOStatus  *  staRsp
-*  @return   S16
-*      -# ROK
-**/
-uint16_t packBOStatus
-(
-Pst* pst,
-SpId spId,
-RlcMacBOStatus  *boStatus
-)
-{
-   RlcMacBOStatus  *boStaInfo = NULL;
-   Buffer *mBuf = NULLP;
-
-   if(SGetSBuf(pst->region, pst->pool, (Data **)&boStaInfo, sizeof(RlcMacBOStatus)) != ROK)
-   {
-#if (ERRCLASS & ERRCLS_ADD_RES)      
-      SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-            __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-            (ErrVal)ERGU056, (ErrVal)0, "Packing failed");
-#endif      
-      return RFAILED;
-   }
-#ifdef ERRCLS_KW
-   /* boStaInfo cant be NULL here */
-   if (boStaInfo == NULLP)
-   {
-      return RFAILED;
-   }
-#endif
-   cmMemcpy((U8 *)boStaInfo, (U8 *)boStatus, sizeof(RlcMacBOStatus)); 
-   if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)      
-      SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-          __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-          (ErrVal)ERGU056, (ErrVal)0, "Packing failed");
-#endif      
-         SPutSBuf(pst->region, pst->pool, (Data *)boStaInfo, sizeof(RlcMacBOStatus));
-
-      return RFAILED;
-   }
-   if (pst->selector == ODU_SELECTOR_LWLC)
-   {
-      CMCHKPK(oduPackPointer,(PTR) boStaInfo, mBuf);
-   }
-   else
-   {
-      if (packBOStatusInfo(boStatus, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)      
-        SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-            __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-            (ErrVal)ERGU057, (ErrVal)0, "Packing failed");
-#endif      
-        SPutMsg(mBuf);
-        return RFAILED;
-     }
-   }
-   if (SPkS16(spId, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)      
-      SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-          __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-          (ErrVal)ERGU058, (ErrVal)0, "Packing failed");
-#endif      
-      if (boStaInfo != NULLP)
-      {
-         SPutSBuf(pst->region, pst->pool, (Data *)boStaInfo, sizeof(RlcMacBOStatus));
-      }
-      SPutMsg(mBuf);
-      return RFAILED;
-   }
-
-   pst->event = (Event)EVTRLCBOSTA;
-   return (SPstTsk(pst,mBuf));
-   SPutMsg(mBuf);
-}
-
-\f
-/**
-* @brief Primitive invoked from RLC to MAC to 
-* inform the BO report for dedicated channels
-*
-* @details
-*
-*     Function : unpackBOStatus
-*
-*  @param[in]   Pst*  pst
-*  @param[in]   SpId  spId
-*  @param[in]   RlcMacBOStatus *  staRsp
-*  @return   S16
-*      -# ROK
-**/
-uint16_t unpackBOStatus
-(
-RlcMacBoStatus func,
-Pst *pst,
-Buffer *mBuf
-)
-{
-   SpId spId;
-   RlcMacBOStatus *boSta;
-
-   TRC3(unpackBOStatus)
-
-   if (SUnpkS16(&spId, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)      
-      SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-          __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-          (ErrVal)ERGU060, (ErrVal)0, "UnPacking failed");
-#endif      
-      SPutMsg(mBuf);
-      return RFAILED;
-   }
-
-   if (pst->selector == ODU_SELECTOR_LWLC)
-   {
-      CMCHKUNPK(oduUnpackPointer,(PTR *) &boSta, mBuf);
-   }
-   else
-   {
-      if ((SGetSBuf(pst->region, pst->pool, (Data **)&boSta, 
-                                 sizeof(RlcMacBOStatus))) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)      
-         SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-             __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-             (ErrVal)ERGU061, (ErrVal)0, "UnPacking failed");
-#endif      
-         SPutMsg(mBuf);
-         return RFAILED;
-      }
-      if (unpackBOStatusInfo(boSta, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)      
-         SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-             __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-             (ErrVal)ERGU062, (ErrVal)0, "UnPacking failed");
-#endif      
-         SPutMsg(mBuf);
-         SPutSBuf(pst->region, pst->pool, (Data *)boSta, sizeof(RlcMacBOStatus));
-         return RFAILED;
-      }
-   }
-   SPutMsg(mBuf);
-  // (*func)(pst, spId, boSta);
-   SPutSBuf(pst->region, pst->pool, (Data *)boSta, sizeof(RlcMacBOStatus));
-   return ROK;
-}
-
-
    /*rgu_c_001.main_5 - ADD - L2M Support */
 #ifdef LTE_L2_MEAS
 \f
@@ -1238,229 +799,78 @@ RguHarqStatusInd  *harqStatusInd;
 #ifdef ANSI
 S16 cmUnpkRguHqStaInd
 (
-RguHqStaInd  func,
-Pst *pst,
-Buffer *mBuf
-)
-#else
-S16 cmUnpkRguHqStaInd(func, pst, mBuf)
-RguHqStaInd   func;
-Pst *pst;
-Buffer *mBuf;
-#endif
-{
-   RguHarqStatusInd    *hqStaInd;  
-   SuId                suId;
-   U8                  idx;
-
-   TRC3(cmUnpkRguHqStaInd)
-
-   if (SUnpkS16(&suId, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)      
-      SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-          __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-          (ErrVal)ERGU073, (ErrVal)0, "UnPacking failed");
-#endif      
-      SPutMsg(mBuf);
-      return RFAILED;
-   }
-#ifdef XEON_SPECIFIC_CHANGES
-   if ((SGetSBuf(pst->region, pst->pool, (Data **)&hqStaInd, 
-        sizeof(RguHarqStatusInd))) != ROK) {
-#else   
-   if (pst->selector == ODU_SELECTOR_LWLC)
-   {
-      CMCHKUNPK(oduUnpackPointer,(PTR *) &hqStaInd, mBuf);
-   }  
-   else
-   {   
-      if ((SGetStaticBuffer(pst->region, pst->pool, 
-                  (Data **)&hqStaInd, sizeof(RguHarqStatusInd),0)) != ROK)
-      {
-#endif         
-#if (ERRCLASS & ERRCLS_ADD_RES)      
-         SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-               __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-               (ErrVal)ERGU074, (ErrVal)0, "UnPacking failed");
-#endif      
-         SPutMsg(mBuf);
-         return RFAILED;
-      }
-      CMCHKUNPK(cmUnpkLteCellId, &hqStaInd->cellId, mBuf);
-      CMCHKUNPK(cmUnpkLteRnti, &hqStaInd->ueId, mBuf);
-      CMCHKUNPK(oduPackUInt8, &hqStaInd->numTbs, mBuf);
-      for(idx = hqStaInd->numTbs; idx > 0; idx--)
-      {
-         CMCHKUNPK(oduPackUInt32, &hqStaInd->tbId[idx - 1], mBuf);
-      }
-      for(idx = hqStaInd->numTbs; idx > 0; idx--)
-      {
-         CMCHKUNPK(oduPackUInt16, &hqStaInd->status[idx - 1], mBuf);
-      }
-#ifndef XEON_SPECIFIC_CHANGES      
-   }
-#endif   
-   SPutMsg(mBuf);
-   (*func)(pst, suId, hqStaInd);
-#ifdef XEON_SPECIFIC_CHANGES
-   SPutSBuf(pst->region, pst->pool, (Data *)hqStaInd, sizeof(RguHarqStatusInd));
-#else   
-   SPutStaticBuffer(pst->region, pst->pool, (Data *)hqStaInd, sizeof(RguHarqStatusInd), 0);
-#endif   
-   return ROK;
-}
-#endif /* LTE_L2_MEAS */
-
-\f
-/**
-* @brief Status Indication from MAC to RLC  
- * as a response to the staRsp primitive from RLC.
- * Informs RLC of the totalBufferSize and Timing Info 
- * for the transmission on dedicated channels.
-*
-* @details
-*
-*     Function : packSchedRep
-*
-*  @param[in]   Pst*  pst
-*  @param[in]   SuId  suId
-*  @param[in]   RlcMacSchedRep*  schRep
-*  @return   S16
-*      -# ROK
-**/
-S16 packSchedRep
-(
-Pst* pst,
-SuId suId,
-RlcMacSchedRepInfo  * schRep
-)
-{
-   Buffer *mBuf = NULLP;
-   TRC3(packSchedRep)
-
-   if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)      
-      SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-          __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-          (ErrVal)ERGU076, (ErrVal)0, "Packing failed");
-#endif      
-      SPutSBuf(pst->region, pst->pool, (Data *)schRep, sizeof(RlcMacSchedRepInfo));
-      return RFAILED;
-   }
-   if (pst->selector == ODU_SELECTOR_LWLC)
-   {
-      CMCHKPK(oduPackPointer,(PTR) schRep, mBuf);
-   }
-   else
-   {
-      if (packSchedRepInfo(schRep, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)      
-           SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-               __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-               (ErrVal)ERGU077, (ErrVal)0, "Packing failed");
-#endif      
-        SPutSBuf(pst->region, pst->pool, (Data *)schRep, 
-                                         sizeof(RlcMacSchedRepInfo));
-         SPutMsg(mBuf);
-         return RFAILED;
-      } 
-      if (SPutSBuf(pst->region, pst->pool, (Data *)schRep,
-                                  sizeof(RlcMacSchedRepInfo)) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)      
-         SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-             __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-             (ErrVal)ERGU079, (ErrVal)0, "Packing failed");
-#endif      
-         SPutMsg(mBuf);
-         return RFAILED;
-      }
-      schRep= NULLP;
-   }
-   if (SPkS16(suId, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)      
-      SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-          __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-          (ErrVal)ERGU078, (ErrVal)0, "Packing failed");
-#endif      
-      if (schRep != NULLP)
-      {
-         SPutSBuf(pst->region, pst->pool, (Data *)schRep, sizeof(RlcMacSchedRepInfo));
-      }
-      SPutMsg(mBuf);
-      return RFAILED;
-   }
-
-   pst->event = (Event) EVTSCHREP;
-   return (SPstTsk(pst,mBuf));
-}
-
-\f
-/**
-* @brief Status Indication from MAC to RLC  
- * as a response to the staRsp primitive from RLC.
- * Informs RLC of the totalBufferSize and Timing Info 
- * for the transmission on dedicated channels.
-*
-* @details
-*
-*     Function : unpackSchedRep
-*
-*  @param[in]   Pst*  pst
-*  @param[in]   SuId  suId
-*  @param[in]   RguDStaIndInfo  *  staInd
-*  @return   S16
-*      -# ROK
-**/
-S16 unpackSchedRep
-(
-RlcMacSchedRep func,
+RguHqStaInd  func,
 Pst *pst,
 Buffer *mBuf
 )
+#else
+S16 cmUnpkRguHqStaInd(func, pst, mBuf)
+RguHqStaInd   func;
+Pst *pst;
+Buffer *mBuf;
+#endif
 {
-   SuId suId;
-   RlcMacSchedRepInfo *schRep;
-   
-   TRC3(unpackSchedRep)
+   RguHarqStatusInd    *hqStaInd;  
+   SuId                suId;
+   U8                  idx;
+
+   TRC3(cmUnpkRguHqStaInd)
 
    if (SUnpkS16(&suId, mBuf) != ROK) {
 #if (ERRCLASS & ERRCLS_ADD_RES)      
       SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
           __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-          (ErrVal)ERGU080, (ErrVal)0, "UnPacking failed");
+          (ErrVal)ERGU073, (ErrVal)0, "UnPacking failed");
 #endif      
       SPutMsg(mBuf);
       return RFAILED;
    }
+#ifdef XEON_SPECIFIC_CHANGES
+   if ((SGetSBuf(pst->region, pst->pool, (Data **)&hqStaInd, 
+        sizeof(RguHarqStatusInd))) != ROK) {
+#else   
    if (pst->selector == ODU_SELECTOR_LWLC)
    {
-      CMCHKUNPK(oduUnpackPointer,(PTR *) &schRep, mBuf);
-   }
-   else 
-   {
-      if ((SGetSBuf(pst->region, pst->pool, (Data **)&schRep, sizeof(RlcMacSchedRepInfo))) != ROK) {
+      CMCHKUNPK(oduUnpackPointer,(PTR *) &hqStaInd, mBuf);
+   }  
+   else
+   {   
+      if ((SGetStaticBuffer(pst->region, pst->pool, 
+                  (Data **)&hqStaInd, sizeof(RguHarqStatusInd),0)) != ROK)
+      {
+#endif         
 #if (ERRCLASS & ERRCLS_ADD_RES)      
          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-         __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-         (ErrVal)ERGU081, (ErrVal)0, "UnPacking failed");
+               __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
+               (ErrVal)ERGU074, (ErrVal)0, "UnPacking failed");
 #endif      
          SPutMsg(mBuf);
          return RFAILED;
       }
-      if (unpackSchedRepInfo(schRep, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)      
-         SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-             __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-             (ErrVal)ERGU082, (ErrVal)0, "UnPacking failed");
-#endif      
-         SPutMsg(mBuf);
-         SPutSBuf(pst->region, pst->pool, (Data *)schRep, sizeof(RlcMacSchedRepInfo));
-         return RFAILED;
+      CMCHKUNPK(cmUnpkLteCellId, &hqStaInd->cellId, mBuf);
+      CMCHKUNPK(cmUnpkLteRnti, &hqStaInd->ueId, mBuf);
+      CMCHKUNPK(oduPackUInt8, &hqStaInd->numTbs, mBuf);
+      for(idx = hqStaInd->numTbs; idx > 0; idx--)
+      {
+         CMCHKUNPK(oduPackUInt32, &hqStaInd->tbId[idx - 1], mBuf);
       }
+      for(idx = hqStaInd->numTbs; idx > 0; idx--)
+      {
+         CMCHKUNPK(oduPackUInt16, &hqStaInd->status[idx - 1], mBuf);
+      }
+#ifndef XEON_SPECIFIC_CHANGES      
    }
+#endif   
    SPutMsg(mBuf);
-   return ((*func)(pst, suId, schRep));
+   (*func)(pst, suId, hqStaInd);
+#ifdef XEON_SPECIFIC_CHANGES
+   SPutSBuf(pst->region, pst->pool, (Data *)hqStaInd, sizeof(RguHarqStatusInd));
+#else   
+   SPutStaticBuffer(pst->region, pst->pool, (Data *)hqStaInd, sizeof(RguHarqStatusInd), 0);
+#endif   
+   return ROK;
 }
+#endif /* LTE_L2_MEAS */
 
 #ifdef ANSI
 S16 cmPkRguLcFlowCntrlInfo
@@ -2559,112 +1969,6 @@ Buffer *mBuf;
    return ROK;
 }
 
-
-\f
-/***********************************************************
-*
-*     Func : packRlcMacDataInfo
-*
-*
-*     Desc : RlcMacData
- * Data Indication from MAC to RLC for dedicated channels of a UE
-*
-*
-*     Ret  : S16
-*
-*     Notes:
-*
-*     File  : 
-*
-**********************************************************/
-#ifdef ANSI
-S16 packRlcMacDataInfo
-(
-RlcMacData *param,
-Buffer *mBuf
-)
-#else
-S16 packRlcMacDataInfo(param, mBuf)
-RlcMacData *param;
-Buffer *mBuf;
-#endif
-{
-   S32 i;
-   MsgLen msgLen;
-
-   TRC3(packRlcMacDataInfo);
-
-   for (i=param->numPdu-1; i >= 0; i--)
-   {
-      msgLen = 0;
-      //if (SFndLenMsg(param->pduInfo[i].pduBuf, &msgLen) != ROK)
-      //   return RFAILED;
-      //if (SCatMsg(mBuf, param->pduInfo[i].pduBuf, M1M2) != ROK)
-      //    return RFAILED;      
-      CMCHKPK(cmPkMsgLen, msgLen, mBuf);
-      CMCHKPK(cmPkLteLcId, param->pduInfo[i].lcId, mBuf);
-      CMCHKPK(oduPackBool, param->pduInfo[i].commCh, mBuf);
-   }
-   CMCHKPK(oduUnpackUInt8, param->numPdu, mBuf);
-   CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
-   CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
-   //CMCHKPK(cmPkLteTimingInfo, &param->timeToTx, mBuf);
-   return ROK;
-}
-
-
-\f
-/***********************************************************
-*
-*     Func : unpackRlcMacDataInfo
-*
-*
-*     Desc : RlcMacData
- * Data Indication from MAC to RLC for dedicated channels of a UE
-*
-*
-*     Ret  : S16
-*
-*     Notes:
-*
-*     File  : 
-*
-**********************************************************/
-#ifdef ANSI
-S16 unpackRlcMacDataInfo
-(
-RlcMacData *param,
-Buffer *mBuf
-)
-#else
-S16 unpackRlcMacDataInfo(param, mBuf)
-RlcMacData *param;
-Buffer *mBuf;
-#endif
-{
-   S32 i;
-
-   TRC3(unpackRlcMacDataInfo);
-   
-   //CMCHKUNPK(cmUnpkLteTimingInfo, &param->timeToTx, mBuf);
-   CMCHKUNPK(cmUnpkLteCellId, &param->cellId, mBuf);
-   CMCHKUNPK(cmUnpkLteRnti, &param->rnti, mBuf);
-   CMCHKUNPK(oduPackUInt8, &param->numPdu, mBuf);
-   for (i=0; i<param->numPdu; i++) 
-   {
-      MsgLen totalMsgLen;
-
-      CMCHKUNPK(oduUnpackBool, &param->pduInfo[i].commCh, mBuf);
-      CMCHKUNPK(cmUnpkLteLcId, &param->pduInfo[i].lcId, mBuf);
-      CMCHKUNPK(cmUnpkMsgLen, &param->pduInfo[i].pduLen, mBuf);
-      if (SFndLenMsg(mBuf, &totalMsgLen) != ROK)
-         return RFAILED;
-      //if (SSegMsg(mBuf, totalMsgLen-param->pduInfo[i].pduLen, &param->pduInfo[i].pduBuf) != ROK)
-      //   return RFAILED;
-   }
-   return ROK;
-}
-
 \f
 /***********************************************************
 *
@@ -2774,88 +2078,6 @@ Buffer *mBuf;
    return ROK;
 }
 
-
-\f
-/***********************************************************
-*
-*     Func : packBOStatusInfo
-*
-*
-*     Desc : RlcMacBOStatus
- * Status Response from RLC to MAC  for dedicated logical channel
-*
-*
-*     Ret  : S16
-*
-*     Notes:
-*
-*     File  : 
-*
-**********************************************************/
-#ifdef ANSI
-S16 packBOStatusInfo
-(
-RlcMacBOStatus *param,
-Buffer *mBuf
-)
-#else
-S16 packBOStatusInfo(param, mBuf)
-RlcMacBOStatus *param;
-Buffer *mBuf;
-#endif
-{
-
-   TRC3(packBOStatusInfo);
-
-   CMCHKPK(SPkS32, param->bo, mBuf);
-   CMCHKPK(cmPkLteLcId, param->lcId, mBuf);
-   CMCHKPK(oduPackBool, param->commCh, mBuf);
-   CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
-   CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
-   return ROK;
-} /* End of packBOStatusInfo */
-
-
-\f
-/***********************************************************
-*
-*     Func : unpackBOStatusInfo
-*
-*
-*     Desc : RlcMacBOStatus
- * Status Response from RLC to MAC  for dedicated logical channel
-*
-*
-*     Ret  : S16
-*
-*     Notes:
-*
-*     File  : 
-*
-**********************************************************/
-#ifdef ANSI
-S16 unpackBOStatusInfo
-(
-RlcMacBOStatus *param,
-Buffer *mBuf
-)
-#else
-S16 unpackBOStatusInfo(param, mBuf)
-RlcMacBOStatus *param;
-Buffer *mBuf;
-#endif
-{
-
-   TRC3(unpackBOStatusInfo);
-
-   CMCHKUNPK(cmUnpkLteCellId, &param->cellId, mBuf);
-   CMCHKUNPK(cmUnpkLteRnti, &param->rnti, mBuf);
-   CMCHKUNPK(oduUnpackBool, &param->commCh, mBuf);
-   CMCHKUNPK(cmUnpkLteLcId, &param->lcId, mBuf);
-   CMCHKUNPK(SUnpkS32, &param->bo, mBuf);
-   return ROK;
-} /* End of unpackBOStatusInfo */
-
 \f
 /***********************************************************
 *
@@ -3020,87 +2242,6 @@ Buffer *mBuf;
    return ROK;
 }
 
-\f
-/***********************************************************
-*
-*     Func : packSchedRepInfo
-*
-*
-*     Desc : RlcMacSchedRep
- * StaInd from MAC to RLC for dedicated logical channels of a UE
-*
-*
-*     Ret  : S16
-*
-*     Notes:
-*
-*     File  : 
-*
-**********************************************************/
-S16 packSchedRepInfo
-(
-RlcMacSchedRepInfo *param,
-Buffer *mBuf
-)
-{
-   S32 idx;
-
-   TRC3(packSchedRepInfo);
-
-   for(idx = (param->nmbLch-1); idx >= 0; idx--)
-   {
-      CMCHKPK(cmPkRguLchStaInd, &param->lchSta[idx].lchStaInd, mBuf);
-      CMCHKPK(oduPackBool, param->lchSta[idx].commCh, mBuf);
-   }
-   CMCHKPK(oduUnpackUInt8, param->nmbLch, mBuf);
-   CMCHKPK(cmPkLteRnti, param->rnti, mBuf);
-   CMCHKPK(cmPkLteCellId, param->cellId, mBuf);
-   CMCHKPK(cmPkLteTimingInfo, &param->timeToTx, mBuf);
-
-   return ROK;
-} /* End of packSchedRepInfo */
-
-
-\f
-/***********************************************************
-*
-*     Func : unpackSchedRepInfo
-*
-*
-*     Desc : RlcMacSchedRep
- * StaInd from MAC to RLC for dedicated logical channels of a UE
-*
-*
-*     Ret  : S16
-*
-*     Notes:
-*
-*     File  : 
-*
-**********************************************************/
-S16 unpackSchedRepInfo
-(
-RlcMacSchedRepInfo *param,
-Buffer *mBuf
-)
-{
-   S32 idx;
-
-   TRC3(unpackSchedRepInfo);
-
-   CMCHKUNPK(cmUnpkLteTimingInfo, &param->timeToTx, mBuf);
-   CMCHKUNPK(cmUnpkLteCellId, &param->cellId, mBuf);
-   CMCHKUNPK(cmUnpkLteRnti, &param->rnti, mBuf);
-   CMCHKUNPK(oduPackUInt8, &param->nmbLch, mBuf);
-   for(idx = 0; idx < param->nmbLch; idx++)
-   {
-      CMCHKUNPK(oduUnpackBool, &param->lchSta[idx].commCh, mBuf);
-      CMCHKUNPK(cmUnpkRguLchStaInd, &param->lchSta[idx].lchStaInd, mBuf);
-   }
-
-   return ROK;
-} /* End of unpackSchedRepInfo */
-
 #endif
 
 /**********************************************************************