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 U8 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 U8 numUe; /*!< Number of UE's allocated in this uplink
100 RgUeUlAlloc *ueUlAllocInfo; /*!< Uplink alloc infor for this subframe */
104 * L2 measurement control block.
108 CmLList measLnk; /*!< MeasCb node */
109 RgInfL2MeasReq measReq; /*!< Request received for measurement */
110 CmLteTimingInfo startTime; /*!< Time at which measurement started */
111 U32 sfnCycle; /*!< Count of Num of SFN wraps */
114 * Control block to store Logical Channels with Qci.
118 U8 qci; /*< QCI for measurement */
119 U32 prbCount; /*!< Cummulative PRB count */
120 U8 mask; /*!< Measurement Active or Not*/
121 CmLteTimingInfo startTime;/*!< Time at which measurement started */
123 #endif /* LTE_L2_MEAS */
126 * Information about one PDCCH.
128 typedef struct rgPdcch {
129 CmLteRnti rnti; /*!< RNTI to who the PDCCH is allocated */
130 RgTfuPdschDciInfo dci; /*!< PDCCH format */
133 typedef struct rgBcchTb
137 U16 txPwrOffset; /*!< PDSCH Tx Pwr offset */
140 typedef struct rgPcchTb
144 U16 txPwrOffset; /*!< PDSCH Tx Pwr offset */
147 typedef struct rgRaRspAlloc
149 RgPdcch pdcch; /*!< NULLP if no Rsp allocation done for raRnti*/
151 U16 txPwrOffset; /*!< PDSCH Tx Pwr offset */
154 typedef struct rgBchTb
156 Buffer *tb; /*!< BCH data for this frame */
160 typedef struct rgDlSf
162 CmLteTimingInfo schdTime; /*!< scheduled frame and subframe number */
163 Bool txDone; /*!< Flag to indicate transmission done */
164 /* ADD Changes for Downlink UE Timing Optimization */
165 #ifdef LTEMAC_DLUE_TMGOPTMZ
166 U8 remDatReqCnt; /*!< Counter to maintain count of Ded data received.*/
167 /* Fix [ccpu00126310]: Tracks Data Requests from RLC for both loosely and tight coupled
169 Bool statIndDone; /*!< Marks sending of all status indication done */
171 RgBchTb bch; /*!< BCH data for this frame */
172 RgBcchTb bcch; /*!< BCCH allocation for this frame */
174 RgEmtcBcchTb emtcBcch; /*!< EMTC BCCH allocation for this frame */
176 RgPcchTb pcch; /*!< PCCH allocation for this frame */
177 CmLListCp tbs; /*!< TBs or DL HARQ processes */
178 U8 numRaRsp; /*!< No.of RaRsp */
179 RgRaRspAlloc raRsp[RG_MAX_RA_RNTI]; /* Array of list of Ra Rsp
180 Allocations for each rarnti */
181 U8 numTbReqsSent; /*!< Number of TB requests sent towards SMAC.
182 Total numTbReqsSent will be equal to maximum secondary cells */
187 * Logical channel control block for BCCH and PCCH channels.
189 typedef struct rgBcchDlschLcCb
191 CmLteLcId lcId; /*!< Logical channel ID */
195 typedef struct rgBcchBchLcCb
197 CmLteLcId lcId; /*!< Logical channel ID */
200 typedef struct rgPcchLcCb
202 CmLteLcId lcId; /*!< Logical channel ID */
207 * Random access information per cell.
209 typedef struct rgRaInfoCb
211 CmLListCp ueRachLst; /*!< List of RaCbs */
214 typedef struct rgSchInstMap
216 S16 cellSapId; /*!< SAP ID of the cell in scheduler instance */
217 Inst schInst; /*!< Scheduler instance that is serving this cell*/
222 * Configuration Information for Upper SAPs at RGU,CRG and RGR interfaces.
224 typedef struct rgUpSapCfgInfo
226 Pst sapPst; /*!< Post information associated with SAP */
227 SpId spId; /*!< SpId associated with SAP */
228 SuId suId; /*!< SuId associated with SAP */
233 * Configuration Information for Lower SAP at TFU interface
235 typedef struct rgLowSapCfgInfo
237 Pst sapPst; /*!< Post information associated with SAP */
238 SpId spId; /*!< SpId associated with SAP */
239 SuId suId; /*!< SuId associated with SAP */
240 TmrCfg bndTmr; /*!< Bind Timer Value */
245 * Control Block structure for Upper SAPs at RGU,CRG and RGR interfaces.
247 typedef struct rgUpSapCb
249 RgUpSapCfgInfo sapCfg; /*!< Configuration information */
250 RgSapSts sapSts; /*!< Statistics related to SAP */
251 RgSapSta sapSta; /*!< SAP Status */
256 * Control Block structure for Lower SAP at TFU interface.
258 typedef struct rgLowSapCb
260 RgLowSapCfgInfo sapCfg; /*!< SAP configuration information */
261 RgSapSts sapSts; /*!< Statistics related to SAP */
262 RgSapSta sapSta; /*!< SAP Status */
263 U8 numBndRetries; /*!< Number of Bind Retries */
268 * MAC sub-header control block for 5G-NR MAC
269 * sub-hdr for fixed size MAC CE - 1 octat(R/R/LCID)
270 * sub-hdr for variable size MAC CE or MAC SDU -2/3 octat(R/F/LCID/L(8/16 bits))
273 typedef struct RgMUXSubHdr
276 U8 shData[RG_MAX_SDU_SUB_HDR_LEN]; /* RRLCID/RFLCID + F-L (O) + L (O) */
282 * Cell Control block per cell
286 CmHashListEnt cellLstEnt; /*!< Hash list Entity for cell list */
287 RgSchInstMap schInstMap; /*!< Sch Inst Info */
288 CmLteCellId cellId; /*!< Cell ID */
289 CmLteTimingInfo crntTime;
290 U8 maxDlHqProcPerUe; /*!< Store based on FDD/TDD(UL/DL Index) */
291 CrgBwCfg bwCfg; /*!< Bandwidth Configuration */
292 CrgRachCfg rachCfg; /*!< RACH Configuration */
294 RgUpSapCb *rguDlSap; /*!< RGU SAP Control Block for RLC DL */
295 RgUpSapCb *rguUlSap; /*!< RGU SAP Control Block for RLC UL*/
296 Inst macInst; /*!< MAC Instance id for this cell */
297 U8 cellActvState; /*!< Bitmask indicating if cell is active:
298 Cell is active only after BCCH, PCCH, DL
299 CCCH, UL CCCH and scheduler config */
300 CmLteLcId ulCcchId; /*!< LcId for uplink CCCH */
301 CmLteLcId dlCcchId; /*!< LcId for downlink CCCH */
302 RgBcchBchLcCb bcchBchInfo; /*!< BCCH mapped on BCH
303 logical channel control block */
304 RgPcchLcCb pcchInfo; /*!< PCCH logical channel control block */
306 RgBcchDlschLcCb bcchDlschInfo[RG_MAX_BCCH_DLSCH]; /*!< BCCH mapped on DLSCH
307 logical channel control block */
308 CmHashListCp ueLst; /*!< Hash list of UE control
310 /*Added support for SPS*/
312 CmHashListCp spsUeLst; /*!< Hash list of UECbs with SPS-Rnti
313 : Element is RgUeCb */
315 RgRaInfoCb raInfo; /*!< Random access related information for
317 RgDlSf subFrms[RG_NUM_SUB_FRAMES];
319 CmLListCp l2mList; /*!< List of all L2M requests
321 RgQciCb qciArray[LRG_MAX_QCI]; /*!< List of all qci's configured
323 RgUlSf ulSf[RG_NUM_UL_SUB_FRAMES]; /*!< UL Sub frame */
324 Bool sndL2Meas; /*!< Send L2 Meas when No L2 Measuremnt timer is running*/
326 U32 ttiCycle; /*!< Count of Number of 10240 Cycles
329 #endif /* LTE_L2_MEAS */
330 RguFlowCntrlInd *flowCntrlInd; /*!<Pre Alloced buffer for flow control */
332 U32 qcisUlPrbCnt[RG_MAX_QCI_REPORTS]; /*!< GBR Lc PRB count */
335 //RgLaaTbReq *laaCellHqPLst[RG_MAX_SCELL_PER_UE]; /*!< LAA: List containing of TBs requested per
346 * Uplink HARQ entity information per UE.
348 typedef struct rgUlHqEnt
350 U8 maxHqRetx; /*!< Maximum number of harq
351 * re-transmissions */
356 * @brief Structure to hold Uplink throughtput info for L2 measurement.
359 * - outStndngBs : outstanding buffer status
360 * - firstDatSegRcvd : first dat req seg recvd
361 * - frstSegTimInfo : fisrt seg time information
362 * - nextSegTimInfo : next seg time information
363 * - segInd : UL thrgouthput indication
364 * - fSegTtiCycNum : First Seg tti cycles
365 * - nSegTtiCycNum : next seg tti cycles
367 typedef struct rgL2MeasUlThrP
369 S32 outStndngBs; /*!< outstanding buffer status*/
370 Bool firstDatSegRcvd; /*!< first dat req seg recvd*/
371 CmLteTimingInfo frstSegTimInfo; /*!< fisrt seg time information*/
372 CmLteTimingInfo nextSegTimInfo; /*!< next seg time information*/
373 RguL2MUlThrpSegInd segInd; /*!< UL thrgouthput indication*/
374 U32 fSegTtiCycNum; /*!< First Seg tti cycles*/
375 U32 nSegTtiCycNum; /*!< next seg tti cycles*/
381 * Logical channel group
385 /* Right now not keeping associated logical channels, searching for
386 * associated channels needed only during config */
387 LteLcgId lcgId; /*!< Group ID */
391 RgL2MeasUlThrP lcgBsInfo;
394 Bool isGbr; /*!< Indicate if LCG is GBR LCG */
402 * Uplink control block for UE specific information
404 typedef struct rgUeUlCb
406 RgUlHqEnt hqEnt; /*!< Uplink HARQ information for the UE */
407 RgUlLcCb lcCb[RG_MAX_LC_PER_UE]; /*!< Dedicated Uplink logical channel
409 RgLcgCb lcgArr[RG_MAX_LCG_PER_UE]; /*!< Logical channel groups */
410 /* Added support for SPS*/
412 Bool spsLcId[RG_MAX_LC_PER_UE]; /*!< Set to TRUE for SPS LCs */
413 U8 implRelCntr; /*!< Number of empty sps transmissions for
414 implicit(?) release */
415 U8 implRelCnt; /*!< Configured value of implicitRelAfter +
416 RG_ADDL_SPS_OCC_FOR_EXP_REL */
417 U8 explRelCntr;/*!< Counter to track explicit release */
418 U8 explRelCnt; /*!< Count to trigger explicit release */
419 /*Added for explicit release - start*/
420 U8 spsDatRcvd; /*!< Count to track SPS data for explicit
422 U32 totSpsDatRcvd; /*!< total number of SPS data recieved
429 * Logical channel data as being scheduled by the scheduler.
431 typedef struct rgLchSchdData
433 CmLteLcId lcId; /*!< Logical channel ID */
434 U32 schdSz; /*!< Scheduled logical channel data */
439 * Contention Resolution ID.
441 typedef struct RgContResId
443 U8 resId[RG_CRES_LEN];
448 * Used to keep sf and SfLnk in Tb.
450 typedef struct rgTbSfLnkInfo
452 RgDlSf *sf; /*!< Sf pointer to check if SfAlloc came for Tb in a SF */
453 CmLList sfLnk; /*!< Used to queue it up on a subfrm */
458 * Transport Block Info scheduled by the scheduler.
460 typedef struct rgTbInfo{
462 RgLchSchdData schdData[RG_MAX_NUM_DED_LC];
463 TknU8 schdTa; /*!< TA scheduled to be sent */
464 /* Changed as a result of CR timer implementation*/
465 U8 contResCe; /*!< Contention Resolution CE scheduled
467 RgContResId *contResId; /*!< Contention Resolution Identity */
469 Buffer *tb; /*!< Multiplexed Pdu */
471 /* L2 Optimization for mUe/Tti:Pre-allocated MAC Hdr, MAC CEs and padding
472 * will be used to store and send to CL. These pointer will be allocated
473 * during Harq Proc creation. CL shall not free these pointers.
474 * These pointers will be freed duing harq proc deletion
476 RgTfuDatReqTbInfo tb; /* TB to be sent to CL/PHY*/
478 /* Changes for MIMO feature addition */
479 /* Removed dependency on MIMO compile-time flag */
480 U32 tbSz; /*!< TB size scheduled for the hqP */
481 RgPdcch pdcch; /*!< PDCCH allocated for this HQ Proc */
482 /* Adding Array of sfLnk in case of repetitions because same lnk in mutiple
483 * list causing issues*/
484 RgTbSfLnkInfo sfLnkInfo[2]; /*!< Used to queue it up on a subfrm */
486 CmLteTimingInfo timingInfo; /*!<This field holds the scheduled time */
489 Bool puschRptUsd; /*!< True if Precoding Info in PDCCH has to be
490 in-accordance with the latest PUSCH report */
491 TfuDlCqiPuschInfo puschPmiInfo;/*!< PUSCH report details for explicit PMI
492 * information to PHY during a PDSCH */
493 /* LTE_ADV_FLAG_REMOVED_START */
495 U8 pa; /* DL Power control paramter P_A
496 configured by higher layers
497 Ref: RRC 36.331, 6.3.2,
502 TknU8 sCellActCe; /*!< SCell Act ce scheduled to be sent */
504 /* LTE_ADV_FLAG_REMOVED_END */
509 * Downlink HARQ process information per UE.
513 U8 procId; /*!< HARQ process ID */
514 /* Changes for MIMO feature addition */
515 /* Removed dependency on MIMO compile-time flag */
517 RgTbInfo tbInfo[RG_MAX_TB_PER_UE];
521 U32 tbId[RGU_MAX_TB]; /*!< RLC's internal tbId */
522 U16 status[RGU_MAX_TB]; /*!< Status back to RLC ACK/NACK*/
523 #endif /* LTE_L2_MEAS */
524 /* Changes for MIMO feature addition */
525 /* Removed dependency on MIMO compile-time flag */
531 * Downlink HARQ entity information per UE.
536 RgDlHqProcCb *procs[RG_MAX_DL_HARQ_NUM]; /*!< Downlink harq processes */
537 CmLListCp savedProcLst[RG_MAX_DL_HARQ_NUM]; /*!< laa: Saved TBs for the release Hq Procs*/
544 * Downlink control block for UE specific information.
546 typedef struct rgUeDlCb
548 RgDlHqEnt hqEnt; /*!< Downlink HARQ information for the UE */
549 RgDlLcCb lcCb[RG_MAX_LC_PER_UE];/*!< Dedicated Downlink logical channels in
554 typedef struct rgSCellAddCfgCfmInfo
556 CrgCfgTransId transId; /*!< Scell add transaction id*/
557 U8 numSCells; /*!< Used to check if config cfm rcvd from all Scells*/
558 U8 cfgCfgCount; /*!< Keep count of cfg confirms recvd */
559 U8 mask; /*!< Cfg cfm mask */
560 }RgSCellAddCfgCfmInfo;
562 typedef struct rgSCelInfo
564 Bool isSCellAdded; /*!< is Cell Added TRUE/FALSE */
565 Inst macInst; /*!< MAC Instance of that
567 CmLteCellId sCellId; /*!< Secondary Cell ID */
574 * UE control block for UE specific information
578 CmHashListEnt ueLstEnt; /*!< Hash List entity for UE List */
579 /* Added suport for SPS*/
581 CmHashListEnt spsUeLstEnt;/*!< Hash List entity for SPS Rnti */
583 CmLList rachLstEnt; /*!< Link List entity for RACH UE List*/
584 CmLteRnti ueId; /*!< UE identifier */
585 /* Added suport for SPS*/
587 CmLteRnti spsRnti; /*!< SPS-Rnti for the UE */
589 RgContResId contResId; /*!< Contention Resolution Identity */
590 RgUeUlCb ul; /*!< UE Specific Uplink information */
591 RgUeDlCb dl; /*!< UE Specific Downlink information */
592 /* Changes for MIMO feature addition */
593 /* Removed dependency on MIMO compile-time flag */
594 CrgTxMode txMode; /*!< UE Transmission mode Cfg */
595 RgUpSapCb *rguDlSap; /*!< RGU SAP Control Block for RLC DL */
596 RgUpSapCb *rguUlSap; /*!< RGU SAP Control Block for RLC UL*/
598 RgSCelInfo sCelInfo[RG_MAX_SCELL_PER_UE]; /*!<sCell Information */
599 RgSCellAddCfgCfmInfo cfgCfmInfo; /*!< Scell add cfg cfm info*/
605 * structure holding Layer Manager Response information cached from control
608 typedef struct rgLmResponse
610 TranId transId; /*!< Transaction ID */
611 Resp response; /*!< Response */
616 * Structure holding LTE MAC's General Configuration Information.
618 typedef struct rgGenCb
620 U8 tmrRes; /*!< Timer resolution */
621 RgLmResponse trcResp; /*!< Response value for Trace Indication */
622 RgLmResponse ustaResp; /*!< Respones value for Alarms */
623 RgLmResponse bndCfmResp; /*!< Respones value for Bind Confirm */
624 Status memUpperThr; /*!< upper threshold of the memory pool */
625 Status memLowerThr; /*!< lower threshold of the memory pool */
632 * Global Control block for LTE-MAC.
636 TskInit rgInit; /*!< Task Init information */
637 S16 trcLen; /*!< trace length */
638 RgGenCb genCfg; /*!< General Config information */
639 U8 numRguSaps; /*!< Numb of RGU SAP Control Block */
640 RgUpSapCb *rguSap; /*!< RGU SAP Control Block */
641 RgUpSapCb crgSap; /*!< CRG SAP Control Block */
642 RgLowSapCb tfuSap; /*!< TFU SAP Control Block */
643 RgGenSts genSts; /*!< General Statistics */
644 CmTqCp tmrTqCp; /*!< Timer Task Queue Cntrl Point */
645 CmTqType tmrTq[RG_TQ_SIZE]; /*!< Timer Task Queue */
646 CmTimer tmrBlk[RG_MAX_TIMER]; /*!< Timer Block */
647 RgCellCb *inactiveCell; /*!< Reference of last accessed cellCb*/
648 RgCellCb *cell; /*!< Reference of last accessed cellCb*/
649 RgCellCb *prevCell; /*!< Reference of last accessed cellCb*/
650 U8 bufCnt; /*!< Count of buffers in buffersToFree[] */
651 Buffer *bufToFree[RG_MAX_DFRD_FREE_BUFS];/*!< List of Shared Buffers to be freed */
652 MacCellCfg macCellCfg; /* MAC cell config paramters */
655 /* Declaration for RgCb */
656 EXTERN RgCb rgCb[RG_MAX_INST];
660 * Subheader of MAC SDU.
662 typedef struct rgMacSdu
664 CmLList sduLstEnt; /*!< List entry for MAC SDU subheader */
665 CmLteLcId lcId; /*!< Logical channel ID */
666 U16 len; /*!< Length of the SDU */
667 Buffer *mBuf; /*!< SDU Buffer */
674 typedef struct rgMacPdu
676 CmMemListCp memCp; /*!< Memory control point */
677 CmLListCp sduLst; /*!< List of SDUs */
682 * Carries the Error Information.
686 U8 errType; /*!< Error Type */
687 U16 errCause; /*!< Cause of Error */
692 * Carries the Information to build PDU.
694 typedef struct rgBldPduInfo
696 Void *datReq; /*!< Common/Dedicated Dat Request */
697 U8 reqType; /*!< EVTRGUCDATREQ/EVTRGUDDATREQ */
698 MsgLen schdTbSz; /*!< Schedule TB size */
699 U8 tbIndex; /*!< Transport Block Index */
700 TknU8 ta; /*!< Timing Advance */
701 RgContResId *contResId; /*!< Contention Resolution ID */
703 TknU8 sCellActCe; /*!< SCell Act CE info */
709 /* APIs exposed by LIM */
711 #ifdef LTE_L2_MEAS /*LTE_L2_MEAS_PHASE2*/
712 EXTERN S16 rgAddToL2MeasPerQci ARGS ((RgCellCb *cell,U8 qci));
714 EXTERN S16 rgLIMTfuBndReq ARGS((
719 EXTERN S16 rgLIMTfuUbndReq ARGS((
724 EXTERN S16 rgLIMTfuDatReq ARGS((
726 TfuDatReqInfo *datReq));
728 EXTERN S16 rgLIMTfuDelDatReq ARGS((
730 TfuDelDatReqInfo *datReq));
732 /* APIs exposed by TOM */
734 EXTERN S16 rgTOMDatInd ARGS((
736 TfuDatIndInfo *datInd));
738 EXTERN S16 rgTOMTtiInd ARGS((
740 TfuTtiIndInfo *ttiInd));
741 EXTERN Void rgTOMRlsSf ARGS((Inst inst,RgDlSf *dlSf));
743 EXTERN S16 rgSchMacSfAllocReq ARGS((Pst *pst, RgInfSfAlloc *sfInfo));
746 * APIs exposed by LMM
748 EXTERN S16 rgLMMStartTmr ARGS((Inst inst,S16 tmrEvnt, U32 tmrVal, PTR cb));
749 EXTERN S16 rgLMMStopTmr ARGS((Inst inst,S16 tmrEvnt, PTR cb));
750 EXTERN S16 rgLMMTmrExpiry ARGS((PTR cb, S16 tmrEvnt));
751 /* To send a Unsolicited Status Indication to Layer Manager */
752 EXTERN S16 rgLMMStaInd ARGS((Inst inst,U16 category, U16 event, U16 cause, RgUstaDgn *dgn));
753 /* To send a Trace Indication to Layer Manager.
754 * srcMbuf is not freed. caller has to take care. */
755 EXTERN Void rgLMMTrcInd ARGS((Inst inst,Buffer *srcMbuf, U8 event));
756 /* LIM uses this to forward the BndCfm to LMM. This function invokes a
757 * Control Confirmation to the LM. */
758 EXTERN S16 rgLMMBndCfm ARGS((Pst *pst, SuId suId, U8 status));
759 EXTERN S16 rgActvTmr ARGS((Ent ent, Inst inst ));
760 EXTERN S16 rgActvInit ARGS((Ent entity, Inst inst, Region
761 region, Reason reason));
762 EXTERN S16 rgActvTsk ARGS((Pst *pst, Buffer *mBuf));
765 * APIs exposed by CFG module
767 EXTERN S16 rgCFGVldtCrgCellCfg ARGS((Inst inst,CrgCellCfg *cellCfg, RgErrInfo *errInfo));
768 EXTERN S16 rgCFGVldtCrgUeCfg ARGS((Inst inst,CrgUeCfg *ueCfg, RgCellCb **cell, RgErrInfo
770 EXTERN S16 rgCFGVldtCrgLcCfg ARGS((Inst inst,CrgLchCfg *lcCfg, RgCellCb **cell, RgUeCb
771 **ue, RgErrInfo *errInfo));
772 EXTERN S16 rgCFGVldtCrgCellRecfg ARGS((Inst inst,CrgCellRecfg *cellRecfg, RgCellCb **cell,
773 RgErrInfo *errInfo));
774 EXTERN S16 rgCFGVldtCrgUeRecfg ARGS((Inst inst,CrgUeRecfg *ueRecfg, RgCellCb **cell,
775 RgUeCb **ue, RgErrInfo *errInfo));
776 EXTERN S16 rgCFGVldtCrgLcRecfg ARGS((Inst inst,CrgLchRecfg *lcRecfg, RgCellCb **cell,
777 RgUeCb **ue, RgUlLcCb **ulLc, RgErrInfo *errInfo));
778 EXTERN S16 rgCFGVldtCrgUeReset ARGS ((Inst inst,CrgRst *reset,RgCellCb **cell,RgUeCb **ue,
779 RgErrInfo *errInfo));
781 EXTERN S16 rgCFGCrgCellCfg ARGS((Inst inst,CrgCellCfg *cellCfg, RgErrInfo *errInfo));
782 EXTERN S16 rgCFGCrgUeCfg ARGS((Inst inst,RgCellCb *cell, CrgUeCfg *ueCfg, RgErrInfo
786 EXTERN S16 rgFillAndAddSCellCfg ARGS((Inst inst, RgCellCb *cell,
787 CrgUeRecfg *ueRecfg, CrgCfgTransId transId, Bool *isCfmRqrd));
788 EXTERN S16 rgDelUeFrmAllSCell ARGS(( RgCellCb *cell, RgUeCb *ue));
789 EXTERN S16 rgUtlVltdAddSCellCfg ARGS ((RgPrgUeSCellCfgInfo *ueSCellCb,
793 EXTERN S16 rgCfgAddUeSCellCfg ARGS ((Inst dstMacInst,
794 RgPrgUeSCellCfgInfo *ueSCellCb,
799 EXTERN S16 rgCFGCrgLcCfg ARGS((Inst inst,RgCellCb *cell, RgUeCb *ue, CrgLchCfg
800 *lcCfg, RgErrInfo *errInfo,Bool *isCfmRqrd,CrgCfgTransId transId));
801 EXTERN S16 rgCFGCrgCellRecfg ARGS((Inst inst,RgCellCb *cell, CrgCellRecfg *cellRecfg,
802 RgErrInfo *errInfo));
803 EXTERN S16 rgCFGCrgUeRecfg ARGS((Inst inst,RgCellCb *cell, RgUeCb *ue, CrgUeRecfg
804 *ueRecfg, RgErrInfo *errInfo));
805 EXTERN S16 rgCFGCrgLcRecfg ARGS((Inst inst,RgCellCb *cell, RgUeCb *ue, RgUlLcCb
806 *ulLc, CrgLchRecfg *lcRecfg, RgErrInfo *errInfo, Bool *isCfmRqrd));
807 EXTERN S16 rgCFGCrgCellDel ARGS((Inst inst,CrgDel *cellDelInfo, RgErrInfo *errInfo));
808 EXTERN S16 rgCFGCrgUeDel ARGS((Inst inst,CrgDel *ueDelInfo, RgErrInfo *errInfo));
809 EXTERN S16 rgCFGCrgLcDel ARGS((Inst inst,CrgDel *lcDelInfo, RgErrInfo
810 *errInfo,Bool *isCfmRqrd,CrgCfgTransId transId));
811 EXTERN Void rgCFGFreeCellCb ARGS((RgCellCb *cell));
812 EXTERN Void rgCFGFreeInactvCellCb ARGS((RgCellCb *cell));
813 EXTERN S16 rgSchMacCellRegReq ARGS((Pst* pst,RgInfCellReg* regReq));
814 EXTERN S16 rgCFGCrgUeReset ARGS((RgCellCb *cell,RgUeCb *ue,CrgRst *reset,
815 RgErrInfo *errInfo));
818 * APIs exposed by COM module
820 EXTERN S16 rgCOMCfgReq ARGS((Inst inst,CrgCfgTransId transId, CrgCfgReqInfo
823 /* APIs Exposed by UIM */
824 EXTERN S16 rgUIMRguBndCfm ARGS ((Inst inst,SuId suId, U8 status));
825 EXTERN S16 rgUIMSndDedStaInd ARGS ((Inst inst,RgUpSapCb *rguDlSap,RgRguDedStaInd *staInd));
826 EXTERN S16 rgUIMSndCmnStaInd ARGS ((Inst inst,RgUpSapCb *rguDlSap,RgRguCmnStaInd *staInd));
827 EXTERN S16 rgUIMSndDedDatInd ARGS ((Inst inst,RgUpSapCb *rguDlSap,RgRguDedDatInd *datInd));
829 EXTERN S16 rgL2mCreateMeasCb ARGS((
831 RgInfL2MeasReq *measInfo,
835 EXTERN S16 rgL2mMeasReq ARGS((
837 RgInfL2MeasReq *measInfo,
840 EXTERN S16 rgL2Meas ARGS ((
843 #endif /* LTE_L2_MEAS */
844 EXTERN S16 rgUIMSndCmnDatInd ARGS ((Inst inst,RgUpSapCb *rguSap,RgRguCmnDatInd *datInd));
845 EXTERN S16 rgUIMCrgBndCfm ARGS ((Inst inst,SuId suId,U8 status));
846 EXTERN S16 rgUIMCrgCfgCfm ARGS ((Inst inst,CrgCfgTransId transId,U8 status));
850 * APIs exposed by ROM module
852 EXTERN S16 rgROMDedDatReq ARGS((Inst inst,RgRguDedDatReq *datReq));
853 EXTERN S16 rgROMCmnDatReq ARGS((Inst inst,RgRguCmnDatReq *datReq));
854 EXTERN S16 rgROMDedStaRsp ARGS((Inst inst,RgRguDedStaRsp *staRsp));
855 EXTERN S16 rgROMCmnStaRsp ARGS((Inst inst,RgRguCmnStaRsp *staRsp));
858 EXTERN S16 rgROML2MUlThrpMeasReq ARGS((Inst inst,RgRguL2MUlThrpMeasReq *measReq));
863 * APIs exposed by RAM module
865 EXTERN RgUeCb* rgRAMCreateUeCb ARGS((RgCellCb *cell,
866 CmLteRnti tmpCrnti,Bool insert, RgErrInfo *err));
867 EXTERN S16 rgRAMFreeCell ARGS((RgCellCb *cell));
868 EXTERN Void rgRAMFreeUeCb ARGS((Inst inst,RgUeCb *ueCb));
869 EXTERN S16 rgHndlRaResp ARGS((RgCellCb *cell,CmLteTimingInfo timingInfo,
870 RgInfRarInfo *rarInfo,RgErrInfo *err));
871 EXTERN S16 rgSchMacRlsRntiReq ARGS((Pst *pst,RgInfRlsRnti* rlsRnti));
873 * APIs exposed by UHM module
875 EXTERN Void rgUHMCrgUeCfg ARGS(( RgCellCb *cellCb, RgUeCb *ueCb,
877 EXTERN Void rgUHMCrgUeRecfg ARGS(( RgCellCb *cellCb, RgUeCb *ueCb,
878 CrgUeRecfg *ueRecfg));
880 * APIs exposed by DUX module
882 EXTERN S16 rgDUXDemuxData ARGS((Inst inst,RgMacPdu *pdu, RgInfCeInfo *ceInfo,
883 Buffer **mBuf, RgErrInfo *err));
884 EXTERN S16 rgDUXExtSduLen ARGS
893 * APIs exposed by DBM module
896 EXTERN S16 rgDBMInitInactvCellLst ARGS((U16 numBins));
897 EXTERN S16 rgDBMDeInitInactvCellLst ARGS((Void));
898 EXTERN S16 rgDBMInsInactvCellCb ARGS(( RgCellCb *cellCb));
899 EXTERN RgCellCb* rgDBMGetInactvCellCb ARGS(( CmLteCellId cellId));
900 EXTERN S16 rgDBMDelInactvCellCb ARGS(( RgCellCb *cellCb));
901 EXTERN RgCellCb* rgDBMGetNextInactvCellCb ARGS((RgCellCb *cellCb));
903 EXTERN S16 rgDBMInitCellLst ARGS(( U16 numBins));
904 EXTERN S16 rgDBMDeInitCellLst ARGS((Void));
905 EXTERN S16 rgDBMInsCellCb ARGS(( RgCellCb *cellCb));
906 EXTERN RgCellCb* rgDBMGetCellCb ARGS(( CmLteCellId cellId));
907 EXTERN S16 rgDBMDelCellCb ARGS(( RgCellCb *cellCb));
908 EXTERN RgCellCb* rgDBMGetNextCellCb ARGS((RgCellCb *cellCb));
909 EXTERN S16 rgDBMInitCell ARGS((RgCellCb *cellCb));
911 EXTERN S16 rgDBMDeInitUeCbLst ARGS(( RgCellCb *cellCb));
912 EXTERN S16 rgDBMInsUeCb ARGS(( RgCellCb *cellCb, RgUeCb *ueCb));
913 EXTERN RgUeCb* rgDBMGetUeCb ARGS(( RgCellCb *cellCb, CmLteRnti ueId));
914 EXTERN RgUeCb* rgDBMGetNextUeCb ( RgCellCb *cellCb, RgUeCb *ueCb);
915 EXTERN S16 rgDBMDelUeCb ARGS(( RgCellCb *cellCb, RgUeCb *ueCb));
916 EXTERN Void rgDBMInitUe ARGS((RgUeCb *ueCb));
919 EXTERN Void rgDBMInsUlDedLcCb ARGS((RgUeCb *ueCb, CmLteLcId idx, LteLcgId gId,
922 EXTERN Void rgDBMInsUlDedLcCb ARGS((RgUeCb *ueCb,
923 CmLteLcId idx, LteLcgId gId));
925 EXTERN Void rgDBMUpdUlDedLcCb ARGS((RgUeCb *ueCb,
926 RgUlLcCb *ulLcCb, LteLcgId gId));
928 EXTERN Void rgDBMInsDlDedLcCb ARGS((RgUeCb *ueCb, CmLteLcId idx));
929 EXTERN Void rgDBMDelUlDedLcCb ARGS((RgUeCb *ueCb, RgUlLcCb *ulLcCb));
930 EXTERN Void rgDBMDelDlDedLcCb ARGS((RgUeCb *ueCb, RgDlLcCb *dlLcCb));
931 EXTERN RgDlLcCb* rgDBMGetDlDedLcCb ARGS(( RgUeCb *ueCb, CmLteLcId idx));
932 EXTERN RgUlLcCb* rgDBMGetUlDedLcCb ARGS(( RgUeCb *ueCb, CmLteLcId idx));
933 EXTERN Void rgDBMFreeCmnLcLst ARGS((RgCellCb *cellCb));
934 EXTERN S16 rgDBMChkCmnLcCb ARGS(( RgCellCb *cellCb, CmLteLcId lcId));
935 EXTERN RgBcchBchLcCb* rgDBMGetBcchOnBch ARGS(( RgCellCb *cellCb ));
936 EXTERN RgBcchDlschLcCb* rgDBMGetBcchOnDlsch ARGS(( RgCellCb *cellCb,
938 EXTERN RgPcchLcCb* rgDBMGetPcch ARGS(( RgCellCb *cellCb));
939 EXTERN Void rgDBMInsBcchOnBch ARGS(( RgCellCb *cellCb, CmLteLcId idx));
940 EXTERN Void rgDBMInsBcchOnDlsch ARGS(( RgCellCb *cellCb, CmLteLcId idx));
941 EXTERN Void rgDBMInsPcch ARGS(( RgCellCb *cellCb, CmLteLcId idx));
943 EXTERN Void rgDBMInsUeCbInRachLst ARGS((RgCellCb *cellCb,RgUeCb *ueCb));
944 EXTERN RgUeCb* rgDBMGetUeCbFromRachLst ARGS((RgCellCb *cellCb,CmLteRnti key));
945 EXTERN RgUeCb* rgDBMGetNextUeCbFromRachLst ARGS((RgCellCb *cellCb,
947 EXTERN Void rgDBMDelUeCbFromRachLst ARGS((RgCellCb *cellCb,RgUeCb *ueCb));
948 /* Added support for SPS*/
950 EXTERN S16 rgDBMDeInitSpsUeCbLst ARGS((RgCellCb *cellCb));
951 EXTERN S16 rgDBMInsSpsUeCb ARGS((RgCellCb *cellCb, RgUeCb *ueCb));
952 EXTERN RgUeCb* rgDBMGetSpsUeCb ARGS((RgCellCb *cellCb, CmLteRnti ueId));
953 EXTERN RgUeCb* rgDBMGetNextSpsUeCb ARGS((RgCellCb *cellCb, RgUeCb *ueCb));
954 EXTERN S16 rgDBMDelSpsUeCb ARGS((RgCellCb *cellCb,RgUeCb *ueCb));
955 #endif /* LTEMAC_SPS */
958 * APIs exposed by DHM module
960 EXTERN Void rgCFGFreeUeCb ARGS((RgCellCb *cell, RgUeCb *ue));
961 EXTERN S16 rgDHMHqEntInit ARGS((Inst inst,RgDlHqEnt *hqE, U8 maxHqProcs));
962 EXTERN Void rgDHMRlsHqProc ARGS((RgDlHqProcCb *hqP));
963 EXTERN Void rgDHMUeReset ARGS ((RgCellCb *cell, RgDlHqEnt *hqE));
964 EXTERN Void rgDHMHdlBufFree ARGS((Inst inst, Buffer **mBuf));
965 EXTERN Void rgDHMFreeTbBufs ARGS((Inst inst));
966 EXTERN S16 rgDHMRlsHqProcTB ARGS((RgCellCb *cell, RgDlHqProcCb *hqP,U8 tbIndex));
967 EXTERN S16 rgDHMGetHqProcFrmId ARGS((RgUeCb *ue, U8 idx, RgDlHqProcCb **hqP));
968 /* Changes for MIMO feature addition */
969 /* Removed dependency on MIMO compile-time flag */
970 EXTERN S16 rgDHMSndDatReq ARGS((RgCellCb *cellCb, RgDlSf *dlSf, RgTfuDatReqInfo *datInfo,
971 RgDlHqProcCb *hqProc, RgErrInfo *err));
972 EXTERN S16 rgDHMHndlDedDatReq ARGS((Inst inst,RgDlHqProcCb *hqProc,
973 RgRguDDatReqPerUe *datReq, RgDlSf *dlSf, RgErrInfo *err));
974 /* Changed for contention resolution timer implementation*/
975 EXTERN S16 rgDHMHndlCmnDatReq ARGS((Inst inst,RgDlHqProcCb *hqProc,
976 RgRguCmnDatReq *datReq, RgErrInfo *err));
977 /* Changes for MIMO feature addition */
978 /* Removed dependency on MIMO compile-time flag */
980 EXTERN S16 rgDHMSndConsolidatedStaInd ARGS ((RgCellCb *cell,RgInfUeInfo *ueInfo,
981 CmLteTimingInfo timingInfo, RgErrInfo *err));
983 EXTERN Void rgDHMFreeUe ARGS((Inst inst,RgDlHqEnt *hqE));
984 EXTERN S16 rgSchMacRlsHqReq ARGS((Pst *pst, RgInfRlsHqInfo *rlshqUeInfo));
987 * APIs exposed by MUX module
990 EXTERN S16 rgMUXBldPdu ARGS((Inst inst, RgBldPduInfo *bldPdu, Buffer **txPdu,
993 EXTERN S16 rgMUXBldPdu ARGS((Inst inst, RgBldPduInfo *bldPdu, RgTfuDatReqTbInfo *tb,
995 EXTERN Bool RgUtlIsTbMuxed ARGS((TfuDatReqTbInfo *tb));
997 EXTERN S16 rgMUXBldRarPdu ARGS((RgCellCb *cell, RgInfRaRntiInfo *alloc,
998 Buffer **txPdu, RgErrInfo *err));
1003 EXTERN S16 rgAllocSBuf ARGS((Inst inst,Data **pData, Size size));
1004 EXTERN S16 rgGetMsg ARGS((Inst inst,Buffer **mBuf));
1005 /*ccpu00117052 - MOD Passing double pointer for proper NULLP
1007 EXTERN Void rgFreeSBuf ARGS((Inst inst,Data **data, Size size));
1008 EXTERN Void rgFillDgnParams ARGS((Inst inst,RgUstaDgn *dgn,U8 dgnType));
1009 EXTERN Void rgUpdtRguDedSts ARGS((Inst inst,RgUpSapCb *rguSap,U8 stsType, RgRguDedDatReq *datReq));
1010 EXTERN Void rgUpdtRguCmnSts ARGS((Inst inst,RgUpSapCb *rguSap,U8 stsType));
1011 EXTERN Void rgUpdtCellCnt ARGS((Inst inst,U8 updtType));
1012 EXTERN Void rgUpdtUeCnt ARGS((Inst inst,U8 updtType));
1013 EXTERN Void rgGetPstToInst ARGS((Pst *pst,Inst srcInst, Inst dstInst));
1014 EXTERN S16 rgAllocEventMem ARGS((Inst inst,Ptr *memPtr,Size memSize));
1015 EXTERN S16 rgGetEventMem ARGS((Inst inst,Ptr *ptr,Size len,Ptr memCp));
1016 EXTERN S16 rgAllocShrablSBuf ARGS((Inst inst,Data **pData, Size size));
1017 EXTERN Void rgPrintfSubFrameInfo ARGS((RgDlSf *dlSf));
1018 EXTERN Void printMacCellInfo ARGS((Void));
1019 EXTERN Void rgFreeSharableSBuf ARGS((Inst inst,Data **data, Size size));
1022 EXTERN Void rgDHMFreeAllTbBufs ARGS
1027 EXTERN S16 rgMUXAddPadd ARGS((
1034 EXTERN U16 rgMUXCalcRiv ARGS
1045 #endif /* __cplusplus */
1046 #endif /* __RGX__ */
1049 /**********************************************************************
1051 **********************************************************************/