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 static const CellRegReq RgSchMacCellRegReqMt[RG_MAX_SCH] =
73 static const DedBoUpdtReq RgMacSchDedBoUpdtReqMt[RG_MAX_SCH] =
76 cmPkMacSchDedBoUpdtReq,
82 static const CmnBoUpdtReq RgMacSchCmnBoUpdtReqMt[RG_MAX_SCH] =
85 cmPkMacSchCmnBoUpdtReq,
91 static const SfRecpInd RgMacSchSfRecpIndMt[RG_MAX_SCH] =
99 /*Fix: start: Inform UE delete to scheduler*/
100 static const UeDelInd RgMacSchUeDelIndMt[RG_MAX_SCH] =
108 /*Fix: end: Inform UE delete to scheduler*/
109 static const SfAllocReq RgSchMacSfAllocReqMt[RG_MAX_SCH] =
112 cmPkSchMacSfAllocReq,
118 static const RstHqEntReq RgSchMacRstHqEntReqMt[RG_MAX_SCH] =
121 cmPkSchMacRstHqEntReq,
126 static const RlsHqReq RgSchMacRlsHqReqMt[RG_MAX_SCH] =
135 static const RlsRntiReq RgSchMacRlsRntiReqMt[RG_MAX_SCH] =
138 cmPkSchMacRlsRntiReq,
144 static const LcgReg RgSchMacLcgRegReqMt[RG_MAX_SCH] =
154 static const SpsLcReg RgSchMacSpsLcRegReqMt[RG_MAX_SCH] =
157 cmPkSchMacSpsLcRegReq,
163 static const UlSpsReset RgSchMacUlSpsResetMt[RG_MAX_SCH] =
166 cmPkSchMacUlSpsReset,
168 RgSchMacUlSpsResetReq
174 static const SpsLcDereg RgSchMacSpsLcDeregReqMt[RG_MAX_SCH] =
177 cmPkSchMacSpsLcDeregReq,
179 RgSchMacSpsLcDeregReq
183 static const SpsRelInd RgMacSchSpsRelIndMt[RG_MAX_SCH] =
192 #endif /* LTEMAC_SPS */
195 static const L2MeasReq RgSchMacL2MeasReqMt[RG_MAX_SCH] =
203 /*Added for Rsys oam*/
204 static const L2MeasStopReq RgSchMacL2MeasStopReqMt[RG_MAX_SCH] =
207 cmPkSchMacL2MeasStopReq
209 RgSchMacL2MeasStopReq
213 static const L2MeasSendReq RgSchMacL2MeasSendReqMt[RG_MAX_SCH] =
216 cmPkSchMacL2MeasSendReq
218 RgSchMacL2MeasSendReq
222 static const L2MeasCfm RgMacSchL2MeasCfmMt[RG_MAX_SCH] =
230 static const 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
253 S16 RgSchMacCellReg(Pst* pst,RgInfCellReg* regReq)
256 return ((*RgSchMacCellRegReqMt[0])(pst, regReq));
260 * @brief Data Indication from MAC to RLC to
261 * forward the data received for dedicated channels
265 * Function : RgMacSchDedBoUpdt
267 * @param[in] Pst* pst
268 * @param[in] SuId suId
269 * @param[in] RguDDatIndInfo * datInd
273 S16 RgMacSchDedBoUpdt(Pst* pst,RgInfDedBoRpt* boRpt)
276 return ((*RgMacSchDedBoUpdtReqMt[0])(pst, boRpt));
280 * @brief Data Indication from MAC to RLC to
281 * forward the data received for dedicated channels
285 * Function : RgMacSchCmnBoUpdt
287 * @param[in] Pst* pst
288 * @param[in] SuId suId
289 * @param[in] RguDDatIndInfo * datInd
293 S16 RgMacSchCmnBoUpdt(Pst* pst ,RgInfCmnBoRpt* boRpt)
296 return ((*RgMacSchCmnBoUpdtReqMt[0])(pst, boRpt));
299 /*Fix: start: Inform UE delete to scheduler*/
301 * @brief This primitive is used to indicate deletion of UE
302 * at MAC to scheduler.
306 * Function : RgMacSchUeDel
308 * @param[in] Pst* pst
309 * @param[in] RgInfSfDatInd* ueDelInd
313 S16 RgMacSchUeDel(Pst* pst,RgInfUeDelInd* ueDelInd)
316 return ((*RgMacSchUeDelIndMt[0])(pst, ueDelInd));
318 /*Fix: end: Inform UE delete to scheduler*/
320 * @brief Data Indication from MAC to RLC to
321 * forward the data received for dedicated channels
325 * Function : RgMacSchSfRecp
327 * @param[in] Pst* pst
328 * @param[in] SuId suId
329 * @param[in] RguDDatIndInfo * datInd
333 S16 RgMacSchSfRecp(Pst* pst,RgInfSfDatInd* datInd)
336 return ((*RgMacSchSfRecpIndMt[0])(pst, datInd));
340 * @brief Data Indication from MAC to RLC to
341 * forward the data received for dedicated channels
345 * Function : RgSchMacSfAlloc
347 * @param[in] Pst* pst
348 * @param[in] SuId suId
349 * @param[in] RguDDatIndInfo * datInd
353 S16 RgSchMacSfAlloc(Pst* pst,RgInfSfAlloc* resAllocReq)
356 return ((*RgSchMacSfAllocReqMt[0])(pst, resAllocReq));
360 * @brief Trigger for resetting Harq Entity at MAC
364 * Function : RgSchMacRstHqEnt
366 * @param[in] Pst* pst
367 * @param[in] RgInfResetHqEnt *hqEntRstReq
371 S16 RgSchMacRstHqEnt(Pst* pst,RgInfResetHqEnt* hqEntInfo)
374 return ((*RgSchMacRstHqEntReqMt[0])(pst, hqEntInfo));
378 * @brief Data Indication from MAC to RLC to
379 * forward the data received for dedicated channels
383 * Function : RgSchMacRlsHq
385 * @param[in] Pst* pst
386 * @param[in] SuId suId
387 * @param[in] RguDDatIndInfo * datInd
391 S16 RgSchMacRlsHq(Pst* pst,RgInfRlsHqInfo* sfHqInfo)
394 return ((*RgSchMacRlsHqReqMt[0])(pst, sfHqInfo));
398 * @brief Data Indication from MAC to RLC to
399 * forward the data received for dedicated channels
403 * Function : RgSchMacRlsRnti
405 * @param[in] Pst* pst
406 * @param[in] SuId suId
407 * @param[in] RguDDatIndInfo * datInd
411 S16 RgSchMacRlsRnti(Pst* pst,RgInfRlsRnti* rlsRnti)
414 return ((*RgSchMacRlsRntiReqMt[0])(pst, rlsRnti));
418 * @brief Request from SCH to MAC to register the GBR LCG of a UE
422 * Function : RgSchMacLcgReg
424 * @param[in] Pst* pst
425 * @param[in] RgInfLcgRegReq *lcgRegReq
429 S16 RgSchMacLcgReg(Pst* pst,RgInfLcgRegReq *lcgRegReq)
432 return ((*RgSchMacLcgRegReqMt[0])(pst, lcgRegReq));
433 } /* end of RgSchMacLcgReg */
437 * @brief Data Indication from MAC to SCH to
438 * indicate the arrival of the data on SPS logical channels
442 * Function : RgMacSchSpsRel
444 * @param[in] Pst* pst
445 * @param[in] RgInfSpsRelInfo* relInfo
449 S16 RgMacSchSpsRel(Pst* pst,RgInfSpsRelInfo* relInfo)
452 return ((*RgMacSchSpsRelIndMt[0])(pst, relInfo));
453 } /* end of RgMacSchSpsRel */
456 * @brief Request from SCH to MAC to register the SPS logical channels of a UE
460 * Function : RgSchMacSpsLcReg
462 * @param[in] Pst* pst
463 * @param[in] RgInfSpsLcInfo *lcInfo
467 S16 RgSchMacSpsLcReg(Pst* pst,RgInfSpsLcInfo *lcInfo)
470 return ((*RgSchMacSpsLcRegReqMt[0])(pst, lcInfo));
471 } /* end of RgSchMacSpsLcReg */
476 * @brief Request from SCH to MAC to reset UL SPS params
480 * Function : RgSchMacUlSpsReset
482 * @param[in] Pst* pst
483 * @param[in] RgInfUlSpsReset *lcInfo
487 S16 RgSchMacUlSpsReset(Pst* pst,RgInfUlSpsReset *ulSpsResetInfo)
490 return ((*RgSchMacUlSpsResetMt[0])(pst, ulSpsResetInfo));
491 } /* end of RgSchMacUlSpsReset */
496 * @brief Request from SCH to MAC to deregister the SPS logical channels of a UE
500 * Function : RgSchMacSpsLcDereg
502 * @param[in] Pst* pst
503 * @param[in] RgInfSpsLcInfo *lcInfo
507 S16 RgSchMacSpsLcDereg(Pst* pst,CmLteCellId cellId,CmLteRnti crnti)
510 return ((*RgSchMacSpsLcDeregReqMt[0])(pst, cellId, crnti));
511 } /* end of RgSchMacSpsLcDereg */
513 #endif /* LTEMAC_SPS */
516 * @brief Request from SCH to MAC for L2 Measurement
520 * Function : RgSchMacL2Meas
522 * @param[in] Pst* pst
523 * @param[in] RgInfL2MeasReq *measInfo
527 S16 RgSchMacL2Meas(Pst* pst,RgInfL2MeasReq *measInfo)
530 return ((*RgSchMacL2MeasReqMt[0])(pst, measInfo));
531 } /* end of RgSchMacL2Meas */
534 * @brief Request from SCH to MAC for Stopping L2 Measurement
538 * Function : RgSchMacL2MeasStop
540 * @param[in] Pst* pst
541 * @param[in] RgInfL2MeasReq *measInfo
545 S16 RgSchMacL2MeasStop(Pst* pst,RgInfL2MeasStopReq *measInfo)
548 return ((*RgSchMacL2MeasStopReqMt[0])(pst, measInfo));
549 } /* end of RgSchMacL2Meas */
552 * @brief Request from SCH to MAC for Sending L2 Measurement
556 * Function : RgSchMacL2MeasSend
558 * @param[in] Pst* pst
559 * @param[in] RgInfL2MeasReq *measInfo
563 S16 RgSchMacL2MeasSend(Pst* pst,RgInfL2MeasSndReq *measInfo)
566 return ((*RgSchMacL2MeasSendReqMt[0])(pst, measInfo));
567 } /* end of RgSchMacL2MeasSend */
570 * @brief Request from MAC to SCH for L2 Measurement
574 * Function : RgMacSchL2Meas
576 * @param[in] Pst* pst
577 * @param[in] RgInfL2MeasCfm *measInfo
581 S16 RgMacSchL2Meas(Pst* pst,RgInfL2MeasCfm *measInfo)
584 return ((*RgMacSchL2MeasCfmMt[0])(pst, measInfo));
585 } /* end of RgSchMacL2Meas */
587 * @brief Request from MAC to SCH for L2 Measurement
591 * Function : RgMacSchL2MeasStop
593 * @param[in] Pst* pst
594 * @param[in] RgInfL2MeasCfm *measInfo
598 S16 RgMacSchL2MeasStop(Pst* pst,RgInfL2MeasCfm *measInfo)
601 return ((*RgMacSchL2MeasStopCfmMt[0])(pst, measInfo));
602 } /* end of RgSchMacL2MeasStop*/
603 #endif/*LTE_L2_MEAS*/
604 /**********************************************************************
607 **********************************************************************/