1 /*******************************************************************************
2 ################################################################################
3 # Copyright (c) [2017-2019] [Radisys] #
5 # Licensed under the Apache License, Version 2.0 (the "License"); #
6 # you may not use this file except in compliance with the License. #
7 # You may obtain a copy of the License at #
9 # http://www.apache.org/licenses/LICENSE-2.0 #
11 # Unless required by applicable law or agreed to in writing, software #
12 # distributed under the License is distributed on an "AS IS" BASIS, #
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
14 # See the License for the specific language governing permissions and #
15 # limitations under the License. #
16 ################################################################################
17 *******************************************************************************/
19 /************************************************************************
25 Desc: C source code for Entry point fucntions
29 **********************************************************************/
32 @brief This file implements the schedulers main access to MAC layer code.
36 /* header include files -- defines (.h) */
37 #include "common_def.h"
43 #include "rg_sch_inf.h"
45 #include "rg_sch_err.h"
46 #include "rg_sch_cmn.h"
48 /* header/extern include files (.x) */
49 #include "tfu.x" /* TFU types */
50 #include "lrg.x" /* layer management typedefs for MAC */
51 #include "rgr.x" /* layer management typedefs for MAC */
52 #include "rgm.x" /* layer management typedefs for MAC */
53 #include "rg_sch_inf.x" /* typedefs for Scheduler */
54 #include "rg_sch.x" /* typedefs for Scheduler */
55 #include "rg_sch_cmn.x"
58 S16 rgEmtcMacSchUeDelInd ARGS((RgSchCellCb *cell,RgInfUeDelInd *ueDelInd));
59 S16 rgSCHGomEmtcHndlSiCfg ARGS((
64 RgrCfgTransId transId,
65 RgrSiCfgReqInfo *cfgReqInfo
67 S16 rgSCHGomEmtcHndlWarningSiCfg ARGS((
72 RgrCfgTransId transId,
73 RgrWarningSiCfgReqInfo *warningSiCfgReqInfo
77 /************** LRG Interface ****************/
80 * @brief Layer Manager Control request handler.
84 * Function : RgMiLrgSchCntrlReq
86 * This function handles the control
87 * request received from the Layer Manager.
88 * -# Based on cntrl->hdr.elmId.elmnt, cntrl->t.cntrl.action
89 * and cntrl->t.cntrl.subAction, it performs the appropriate control action
90 * of SAP (enable/disable) and layer shutdown.
91 * -# Invokes the RgMiLrgSchCntrlCfm to send back the confirmation to LM.
93 * @param[in] Pst *pst, the post structure
94 * @param[in] RgMngmt *cntrl, the control parameter's structure
98 S16 RgMiLrgSchCntrlReq
100 Pst *pst, /* post structure */
101 RgMngmt *cntrl /* control structure */
104 S16 ret = ROK; /* return value */
108 Inst inst = (pst->dstInst - SCH_INST_START); /* Scheduler instance Id */
110 /* Fill the post structure for sending the confirmation */
111 SchFillCfmPst(pst, &cfmPst, cntrl);
113 /* Initialize the cfg cfm structure
114 if (SGetSBuf(cfmPst.region, cfmPst.pool, (Data **)&cfm, sizeof(RgMngmt))
117 DU_LOG("\nERROR --> SCH : Memory Unavailable for Confirmation");
118 SPutSBuf(pst->region, pst->pool, (Data *)cntrl, sizeof(RgMngmt));
121 memset(&cfm, 0, sizeof(RgMngmt));
128 cfm.hdr.elmId.elmnt = cntrl->hdr.elmId.elmnt;
129 cfm.t.cntrl.action = cntrl->t.cntrl.action;
130 cfm.t.cntrl.subAction = cntrl->t.cntrl.subAction;
132 /* Check if General Config Done*/
133 if(rgSchCb[inst].rgSchInit.cfgDone != TRUE)
135 cfm.cfm.status = LCM_PRIM_NOK;
136 cfm.cfm.reason = LCM_REASON_GENCFG_NOT_DONE;
137 cfm.hdr.elmId.elmnt = cntrl->hdr.elmId.elmnt;
138 RgMiLrgSchCntrlCfm(&cfmPst, &cfm);
139 DU_LOG("\nERROR --> SCH : Gen Cfg not done.");
140 /* SPutSBuf(pst->region, pst->pool, (Data *)cntrl, sizeof(RgMngmt)); */
144 /* General Config done, process the Control request */
145 switch(cntrl->hdr.elmId.elmnt)
148 rgSCHLmmGenCntrl(cntrl, &cfm, &cfmPst);
152 rgSCHLmmSapCntrl(cntrl, &cfm, &cfmPst);
155 cfm.cfm.status = LCM_PRIM_NOK;
156 cfm.cfm.reason = LCM_REASON_INVALID_PAR_VAL;
157 RgMiLrgSchCntrlCfm(&cfmPst, &cfm);
158 DU_LOG("\nERROR --> SCH : invalid elmnt=%d",
159 cntrl->hdr.elmId.elmnt);
162 /* SPutSBuf(pst->region, pst->pool, (Data *)cntrl, sizeof(RgMngmt)); */
164 }/*-- RgMiLrgSchCntrlReq --*/
168 * @brief Layer Manager L2 Measurement request handler.
172 * Function : RgMiLrgSchL2MeasReq
174 * This function handles the control
175 * measurement request received from the Layer Manager.
177 * @param[in] Pst *pst, the post structure
178 * @param[in] LrgSchMeasReqInfo *measInfo, measurement request info
182 S16 RgMiLrgSchL2MeasReq
184 Pst *pst, /* post structure */
185 LrgSchMeasReqInfo *measInfo /* Meas Req Info */
192 RgSchCb *instCb = &rgSchCb[(pst->dstInst - SCH_INST_START)];
193 #if (ERRCLASS & ERRCLS_ADD_RES)
197 RgSchL2MeasCb *measCb = NULLP;
199 Inst inst = (pst->dstInst - SCH_INST_START); /* Scheduler instance Id */
206 /* Find the cellCb using cellId in measInfo. Iterate through all cells
207 * in rgrsapCb in RgschCb */
209 for (idx = 0; idx < instCb->numSaps; idx++)
211 if ( instCb->rgrSap[idx].cell->cellId == measInfo->cellId)
213 /* got the cell break the loop */
214 cell = instCb->rgrSap[idx].cell;
218 /* If no cellCb return Err with Invalid Cell Id */
221 rgSchL2mFillCfmPst(pst, &cfmPst, measInfo);
222 RGSCHFILLERR(err, RGSCHERR_L2M_MEASREQ, RGSCHERR_SCH_INVALID_CELLID);
223 rgSchL2mSndCfm(&cfmPst, NULLP, measInfo, TRUE);
224 DU_LOG("\nERROR --> SCH : Meas req Failed.Invalid Cell Id errType(%d) errCause(%d)",
225 err.errType, err.errCause);
228 /* Validate for Meas Types */
229 if ( (ret = rgSCHUtlValidateMeasReq(cell, measInfo, &err)) != ROK)
231 rgSchL2mFillCfmPst(pst, &cfmPst, measInfo);
232 RGSCHFILLERR(err, RGSCHERR_L2M_MEASREQ, RGSCHERR_SCH_INVALID_MEASTYPE);
233 rgSchL2mSndCfm(&cfmPst, NULLP, measInfo, TRUE);
234 DU_LOG("\nERROR --> SCH : Meas req Failed.Invalid Measurement Type"
235 "errCasue(%d) errType(%d)", err.errType, err.errCause);
238 /* Iterate through all meas requests in l2mList in cellCb */
239 #if (ERRCLASS & ERRCLS_ADD_RES)
240 lnk = cell->l2mList.first;
243 /* Get the MeasCb : RgSchL2MeasCb */
244 measCb = (RgSchL2MeasCb *)lnk->node;
246 if (measCb->measReq.hdr.transId == measInfo->hdr.transId)
248 rgSchL2mFillCfmPst(pst, &cfmPst, measInfo);
249 RGSCHFILLERR(err, RGSCHERR_L2M_MEASREQ, RGSCHERR_SCH_DUP_TRANSID);
250 rgSchL2mSndCfm(&cfmPst, measCb, measInfo, TRUE);
251 DU_LOG("\nERROR --> SCH : Meas req Failed Duplicate TransId"
252 "errType(%d) errCause(%d)", err.errType, err.errCause);
257 /* Call L2M Function to store Meas req */
258 ret = rgSchL2mMeasReq(cell, measInfo, err);
261 rgSchL2mFillCfmPst(pst, &cfmPst, measInfo);
262 RGSCHFILLERR(err, RGSCHERR_L2M_MEASREQ, RGSCHERR_SCH_L2MEAS_FAILED);
263 rgSchL2mSndCfm(&cfmPst, measCb, measInfo, TRUE);
264 DU_LOG("\nERROR --> SCH : Meas req Failed.errType(%d) errCause(%d)",
265 err.errType, err.errCause);
269 } /* -- RRgMiLrgSchL2MeasReq-- */
272 * @brief Layer Manager L2 Measurement Stop request handler.
276 * Function : RgMiLrgSchL2MeasStopReq
278 * This function handles the control
279 * measurement stop request received from the Layer Manager.
281 * @param[in] Pst *pst, the post structure
282 * @param[in] LrgSchMeasReqInfo *measInfo, measurement stop request info
286 S16 RgMiLrgSchL2MeasStopReq
288 Pst *pst, /* post structure */
289 LrgSchMeasStopReqInfo *measInfo /* Meas Req Info */
293 RgSchCellCb *cell = NULLP;
294 RgSchCb *instCb = &rgSchCb[(pst->dstInst - SCH_INST_START)];
295 CmLList *node = NULLP;
296 RgSchL2MeasCb *measCb = NULLP;
297 LrgSchMeasCfmInfo measCfm;
300 for (idx = 0; idx < instCb->numSaps; idx++)
302 if ( instCb->rgrSap[idx].cell->cellId == measInfo->cellId)
304 /* got the cell break the loop */
305 cell = instCb->rgrSap[idx].cell;
311 DU_LOG("\nERROR --> SCH : Stop req Failed.Invalid Cell Id ");
314 memset(&measCfm, 0, sizeof(LrgSchMeasCfmInfo));
315 node = cell->l2mList.first;
318 measCb = (RgSchL2MeasCb *)(node)->node;
321 cmLListDelFrm(&cell->l2mList, &measCb->measLnk);
322 rgSCHUtlFreeSBuf(cell->instIdx, (Data **)&measCb,
323 sizeof(RgSchL2MeasCb));
326 if(measInfo->measType & LRG_L2MEAS_AVG_PRB_PER_QCI_UL)
328 RgInfL2MeasStopReq measStopReq;
330 memset(&measStopReq, 0, sizeof(RgInfL2MeasStopReq));
331 measStopReq.transId = measInfo->hdr.transId;
332 measStopReq.measType = measInfo->measType;
333 /* measReq.timePrd = measInfo->timePrd; */
334 measStopReq.cellId = measInfo->cellId;
335 rgSCHUtlGetPstToLyr(&pstMac, &rgSchCb[cell->instIdx], cell->macInst);
336 RgSchMacL2MeasStop(&pstMac,&measStopReq);
340 RgMiLrgSchL2MeasStopCfm(&(rgSchCb[cell->instIdx].rgSchInit.lmPst),
344 }/*RgMiLrgSchL2MeasStopReq*/
346 * @brief Layer Manager L2 Measurement request handler.
347 * for Send l2 measurement req
350 * Function : RgMiLrgSchL2MeasSendReq
352 * This function handles the control
353 * measurement send request received from the Layer Manager.
355 * @param[in] Pst *pst, the post structure
356 * @param[in] LrgSchMeasReqInfo *measInfo, measurement stop request info
360 S16 RgMiLrgSchL2MeasSendReq
362 Pst *pst, /* post structure */
363 LrgSchMeasSndReqInfo *measInfo /* Meas Req Info */
368 RgSchCb *instCb = &rgSchCb[(pst->dstInst - SCH_INST_START)];
372 for (idx = 0; idx < instCb->numSaps; idx++)
374 if ( instCb->rgrSap[idx].cell->cellId == measInfo->cellId)
376 /* got the cell break the loop */
377 cell = instCb->rgrSap[idx].cell;
383 DU_LOG("\nERROR --> SCH : Send req Failed.Invalid Cell Id");
387 if(measInfo->measType & LRG_L2MEAS_AVG_PRB_PER_QCI_UL)
389 RgInfL2MeasSndReq measSndReq;
391 memset(&measSndReq, 0, sizeof(RgInfL2MeasSndReq));
392 measSndReq.transId = measInfo->hdr.transId;
393 measSndReq.measType = measInfo->measType;
394 measSndReq.timePrd = measInfo->timePrd;
395 measSndReq.cellId = measInfo->cellId;
396 rgSCHUtlGetPstToLyr(&pstMac, &rgSchCb[cell->instIdx], cell->macInst);
397 RgSchMacL2MeasSend(&pstMac, &measSndReq);
401 cell->sndL2Meas = TRUE;
405 }/*RgMiLrgSchL2MeasSendReq*/
406 #endif /* LTE_L2_MEAS */
411 /************* RGR Interface ****************/
413 * @brief API for bind request from RRM towards MAC.
417 * Function: RgUiRgrBndReq
419 * This API is invoked by RRM towards MAC to bind RGR SAP.
420 * These API validates the Pst, spId, suId and sends the bind confirm to
424 * @param[in] Pst *pst
425 * @param[in] SuId suId
426 * @param[in] SpId spId
431 S16 RgUiRgrBndReq(Pst *pst, SuId suId, SpId spId)
434 Pst tmpPst; /* Temporary Post Structure */
435 Inst instId = pst->dstInst-SCH_INST_START;
436 RgUstaDgn dgn; /* Alarm diagnostics structure */
438 tmpPst.prior = pst->prior;
439 tmpPst.route = pst->route;
440 tmpPst.selector = pst->selector;
441 tmpPst.region = rgSchCb[instId].rgSchInit.region;
442 tmpPst.pool = rgSchCb[instId].rgSchInit.pool;
443 tmpPst.srcProcId = rgSchCb[instId].rgSchInit.procId;
444 tmpPst.srcEnt = rgSchCb[instId].rgSchInit.ent;
445 tmpPst.srcInst = rgSchCb[instId].rgSchInit.inst + SCH_INST_START;
446 tmpPst.event = EVTNONE;
447 tmpPst.dstProcId = pst->srcProcId;
448 tmpPst.dstEnt = pst->srcEnt;
449 tmpPst.dstInst = pst->srcInst;
451 if(spId < rgSchCb[instId].numSaps)
453 /* Check the state of the SAP */
454 switch (rgSchCb[instId].rgrSap[spId].sapSta.sapState)
456 /* This case might not be needed if SAP not configured then it will go
457 * to else of above if condition */
458 case LRG_UNBND: /* SAP is not bound */
459 DU_LOG("\nDEBUG --> SCH : SAP Not yet bound");
460 rgSchCb[instId].rgrSap[spId].sapSta.sapState = LRG_BND;
461 rgSchCb[instId].rgrSap[spId].sapCfg.suId = suId;
462 /* Send Bind Confirm with status as SUCCESS */
463 ret = rgSCHUtlRgrBndCfm(instId, suId, CM_BND_OK);
464 /*Indicate to Layer manager */
465 rgSCHUtlFillDgnParams(instId, &dgn, LRG_USTA_DGNVAL_MEM);
466 ret = rgSCHLmmStaInd(instId, LCM_CATEGORY_INTERFACE,
467 LRG_EVENT_RGRSAP_ENB, LCM_CAUSE_UNKNOWN, &dgn);
469 case LRG_BND: /* SAP is already bound*/
470 DU_LOG("\nDEBUG --> SCH : SAP is already bound");
471 ret = rgSCHUtlRgrBndCfm(instId, suId, CM_BND_OK);
473 default: /* Should Never Enter here */
474 #if (ERRCLASS & ERRCLS_ADD_RES)
475 DU_LOG("\nERROR --> SCH : Invalid SAP State:RgUiRrgBndReq failed\n");
477 ret = rgSCHUtlRgrBndCfm(instId, suId, CM_BND_NOK);
483 #if (ERRCLASS & ERRCLS_ADD_RES)
484 /* ccpu00117035 - MOD - Changed ErrVal argument from accessing sap state
485 to spId to avoid seg fault due to invalid sapID */
486 DU_LOG("\nERROR --> SCH : Invalid SAP Id:RgUiRrgBndReq failed\n");
488 ret = RgUiRgrBndCfm(&tmpPst, suId, CM_BND_NOK);
491 } /* RgUiRgrBndReq */
494 * @brief API for unbind request from RRM towards MAC.
498 * Function: RgUiRgrUbndReq
500 * This API is invoked by RRM towards MAC to unbind RGR SAP.
501 * These API validates the Pst, spId, suId and transfers the unbind request
502 * specific information to corresponding ownership module (GOM) API.
505 * @param[in] Pst *pst
506 * @param[in] SuId suId
507 * @param[in] Reason reason
512 S16 RgUiRgrUbndReq(Pst *pst,SpId spId,Reason reason)
514 Inst instId = pst->dstInst-SCH_INST_START;
516 /* SAP Id validation */
517 if (spId < rgSchCb[instId].numSaps)
519 switch(rgSchCb[instId].rgrSap[spId].sapSta.sapState)
521 case LRG_BND: /* SAP is already bound*/
522 DU_LOG("\nDEBUG --> SCH : SAP is already bound");
523 /* setting SAP state to UN BOUND */
524 rgSchCb[instId].rgrSap[spId].sapSta.sapState = LRG_UNBND;
527 #if (ERRCLASS & ERRCLS_ADD_RES)
528 DU_LOG("\nERROR --> SCH : Invalid SAP State RgUiRgrUbndReq failed\n");
535 #if (ERRCLASS & ERRCLS_ADD_RES)
536 DU_LOG("\nERROR --> SCH : Invalid SAP Id RgUiRgrUbndReq failed\n");
541 } /* RgUiRgrUbndReq */
545 * @brief API for SI configuration request from RRM towards MAC.
549 * Function: RgUiRgrSiCfgReq
551 * This API is invoked by RRM towards MAC to configure SI at MAC.
552 * These API validates the Pst, spId, suId and transfers the
553 * config request specific information to corresponding ownership
557 * @param[in] Pst *pst
558 * @param[in] SpId spId
559 * @param[in] RgrCfgTransId transId
560 * @param[in] RgrSiCfgReqInfo *cfgReqInfo
565 S16 RgUiRgrSiCfgReq(Pst *pst, SpId spId,RgrCfgTransId transId,RgrSiCfgReqInfo *cfgReqInfo)
568 uint8_t cfmStatus = RGR_CFG_CFM_NOK;
569 uint8_t prntTrans[RGR_CFG_TRANSID_SIZE+1];
570 Inst instId = pst->dstInst-SCH_INST_START;
572 memcpy(prntTrans, transId.trans, RGR_CFG_TRANSID_SIZE);
573 prntTrans[RGR_CFG_TRANSID_SIZE] = '\0';
576 if (cfgReqInfo == NULLP)
578 DU_LOG("\nERROR --> SCH : Input Message Buffer is NULL");
579 rgSCHUtlRgrSiCfgCfm(instId, spId, transId, cfmStatus);
583 if (spId < rgSchCb[instId].numSaps)
585 if(LRG_BND != rgSchCb[instId].rgrSap[spId].sapSta.sapState)
587 #if (ERRCLASS & ERRCLS_ADD_RES)
588 DU_LOG("\nERROR --> SCH : Invalid SAP State: RgUiRgrSiCfgReq failed\n");
590 SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo,
591 (Size)sizeof(*cfgReqInfo));
592 rgSCHUtlRgrSiCfgCfm(instId, spId, transId, cfmStatus);
598 #if (ERRCLASS & ERRCLS_ADD_RES)
599 DU_LOG("\nERROR --> SCH : Invalid SAP Id:RgUiRgrSiCfgReq failed\n");
601 SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo,
602 (Size)sizeof(*cfgReqInfo));
603 rgSCHUtlRgrSiCfgCfm(instId, spId, transId, cfmStatus);
607 /* Handle configuration */
609 if(rgSchCb[instId].rgrSap[spId].cell->emtcEnable)
611 ret = rgSCHGomEmtcHndlSiCfg(pst->region, pst->pool,
612 &rgSchCb[instId], spId, transId,
617 ret = rgSCHGomHndlSiCfg(pst->region, pst->pool,
618 &rgSchCb[instId], spId, transId,
622 ret = rgSCHGomHndlSiCfg(pst->region, pst->pool,
623 &rgSchCb[instId], spId, transId,
628 DU_LOG("\nERROR --> SCH : RgUiRgrSiCfgReq:"
629 "Configuration Request Handling Failed");
634 } /* RgUiRgrSiCfgReq */
638 * @brief API for Warning SI configuration request from RRM towards MAC.
642 * Function: RgUiRgrWarningSiCfgReq
644 * This API is invoked by RRM towards MAC to configure SI at MAC.
645 * These API validates the Pst, spId, suId and transfers the
646 * config request specific information to corresponding ownership
650 * @param[in] Pst *pst
651 * @param[in] SpId spId
652 * @param[in] RgrCfgTransId transId
653 * @param[in] RgrWarningSiCfgReqInfo *warningSiCfgReqInfo
658 S16 RgUiRgrWarningSiCfgReq(Pst *pst, SpId spId,RgrCfgTransId transId,RgrWarningSiCfgReqInfo *warningSiCfgReqInfo)
660 Inst instId = pst->dstInst-SCH_INST_START;
662 uint8_t cfmStatus = RGR_CFG_CFM_NOK;
663 uint8_t prntTrans[RGR_CFG_TRANSID_SIZE+1];
665 memcpy(prntTrans, transId.trans, RGR_CFG_TRANSID_SIZE);
666 prntTrans[RGR_CFG_TRANSID_SIZE] = '\0';
668 if (warningSiCfgReqInfo == NULLP)
670 DU_LOG("\nERROR --> SCH : Input Message Buffer "
672 rgSCHUtlRgrWarningSiCfgCfm(instId, spId, 0, transId, cfmStatus);
676 if (spId < rgSchCb[instId].numSaps)
678 if(LRG_BND != rgSchCb[instId].rgrSap[spId].sapSta.sapState)
680 #if (ERRCLASS & ERRCLS_ADD_RES)
681 DU_LOG("\nERROR --> SCH : Invalid SAP State: warningSiCfgReqInfo failed\n");
683 rgSCHUtlFreeWarningSiSeg(pst->region, pst->pool,
684 &warningSiCfgReqInfo->siPduLst);
685 SPutSBuf(pst->region, pst->pool, (Data *)warningSiCfgReqInfo,
686 sizeof(RgrWarningSiCfgReqInfo));
687 rgSCHUtlRgrWarningSiCfgCfm(instId, spId, warningSiCfgReqInfo->siId,
694 #if (ERRCLASS & ERRCLS_ADD_RES)
695 DU_LOG("\nERROR --> SCH : Invalid SAP Id:warningSiCfgReqInfo failed\n");
697 rgSCHUtlFreeWarningSiSeg(pst->region, pst->pool,
698 &warningSiCfgReqInfo->siPduLst);
699 SPutSBuf(pst->region, pst->pool, (Data *)warningSiCfgReqInfo,
700 sizeof(RgrWarningSiCfgReqInfo));
701 rgSCHUtlRgrWarningSiCfgCfm(instId, spId, warningSiCfgReqInfo->siId,
706 /* Handle configuration */
708 if(rgSchCb[instId].rgrSap[spId].cell->emtcEnable)
710 ret = rgSCHGomEmtcHndlWarningSiCfg(pst->region, pst->pool,
711 &rgSchCb[instId], spId, transId, warningSiCfgReqInfo);
715 ret = rgSCHGomHndlWarningSiCfg(pst->region, pst->pool,
716 &rgSchCb[instId], spId, transId, warningSiCfgReqInfo);
719 ret = rgSCHGomHndlWarningSiCfg(pst->region, pst->pool,
720 &rgSchCb[instId], spId, transId, warningSiCfgReqInfo);
724 DU_LOG("\nERROR --> SCH : Configuration Request Handling Failed");
733 * @brief API for Warning SI Stop request from RRM towards MAC.
737 * Function: RgUiRgrWarningSiStopReq
739 * This API is invoked by RRM towards MAC to Stop warning SI at MAC.
740 * These API validates the Pst, spId, suId and transfers the
741 * stop request specific information to corresponding ownership
745 * @param[in] Pst *pst
746 * @param[in] SpId spId
747 * @param[in] RgrWarningSiCfgReqInfo *warningSiCfgReqInfo
752 S16 RgUiRgrWarningSiStopReq(Pst *pst,SpId spId,RgrCfgTransId transId,uint8_t siId)
754 Inst instId = pst->dstInst-SCH_INST_START;
756 if (spId < rgSchCb[instId].numSaps)
758 if(LRG_BND != rgSchCb[instId].rgrSap[spId].sapSta.sapState)
760 #if (ERRCLASS & ERRCLS_ADD_RES)
761 DU_LOG("\nERROR --> SCH : Invalid SAP State: RgUiRgrWarningSiStopReq failed\n");
768 #if (ERRCLASS & ERRCLS_ADD_RES)
769 DU_LOG("\nERROR --> SCH : Invalid SAP Id:RgUiRgrWarningSiStopReq failed\n");
774 rgSCHGomHndlWarningSiStopReq(pst->region, pst->pool,
775 &rgSchCb[instId], siId, transId, spId);
779 #endif /*RGR_SI_SCH */
781 /* LTE_ADV_FLAG_REMOVED_START */
784 * @brief API for LOAD INF request from RRM towards MAC.
788 * Function: RgUiRgrLoadInfReq
790 * This API is invoked by RRM towards MAC to configure LOAD INF Parameters at MAC.
791 * These API validates the Pst, spId, suId and transfers the
792 * LOAD INF request to corresponding ownership
796 * @param[in] Pst *pst
797 * @param[in] SpId spId
798 * @param[in] RgrCfgTransId transId
799 * @param[in] RgrLoadInfReqInfo *loadInfReq
804 S16 RgUiRgrLoadInfReq(Pst *pst, SpId spId, RgrCfgTransId transId,RgrLoadInfReqInfo *loadInfReq)
807 uint8_t prntTrans[RGR_CFG_TRANSID_SIZE+1];
808 Inst instId = pst->dstInst-SCH_INST_START;
810 memcpy(prntTrans, transId.trans, RGR_CFG_TRANSID_SIZE);
811 prntTrans[RGR_CFG_TRANSID_SIZE] = '\0';
814 if (loadInfReq == NULLP)
816 DU_LOG("\nERROR --> SCH : Input Message Buffer "
821 if (spId < rgSchCb[instId].numSaps)
823 if(LRG_BND != rgSchCb[instId].rgrSap[spId].sapSta.sapState)
825 #if (ERRCLASS & ERRCLS_ADD_RES)
826 DU_LOG("\nERROR --> SCH : Invalid SAP State: RgUiRgrLoadInfReq failed\n");
828 SPutSBuf(pst->region, pst->pool, (Data *)loadInfReq,
829 (Size)sizeof(*loadInfReq));
835 #if (ERRCLASS & ERRCLS_ADD_RES)
836 DU_LOG("\nERROR --> SCH : Invalid SAP Id:RgUiRgrLoadInfReq failed\n");
838 SPutSBuf(pst->region, pst->pool, (Data *)loadInfReq,
839 (Size)sizeof(*loadInfReq));
843 /* Handle configuration */
844 ret = rgSCHGomHndlLoadInf(pst->region, pst->pool,
845 &rgSchCb[(pst->dstInst - SCH_INST_START)], spId, transId,
849 DU_LOG("\nERROR --> SCH : Configuration Request Handling Failed");
854 } /* RgUiRgrLoadInfReq */
855 /* LTE_ADV_FLAG_REMOVED_END */
857 /************** MAC SCH Interface **************/
859 * @brief Function for updating dedicated channel BO at scheduler from MAC.
863 * Function : rgMacSchDedBoUpdtReq
865 * This function shall be invoked whenever MAC gets staRsp from RLC
866 * Scheduler shall update BO in its dedicated logical channel control block.
868 * @param[in] Pst* pst
869 * @param[in] S16 cellSapId
870 * @param[in] RgInfDedBoRpt *boRpt
874 S16 RgMacSchDedBoUpdtReq(Pst* pst,RgInfDedBoRpt *boRpt)
882 Inst inst = (pst->dstInst - SCH_INST_START);
883 S16 cellSapId = boRpt->cellSapId;
885 DU_LOG("\nDEBUG --> SCH : rgMacSchDedBoUpdtReq():"
886 " boRpt->rnti = %u boRpt->lcId = %u",boRpt->rnti, boRpt->lcId);
888 /* No need to chk for cell being NULL as MAC wouldn't have found instance if
890 cell = rgSchCb[inst].rgrSap[cellSapId].cell;
893 if (cell->cellId != boRpt->cellId)
895 /* Handle Cell fetch failure */
896 DU_LOG("\nERROR --> SCH : rgMacSchDedBoUpdtReq(): Invalid cell Id");
901 /* Update Bo in the given logical channel of the UE */
902 if ((ue = rgSCHDbmGetUeCb(cell, boRpt->rnti)) != NULLP)
905 /* Honor BO Reports only from PCELL */
907 if (cell != ue->cell)
912 if ((dlLc = rgSCHDbmGetDlDedLcCb(ue, boRpt->lcId)) != NULLP)
915 if(dlLc->lcType == CM_LTE_LCH_DTCH)
917 if((dlLc->bo == 0) &&(boRpt->bo != 0))
920 if(!(ue->qciActiveLCs[dlLc->qciCb->qci]))
922 dlLc->qciCb->dlUeCount++;
924 ue->qciActiveLCs[dlLc->qciCb->qci]++;
926 else if((dlLc->bo != 0) && (boRpt->bo == 0) && (dlLc->qciCb->dlUeCount))
929 if (ue->qciActiveLCs[dlLc->qciCb->qci])
931 ue->qciActiveLCs[dlLc->qciCb->qci]--;
932 if (!(ue->qciActiveLCs[dlLc->qciCb->qci]))
934 dlLc->qciCb->dlUeCount--;
941 dlUe = RG_SCH_CMN_GET_DL_UE(ue, cell);
942 if (boRpt->bo > dlLc->bo)
944 dlUe->boReported += (boRpt->bo - dlLc->bo);
948 if (boRpt->bo > dlLc->bo)
950 ue->tenbStats->stats.nonPersistent.sch[RG_SCH_CELLINDEX(cell)].dlBo += ((boRpt->bo - dlLc->bo)<<3);
953 /* RLC provides cumulative BO for each LC.
954 * Reduce the left out unscheduled bo from total bo and
955 * update the new BO to the total bo */
956 if(ue->totalBo >= dlLc->bo)
958 ue->totalBo -= dlLc->bo;
962 ue->totalBo = 0; /* this case should not arise
963 * Resetting for safety */
966 ue->totalBo += boRpt->bo;
967 dlLc->bo = boRpt->bo;
968 dlLc->oldestSduArrTime = boRpt->oldestSduArrTime;
969 dlLc->staPduBo = boRpt->staPduBo;
971 dlLc->setMaxUlPrio = boRpt->setMaxUlPrio;
972 dlLc->setMaxDlPrio = boRpt->setMaxDlPrio;
973 /* Update the scheduler */
974 rgSCHUtlDlDedBoUpd(cell, ue, dlLc);
980 } /* end of rgMacSchDedBoUpdtReq */
984 * @brief Function for updating common channel BO at scheduler from MAC.
988 * Function : RgMacSchCmnBoUpdtReq
990 * This function shall be invoked whenever MAC gets staRsp from RLC
991 * Scheduler shall update BO in its common logical channel control block.
993 * @param[in] Pst* pst
994 * @param[in] S16 cellSapId
995 * @param[in] RgInfCmnBoRpt *boRpt
999 S16 RgMacSchCmnBoUpdtReq(Pst* pst,RgInfCmnBoRpt *boRpt)
1002 Inst inst = (pst->dstInst - SCH_INST_START);
1003 S16 cellSapId = boRpt->cellSapId;
1006 /* No need to chk for cell being NULL as MAC would not have found instance if
1007 * it doesnt exist */
1008 cell = rgSchCb[inst].rgrSap[cellSapId].cell;
1009 if (cell->cellId != boRpt->cellId)
1011 DU_LOG("\nERROR --> SCH : RgMacSchCmnBoUpdtReq():"
1012 "Invalid boRpt cell Id:%d",boRpt->cellId);
1016 /* handle status response on CCCH */
1017 if(boRpt->lcId == cell->dlCcchId)
1019 DU_LOG("\nDEBUG --> SCH : RgMacSchCmnBoUpdtReq():"
1020 " BO update for CCCH");
1021 rgSCHUtlHndlCcchBoUpdt(cell, boRpt);
1025 rgSCHUtlHndlBcchPcchBoUpdt(cell, boRpt);
1029 } /* end of RgMacSchCmnBoUpdtReq */
1030 /*Fix: start: Inform UE delete to scheduler*/
1032 * @brief This API is used to send data indication to Scheduler instance from MAC.
1036 * Function : rgMacSchUeDelInd
1038 * This function shall be invoked whenever MAC gets Ue delete request.
1041 * @param[in] Pst* pst
1042 * @param[in] RgInfUeDelInd *ueDelInd
1046 S16 RgMacSchUeDelInd(Pst* pst,RgInfUeDelInd *ueDelInd)
1049 Inst inst = (pst->dstInst - SCH_INST_START);
1050 S16 cellSapId = ueDelInd->cellSapId;
1052 RgSchRntiLnk *rntiLnk=NULL;
1054 if (rgSchCb[inst].rgrSap == NULLP || rgSchCb[inst].rgrSap[cellSapId].cell == NULLP)
1056 DU_LOG("\nERROR --> SCH : rgrSap or cell is not configured");
1059 cell = rgSchCb[inst].rgrSap[cellSapId].cell;
1061 if (cell->cellId != ueDelInd->cellId)
1063 /* Handle Cell fetch failure */
1064 DU_LOG("\nERROR --> SCH : rgMacSchUeDelInd(): Invalid ueDelInd cell Id:%d",
1070 CM_LLIST_FIRST_NODE(&cell->rntiDb.rntiGuardPool, tmp);
1074 rntiLnk = (RgSchRntiLnk *)(tmp->node);
1075 if(rntiLnk->rnti == ueDelInd->rnti)
1077 cmLListDelFrm(&cell->rntiDb.rntiGuardPool, tmp);
1079 rgSCHDbmRlsRnti(cell, rntiLnk);
1080 DU_LOG("\nDEBUG --> SCH : RNTI:%d Released from the Guard pool(%d)",
1081 ueDelInd->rnti, cell->rntiDb.rntiGuardPool.count);
1085 CM_LLIST_NEXT_NODE(&cell->rntiDb.rntiGuardPool, tmp);
1089 rgEmtcMacSchUeDelInd(cell,ueDelInd);
1094 /* Fix : syed HO UE does not have a valid ue->rntiLnk */
1095 DU_LOG("\nINFO --> SCH : HO CRNTI:%d not present in the"
1096 "Guard Pool:%d", ueDelInd->rnti, cell->rntiDb.rntiGuardPool.count);
1100 } /* rgMacSchUeDelInd */
1101 /*Fix: end: Inform UE delete to scheduler*/
1103 * @brief This API is used to send data indication to Scheduler instance from MAC.
1107 * Function : rgMacSchSfRecpInd
1109 * This function shall be invoked whenever MAC gets datInd on TFU
1110 * Scheduler shall act on the CEs and data that are received as part of
1113 * @param[in] Pst* pst
1114 * @param[in] S16 cellSapId
1115 * @param[in] CmLteRnti rnti
1116 * @param[in] DatIndInfo *datInd
1120 S16 RgMacSchSfRecpInd(Pst* pst,RgInfSfDatInd *subfrmInfo)
1125 RgInfUeDatInd *datInd;
1127 Inst inst = (pst->dstInst - SCH_INST_START);
1131 S16 cellSapId = subfrmInfo->cellSapId;
1132 RgrUeStaIndInfo *ueStaInd;
1135 RgSchCmnUlUeSpsInfo *ulSpsUe ;
1143 uint16_t datIndActQci = 0;
1144 uint16_t combDatIndActQci = 0; /* Prev and Latest Dat Ind combined */
1145 uint16_t tempUeActQci = 0; /* UE specific Active QCIs */
1146 uint16_t diffBits = 0;
1150 /* No need to chk for cell being NULL as MAC wouldn't have found instance if
1151 * it doesnt exist */
1152 cell = rgSchCb[inst].rgrSap[cellSapId].cell;
1154 /* lnkLst assignment */
1155 lnkLst = &(subfrmInfo->ueLst);
1157 CM_LLIST_FIRST_NODE(lnkLst, tmp);
1159 while((NULLP != tmp) && ((RgInfUeDatInd *)tmp->node != NULLP))
1165 datInd = (RgInfUeDatInd *)tmp->node;
1166 rnti = datInd->rnti;
1168 /* We shall try and find
1169 * out the RaCb based on the following -
1170 * 1. If the incoming PDU contained a CCCH SDU i.e. this is message 3.
1171 * 2. If the incoming PDU contained a CRNTI control element, i.e. we should
1172 * have a ueCb also for this
1175 /* It could be that a non-msg3 pdu contains a CRNTI Control element. We
1176 * should check for CRNTI CE and if it exists the UECb must exist, also an
1177 * if the CRNTI in the CE and the one with which the message came in are
1178 * different we shall look for an raCb as well.
1180 if (datInd->ceInfo.bitMask & RGSCH_CRNTI_CE_PRSNT)
1182 /* SR_RACH_STATS : CRNTI CE*/
1185 if (datInd->ceInfo.bitMask & RGSCH_CCCH_SDU_PRSNT)
1187 RGSCH_FREE_MEM(subfrmInfo);
1188 err.errType = RGSCHERR_TOM_DATIND;
1189 DU_LOG("\nDEBUG --> SCH : Received MSG3 with CRNTI:%d and also CCCH ",
1190 datInd->ceInfo.ces.cRnti);
1193 ue = rgSCHDbmGetUeCb (cell, datInd->ceInfo.ces.cRnti);
1196 /* SR_RACH_STATS : CRNTI CE UECB NOT FOUND*/
1197 rgNumCrntiCeCrntiNotFound++;
1198 /* ccpu00141318 - Removed condition for SPS rnti checking*/
1199 RGSCH_FREE_MEM(subfrmInfo);
1200 err.errType = RGSCHERR_TOM_DATIND;
1201 DU_LOG("\nERROR --> SCH : Received MSG3 "
1202 "with CRNTI:%d unable to find ueCb",
1203 datInd->ceInfo.ces.cRnti);
1207 if ((ret = rgSCHUtlProcMsg3 (subfrmInfo, cell, ue,
1208 rnti, datInd, &err)) != ROK)
1210 RGSCH_FREE_MEM(subfrmInfo);
1211 err.errType = RGSCHERR_TOM_DATIND;
1212 DU_LOG("\nERROR --> SCH : Processing for MSG3 failed for CRNTI:%d",
1218 rgSCHUtlHdlCrntiCE (cell, ue);
1220 ret = rgSCHUtlAllocSBuf (cell->instIdx,(Data**)&ueStaInd,
1221 sizeof(RgrUeStaIndInfo));
1224 ueStaInd->status = RGR_UESTA_MAC_CRNTI_CE_RECVD;
1227 ulSpsUe = RG_SCH_CMN_GET_UL_SPS_UE(ue);
1228 if(ulSpsUe->isUlSpsActv)
1230 ueStaInd->status = RGR_UESTA_MAC_CRNTI_CE_RECVD_IN_SPS_ACTIVE;
1231 ue->ul.ulSpsCfg.isLcSRMaskEnab = FALSE;
1234 ret = rgSCHUtlFillSndUeStaInd(cell, ue, ueStaInd);
1237 DU_LOG("\nERROR --> SCH : Could not Send Ue Sta Ind UEID:%d",ue->ueId);
1240 CM_LLIST_NEXT_NODE(lnkLst, tmp);
1242 } /* end of CRNTI based message */
1243 else if (datInd->ceInfo.bitMask & RGSCH_CCCH_SDU_PRSNT)
1245 /* SR_RACH_STATS : CCCH SDU */
1247 /* SR_RACH_STATS : CCCH SDU RACB NOT FOUND*/
1248 if (NULLP == rgSCHDbmGetRaCb (cell, rnti))
1250 rgNumCCCHSduCrntiNotFound++;
1253 if ((ret = rgSCHUtlProcMsg3 (subfrmInfo, cell, ue,
1254 rnti, datInd, &err)) != ROK)
1256 RGSCH_FREE_MEM(subfrmInfo);
1257 err.errType = RGSCHERR_TOM_DATIND;
1258 DU_LOG("\nERROR --> SCH : Processing for MSG3 failed for CRNTI:%d",
1263 CM_LLIST_NEXT_NODE(lnkLst, tmp);
1265 } /* end of Msg3 processing */
1269 ue = rgSCHDbmGetUeCb (cell, datInd->rnti);
1273 if((ue = rgSCHDbmGetSpsUeCb (cell, datInd->rnti)) == NULLP)
1276 RGSCH_FREE_MEM(subfrmInfo);
1277 err.errType = RGSCHERR_TOM_DATIND;
1278 DU_LOG("\nERROR --> SCH : Unable to get the UE CB for CRNTI:%d",
1286 /* The LCs for which data is received at MAC is provided to SCH.
1287 This information is used to estimate the Active LCs at UE
1288 since estimates based on only BSR is not accurate */
1289 if (datInd->ceInfo.bitMask & RGSCH_ACTIVE_LC_PRSNT)
1292 /* Compose a Bitmask with for the QCI's for which Data
1294 for (lcCount = 0; lcCount < RGINF_MAX_NUM_DED_LC; lcCount++)
1296 if ((datInd->ceInfo.ulActLCs[lcCount] == TRUE) && (TRUE == ue->ul.lcCb[lcCount].isValid))
1298 datIndActQci |= (1 << (ue->ul.lcCb[lcCount].qciCb->qci -1));
1301 if (ue->ulActiveLCs && ue->lastDatIndLCs)
1303 /* Combine previous Dat Ind and current Dat Ind to
1304 estimate active LCs at UE */
1305 combDatIndActQci = ue->lastDatIndLCs | datIndActQci;
1306 tempUeActQci = ue->ulActiveLCs;
1307 ue->ulActiveLCs = combDatIndActQci;
1308 diffBits = combDatIndActQci ^ tempUeActQci;
1314 if (0x1 & tempUeActQci)
1316 /* An active QCI has become inactive */
1317 cell->qciArray[qci].ulUeCount--;
1321 /* An Inactive QCI has become active */
1322 cell->qciArray[qci].ulUeCount++;
1329 ue->lastDatIndLCs = datIndActQci;
1333 #endif /* LTE_L2_MEAS */
1334 /* Just copy the timing information from the dat indication into the one
1335 * stored in the UE CB, will be later utilized to handle Timing advance
1338 if ((ret = rgSCHUtlUpdSch (subfrmInfo, cell, ue, datInd, &err)) != ROK)
1340 RGSCH_FREE_MEM(subfrmInfo);
1341 err.errType = RGSCHERR_TOM_DATIND;
1342 DU_LOG("\nERROR --> SCH : Unable to handle Data"
1343 " Indication for UEID:%d",ue->ueId);
1347 CM_LLIST_NEXT_NODE(lnkLst, tmp);
1350 /* update the UL PRB usage for all GBR QCIs*/
1351 for (idx = 0; idx < RGM_MAX_QCI_REPORTS; idx++)
1353 cell->prbUsage.qciPrbRpts[idx].ulTotPrbUsed += subfrmInfo->qcisUlPrbCnt[idx];
1357 /* chk if Sch needs to dealloc datInd after unpk */
1358 RGSCH_FREE_MEM(subfrmInfo);
1360 } /* rgMacSchSfRecpInd */
1364 * @brief Function to handle relInd from MAC for a UE
1368 * Function: RgMacSchSpsRelInd
1370 * Handler for processing relInd for UL SPS of a UE
1377 * @param[in] Pst *pst
1378 * @param[in] RgInfSpsRelInfo *relInfo
1383 S16 RgMacSchSpsRelInd(Pst *pst,RgInfSpsRelInfo *relInfo)
1387 Inst inst = (pst->dstInst - SCH_INST_START);
1390 /* No need to chk for cell being NULL as MAC wouldn't have found instance if
1391 * it doesnt exist */
1392 cell = rgSchCb[inst].rgrSap[relInfo->cellSapId].cell;
1394 if ((ue = rgSCHDbmGetUeCb(cell, relInfo->cRnti)) == NULLP)
1396 DU_LOG("\nERROR --> SCH : No Ue exists with CRNTI:%d",relInfo->cRnti);
1400 if ((rgSCHUtlSpsRelInd(cell, ue, relInfo->isExplRel)) != ROK)
1402 DU_LOG("\nERROR --> SCH : RelInd processing for CRNTI:%d failed",relInfo->cRnti);
1406 } /* end of RgMacSchSpsRelInd */
1407 #endif /* LTEMAC_SPS */
1412 * @brief Function to handle L2MeasCfm from MAC
1416 * Function: RgMacSchL2MeasCfm
1418 * Handler for processing L2 measurement confirm
1425 * @param[in] Pst *pst
1426 * @param[in] RgInfL2MeasCfm *measCfm
1431 S16 RgMacSchL2MeasCfm(Pst *pst, RgInfL2MeasCfm *measCfm)
1433 RgSchCellCb *cell = NULLP;
1434 Inst inst = (pst->dstInst - SCH_INST_START);
1436 RgSchL2MeasCb *measCb = NULLP;
1437 RgSchCb *instCb = &rgSchCb[inst];
1439 LrgSchMeasCfmInfo schMeasCfm;
1441 uint8_t idx1; /*LTE_L2_MEAS_PHASE2*/
1444 /* Find the cellCb using cellId in measInfo. Iterate through all cells
1445 * in rgrsapCb in RgschCb */
1446 for (idx = 0; idx < instCb->numSaps; idx++)
1448 if ( instCb->rgrSap[idx].cell->cellId == measCfm->cellId)
1450 /* got the cell break the loop */
1451 cell = instCb->rgrSap[idx].cell;
1455 /* If no cellCb return Err with Invalid Cell Id */
1458 DU_LOG("\nERROR --> SCH : Meas Cfm Failed.Invalid Cell Id");
1463 /* Iterate through all meas requests in l2mList in cellCb */
1464 lnk = cell->l2mList.first;
1467 /* Get the MeasCb : RgSchL2MeasCb */
1468 measCb = (RgSchL2MeasCb *)lnk->node;
1470 if (measCb->measReq.hdr.transId == measCfm->transId)
1475 if ( measCb == NULLP )
1481 if(measCfm->cfm.status != LCM_PRIM_OK)
1483 for (idx = 0; idx < measCb->measReq.avgPrbQciUl.numQci; idx++)
1485 qciVal = measCb->measReq.avgPrbQciUl.qci[idx];
1486 cell->qciArray[qciVal].qci = 0;
1488 /* Delete this measCb, send the negative confirmation to
1490 cmLListDelFrm(&cell->l2mList, &measCb->measLnk);
1491 /* ccpu00117052 - MOD - Passing double pointer
1492 for proper NULLP assignment*/
1493 rgSCHUtlFreeSBuf(cell->instIdx, (Data **)&measCb, sizeof(RgSchL2MeasCb));
1494 memset(&schMeasCfm, 0, sizeof(LrgSchMeasCfmInfo));
1495 schMeasCfm.measType = measCfm->measType;
1496 schMeasCfm.cfm = measCfm->cfm;
1497 schMeasCfm.hdr.transId = measCfm->transId;
1498 schMeasCfm.cellId = measCfm->cellId;
1499 RgMiLrgSchL2MeasCfm(&(instCb->rgSchInit.lmPst), &schMeasCfm);
1502 for(idx = 0; idx < measCfm->u.prbCfm.numQci; idx++)
1504 measCb->avgPrbQciUl.prbUsage[idx].prbUsage = measCfm->u.prbCfm.prbUsage[idx].prbUsage;
1505 measCb->avgPrbQciUl.prbUsage[idx].qciValue = measCfm->u.prbCfm.prbUsage[idx].qciValue;
1506 /*LTE_L2_MEAS_PHASE2*/
1507 qciVal1 = measCfm->u.prbCfm.prbUsage[idx].qciValue;
1508 for(idx1=0;idx1<measCb->measReq.avgPrbQciUl.numQci;idx1++)
1510 if(measCb->measReq.avgPrbQciUl.qci[idx1] == qciVal1)
1515 if(idx1 == measCb->measReq.avgPrbQciUl.numQci)
1517 measCb->measReq.avgPrbQciUl.qci[measCb->measReq.avgPrbQciUl.numQci++] = qciVal1;
1520 measCb->avgPrbQciUl.numQci = measCfm->u.prbCfm.numQci;
1521 measCb->cfmRcvd = TRUE;
1522 cell->sndL2Meas = TRUE;
1524 } /* end of RgMacSchL2MeasCfm */
1527 * @brief Function to handle L2MeasStopCfm from MAC
1531 * Function: RgMacSchL2MeasStopCfm
1533 * Handler for processing L2 measurement confirm
1540 * @param[in] Pst *pst
1541 * @param[in] RgInfL2MeasCfm *measCfm
1546 S16 RgMacSchL2MeasStopCfm(Pst *pst,RgInfL2MeasCfm *measCfm)
1548 LrgSchMeasCfmInfo schMeasCfm;
1549 Inst inst = (pst->dstInst - SCH_INST_START);
1550 RgSchCb *instCb = &rgSchCb[inst];
1552 memset(&schMeasCfm, 0, sizeof(LrgSchMeasCfmInfo));
1553 schMeasCfm.measType = measCfm->measType;
1554 schMeasCfm.cfm = measCfm->cfm;
1555 schMeasCfm.hdr.transId = measCfm->transId;
1556 schMeasCfm.cellId = measCfm->cellId;
1557 RgMiLrgSchL2MeasStopCfm(&(instCb->rgSchInit.lmPst), &schMeasCfm);
1562 /************** TFU Interface *************/
1565 * @brief Bind confirm API for TFU SAP on scheduler instance.
1569 * Function : RgLiTfuSchBndCfm
1571 * This API is invoked by PHY to confirm TFU SAP bind.
1574 * @param[in] Pst *pst
1575 * @param[in] SuId suId
1576 * @param[in] uint8_t status
1581 S16 RgLiTfuSchBndCfm (Pst *pst,SuId suId, uint8_t status)
1584 RgSchLowSapCb *tfuSap;
1585 Inst instId = pst->dstInst - SCH_INST_START;
1587 if(suId >= rgSchCb[instId].numSaps)
1589 DU_LOG("\nERROR --> SCH : Incorrect SuId");
1592 /* Lets validate suId first */
1593 tfuSap = &(rgSchCb[instId].tfuSap[suId]);
1595 if (suId != tfuSap->sapCfg.suId)
1597 DU_LOG("\nERROR --> SCH : Incorrect SuId. Configured (%d)"
1598 "Recieved (%d)", tfuSap->sapCfg.suId, suId);
1601 ret = rgSCHLmmBndCfm (pst, suId, status);
1603 } /* RgLiTfuSchBndCfm */
1606 * @brief Random Access Request indication from PHY.
1610 * Function : RgLiTfuRaReqInd
1612 * This API is invoked by PHY to send Random Access Request to Scheduler.
1613 * This API contains information for Random Access Request including
1614 * raRnti, list of associated RAPIDs and related information.
1616 * @param[in] Pst *pst
1617 * @param[in] SuId suId
1618 * @param[in] TfuRaReqIndInfo *raReqInd
1623 S16 RgLiTfuRaReqInd(Pst *pst,SuId suId, TfuRaReqIndInfo *raReqInd)
1626 Inst inst = pst->dstInst-SCH_INST_START;
1628 if ((ret = rgSCHUtlValidateTfuSap (inst, suId)) != ROK)
1630 DU_LOG("\nERROR --> SCH : SAP Validation failed SuId(%d)", suId);
1631 /* Free up the memory for the request structure */
1632 RGSCH_FREE_MEM(raReqInd);
1636 if(raReqInd == NULLP)
1638 DU_LOG("\nERROR --> SCH : Invalid input pointer for raReqInd Failed");
1642 if (rgSchCb[inst].tfuSap[suId].cell == NULLP)
1644 DU_LOG("\nERROR --> SCH : No cell exists");
1648 ret = rgSCHTomRaReqInd(rgSchCb[inst].tfuSap[suId].cell, raReqInd);
1649 /* Free up the memory for the request structure */
1650 RGSCH_FREE_MEM(raReqInd);
1651 /*SPutSBuf (pst->region, pst->pool, (Data *)raReqInd,
1652 sizeof(TfuRaReqIndInfo)); */
1654 } /* RgLiTfuRaReqInd */
1657 * @brief Uplink CQI indication from PHY.
1661 * Function : RgLiTfuUlCqiInd
1663 * This API is invoked by PHY to send Uplink CQI to Scheduler.
1664 * This API contains Uplink CQI information reported per UE.
1666 * @param[in] Pst *pst
1667 * @param[in] SuId suId
1668 * @param[in] TfuUlCqiIndInfo *ulCqiInd
1673 S16 RgLiTfuUlCqiInd(Pst *pst, SuId suId, TfuUlCqiIndInfo *ulCqiInd)
1676 Inst inst = pst->dstInst-SCH_INST_START;
1678 if ((ret = rgSCHUtlValidateTfuSap (inst, suId)) != ROK)
1680 DU_LOG("\nERROR --> SCH : SAP Validation failed");
1681 /* Free up the memory for the request structure */
1682 RGSCH_FREE_MEM(ulCqiInd);
1686 if (rgSchCb[inst].tfuSap[suId].cell == NULLP)
1688 DU_LOG("\nERROR --> SCH : No cell exists");
1689 /* Free up the memory for the request structure */
1690 RGSCH_FREE_MEM(ulCqiInd);
1693 ret = rgSCHTomUlCqiInd (rgSchCb[inst].tfuSap[suId].cell, ulCqiInd);
1694 /* Free up the memory for the request structure */
1695 RGSCH_FREE_MEM(ulCqiInd);
1697 } /* RgLiTfuUlCqiInd */
1700 * @brief PUCCH power adjustment indication.
1704 * Function : RgLiTfuPucchDeltaPwrInd
1706 * This API is invoked by PHY to send PUCCH power adjustment
1709 * @param[in] Pst *pst
1710 * @param[in] SuId suId
1711 * @param[in] TfuPucchDeltaPwrIndInfo *pucchDeltaPwr
1716 S16 RgLiTfuPucchDeltaPwrInd(Pst *pst,SuId suId,TfuPucchDeltaPwrIndInfo *pucchDeltaPwr)
1719 Inst inst = pst->dstInst-SCH_INST_START;
1721 if ((ret = rgSCHUtlValidateTfuSap (inst, suId)) != ROK)
1723 DU_LOG("\nERROR --> SCH : SAP Validation failed");
1724 /* Free up the memory for the request structure */
1725 RGSCH_FREE_MEM(pucchDeltaPwr);
1729 if (rgSchCb[inst].tfuSap[suId].cell == NULLP)
1731 DU_LOG("\nERROR --> SCH : No cell exists");
1734 ret = rgSCHTomPucchDeltaPwrInd (rgSchCb[inst].tfuSap[suId].cell, pucchDeltaPwr);
1735 /* Free up the memory for the request structure */
1736 RGSCH_FREE_MEM(pucchDeltaPwr);
1738 } /* RgLiTfuPucchDeltaPwrInd */
1742 * @brief HARQ ACK indication from PHY for Downlink transmissions.
1746 * Function : RgLiTfuHqInd
1748 * This API is invoked by PHY to send HARQ ACK information to Scheduler
1749 * on recieving HARQ ACK/NACK from UEs.
1750 * This API contains HARQ ACK information recieved by PHY for downlink
1753 * @param[in] Pst *pst
1754 * @param[in] SuId suId
1755 * @param[in] TfuHqIndInfo *harqAckInd
1760 S16 RgLiTfuHqInd(Pst *pst, SuId suId, TfuHqIndInfo *harqAckInd)
1763 Inst inst = (pst->dstInst - SCH_INST_START);
1767 if ((ret = rgSCHUtlValidateTfuSap (inst, suId)) != ROK)
1769 DU_LOG("\nERROR --> SCH : SAP Validation failed");
1770 RGSCH_FREE_MEM(harqAckInd);
1774 if (rgSchCb[inst].tfuSap[suId].cell == NULLP)
1776 DU_LOG("\nERROR --> SCH : No cell exists");
1781 /* Now call the TOM (Tfu ownership module) primitive to process further */
1782 ret = rgSCHTomHarqAckInd (rgSchCb[inst].tfuSap[suId].cell, harqAckInd);
1783 /* Free up the memory for the request structure */
1784 RGSCH_FREE_MEM(harqAckInd);
1786 } /* RgLiTfuHqInd */
1790 * @brief Scheduling request(SR) indication from PHY for an UE.
1794 * Function : RgLiTfuSrInd
1796 * This API is invoked by PHY to send Scheduling request information to
1797 * Scheduler on recieving SR from a list of UEs.
1798 * This API contains scheduling request information recieved by PHY for UEs.
1800 * @param[in] Pst *pst
1801 * @param[in] SuId suId
1802 * @param[in] TfuSrIndInfo *srInd
1807 S16 RgLiTfuSrInd(Pst *pst, SuId suId, TfuSrIndInfo *srInd)
1810 Inst inst = pst->dstInst-SCH_INST_START;
1813 if ((ret = rgSCHUtlValidateTfuSap (inst, suId)) != ROK)
1815 DU_LOG("\nERROR --> SCH : SAP Validation failed");
1816 RGSCH_FREE_MEM(srInd);
1820 if (rgSchCb[inst].tfuSap[suId].cell == NULLP)
1822 DU_LOG("\nERROR --> SCH : RgLiTfuSrInd()No cell exists");
1826 /* Now call the TOM (Tfu ownership module) primitive to process further */
1827 ret = rgSCHTomSrInd (rgSchCb[inst].tfuSap[suId].cell, srInd);
1828 /* Free up the memory for the request structure */
1829 RGSCH_FREE_MEM(srInd);
1831 } /* RgLiTfuSrInd */
1835 * @brief Downlink CQI indication from PHY for an UE.
1839 * Function : RgLiTfuDlCqiInd
1841 * This API is invoked by PHY to send Downlink CQI indication to Scheduler
1842 * on recieving downlink CQI from UE.
1843 * This API contains downlink CQI information recieved by PHY for an UE.
1845 * @param[in] Pst *pst
1846 * @param[in] SuId suId
1847 * @param[in] TfuDlCqiIndInfo *dlCqiInd
1852 S16 RgLiTfuDlCqiInd(Pst *pst, SuId suId, TfuDlCqiIndInfo *dlCqiInd)
1855 Inst inst = pst->dstInst-SCH_INST_START;
1857 if ((ret = rgSCHUtlValidateTfuSap (inst, suId)) != ROK)
1859 DU_LOG("\nERROR --> SCH : SAP Validation failed");
1860 /* Free up the memory for the request structure */
1861 RGSCH_FREE_MEM(dlCqiInd);
1865 if (rgSchCb[inst].tfuSap[suId].cell == NULLP)
1867 DU_LOG("\nERROR --> SCH : No cell exists");
1870 ret = rgSCHTomDlCqiInd (rgSchCb[inst].tfuSap[suId].cell, dlCqiInd);
1871 /* Free up the memory for the request structure */
1872 RGSCH_FREE_MEM(dlCqiInd);
1874 } /* RgLiTfuDlCqiInd */
1878 * @brief Raw CQI indication from PHY for an UE.
1882 * Function : RgLiTfuRawCqiInd
1884 * This API is invoked by PHY to send Raw CQI indication to Scheduler
1885 * on receiving Raw CQI from UE.
1886 * This API contains Raw CQI information recieved by PHY for an UE.
1888 * @param[in] Pst *pst
1889 * @param[in] SuId suId
1890 * @param[in] TfuRawCqiIndInfo *rawCqiInd
1895 S16 RgLiTfuRawCqiInd(Pst *pst, SuId suId, TfuRawCqiIndInfo *rawCqiInd)
1898 Inst inst = pst->dstInst-SCH_INST_START;
1901 if ((ret = rgSCHUtlValidateTfuSap (inst, suId)) != ROK)
1903 DU_LOG("\nERROR --> SCH : SAP Validation failed");
1904 /* Free up the memory for the request structure */
1905 RGSCH_FREE_MEM(rawCqiInd);
1909 if (rgSchCb[inst].tfuSap[suId].cell == NULLP)
1911 DU_LOG("\nERROR --> SCH : No cell exists");
1915 ret = rgSCHTomRawCqiInd (rgSchCb[inst].tfuSap[suId].cell, rawCqiInd);
1916 /* Free up the memory for the request structure */
1917 RGSCH_FREE_MEM(rawCqiInd);
1919 } /* RgLiTfuRawCqiInd */
1922 * @brief SRS indication from PHY for an UE.
1926 * Function : RgLiTfuSrsInd
1928 * This API is invoked by PHY to send UL SRS indication to Scheduler
1929 * on receiving a SRS from UE.
1930 * This API contains SRS information recieved by PHY for an UE.
1932 * @param[in] Pst *pst
1933 * @param[in] SuId suId
1934 * @param[in] TfuSrsIndInfo *srsInd
1939 S16 RgLiTfuSrsInd(Pst *pst, SuId suId, TfuSrsIndInfo *srsInd)
1942 Inst inst = pst->dstInst-SCH_INST_START;
1944 if ((ret = rgSCHUtlValidateTfuSap (inst, suId)) != ROK)
1946 DU_LOG("\nERROR --> SCH : SAP Validation failed");
1947 /* Free up the memory for the request structure */
1948 RGSCH_FREE_MEM(srsInd);
1952 if (rgSchCb[inst].tfuSap[suId].cell == NULLP)
1954 DU_LOG("\nERROR --> SCH : No cell exists");
1957 ret = rgSCHTomSrsInd (rgSchCb[inst].tfuSap[suId].cell, srsInd);
1958 /* Free up the memory for the request structure */
1959 RGSCH_FREE_MEM(srsInd);
1961 } /* RgLiTfuSrsInd */
1966 * @brief DOA indication from PHY for an UE.
1970 * Function : RgLiTfuDoaInd
1972 * This API is invoked by PHY to send Direction Of Arrival to Scheduler
1973 * on calculating DOA at PHYSICAL LAYER for an UE.
1974 * This API contains DOA information calculated by PHY for an UE.
1976 * @param[in] Pst *pst
1977 * @param[in] SuId suId
1978 * @param[in] TfuDoaIndInfo *doaInd
1983 S16 RgLiTfuDoaInd(Pst *pst, SuId suId, TfuDoaIndInfo *doaInd)
1986 Inst inst = pst->dstInst-SCH_INST_START;
1988 if ((ret = rgSCHUtlValidateTfuSap (inst, suId)) != ROK)
1990 DU_LOG("\nERROR --> SCH : SAP Validation failed");
1991 /* Free up the memory for the request structure */
1992 RGSCH_FREE_MEM(doaInd);
1996 if (rgSchCb[inst].tfuSap[suId].cell == NULLP)
1998 DU_LOG("\nERROR --> SCH : No cell exists");
2001 ret = rgSCHTomDoaInd (rgSchCb[inst].tfuSap[suId].cell, doaInd);
2002 /* Free up the memory for the request structure */
2003 RGSCH_FREE_MEM(doaInd);
2005 } /* RgLiTfuDlCqiInd */
2008 * @brief CRC indication from PHY.
2012 * Function : RgLiTfuCrcInd
2014 * This API is invoked by PHY to give CRC indication to scheduler.
2016 * @param[in] Pst *pst
2017 * @param[in] SuId suId
2018 * @param[in] TfuCrcIndInfo *crcInd
2023 S16 RgLiTfuCrcInd(Pst *pst, SuId suId, TfuCrcIndInfo *crcInd)
2026 Inst inst = pst->dstInst-SCH_INST_START;
2028 #ifdef XEON_SPECIFIC_CHANGES
2029 struct timeval start6, end6;
2030 gettimeofday(&start6, NULL);
2033 if ((ret = rgSCHUtlValidateTfuSap (inst, suId)) != ROK)
2035 DU_LOG("\nERROR --> SCH : SAP Validation failed");
2036 RGSCH_FREE_MEM(crcInd);
2040 if (rgSchCb[inst].tfuSap[suId].cell == NULLP)
2042 DU_LOG("\nERROR --> SCH : No cell exists");
2047 /* Now call the TOM (Tfu ownership module) primitive to process further */
2048 ret = rgSCHTomCrcInd(rgSchCb[inst].tfuSap[suId].cell, crcInd);
2049 /* Free up the memory for the request structure */
2050 RGSCH_FREE_MEM(crcInd);
2051 #ifdef XEON_SPECIFIC_CHANGES
2052 gettimeofday(&end6, NULL);
2055 } /* RgLiTfuCrcInd */
2058 * @brief Timing Advance indication from PHY.
2062 * Function : RgLiTfuTimingAdvInd
2064 * This API is invoked by PHY to indicate timing advance to Scheduler for
2067 * @param[in] Pst *pst
2068 * @param[in] SuId suId
2069 * @param[in] TfuTimingAdvIndInfo *timingAdvInd
2074 S16 RgLiTfuTimingAdvInd(Pst *pst, SuId suId, TfuTimingAdvIndInfo *timingAdvInd)
2077 Inst inst = pst->dstInst-SCH_INST_START;
2079 if ((ret = rgSCHUtlValidateTfuSap (inst, suId)) != ROK)
2081 DU_LOG("\nERROR --> SCH : SAP Validation failed");
2082 /* Free up the memory for the request structure */
2083 RGSCH_FREE_MEM(timingAdvInd);
2087 if (rgSchCb[inst].tfuSap[suId].cell == NULLP)
2089 DU_LOG("\nERROR --> SCH : No cell exists");
2092 /* Now call the TOM (Tfu ownership module) primitive to process further */
2093 ret = rgSCHTomTimingAdvInd(rgSchCb[inst].tfuSap[suId].cell, timingAdvInd);
2094 /* Free up the memory for the request structure */
2095 RGSCH_FREE_MEM(timingAdvInd);
2097 } /* RgLiTfuTimingAdvInd */
2099 /************* RGM Interface ****************/
2101 * @brief API for bind request from RRM towards MAC.
2105 * Function: RgUiRgmBndReq
2107 * This API is invoked by RRM towards MAC to bind RGM SAP.
2108 * These API validates the Pst, spId, suId and sends the bind confirm to
2112 * @param[in] Pst *pst
2113 * @param[in] SuId suId
2114 * @param[in] SpId spId
2119 S16 RgUiRgmBndReq(Pst *pst,SuId suId,SpId spId)
2122 Pst tmpPst; /* Temporary Post Structure */
2123 Inst instId = pst->dstInst-SCH_INST_START;
2125 tmpPst.prior = pst->prior;
2126 tmpPst.route = pst->route;
2127 tmpPst.selector = pst->selector;
2128 tmpPst.region = rgSchCb[instId].rgSchInit.region;
2129 tmpPst.pool = rgSchCb[instId].rgSchInit.pool;
2131 tmpPst.srcProcId = rgSchCb[instId].rgSchInit.procId;
2132 tmpPst.srcEnt = rgSchCb[instId].rgSchInit.ent;
2133 tmpPst.srcInst = rgSchCb[instId].rgSchInit.inst + SCH_INST_START;
2135 tmpPst.event = EVTNONE;
2137 tmpPst.dstProcId = pst->srcProcId;
2138 tmpPst.dstEnt = pst->srcEnt;
2139 tmpPst.dstInst = pst->srcInst;
2141 /*TODO remove follo statement*/
2142 rgSchCb[instId].rgmSap[spId].sapSta.sapState = LRG_UNBND;
2144 if(spId < rgSchCb[instId].numSaps)
2146 /* Check the state of the SAP */
2147 switch (rgSchCb[instId].rgmSap[spId].sapSta.sapState)
2149 /* This case might not be needed if SAP not configured then it will go
2150 * to else of above if condition */
2151 case LRG_UNBND: /* SAP is not bound */
2152 DU_LOG("\nDEBUG --> SCH : SAP is not yet bound");
2153 rgSchCb[instId].rgmSap[spId].sapSta.sapState = LRG_BND;
2154 rgSchCb[instId].rgmSap[spId].sapCfg.suId = suId;
2155 /* Send Bind Confirm with status as SUCCESS */
2156 ret = rgSCHUtlRgmBndCfm(instId, suId, CM_BND_OK);
2157 /*Indicate to Layer manager */
2159 case LRG_BND: /* SAP is already bound*/
2160 DU_LOG("\nDEBUG --> SCH : SAP is already bound");
2161 ret = rgSCHUtlRgmBndCfm(instId, suId, CM_BND_OK);
2163 default: /* Should Never Enter here */
2164 #if (ERRCLASS & ERRCLS_ADD_RES)
2165 DU_LOG("\nERROR --> SCH : Invalid SAP State:RgUiRgmBndReq failed\n");
2167 ret = rgSCHUtlRgmBndCfm(instId, suId, CM_BND_NOK);
2173 #if (ERRCLASS & ERRCLS_ADD_RES)
2174 /* ccpu00117035 - MOD - Changed ErrVal argument from accessing sap state
2175 to spId to avoid seg fault due to invalid sapID */
2176 DU_LOG("\nERROR --> SCH : Invalid SAP Id:RgUiRrmBndReq failed\n");
2178 ret = RgUiRgmBndCfm(&tmpPst, suId, CM_BND_NOK);
2181 } /* RgUiRgmBndReq */
2184 * @brief API for unbind request from RRM towards MAC.
2188 * Function: RgUiRgmUbndReq
2190 * This API is invoked by RRM towards MAC to unbind RGM SAP.
2191 * These API validates the Pst, spId, suId and transfers the unbind request
2192 * specific information to corresponding ownership module (GOM) API.
2195 * @param[in] Pst *pst
2196 * @param[in] SuId suId
2197 * @param[in] Reason reason
2202 S16 RgUiRgmUbndReq(Pst *pst,SpId spId,Reason reason)
2204 Inst instId = pst->dstInst-SCH_INST_START;
2206 /* SAP Id validation */
2207 if (spId < rgSchCb[instId].numSaps)
2209 switch(rgSchCb[instId].rgmSap[spId].sapSta.sapState)
2211 case LRG_BND: /* SAP is already bound*/
2212 /* setting SAP state to UN BOUND */
2213 DU_LOG("\nDEBUG --> SCH : SAP is already bound");
2214 rgSchCb[instId].rgmSap[spId].sapSta.sapState = LRG_UNBND;
2217 #if (ERRCLASS & ERRCLS_ADD_RES)
2218 DU_LOG("\nERROR --> SCH : Invalid SAP State: RgUiRgmUbndReq failed\n");
2225 #if (ERRCLASS & ERRCLS_ADD_RES)
2226 DU_LOG("\nERROR --> SCH : Invalid SAP Id:RgUiRgmUbndReq failed\n");
2231 } /* RgUiRgmUbndReq */
2235 * @brief API for start or stop PRB reporting from RRM towards MAC.
2239 * Function: RgUiRgmCfgPrbRprt
2241 * This API is invoked by RRM towards MAC to start or stop calculating
2242 * Average PRB usage in downlink and uplink. The average PRB usage will
2243 * be reported to RRM based on confiured periodicity.
2246 * @param[in] Pst *pst
2247 * @param[in] SuId suId
2248 * @param[in] SpId spId
2253 S16 RgUiRgmCfgPrbRprt(Pst *pst, SpId spId,RgmPrbRprtCfg *prbRprtCfg)
2257 RgSchPrbUsage *prbUsage;
2258 Inst inst = (pst->dstInst - SCH_INST_START);
2260 cell = rgSchCb[inst].rgmSap[spId].cell;
2261 prbUsage = &cell->prbUsage;
2262 prbUsage->prbRprtEnabld = prbRprtCfg->bConfigType;
2263 prbUsage->rprtPeriod = prbRprtCfg->usPrbAvgPeriodicty;
2264 RG_SCH_ADD_TO_CRNT_TIME(cell->crntTime, prbUsage->startTime, 1);
2266 /* clear the qciPrbRpts for all GBR QCIs */
2267 memset(&prbUsage->qciPrbRpts[0], 0,
2268 (RGM_MAX_QCI_REPORTS * sizeof(RgSchQciPrbUsage)));
2269 DU_LOG("\nDEBUG --> SCH : RgUiRgmCfgPrbRprt config type %d with the report period %d",
2270 prbUsage->prbRprtEnabld,prbUsage->rprtPeriod);
2272 /* ccpu00134393 : mem leak fix */
2273 SPutSBuf(pst->region, pst->pool, (Data *)prbRprtCfg, sizeof(RgmPrbRprtCfg));
2278 * @brief ERROR INDICATION from PHY for the i failed unlicensed Scell transmission.
2282 * Function : RgLiTfuErrInd
2284 * This API is invoked by PHY to send ERROR INDICATION to scheduler
2285 * Currently invoked in the cases when the Unlicensed SCell transmission
2287 * This API contains the Cell and subframe information for which the
2288 * transmission failed.
2290 * @param[in] Pst *pst
2291 * @param[in] SuId suId
2292 * @param[in] TfuErrIndInfo *errIndInfo
2297 S16 RgLiTfuErrInd(Pst *pst, SuId suId, TfuErrIndInfo *errInd)
2301 Inst inst = (pst->dstInst - SCH_INST_START);
2305 if ((ret = rgSCHUtlValidateTfuSap (inst, suId)) != ROK)
2308 DU_LOG("\nERROR --> SCH : SAP Validation failed");
2312 if (rgSchCb[inst].tfuSap[suId].cell == NULLP)
2314 DU_LOG("\nERROR --> SCH : No cell exists");
2320 /* Now call the TOM (Tfu ownership module) primitive to process further */
2321 ret = rgSCHLaaErrInd(rgSchCb[inst].tfuSap[suId].cell, errInd);
2324 } /* RgLiTfuErrInd */
2328 /**********************************************************************
2331 **********************************************************************/