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 INF Interface Module
29 **********************************************************************/
32 @brief This file contains the definitions for Upper Interface(RGR/CRG/RGU)
33 primitives that are invoked from MAC to its service users.
34 Portable functions corresponding to these primitives are also defined.
36 /* header include files (.h) */
37 #include "common_def.h"
38 #include "rg_env.h" /* MAC Environment Defines */
39 #include "crg.h" /* CRG Interface defines */
40 #include "rgr.h" /* RGR Interface defines */
41 #include "rgu.h" /* RGU Interface defines */
42 #include "cm_mblk.h" /* memory management */
43 #include "cm_lte.h" /* Common LTE Defines */
44 #include "tfu.h" /* RGU Interface defines */
48 #include "rg_sch_inf.h" /* RGU Interface defines */
50 /* header/extern include files (.x) */
51 #include "crg.x" /* CRG Interface includes */
52 #include "rgr.x" /* RGR Interface includes */
53 #include "rgu.x" /* RGU Interface includes */
54 #include "cm_mblk.x" /* memory management */
55 #include "cm_lte.x" /* Common LTE Defines */
56 #include "tfu.x" /* RGU Interface includes */
60 #include "rg_sch_inf.x" /* RGU Interface includes */
64 PRIVATE CONSTANT CellRegReq RgSchMacCellRegReqMt[RG_MAX_SCH] =
73 PRIVATE CONSTANT DedBoUpdtReq RgMacSchDedBoUpdtReqMt[RG_MAX_SCH] =
76 cmPkMacSchDedBoUpdtReq,
82 PRIVATE CONSTANT CmnBoUpdtReq RgMacSchCmnBoUpdtReqMt[RG_MAX_SCH] =
85 cmPkMacSchCmnBoUpdtReq,
91 PRIVATE CONSTANT SfRecpInd RgMacSchSfRecpIndMt[RG_MAX_SCH] =
99 /*Fix: start: Inform UE delete to scheduler*/
100 PRIVATE CONSTANT UeDelInd RgMacSchUeDelIndMt[RG_MAX_SCH] =
108 /*Fix: end: Inform UE delete to scheduler*/
109 PRIVATE CONSTANT SfAllocReq RgSchMacSfAllocReqMt[RG_MAX_SCH] =
112 cmPkSchMacSfAllocReq,
118 PRIVATE CONSTANT RstHqEntReq RgSchMacRstHqEntReqMt[RG_MAX_SCH] =
121 cmPkSchMacRstHqEntReq,
126 PRIVATE CONSTANT RlsHqReq RgSchMacRlsHqReqMt[RG_MAX_SCH] =
135 PRIVATE CONSTANT RlsRntiReq RgSchMacRlsRntiReqMt[RG_MAX_SCH] =
138 cmPkSchMacRlsRntiReq,
144 PRIVATE CONSTANT LcgReg RgSchMacLcgRegReqMt[RG_MAX_SCH] =
154 PRIVATE CONSTANT SpsLcReg RgSchMacSpsLcRegReqMt[RG_MAX_SCH] =
157 cmPkSchMacSpsLcRegReq,
163 PRIVATE CONSTANT UlSpsReset RgSchMacUlSpsResetMt[RG_MAX_SCH] =
166 cmPkSchMacUlSpsReset,
168 RgSchMacUlSpsResetReq
174 PRIVATE CONSTANT SpsLcDereg RgSchMacSpsLcDeregReqMt[RG_MAX_SCH] =
177 cmPkSchMacSpsLcDeregReq,
179 RgSchMacSpsLcDeregReq
183 PRIVATE CONSTANT SpsRelInd RgMacSchSpsRelIndMt[RG_MAX_SCH] =
192 #endif /* LTEMAC_SPS */
195 PRIVATE CONSTANT L2MeasReq RgSchMacL2MeasReqMt[RG_MAX_SCH] =
203 /*Added for Rsys oam*/
204 PRIVATE CONSTANT L2MeasStopReq RgSchMacL2MeasStopReqMt[RG_MAX_SCH] =
207 cmPkSchMacL2MeasStopReq
209 RgSchMacL2MeasStopReq
213 PRIVATE CONSTANT L2MeasSendReq RgSchMacL2MeasSendReqMt[RG_MAX_SCH] =
216 cmPkSchMacL2MeasSendReq
218 RgSchMacL2MeasSendReq
222 PRIVATE CONSTANT L2MeasCfm RgMacSchL2MeasCfmMt[RG_MAX_SCH] =
230 PRIVATE CONSTANT L2MeasStopCfm RgMacSchL2MeasStopCfmMt[RG_MAX_SCH] =
233 cmPkMacSchL2MeasStopCfm
235 RgMacSchL2MeasStopCfm
238 #endif/*LTE_L2_MEAS*/
240 * @brief Data Indication from MAC to RLC to
241 * forward the data received for dedicated channels
245 * Function : RgSchMacCellReg
247 * @param[in] Pst* pst
248 * @param[in] SuId suId
249 * @param[in] RguDDatIndInfo * datInd
254 PUBLIC S16 RgSchMacCellReg
260 PUBLIC S16 RgSchMacCellReg(pst, regReq)
262 RgInfCellReg* regReq;
266 TRC3(RgSchMacCellReg);
268 return ((*RgSchMacCellRegReqMt[0])(pst, regReq));
272 * @brief Data Indication from MAC to RLC to
273 * forward the data received for dedicated channels
277 * Function : RgMacSchDedBoUpdt
279 * @param[in] Pst* pst
280 * @param[in] SuId suId
281 * @param[in] RguDDatIndInfo * datInd
286 PUBLIC S16 RgMacSchDedBoUpdt
292 PUBLIC S16 RgMacSchDedBoUpdt(pst, boRpt)
294 RgInfDedBoRpt* boRpt;
298 TRC3(RgMacSchDedBoUpdt);
300 return ((*RgMacSchDedBoUpdtReqMt[0])(pst, boRpt));
304 * @brief Data Indication from MAC to RLC to
305 * forward the data received for dedicated channels
309 * Function : RgMacSchCmnBoUpdt
311 * @param[in] Pst* pst
312 * @param[in] SuId suId
313 * @param[in] RguDDatIndInfo * datInd
318 PUBLIC S16 RgMacSchCmnBoUpdt
324 PUBLIC S16 RgMacSchCmnBoUpdt(pst, boRpt)
326 RgInfCmnBoRpt* boRpt;
330 TRC3(RgMacSchCmnBoUpdt);
332 return ((*RgMacSchCmnBoUpdtReqMt[0])(pst, boRpt));
335 /*Fix: start: Inform UE delete to scheduler*/
337 * @brief This primitive is used to indicate deletion of UE
338 * at MAC to scheduler.
342 * Function : RgMacSchUeDel
344 * @param[in] Pst* pst
345 * @param[in] RgInfSfDatInd* ueDelInd
350 PUBLIC S16 RgMacSchUeDel
353 RgInfUeDelInd* ueDelInd
356 PUBLIC S16 RgMacSchUeDel(pst, datInd)
358 RgInfUeDelInd* ueDelInd;
364 return ((*RgMacSchUeDelIndMt[0])(pst, ueDelInd));
366 /*Fix: end: Inform UE delete to scheduler*/
368 * @brief Data Indication from MAC to RLC to
369 * forward the data received for dedicated channels
373 * Function : RgMacSchSfRecp
375 * @param[in] Pst* pst
376 * @param[in] SuId suId
377 * @param[in] RguDDatIndInfo * datInd
382 PUBLIC S16 RgMacSchSfRecp
385 RgInfSfDatInd* datInd
388 PUBLIC S16 RgMacSchSfRecp(pst, datInd)
390 RgInfSfDatInd* datInd;
394 TRC3(RgMacSchSfRecp);
396 return ((*RgMacSchSfRecpIndMt[0])(pst, datInd));
400 * @brief Data Indication from MAC to RLC to
401 * forward the data received for dedicated channels
405 * Function : RgSchMacSfAlloc
407 * @param[in] Pst* pst
408 * @param[in] SuId suId
409 * @param[in] RguDDatIndInfo * datInd
414 PUBLIC S16 RgSchMacSfAlloc
417 RgInfSfAlloc* resAllocReq
420 PUBLIC S16 RgSchMacSfAlloc(pst, resAllocReq)
422 RgInfSfAlloc* resAllocReq;
426 TRC3(RgSchMacSfAlloc);
428 return ((*RgSchMacSfAllocReqMt[0])(pst, resAllocReq));
432 * @brief Trigger for resetting Harq Entity at MAC
436 * Function : RgSchMacRstHqEnt
438 * @param[in] Pst* pst
439 * @param[in] RgInfResetHqEnt *hqEntRstReq
444 PUBLIC S16 RgSchMacRstHqEnt
447 RgInfResetHqEnt* hqEntInfo
450 PUBLIC S16 RgSchMacRstHqEnt(pst, hqEntInfo)
452 RgInfResetHqEnt* hqEntInfo;
456 TRC3(RgSchMacRstHqEnt)
458 return ((*RgSchMacRstHqEntReqMt[0])(pst, hqEntInfo));
462 * @brief Data Indication from MAC to RLC to
463 * forward the data received for dedicated channels
467 * Function : RgSchMacRlsHq
469 * @param[in] Pst* pst
470 * @param[in] SuId suId
471 * @param[in] RguDDatIndInfo * datInd
476 PUBLIC S16 RgSchMacRlsHq
479 RgInfRlsHqInfo* sfHqInfo
482 PUBLIC S16 RgSchMacRlsHq(pst, sfHqInfo)
484 RgInfRlsHqInfo* sfHqInfo;
490 return ((*RgSchMacRlsHqReqMt[0])(pst, sfHqInfo));
494 * @brief Data Indication from MAC to RLC to
495 * forward the data received for dedicated channels
499 * Function : RgSchMacRlsRnti
501 * @param[in] Pst* pst
502 * @param[in] SuId suId
503 * @param[in] RguDDatIndInfo * datInd
508 PUBLIC S16 RgSchMacRlsRnti
511 RgInfRlsRnti* rlsRnti
514 PUBLIC S16 RgSchMacRlsRnti(pst, rlsRnti)
516 RgInfRlsRnti* rlsRnti;
520 TRC3(RgSchMacRlsRnti);
522 return ((*RgSchMacRlsRntiReqMt[0])(pst, rlsRnti));
526 * @brief Request from SCH to MAC to register the GBR LCG of a UE
530 * Function : RgSchMacLcgReg
532 * @param[in] Pst* pst
533 * @param[in] RgInfLcgRegReq *lcgRegReq
538 PUBLIC S16 RgSchMacLcgReg
541 RgInfLcgRegReq *lcgRegReq
544 PUBLIC S16 RgSchMacLcgReg(pst, lcgRegReq)
546 RgInfLcgRegReq *lcgRegReq;
550 TRC3(RgSchMacLcgReg);
552 return ((*RgSchMacLcgRegReqMt[0])(pst, lcgRegReq));
553 } /* end of RgSchMacLcgReg */
557 * @brief Data Indication from MAC to SCH to
558 * indicate the arrival of the data on SPS logical channels
562 * Function : RgMacSchSpsRel
564 * @param[in] Pst* pst
565 * @param[in] RgInfSpsRelInfo* relInfo
570 PUBLIC S16 RgMacSchSpsRel
573 RgInfSpsRelInfo* relInfo
576 PUBLIC S16 RgMacSchSpsRel(pst, relInfo)
578 RgInfSpsRelInfo* relInfo;
584 return ((*RgMacSchSpsRelIndMt[0])(pst, relInfo));
585 } /* end of RgMacSchSpsRel */
588 * @brief Request from SCH to MAC to register the SPS logical channels of a UE
592 * Function : RgSchMacSpsLcReg
594 * @param[in] Pst* pst
595 * @param[in] RgInfSpsLcInfo *lcInfo
600 PUBLIC S16 RgSchMacSpsLcReg
603 RgInfSpsLcInfo *lcInfo
606 PUBLIC S16 RgSchMacSpsLcReg(pst, lcInfo)
608 RgInfSpsLcInfo *lcInfo;
612 TRC3(RgSchMacSpsLcReg);
614 return ((*RgSchMacSpsLcRegReqMt[0])(pst, lcInfo));
615 } /* end of RgSchMacSpsLcReg */
620 * @brief Request from SCH to MAC to reset UL SPS params
624 * Function : RgSchMacUlSpsReset
626 * @param[in] Pst* pst
627 * @param[in] RgInfUlSpsReset *lcInfo
632 PUBLIC S16 RgSchMacUlSpsReset
635 RgInfUlSpsReset *ulSpsResetInfo
638 PUBLIC S16 RgSchMacUlSpsReset(pst, ulSpsResetInfo)
640 RgInfUlSpsReset *ulSpsResetInfo;
644 TRC3(RgSchMacUlSpsReset);
646 return ((*RgSchMacUlSpsResetMt[0])(pst, ulSpsResetInfo));
647 } /* end of RgSchMacUlSpsReset */
652 * @brief Request from SCH to MAC to deregister the SPS logical channels of a UE
656 * Function : RgSchMacSpsLcDereg
658 * @param[in] Pst* pst
659 * @param[in] RgInfSpsLcInfo *lcInfo
664 PUBLIC S16 RgSchMacSpsLcDereg
671 PUBLIC S16 RgSchMacSpsLcDereg(pst, cellId, crnti)
678 TRC3(RgSchMacSpsLcDereg);
680 return ((*RgSchMacSpsLcDeregReqMt[0])(pst, cellId, crnti));
681 } /* end of RgSchMacSpsLcDereg */
683 #endif /* LTEMAC_SPS */
686 * @brief Request from SCH to MAC for L2 Measurement
690 * Function : RgSchMacL2Meas
692 * @param[in] Pst* pst
693 * @param[in] RgInfL2MeasReq *measInfo
698 PUBLIC S16 RgSchMacL2Meas
701 RgInfL2MeasReq *measInfo
704 PUBLIC S16 RgSchMacL2Meas(pst, measInfo)
706 RgInfL2MeasReq *measInfo;
710 TRC3(RgSchMacL2Meas);
712 return ((*RgSchMacL2MeasReqMt[0])(pst, measInfo));
713 } /* end of RgSchMacL2Meas */
716 * @brief Request from SCH to MAC for Stopping L2 Measurement
720 * Function : RgSchMacL2MeasStop
722 * @param[in] Pst* pst
723 * @param[in] RgInfL2MeasReq *measInfo
728 PUBLIC S16 RgSchMacL2MeasStop
731 RgInfL2MeasStopReq *measInfo
734 PUBLIC S16 RgSchMacL2MeasStop(pst, measInfo)
736 RgInfL2MeasStopReq *measInfo;
740 TRC3(RgSchMacL2MeasStop);
742 return ((*RgSchMacL2MeasStopReqMt[0])(pst, measInfo));
743 } /* end of RgSchMacL2Meas */
746 * @brief Request from SCH to MAC for Sending L2 Measurement
750 * Function : RgSchMacL2MeasSend
752 * @param[in] Pst* pst
753 * @param[in] RgInfL2MeasReq *measInfo
758 PUBLIC S16 RgSchMacL2MeasSend
761 RgInfL2MeasSndReq *measInfo
764 PUBLIC S16 RgSchMacL2MeasSend(pst, measInfo)
766 RgInfL2MeasSndReq *measInfo;
770 TRC3(RgSchMacL2MeasSend);
772 return ((*RgSchMacL2MeasSendReqMt[0])(pst, measInfo));
773 } /* end of RgSchMacL2MeasSend */
776 * @brief Request from MAC to SCH for L2 Measurement
780 * Function : RgMacSchL2Meas
782 * @param[in] Pst* pst
783 * @param[in] RgInfL2MeasCfm *measInfo
788 PUBLIC S16 RgMacSchL2Meas
791 RgInfL2MeasCfm *measInfo
794 PUBLIC S16 RgMacSchL2Meas(pst, measInfo)
796 RgInfL2MeasCfm *measInfo;
800 TRC3(RgMacSchL2Meas);
802 return ((*RgMacSchL2MeasCfmMt[0])(pst, measInfo));
803 } /* end of RgSchMacL2Meas */
805 * @brief Request from MAC to SCH for L2 Measurement
809 * Function : RgMacSchL2MeasStop
811 * @param[in] Pst* pst
812 * @param[in] RgInfL2MeasCfm *measInfo
817 PUBLIC S16 RgMacSchL2MeasStop
820 RgInfL2MeasCfm *measInfo
823 PUBLIC S16 RgMacSchL2MeasStop(pst, measInfo)
825 RgInfL2MeasCfm *measInfo;
829 TRC3(RgMacSchL2MeasStop);
831 return ((*RgMacSchL2MeasStopCfmMt[0])(pst, measInfo));
832 } /* end of RgSchMacL2MeasStop*/
833 #endif/*LTE_L2_MEAS*/
834 /**********************************************************************
837 **********************************************************************/