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
260 S16 RgSchMacCellReg(pst, regReq)
262 RgInfCellReg* regReq;
266 return ((*RgSchMacCellRegReqMt[0])(pst, regReq));
270 * @brief Data Indication from MAC to RLC to
271 * forward the data received for dedicated channels
275 * Function : RgMacSchDedBoUpdt
277 * @param[in] Pst* pst
278 * @param[in] SuId suId
279 * @param[in] RguDDatIndInfo * datInd
284 S16 RgMacSchDedBoUpdt
290 S16 RgMacSchDedBoUpdt(pst, boRpt)
292 RgInfDedBoRpt* boRpt;
296 return ((*RgMacSchDedBoUpdtReqMt[0])(pst, boRpt));
300 * @brief Data Indication from MAC to RLC to
301 * forward the data received for dedicated channels
305 * Function : RgMacSchCmnBoUpdt
307 * @param[in] Pst* pst
308 * @param[in] SuId suId
309 * @param[in] RguDDatIndInfo * datInd
314 S16 RgMacSchCmnBoUpdt
320 S16 RgMacSchCmnBoUpdt(pst, boRpt)
322 RgInfCmnBoRpt* boRpt;
326 return ((*RgMacSchCmnBoUpdtReqMt[0])(pst, boRpt));
329 /*Fix: start: Inform UE delete to scheduler*/
331 * @brief This primitive is used to indicate deletion of UE
332 * at MAC to scheduler.
336 * Function : RgMacSchUeDel
338 * @param[in] Pst* pst
339 * @param[in] RgInfSfDatInd* ueDelInd
347 RgInfUeDelInd* ueDelInd
350 S16 RgMacSchUeDel(pst, datInd)
352 RgInfUeDelInd* ueDelInd;
356 return ((*RgMacSchUeDelIndMt[0])(pst, ueDelInd));
358 /*Fix: end: Inform UE delete to scheduler*/
360 * @brief Data Indication from MAC to RLC to
361 * forward the data received for dedicated channels
365 * Function : RgMacSchSfRecp
367 * @param[in] Pst* pst
368 * @param[in] SuId suId
369 * @param[in] RguDDatIndInfo * datInd
377 RgInfSfDatInd* datInd
380 S16 RgMacSchSfRecp(pst, datInd)
382 RgInfSfDatInd* datInd;
386 return ((*RgMacSchSfRecpIndMt[0])(pst, datInd));
390 * @brief Data Indication from MAC to RLC to
391 * forward the data received for dedicated channels
395 * Function : RgSchMacSfAlloc
397 * @param[in] Pst* pst
398 * @param[in] SuId suId
399 * @param[in] RguDDatIndInfo * datInd
407 RgInfSfAlloc* resAllocReq
410 S16 RgSchMacSfAlloc(pst, resAllocReq)
412 RgInfSfAlloc* resAllocReq;
416 return ((*RgSchMacSfAllocReqMt[0])(pst, resAllocReq));
420 * @brief Trigger for resetting Harq Entity at MAC
424 * Function : RgSchMacRstHqEnt
426 * @param[in] Pst* pst
427 * @param[in] RgInfResetHqEnt *hqEntRstReq
435 RgInfResetHqEnt* hqEntInfo
438 S16 RgSchMacRstHqEnt(pst, hqEntInfo)
440 RgInfResetHqEnt* hqEntInfo;
444 return ((*RgSchMacRstHqEntReqMt[0])(pst, hqEntInfo));
448 * @brief Data Indication from MAC to RLC to
449 * forward the data received for dedicated channels
453 * Function : RgSchMacRlsHq
455 * @param[in] Pst* pst
456 * @param[in] SuId suId
457 * @param[in] RguDDatIndInfo * datInd
465 RgInfRlsHqInfo* sfHqInfo
468 S16 RgSchMacRlsHq(pst, sfHqInfo)
470 RgInfRlsHqInfo* sfHqInfo;
474 return ((*RgSchMacRlsHqReqMt[0])(pst, sfHqInfo));
478 * @brief Data Indication from MAC to RLC to
479 * forward the data received for dedicated channels
483 * Function : RgSchMacRlsRnti
485 * @param[in] Pst* pst
486 * @param[in] SuId suId
487 * @param[in] RguDDatIndInfo * datInd
495 RgInfRlsRnti* rlsRnti
498 S16 RgSchMacRlsRnti(pst, rlsRnti)
500 RgInfRlsRnti* rlsRnti;
504 return ((*RgSchMacRlsRntiReqMt[0])(pst, rlsRnti));
508 * @brief Request from SCH to MAC to register the GBR LCG of a UE
512 * Function : RgSchMacLcgReg
514 * @param[in] Pst* pst
515 * @param[in] RgInfLcgRegReq *lcgRegReq
523 RgInfLcgRegReq *lcgRegReq
526 S16 RgSchMacLcgReg(pst, lcgRegReq)
528 RgInfLcgRegReq *lcgRegReq;
532 return ((*RgSchMacLcgRegReqMt[0])(pst, lcgRegReq));
533 } /* end of RgSchMacLcgReg */
537 * @brief Data Indication from MAC to SCH to
538 * indicate the arrival of the data on SPS logical channels
542 * Function : RgMacSchSpsRel
544 * @param[in] Pst* pst
545 * @param[in] RgInfSpsRelInfo* relInfo
553 RgInfSpsRelInfo* relInfo
556 S16 RgMacSchSpsRel(pst, relInfo)
558 RgInfSpsRelInfo* relInfo;
562 return ((*RgMacSchSpsRelIndMt[0])(pst, relInfo));
563 } /* end of RgMacSchSpsRel */
566 * @brief Request from SCH to MAC to register the SPS logical channels of a UE
570 * Function : RgSchMacSpsLcReg
572 * @param[in] Pst* pst
573 * @param[in] RgInfSpsLcInfo *lcInfo
581 RgInfSpsLcInfo *lcInfo
584 S16 RgSchMacSpsLcReg(pst, lcInfo)
586 RgInfSpsLcInfo *lcInfo;
590 return ((*RgSchMacSpsLcRegReqMt[0])(pst, lcInfo));
591 } /* end of RgSchMacSpsLcReg */
596 * @brief Request from SCH to MAC to reset UL SPS params
600 * Function : RgSchMacUlSpsReset
602 * @param[in] Pst* pst
603 * @param[in] RgInfUlSpsReset *lcInfo
608 S16 RgSchMacUlSpsReset
611 RgInfUlSpsReset *ulSpsResetInfo
614 S16 RgSchMacUlSpsReset(pst, ulSpsResetInfo)
616 RgInfUlSpsReset *ulSpsResetInfo;
620 return ((*RgSchMacUlSpsResetMt[0])(pst, ulSpsResetInfo));
621 } /* end of RgSchMacUlSpsReset */
626 * @brief Request from SCH to MAC to deregister the SPS logical channels of a UE
630 * Function : RgSchMacSpsLcDereg
632 * @param[in] Pst* pst
633 * @param[in] RgInfSpsLcInfo *lcInfo
638 S16 RgSchMacSpsLcDereg
645 S16 RgSchMacSpsLcDereg(pst, cellId, crnti)
652 return ((*RgSchMacSpsLcDeregReqMt[0])(pst, cellId, crnti));
653 } /* end of RgSchMacSpsLcDereg */
655 #endif /* LTEMAC_SPS */
658 * @brief Request from SCH to MAC for L2 Measurement
662 * Function : RgSchMacL2Meas
664 * @param[in] Pst* pst
665 * @param[in] RgInfL2MeasReq *measInfo
673 RgInfL2MeasReq *measInfo
676 S16 RgSchMacL2Meas(pst, measInfo)
678 RgInfL2MeasReq *measInfo;
682 return ((*RgSchMacL2MeasReqMt[0])(pst, measInfo));
683 } /* end of RgSchMacL2Meas */
686 * @brief Request from SCH to MAC for Stopping L2 Measurement
690 * Function : RgSchMacL2MeasStop
692 * @param[in] Pst* pst
693 * @param[in] RgInfL2MeasReq *measInfo
698 S16 RgSchMacL2MeasStop
701 RgInfL2MeasStopReq *measInfo
704 S16 RgSchMacL2MeasStop(pst, measInfo)
706 RgInfL2MeasStopReq *measInfo;
710 return ((*RgSchMacL2MeasStopReqMt[0])(pst, measInfo));
711 } /* end of RgSchMacL2Meas */
714 * @brief Request from SCH to MAC for Sending L2 Measurement
718 * Function : RgSchMacL2MeasSend
720 * @param[in] Pst* pst
721 * @param[in] RgInfL2MeasReq *measInfo
726 S16 RgSchMacL2MeasSend
729 RgInfL2MeasSndReq *measInfo
732 S16 RgSchMacL2MeasSend(pst, measInfo)
734 RgInfL2MeasSndReq *measInfo;
738 return ((*RgSchMacL2MeasSendReqMt[0])(pst, measInfo));
739 } /* end of RgSchMacL2MeasSend */
742 * @brief Request from MAC to SCH for L2 Measurement
746 * Function : RgMacSchL2Meas
748 * @param[in] Pst* pst
749 * @param[in] RgInfL2MeasCfm *measInfo
757 RgInfL2MeasCfm *measInfo
760 S16 RgMacSchL2Meas(pst, measInfo)
762 RgInfL2MeasCfm *measInfo;
766 return ((*RgMacSchL2MeasCfmMt[0])(pst, measInfo));
767 } /* end of RgSchMacL2Meas */
769 * @brief Request from MAC to SCH for L2 Measurement
773 * Function : RgMacSchL2MeasStop
775 * @param[in] Pst* pst
776 * @param[in] RgInfL2MeasCfm *measInfo
781 S16 RgMacSchL2MeasStop
784 RgInfL2MeasCfm *measInfo
787 S16 RgMacSchL2MeasStop(pst, measInfo)
789 RgInfL2MeasCfm *measInfo;
793 return ((*RgMacSchL2MeasStopCfmMt[0])(pst, measInfo));
794 } /* end of RgSchMacL2MeasStop*/
795 #endif/*LTE_L2_MEAS*/
796 /**********************************************************************
799 **********************************************************************/