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: Defines required by LTE MAC
29 **********************************************************************/
32 @brief This file contains basic data structures for the Mac.
40 #endif /* __cplusplus */
43 #include "rg_emtc.x" /* typedefs for MAC */
46 /** @brief Logical Channel Id */
47 typedef RgPrgLteLcgId LteLcgId;
48 typedef RguDDatReqInfo RgRguDedDatReq;
49 typedef RguCDatReqInfo RgRguCmnDatReq;
50 typedef RguDStaRspInfo RgRguDedStaRsp;
51 typedef RguCStaRspInfo RgRguCmnStaRsp;
52 typedef RguDStaIndInfo RgRguDedStaInd;
53 typedef RguCStaIndInfo RgRguCmnStaInd;
54 typedef RguDDatIndInfo RgRguDedDatInd;
55 typedef RguCDatIndInfo RgRguCmnDatInd;
56 typedef RguLchStaInd RgRguLcStaInd;
57 typedef TfuPdschDciInfo RgTfuPdschDciInfo;
58 typedef TfuDatReqInfo RgTfuDatReqInfo;
59 typedef TfuDatReqPduInfo RgTfuDatReqPduInfo;
60 typedef RguDDatReqPerUe RgRguDDatReqPerUe;
62 typedef TfuDatReqTbInfo RgTfuDatReqTbInfo;
66 typedef struct rgL2MeasCb RgL2MeasCb;
67 typedef struct rgQciCb RgQciCb;
69 typedef RguL2MUlThrpMeasReqInfo RgRguL2MUlThrpMeasReq;
71 #endif /* LTE_L2_MEAS */
72 /* Forward declarations for some structures */
73 typedef struct rgUeCb RgUeCb;
74 typedef struct rgErrInfo RgErrInfo;
75 typedef struct rgCellCb RgCellCb;
76 typedef struct rgUlHqProcCb RgUlHqProcCb;
77 typedef struct rgDlHqProcCb RgDlHqProcCb;
78 typedef struct rgLcgCb RgLcgCb;
79 typedef struct rgDlHqEnt RgDlHqEnt;
80 typedef struct _rgCb RgCb;
81 typedef RgPrgUlLcInfo RgUlLcCb;
82 typedef RgPrgDlLcInfo RgDlLcCb;
86 /* @brief UE Specific Uplink allocation info needed for measurements */
87 typedef struct rgUeUlAlloc
89 CmLteRnti rnti; /*!< Ue Id */
90 uint8_t numPrb; /*!< Number of total PRB's allocated for this UE */
93 * @brief Structure hold uplink allocation information for sub frames.
97 CmLteTimingInfo schdTime; /*!< scheduled frame and subframe number */
98 uint8_t numUe; /*!< Number of UE's allocated in this uplink subframe */
99 RgUeUlAlloc *ueUlAllocInfo; /*!< Uplink alloc infor for this subframe */
103 * L2 measurement control block.
107 CmLList measLnk; /*!< MeasCb node */
108 RgInfL2MeasReq measReq; /*!< Request received for measurement */
109 CmLteTimingInfo startTime; /*!< Time at which measurement started */
110 uint32_t sfnCycle; /*!< Count of Num of SFN wraps */
113 * Control block to store Logical Channels with Qci.
117 uint8_t qci; /*< QCI for measurement */
118 uint32_t prbCount; /*!< Cummulative PRB count */
119 uint8_t mask; /*!< Measurement Active or Not*/
120 CmLteTimingInfo startTime;/*!< Time at which measurement started */
122 #endif /* LTE_L2_MEAS */
125 * Information about one PDCCH.
127 typedef struct rgPdcch {
128 CmLteRnti rnti; /*!< RNTI to who the PDCCH is allocated */
129 RgTfuPdschDciInfo dci; /*!< PDCCH format */
132 typedef struct rgBcchTb
136 uint16_t txPwrOffset; /*!< PDSCH Tx Pwr offset */
139 typedef struct rgPcchTb
143 uint16_t txPwrOffset; /*!< PDSCH Tx Pwr offset */
146 typedef struct rgRaRspAlloc
148 RgPdcch pdcch; /*!< NULLP if no Rsp allocation done for raRnti*/
150 uint16_t txPwrOffset; /*!< PDSCH Tx Pwr offset */
153 typedef struct rgBchTb
155 Buffer *tb; /*!< BCH data for this frame */
159 typedef struct rgDlSf
161 CmLteTimingInfo schdTime; /*!< scheduled frame and subframe number */
162 Bool txDone; /*!< Flag to indicate transmission done */
163 /* ADD Changes for Downlink UE Timing Optimization */
164 #ifdef LTEMAC_DLUE_TMGOPTMZ
165 uint8_t remDatReqCnt; /*!< Counter to maintain count of Ded data received.*/
166 /* Fix [ccpu00126310]: Tracks Data Requests from RLC for both loosely and tight coupled
168 Bool statIndDone; /*!< Marks sending of all status indication done */
170 RgBchTb bch; /*!< BCH data for this frame */
171 RgBcchTb bcch; /*!< BCCH allocation for this frame */
173 RgEmtcBcchTb emtcBcch; /*!< EMTC BCCH allocation for this frame */
175 RgPcchTb pcch; /*!< PCCH allocation for this frame */
176 CmLListCp tbs; /*!< TBs or DL HARQ processes */
177 uint8_t numRaRsp; /*!< No.of RaRsp */
178 RgRaRspAlloc raRsp[RG_MAX_RA_RNTI]; /* Array of list of Ra Rsp
179 Allocations for each rarnti */
180 uint8_t numTbReqsSent; /*!< Number of TB requests sent towards SMAC.
181 Total numTbReqsSent will be equal to maximum secondary cells */
186 * Logical channel control block for BCCH and PCCH channels.
188 typedef struct rgBcchDlschLcCb
190 CmLteLcId lcId; /*!< Logical channel ID */
194 typedef struct rgBcchBchLcCb
196 CmLteLcId lcId; /*!< Logical channel ID */
199 typedef struct rgPcchLcCb
201 CmLteLcId lcId; /*!< Logical channel ID */
206 * Random access information per cell.
208 typedef struct rgRaInfoCb
210 CmLListCp ueRachLst; /*!< List of RaCbs */
213 typedef struct rgSchInstMap
215 S16 cellSapId; /*!< SAP ID of the cell in scheduler instance */
216 Inst schInst; /*!< Scheduler instance that is serving this cell*/
221 * Configuration Information for Upper SAPs at RGU,CRG and RGR interfaces.
223 typedef struct rgUpSapCfgInfo
225 Pst sapPst; /*!< Post information associated with SAP */
226 SpId spId; /*!< SpId associated with SAP */
227 SuId suId; /*!< SuId associated with SAP */
232 * Configuration Information for Lower SAP at TFU interface
234 typedef struct rgLowSapCfgInfo
236 Pst sapPst; /*!< Post information associated with SAP */
237 SpId spId; /*!< SpId associated with SAP */
238 SuId suId; /*!< SuId associated with SAP */
239 TmrCfg bndTmr; /*!< Bind Timer Value */
244 * Control Block structure for Upper SAPs at RGU,CRG and RGR interfaces.
246 typedef struct rgUpSapCb
248 RgUpSapCfgInfo sapCfg; /*!< Configuration information */
249 RgSapSts sapSts; /*!< Statistics related to SAP */
250 RgSapSta sapSta; /*!< SAP Status */
255 * Control Block structure for Lower SAP at TFU interface.
257 typedef struct rgLowSapCb
259 RgLowSapCfgInfo sapCfg; /*!< SAP configuration information */
260 RgSapSts sapSts; /*!< Statistics related to SAP */
261 RgSapSta sapSta; /*!< SAP Status */
262 uint8_t numBndRetries; /*!< Number of Bind Retries */
267 * MAC sub-header control block for 5G-NR MAC
268 * sub-hdr for fixed size MAC CE - 1 octat(R/R/LCID)
269 * sub-hdr for variable size MAC CE or MAC SDU -2/3 octat(R/F/LCID/L(8/16 bits))
272 typedef struct RgMUXSubHdr
275 uint8_t shData[RG_MAX_SDU_SUB_HDR_LEN]; /* RRLCID/RFLCID + F-L (O) + L (O) */
281 * Cell Control block per cell
285 CmHashListEnt cellLstEnt; /*!< Hash list Entity for cell list */
286 RgSchInstMap schInstMap; /*!< Sch Inst Info */
287 CmLteCellId cellId; /*!< Cell ID */
288 CmLteTimingInfo crntTime;
289 uint8_t maxDlHqProcPerUe; /*!< Store based on FDD/TDD(UL/DL Index) */
290 CrgBwCfg bwCfg; /*!< Bandwidth Configuration */
291 CrgRachCfg rachCfg; /*!< RACH Configuration */
293 RgUpSapCb *rguDlSap; /*!< RGU SAP Control Block for RLC DL */
294 RgUpSapCb *rguUlSap; /*!< RGU SAP Control Block for RLC UL*/
295 Inst macInst; /*!< MAC Instance id for this cell */
296 uint8_t cellActvState; /*!< Bitmask indicating if cell is active:
297 Cell is active only after BCCH, PCCH, DL
298 CCCH, UL CCCH and scheduler config */
299 CmLteLcId ulCcchId; /*!< LcId for uplink CCCH */
300 CmLteLcId dlCcchId; /*!< LcId for downlink CCCH */
301 RgBcchBchLcCb bcchBchInfo; /*!< BCCH mapped on BCH
302 logical channel control block */
303 RgPcchLcCb pcchInfo; /*!< PCCH logical channel control block */
304 uint8_t numBcchDlschInfo;
305 RgBcchDlschLcCb bcchDlschInfo[RG_MAX_BCCH_DLSCH]; /*!< BCCH mapped on DLSCH
306 logical channel control block */
307 CmHashListCp ueLst; /*!< Hash list of UE control
309 /*Added support for SPS*/
311 CmHashListCp spsUeLst; /*!< Hash list of UECbs with SPS-Rnti
312 : Element is RgUeCb */
314 RgRaInfoCb raInfo; /*!< Random access related information for
316 RgDlSf subFrms[RG_NUM_SUB_FRAMES];
318 CmLListCp l2mList; /*!< List of all L2M requests
320 RgQciCb qciArray[LRG_MAX_QCI]; /*!< List of all qci's configured
322 RgUlSf ulSf[RG_NUM_UL_SUB_FRAMES]; /*!< UL Sub frame */
323 Bool sndL2Meas; /*!< Send L2 Meas when No L2 Measuremnt timer is running*/
325 uint32_t ttiCycle; /*!< Count of Number of 10240 Cycles
328 #endif /* LTE_L2_MEAS */
329 RguFlowCntrlInd *flowCntrlInd; /*!<Pre Alloced buffer for flow control */
331 uint32_t qcisUlPrbCnt[RG_MAX_QCI_REPORTS]; /*!< GBR Lc PRB count */
334 //RgLaaTbReq *laaCellHqPLst[RG_MAX_SCELL_PER_UE]; /*!< LAA: List containing of TBs requested per
345 * Uplink HARQ entity information per UE.
347 typedef struct rgUlHqEnt
349 uint8_t maxHqRetx; /*!< Maximum number of harq
350 * re-transmissions */
355 * @brief Structure to hold Uplink throughtput info for L2 measurement.
358 * - outStndngBs : outstanding buffer status
359 * - firstDatSegRcvd : first dat req seg recvd
360 * - frstSegTimInfo : fisrt seg time information
361 * - nextSegTimInfo : next seg time information
362 * - segInd : UL thrgouthput indication
363 * - fSegTtiCycNum : First Seg tti cycles
364 * - nSegTtiCycNum : next seg tti cycles
366 typedef struct rgL2MeasUlThrP
368 S32 outStndngBs; /*!< outstanding buffer status*/
369 Bool firstDatSegRcvd; /*!< first dat req seg recvd*/
370 CmLteTimingInfo frstSegTimInfo; /*!< fisrt seg time information*/
371 CmLteTimingInfo nextSegTimInfo; /*!< next seg time information*/
372 RguL2MUlThrpSegInd segInd; /*!< UL thrgouthput indication*/
373 uint32_t fSegTtiCycNum; /*!< First Seg tti cycles*/
374 uint32_t nSegTtiCycNum; /*!< next seg tti cycles*/
380 * Logical channel group
384 /* Right now not keeping associated logical channels, searching for
385 * associated channels needed only during config */
386 LteLcgId lcgId; /*!< Group ID */
390 RgL2MeasUlThrP lcgBsInfo;
393 Bool isGbr; /*!< Indicate if LCG is GBR LCG */
401 * Uplink control block for UE specific information
403 typedef struct rgUeUlCb
405 RgUlHqEnt hqEnt; /*!< Uplink HARQ information for the UE */
406 RgUlLcCb lcCb[RG_MAX_LC_PER_UE]; /*!< Dedicated Uplink logical channel
408 RgLcgCb lcgArr[RG_MAX_LCG_PER_UE]; /*!< Logical channel groups */
409 /* Added support for SPS*/
411 Bool spsLcId[RG_MAX_LC_PER_UE]; /*!< Set to TRUE for SPS LCs */
412 uint8_t implRelCntr; /*!< Number of empty sps transmissions for
413 implicit(?) release */
414 uint8_t implRelCnt; /*!< Configured value of implicitRelAfter +
415 RG_ADDL_SPS_OCC_FOR_EXP_REL */
416 uint8_t explRelCntr;/*!< Counter to track explicit release */
417 uint8_t explRelCnt; /*!< Count to trigger explicit release */
418 /*Added for explicit release - start*/
419 uint8_t spsDatRcvd; /*!< Count to track SPS data for explicit
421 uint32_t totSpsDatRcvd; /*!< total number of SPS data recieved
428 * Logical channel data as being scheduled by the scheduler.
430 typedef struct rgLchSchdData
432 CmLteLcId lcId; /*!< Logical channel ID */
433 uint32_t schdSz; /*!< Scheduled logical channel data */
438 * Contention Resolution ID.
440 typedef struct RgContResId
442 uint8_t resId[RG_CRES_LEN];
447 * Used to keep sf and SfLnk in Tb.
449 typedef struct rgTbSfLnkInfo
451 RgDlSf *sf; /*!< Sf pointer to check if SfAlloc came for Tb in a SF */
452 CmLList sfLnk; /*!< Used to queue it up on a subfrm */
457 * Transport Block Info scheduled by the scheduler.
459 typedef struct rgTbInfo{
461 RgLchSchdData schdData[RG_MAX_NUM_DED_LC];
462 TknUInt8 schdTa; /*!< TA scheduled to be sent */
463 /* Changed as a result of CR timer implementation*/
464 uint8_t contResCe; /*!< Contention Resolution CE scheduled
466 RgContResId *contResId; /*!< Contention Resolution Identity */
468 Buffer *tb; /*!< Multiplexed Pdu */
470 /* L2 Optimization for mUe/Tti:Pre-allocated MAC Hdr, MAC CEs and padding
471 * will be used to store and send to CL. These pointer will be allocated
472 * during Harq Proc creation. CL shall not free these pointers.
473 * These pointers will be freed duing harq proc deletion
475 RgTfuDatReqTbInfo tb; /* TB to be sent to CL/PHY*/
477 /* Changes for MIMO feature addition */
478 /* Removed dependency on MIMO compile-time flag */
479 uint32_t tbSz; /*!< TB size scheduled for the hqP */
480 RgPdcch pdcch; /*!< PDCCH allocated for this HQ Proc */
481 /* Adding Array of sfLnk in case of repetitions because same lnk in mutiple
482 * list causing issues*/
483 RgTbSfLnkInfo sfLnkInfo[2]; /*!< Used to queue it up on a subfrm */
485 CmLteTimingInfo timingInfo; /*!<This field holds the scheduled time */
488 Bool puschRptUsd; /*!< True if Precoding Info in PDCCH has to be
489 in-accordance with the latest PUSCH report */
490 TfuDlCqiPuschInfo puschPmiInfo;/*!< PUSCH report details for explicit PMI
491 * information to PHY during a PDSCH */
492 /* LTE_ADV_FLAG_REMOVED_START */
494 uint8_t pa; /* DL Power control paramter P_A
495 configured by higher layers
496 Ref: RRC 36.331, 6.3.2,
501 TknUInt8 sCellActCe; /*!< SCell Act ce scheduled to be sent */
503 /* LTE_ADV_FLAG_REMOVED_END */
508 * Downlink HARQ process information per UE.
512 uint8_t procId; /*!< HARQ process ID */
513 /* Changes for MIMO feature addition */
514 /* Removed dependency on MIMO compile-time flag */
516 RgTbInfo tbInfo[RG_MAX_TB_PER_UE];
517 uint16_t saveId; // laa
520 uint32_t tbId[RGU_MAX_TB]; /*!< RLC's internal tbId */
521 uint16_t status[RGU_MAX_TB]; /*!< Status back to RLC ACK/NACK*/
522 #endif /* LTE_L2_MEAS */
523 /* Changes for MIMO feature addition */
524 /* Removed dependency on MIMO compile-time flag */
530 * Downlink HARQ entity information per UE.
535 RgDlHqProcCb *procs[RG_MAX_DL_HARQ_NUM]; /*!< Downlink harq processes */
536 CmLListCp savedProcLst[RG_MAX_DL_HARQ_NUM]; /*!< laa: Saved TBs for the release Hq Procs*/
543 * Downlink control block for UE specific information.
545 typedef struct rgUeDlCb
547 RgDlHqEnt hqEnt; /*!< Downlink HARQ information for the UE */
548 RgDlLcCb lcCb[RG_MAX_LC_PER_UE];/*!< Dedicated Downlink logical channels in
553 typedef struct rgSCellAddCfgCfmInfo
555 CrgCfgTransId transId; /*!< Scell add transaction id*/
556 uint8_t numSCells; /*!< Used to check if config cfm rcvd from all Scells*/
557 uint8_t cfgCfgCount; /*!< Keep count of cfg confirms recvd */
558 uint8_t mask; /*!< Cfg cfm mask */
559 }RgSCellAddCfgCfmInfo;
561 typedef struct rgSCelInfo
563 Bool isSCellAdded; /*!< is Cell Added TRUE/FALSE */
564 Inst macInst; /*!< MAC Instance of that
566 CmLteCellId sCellId; /*!< Secondary Cell ID */
573 * UE control block for UE specific information
577 CmHashListEnt ueLstEnt; /*!< Hash List entity for UE List */
578 /* Added suport for SPS*/
580 CmHashListEnt spsUeLstEnt;/*!< Hash List entity for SPS Rnti */
582 CmLList rachLstEnt; /*!< Link List entity for RACH UE List*/
583 CmLteRnti ueId; /*!< UE identifier */
584 /* Added suport for SPS*/
586 CmLteRnti spsRnti; /*!< SPS-Rnti for the UE */
588 RgContResId contResId; /*!< Contention Resolution Identity */
589 RgUeUlCb ul; /*!< UE Specific Uplink information */
590 RgUeDlCb dl; /*!< UE Specific Downlink information */
591 /* Changes for MIMO feature addition */
592 /* Removed dependency on MIMO compile-time flag */
593 CrgTxMode txMode; /*!< UE Transmission mode Cfg */
594 RgUpSapCb *rguDlSap; /*!< RGU SAP Control Block for RLC DL */
595 RgUpSapCb *rguUlSap; /*!< RGU SAP Control Block for RLC UL*/
597 RgSCelInfo sCelInfo[RG_MAX_SCELL_PER_UE]; /*!<sCell Information */
598 RgSCellAddCfgCfmInfo cfgCfmInfo; /*!< Scell add cfg cfm info*/
604 * structure holding Layer Manager Response information cached from control
607 typedef struct rgLmResponse
609 TranId transId; /*!< Transaction ID */
610 Resp response; /*!< Response */
615 * Structure holding LTE MAC's General Configuration Information.
617 typedef struct rgGenCb
619 uint8_t tmrRes; /*!< Timer resolution */
620 RgLmResponse trcResp; /*!< Response value for Trace Indication */
621 RgLmResponse ustaResp; /*!< Respones value for Alarms */
622 RgLmResponse bndCfmResp; /*!< Respones value for Bind Confirm */
623 Status memUpperThr; /*!< upper threshold of the memory pool */
624 Status memLowerThr; /*!< lower threshold of the memory pool */
631 * Global Control block for LTE-MAC.
635 TskInit rgInit; /*!< Task Init information */
636 S16 trcLen; /*!< trace length */
637 RgGenCb genCfg; /*!< General Config information */
638 uint8_t numRguSaps; /*!< Numb of RGU SAP Control Block */
639 RgUpSapCb *rguSap; /*!< RGU SAP Control Block */
640 RgUpSapCb crgSap; /*!< CRG SAP Control Block */
641 RgLowSapCb tfuSap; /*!< TFU SAP Control Block */
642 RgGenSts genSts; /*!< General Statistics */
643 CmTqCp tmrTqCp; /*!< Timer Task Queue Cntrl Point */
644 CmTqType tmrTq[RG_TQ_SIZE]; /*!< Timer Task Queue */
645 CmTimer tmrBlk[RG_MAX_TIMER]; /*!< Timer Block */
646 RgCellCb *inactiveCell; /*!< Reference of last accessed cellCb*/
647 RgCellCb *cell; /*!< Reference of last accessed cellCb*/
648 RgCellCb *prevCell; /*!< Reference of last accessed cellCb*/
649 uint8_t bufCnt; /*!< Count of buffers in buffersToFree[] */
650 Buffer *bufToFree[RG_MAX_DFRD_FREE_BUFS];/*!< List of Shared Buffers to be freed */
653 /* Declaration for RgCb */
654 RgCb rgCb[RG_MAX_INST];
658 * Subheader of MAC SDU.
660 typedef struct rgMacSdu
662 CmLList sduLstEnt; /*!< List entry for MAC SDU subheader */
663 CmLteLcId lcId; /*!< Logical channel ID */
664 uint16_t len; /*!< Length of the SDU */
665 Buffer *mBuf; /*!< SDU Buffer */
672 typedef struct rgMacPdu
674 CmMemListCp memCp; /*!< Memory control point */
675 CmLListCp sduLst; /*!< List of SDUs */
680 * Carries the Error Information.
684 uint8_t errType; /*!< Error Type */
685 uint16_t errCause; /*!< Cause of Error */
690 * Carries the Information to build PDU.
692 typedef struct rgBldPduInfo
694 Void *datReq; /*!< Common/Dedicated Dat Request */
695 uint8_t reqType; /*!< EVTRGUCDATREQ/EVTRGUDDATREQ */
696 MsgLen schdTbSz; /*!< Schedule TB size */
697 uint8_t tbIndex; /*!< Transport Block Index */
698 TknUInt8 ta; /*!< Timing Advance */
699 RgContResId *contResId; /*!< Contention Resolution ID */
701 TknUInt8 sCellActCe; /*!< SCell Act CE info */
707 /* APIs exposed by LIM */
709 #ifdef LTE_L2_MEAS /*LTE_L2_MEAS_PHASE2*/
710 S16 rgAddToL2MeasPerQci ARGS ((RgCellCb *cell,uint8_t qci));
712 S16 rgLIMTfuBndReq ARGS((
717 S16 rgLIMTfuUbndReq ARGS((
722 S16 rgLIMTfuDatReq ARGS((
724 TfuDatReqInfo *datReq));
726 S16 rgLIMTfuDelDatReq ARGS((
728 TfuDelDatReqInfo *datReq));
730 /* APIs exposed by TOM */
732 S16 rgTOMDatInd ARGS((
734 TfuDatIndInfo *datInd));
736 Void rgTOMRlsSf ARGS((Inst inst,RgDlSf *dlSf));
738 S16 rgSchMacSfAllocReq ARGS((Pst *pst, RgInfSfAlloc *sfInfo));
741 * APIs exposed by LMM
743 S16 rgLMMStartTmr ARGS((Inst inst,S16 tmrEvnt, uint32_t tmrVal, PTR cb));
744 S16 rgLMMStopTmr ARGS((Inst inst,S16 tmrEvnt, PTR cb));
745 S16 rgLMMTmrExpiry ARGS((PTR cb, S16 tmrEvnt));
746 /* To send a Unsolicited Status Indication to Layer Manager */
747 S16 rgLMMStaInd ARGS((Inst inst,uint16_t category, uint16_t event, uint16_t cause, RgUstaDgn *dgn));
748 /* To send a Trace Indication to Layer Manager.
749 * srcMbuf is not freed. caller has to take care. */
750 Void rgLMMTrcInd ARGS((Inst inst,Buffer *srcMbuf, uint8_t event));
751 /* LIM uses this to forward the BndCfm to LMM. This function invokes a
752 * Control Confirmation to the LM. */
753 S16 rgLMMBndCfm ARGS((Pst *pst, SuId suId, uint8_t status));
754 S16 rgActvTmr ARGS((Ent ent, Inst inst ));
755 S16 rgActvInit ARGS((Ent entity, Inst inst, Region
756 region, Reason reason));
757 S16 rgActvTsk ARGS((Pst *pst, Buffer *mBuf));
760 * APIs exposed by CFG module
762 S16 rgCFGVldtCrgCellCfg ARGS((Inst inst,CrgCellCfg *cellCfg, RgErrInfo *errInfo));
763 S16 rgCFGVldtCrgUeCfg ARGS((Inst inst,CrgUeCfg *ueCfg, RgCellCb **cell, RgErrInfo
765 S16 rgCFGVldtCrgLcCfg ARGS((Inst inst,CrgLchCfg *lcCfg, RgCellCb **cell, RgUeCb
766 **ue, RgErrInfo *errInfo));
767 S16 rgCFGVldtCrgCellRecfg ARGS((Inst inst,CrgCellRecfg *cellRecfg, RgCellCb **cell,
768 RgErrInfo *errInfo));
769 S16 rgCFGVldtCrgUeRecfg ARGS((Inst inst,CrgUeRecfg *ueRecfg, RgCellCb **cell,
770 RgUeCb **ue, RgErrInfo *errInfo));
771 S16 rgCFGVldtCrgLcRecfg ARGS((Inst inst,CrgLchRecfg *lcRecfg, RgCellCb **cell,
772 RgUeCb **ue, RgUlLcCb **ulLc, RgErrInfo *errInfo));
773 S16 rgCFGVldtCrgUeReset ARGS ((Inst inst,CrgRst *reset,RgCellCb **cell,RgUeCb **ue,
774 RgErrInfo *errInfo));
776 S16 rgCFGCrgCellCfg ARGS((Inst inst,CrgCellCfg *cellCfg, RgErrInfo *errInfo));
777 S16 rgCFGCrgUeCfg ARGS((Inst inst,RgCellCb *cell, CrgUeCfg *ueCfg, RgErrInfo
781 S16 rgFillAndAddSCellCfg ARGS((Inst inst, RgCellCb *cell,
782 CrgUeRecfg *ueRecfg, CrgCfgTransId transId, Bool *isCfmRqrd));
783 S16 rgDelUeFrmAllSCell ARGS(( RgCellCb *cell, RgUeCb *ue));
784 S16 rgUtlVltdAddSCellCfg ARGS ((RgPrgUeSCellCfgInfo *ueSCellCb,
788 S16 rgCfgAddUeSCellCfg ARGS ((Inst dstMacInst,
789 RgPrgUeSCellCfgInfo *ueSCellCb,
794 S16 rgCFGCrgLcCfg ARGS((Inst inst,RgCellCb *cell, RgUeCb *ue, CrgLchCfg
795 *lcCfg, RgErrInfo *errInfo,Bool *isCfmRqrd,CrgCfgTransId transId));
796 S16 rgCFGCrgCellRecfg ARGS((Inst inst,RgCellCb *cell, CrgCellRecfg *cellRecfg,
797 RgErrInfo *errInfo));
798 S16 rgCFGCrgUeRecfg ARGS((Inst inst,RgCellCb *cell, RgUeCb *ue, CrgUeRecfg
799 *ueRecfg, RgErrInfo *errInfo));
800 S16 rgCFGCrgLcRecfg ARGS((Inst inst,RgCellCb *cell, RgUeCb *ue, RgUlLcCb
801 *ulLc, CrgLchRecfg *lcRecfg, RgErrInfo *errInfo, Bool *isCfmRqrd));
802 S16 rgCFGCrgCellDel ARGS((Inst inst,CrgDel *cellDelInfo, RgErrInfo *errInfo));
803 S16 rgCFGCrgUeDel ARGS((Inst inst,CrgDel *ueDelInfo, RgErrInfo *errInfo));
804 S16 rgCFGCrgLcDel ARGS((Inst inst,CrgDel *lcDelInfo, RgErrInfo
805 *errInfo,Bool *isCfmRqrd,CrgCfgTransId transId));
806 Void rgCFGFreeCellCb ARGS((RgCellCb *cell));
807 Void rgCFGFreeInactvCellCb ARGS((RgCellCb *cell));
808 S16 rgSchMacCellRegReq ARGS((Pst* pst,RgInfCellReg* regReq));
809 S16 rgCFGCrgUeReset ARGS((RgCellCb *cell,RgUeCb *ue,CrgRst *reset,
810 RgErrInfo *errInfo));
813 * APIs exposed by COM module
815 S16 rgCOMCfgReq ARGS((Inst inst,CrgCfgTransId transId, CrgCfgReqInfo
818 /* APIs Exposed by UIM */
819 S16 rgUIMRguBndCfm ARGS ((Inst inst,SuId suId, uint8_t status));
820 S16 rgUIMSndDedStaInd ARGS ((Inst inst,RgUpSapCb *rguDlSap,RgRguDedStaInd *staInd));
821 S16 rgUIMSndCmnStaInd ARGS ((Inst inst,RgUpSapCb *rguDlSap,RgRguCmnStaInd *staInd));
822 S16 rgUIMSndDedDatInd ARGS ((Inst inst,RgUpSapCb *rguDlSap,RgRguDedDatInd *datInd));
824 S16 rgL2mCreateMeasCb ARGS((
826 RgInfL2MeasReq *measInfo,
830 S16 rgL2mMeasReq ARGS((
832 RgInfL2MeasReq *measInfo,
838 #endif /* LTE_L2_MEAS */
839 S16 rgUIMSndCmnDatInd ARGS ((Inst inst,RgUpSapCb *rguSap,RgRguCmnDatInd *datInd));
840 S16 rgUIMCrgBndCfm ARGS ((Inst inst,SuId suId,uint8_t status));
841 S16 rgUIMCrgCfgCfm ARGS ((Inst inst,CrgCfgTransId transId,uint8_t status));
845 * APIs exposed by ROM module
847 S16 rgROMDedDatReq ARGS((Inst inst,RgRguDedDatReq *datReq));
848 S16 rgROMCmnDatReq ARGS((Inst inst,RgRguCmnDatReq *datReq));
849 S16 rgROMDedStaRsp ARGS((Inst inst,RgRguDedStaRsp *staRsp));
850 S16 rgROMCmnStaRsp ARGS((Inst inst,RgRguCmnStaRsp *staRsp));
853 S16 rgROML2MUlThrpMeasReq ARGS((Inst inst,RgRguL2MUlThrpMeasReq *measReq));
858 * APIs exposed by RAM module
860 RgUeCb* rgRAMCreateUeCb ARGS((RgCellCb *cell,
861 CmLteRnti tmpCrnti,Bool insert, RgErrInfo *err));
862 S16 rgRAMFreeCell ARGS((RgCellCb *cell));
863 Void rgRAMFreeUeCb ARGS((Inst inst,RgUeCb *ueCb));
864 S16 rgHndlRaResp ARGS((RgCellCb *cell,CmLteTimingInfo timingInfo,
865 RgInfRarInfo *rarInfo,RgErrInfo *err));
866 S16 rgSchMacRlsRntiReq ARGS((Pst *pst,RgInfRlsRnti* rlsRnti));
868 * APIs exposed by UHM module
870 Void rgUHMCrgUeCfg ARGS(( RgCellCb *cellCb, RgUeCb *ueCb,
872 Void rgUHMCrgUeRecfg ARGS(( RgCellCb *cellCb, RgUeCb *ueCb,
873 CrgUeRecfg *ueRecfg));
875 * APIs exposed by DUX module
877 S16 rgDUXDemuxData ARGS((Inst inst,RgMacPdu *pdu, RgInfCeInfo *ceInfo,
878 Buffer **mBuf, RgErrInfo *err));
879 S16 rgDUXExtSduLen ARGS
888 * APIs exposed by DBM module
891 S16 rgDBMInitInactvCellLst ARGS((uint16_t numBins));
892 S16 rgDBMDeInitInactvCellLst ARGS((Void));
893 S16 rgDBMInsInactvCellCb ARGS(( RgCellCb *cellCb));
894 RgCellCb* rgDBMGetInactvCellCb ARGS(( CmLteCellId cellId));
895 S16 rgDBMDelInactvCellCb ARGS(( RgCellCb *cellCb));
896 RgCellCb* rgDBMGetNextInactvCellCb ARGS((RgCellCb *cellCb));
898 S16 rgDBMInitCellLst ARGS(( uint16_t numBins));
899 S16 rgDBMDeInitCellLst ARGS((Void));
900 S16 rgDBMInsCellCb ARGS(( RgCellCb *cellCb));
901 RgCellCb* rgDBMGetCellCb ARGS(( CmLteCellId cellId));
902 S16 rgDBMDelCellCb ARGS(( RgCellCb *cellCb));
903 RgCellCb* rgDBMGetNextCellCb ARGS((RgCellCb *cellCb));
904 S16 rgDBMInitCell ARGS((RgCellCb *cellCb));
906 S16 rgDBMDeInitUeCbLst ARGS(( RgCellCb *cellCb));
907 S16 rgDBMInsUeCb ARGS(( RgCellCb *cellCb, RgUeCb *ueCb));
908 RgUeCb* rgDBMGetUeCb ARGS(( RgCellCb *cellCb, CmLteRnti ueId));
909 RgUeCb* rgDBMGetNextUeCb ( RgCellCb *cellCb, RgUeCb *ueCb);
910 S16 rgDBMDelUeCb ARGS(( RgCellCb *cellCb, RgUeCb *ueCb));
911 Void rgDBMInitUe ARGS((RgUeCb *ueCb));
914 Void rgDBMInsUlDedLcCb ARGS((RgUeCb *ueCb, CmLteLcId idx, LteLcgId gId,
917 Void rgDBMInsUlDedLcCb ARGS((RgUeCb *ueCb,
918 CmLteLcId idx, LteLcgId gId));
920 Void rgDBMUpdUlDedLcCb ARGS((RgUeCb *ueCb,
921 RgUlLcCb *ulLcCb, LteLcgId gId));
923 Void rgDBMInsDlDedLcCb ARGS((RgUeCb *ueCb, CmLteLcId idx));
924 Void rgDBMDelUlDedLcCb ARGS((RgUeCb *ueCb, RgUlLcCb *ulLcCb));
925 Void rgDBMDelDlDedLcCb ARGS((RgUeCb *ueCb, RgDlLcCb *dlLcCb));
926 RgDlLcCb* rgDBMGetDlDedLcCb ARGS(( RgUeCb *ueCb, CmLteLcId idx));
927 RgUlLcCb* rgDBMGetUlDedLcCb ARGS(( RgUeCb *ueCb, CmLteLcId idx));
928 Void rgDBMFreeCmnLcLst ARGS((RgCellCb *cellCb));
929 S16 rgDBMChkCmnLcCb ARGS(( RgCellCb *cellCb, CmLteLcId lcId));
930 RgBcchBchLcCb* rgDBMGetBcchOnBch ARGS(( RgCellCb *cellCb ));
931 RgBcchDlschLcCb* rgDBMGetBcchOnDlsch ARGS(( RgCellCb *cellCb,
933 RgPcchLcCb* rgDBMGetPcch ARGS(( RgCellCb *cellCb));
934 Void rgDBMInsBcchOnBch ARGS(( RgCellCb *cellCb, CmLteLcId idx));
935 Void rgDBMInsBcchOnDlsch ARGS(( RgCellCb *cellCb, CmLteLcId idx));
936 Void rgDBMInsPcch ARGS(( RgCellCb *cellCb, CmLteLcId idx));
938 Void rgDBMInsUeCbInRachLst ARGS((RgCellCb *cellCb,RgUeCb *ueCb));
939 RgUeCb* rgDBMGetUeCbFromRachLst ARGS((RgCellCb *cellCb,CmLteRnti key));
940 RgUeCb* rgDBMGetNextUeCbFromRachLst ARGS((RgCellCb *cellCb,
942 Void rgDBMDelUeCbFromRachLst ARGS((RgCellCb *cellCb,RgUeCb *ueCb));
943 /* Added support for SPS*/
945 S16 rgDBMDeInitSpsUeCbLst ARGS((RgCellCb *cellCb));
946 S16 rgDBMInsSpsUeCb ARGS((RgCellCb *cellCb, RgUeCb *ueCb));
947 RgUeCb* rgDBMGetSpsUeCb ARGS((RgCellCb *cellCb, CmLteRnti ueId));
948 RgUeCb* rgDBMGetNextSpsUeCb ARGS((RgCellCb *cellCb, RgUeCb *ueCb));
949 S16 rgDBMDelSpsUeCb ARGS((RgCellCb *cellCb,RgUeCb *ueCb));
950 #endif /* LTEMAC_SPS */
953 * APIs exposed by DHM module
955 Void rgCFGFreeUeCb ARGS((RgCellCb *cell, RgUeCb *ue));
956 S16 rgDHMHqEntInit ARGS((Inst inst,RgDlHqEnt *hqE, uint8_t maxHqProcs));
957 Void rgDHMRlsHqProc ARGS((RgDlHqProcCb *hqP));
958 Void rgDHMUeReset ARGS ((RgCellCb *cell, RgDlHqEnt *hqE));
959 Void rgDHMHdlBufFree ARGS((Inst inst, Buffer **mBuf));
960 Void rgDHMFreeTbBufs ARGS((Inst inst));
961 S16 rgDHMRlsHqProcTB ARGS((RgCellCb *cell, RgDlHqProcCb *hqP,uint8_t tbIndex));
962 S16 rgDHMGetHqProcFrmId ARGS((RgUeCb *ue, uint8_t idx, RgDlHqProcCb **hqP));
963 /* Changes for MIMO feature addition */
964 /* Removed dependency on MIMO compile-time flag */
965 S16 rgDHMSndDatReq ARGS((RgCellCb *cellCb, RgDlSf *dlSf, RgTfuDatReqInfo *datInfo,
966 RgDlHqProcCb *hqProc, RgErrInfo *err));
967 S16 rgDHMHndlDedDatReq ARGS((Inst inst,RgDlHqProcCb *hqProc,
968 RgRguDDatReqPerUe *datReq, RgDlSf *dlSf, RgErrInfo *err));
969 /* Changed for contention resolution timer implementation*/
970 S16 rgDHMHndlCmnDatReq ARGS((Inst inst,RgDlHqProcCb *hqProc,
971 RgRguCmnDatReq *datReq, RgErrInfo *err));
972 /* Changes for MIMO feature addition */
973 /* Removed dependency on MIMO compile-time flag */
975 S16 rgDHMSndConsolidatedStaInd ARGS ((RgCellCb *cell,RgInfUeInfo *ueInfo,
976 CmLteTimingInfo timingInfo, RgErrInfo *err));
978 Void rgDHMFreeUe ARGS((Inst inst,RgDlHqEnt *hqE));
979 S16 rgSchMacRlsHqReq ARGS((Pst *pst, RgInfRlsHqInfo *rlshqUeInfo));
982 * APIs exposed by MUX module
985 S16 rgMUXBldPdu ARGS((Inst inst, RgBldPduInfo *bldPdu, Buffer **txPdu,
988 S16 rgMUXBldPdu ARGS((Inst inst, RgBldPduInfo *bldPdu, RgTfuDatReqTbInfo *tb,
990 Bool RgUtlIsTbMuxed ARGS((TfuDatReqTbInfo *tb));
992 S16 rgMUXBldRarPdu ARGS((RgCellCb *cell, RgInfRaRntiInfo *alloc,
993 Buffer **txPdu, RgErrInfo *err));
998 S16 rgAllocSBuf ARGS((Inst inst,Data **pData, Size size));
999 S16 rgGetMsg ARGS((Inst inst,Buffer **mBuf));
1000 /*ccpu00117052 - MOD Passing double pointer for proper NULLP
1002 Void rgFreeSBuf ARGS((Inst inst,Data **data, Size size));
1003 Void rgFillDgnParams ARGS((Inst inst,RgUstaDgn *dgn,uint8_t dgnType));
1004 Void rgUpdtRguDedSts ARGS((Inst inst,RgUpSapCb *rguSap,uint8_t stsType, RgRguDedDatReq *datReq));
1005 Void rgUpdtRguCmnSts ARGS((Inst inst,RgUpSapCb *rguSap,uint8_t stsType));
1006 Void rgUpdtCellCnt ARGS((Inst inst,uint8_t updtType));
1007 Void rgUpdtUeCnt ARGS((Inst inst,uint8_t updtType));
1008 Void rgGetPstToInst ARGS((Pst *pst,Inst srcInst, Inst dstInst));
1009 S16 rgAllocEventMem ARGS((Inst inst,Ptr *memPtr,Size memSize));
1010 S16 rgGetEventMem ARGS((Inst inst,Ptr *ptr,Size len,Ptr memCp));
1011 S16 rgAllocShrablSBuf ARGS((Inst inst,Data **pData, Size size));
1012 Void rgPrintfSubFrameInfo ARGS((RgDlSf *dlSf));
1013 Void printMacCellInfo ARGS((Void));
1014 Void rgFreeSharableSBuf ARGS((Inst inst,Data **data, Size size));
1015 void MacSendCellCfgCfm(uint8_t response);
1018 Void rgDHMFreeAllTbBufs ARGS
1023 S16 rgMUXAddPadd ARGS((
1030 uint16_t rgMUXCalcRiv ARGS
1041 #endif /* __cplusplus */
1042 #endif /* __RGX__ */
1045 /**********************************************************************
1047 **********************************************************************/