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 */
654 /* Declaration for RgCb */
655 EXTERN RgCb rgCb[RG_MAX_INST];
659 * Subheader of MAC SDU.
661 typedef struct rgMacSdu
663 CmLList sduLstEnt; /*!< List entry for MAC SDU subheader */
664 CmLteLcId lcId; /*!< Logical channel ID */
665 U16 len; /*!< Length of the SDU */
666 Buffer *mBuf; /*!< SDU Buffer */
673 typedef struct rgMacPdu
675 CmMemListCp memCp; /*!< Memory control point */
676 CmLListCp sduLst; /*!< List of SDUs */
681 * Carries the Error Information.
685 U8 errType; /*!< Error Type */
686 U16 errCause; /*!< Cause of Error */
691 * Carries the Information to build PDU.
693 typedef struct rgBldPduInfo
695 Void *datReq; /*!< Common/Dedicated Dat Request */
696 U8 reqType; /*!< EVTRGUCDATREQ/EVTRGUDDATREQ */
697 MsgLen schdTbSz; /*!< Schedule TB size */
698 U8 tbIndex; /*!< Transport Block Index */
699 TknU8 ta; /*!< Timing Advance */
700 RgContResId *contResId; /*!< Contention Resolution ID */
702 TknU8 sCellActCe; /*!< SCell Act CE info */
708 /* APIs exposed by LIM */
710 #ifdef LTE_L2_MEAS /*LTE_L2_MEAS_PHASE2*/
711 EXTERN S16 rgAddToL2MeasPerQci ARGS ((RgCellCb *cell,U8 qci));
713 EXTERN S16 rgLIMTfuBndReq ARGS((
718 EXTERN S16 rgLIMTfuUbndReq ARGS((
723 EXTERN S16 rgLIMTfuDatReq ARGS((
725 TfuDatReqInfo *datReq));
727 EXTERN S16 rgLIMTfuDelDatReq ARGS((
729 TfuDelDatReqInfo *datReq));
731 /* APIs exposed by TOM */
733 EXTERN S16 rgTOMDatInd ARGS((
735 TfuDatIndInfo *datInd));
737 EXTERN S16 rgTOMTtiInd ARGS((
739 TfuTtiIndInfo *ttiInd));
740 EXTERN Void rgTOMRlsSf ARGS((Inst inst,RgDlSf *dlSf));
742 EXTERN S16 rgSchMacSfAllocReq ARGS((Pst *pst, RgInfSfAlloc *sfInfo));
745 * APIs exposed by LMM
747 EXTERN S16 rgLMMStartTmr ARGS((Inst inst,S16 tmrEvnt, U32 tmrVal, PTR cb));
748 EXTERN S16 rgLMMStopTmr ARGS((Inst inst,S16 tmrEvnt, PTR cb));
749 EXTERN S16 rgLMMTmrExpiry ARGS((PTR cb, S16 tmrEvnt));
750 /* To send a Unsolicited Status Indication to Layer Manager */
751 EXTERN S16 rgLMMStaInd ARGS((Inst inst,U16 category, U16 event, U16 cause, RgUstaDgn *dgn));
752 /* To send a Trace Indication to Layer Manager.
753 * srcMbuf is not freed. caller has to take care. */
754 EXTERN Void rgLMMTrcInd ARGS((Inst inst,Buffer *srcMbuf, U8 event));
755 /* LIM uses this to forward the BndCfm to LMM. This function invokes a
756 * Control Confirmation to the LM. */
757 EXTERN S16 rgLMMBndCfm ARGS((Pst *pst, SuId suId, U8 status));
758 EXTERN S16 rgActvTmr ARGS((Ent ent, Inst inst ));
759 EXTERN S16 rgActvInit ARGS((Ent entity, Inst inst, Region
760 region, Reason reason));
761 EXTERN S16 rgActvTsk ARGS((Pst *pst, Buffer *mBuf));
764 * APIs exposed by CFG module
766 EXTERN S16 rgCFGVldtCrgCellCfg ARGS((Inst inst,CrgCellCfg *cellCfg, RgErrInfo *errInfo));
767 EXTERN S16 rgCFGVldtCrgUeCfg ARGS((Inst inst,CrgUeCfg *ueCfg, RgCellCb **cell, RgErrInfo
769 EXTERN S16 rgCFGVldtCrgLcCfg ARGS((Inst inst,CrgLchCfg *lcCfg, RgCellCb **cell, RgUeCb
770 **ue, RgErrInfo *errInfo));
771 EXTERN S16 rgCFGVldtCrgCellRecfg ARGS((Inst inst,CrgCellRecfg *cellRecfg, RgCellCb **cell,
772 RgErrInfo *errInfo));
773 EXTERN S16 rgCFGVldtCrgUeRecfg ARGS((Inst inst,CrgUeRecfg *ueRecfg, RgCellCb **cell,
774 RgUeCb **ue, RgErrInfo *errInfo));
775 EXTERN S16 rgCFGVldtCrgLcRecfg ARGS((Inst inst,CrgLchRecfg *lcRecfg, RgCellCb **cell,
776 RgUeCb **ue, RgUlLcCb **ulLc, RgErrInfo *errInfo));
777 EXTERN S16 rgCFGVldtCrgUeReset ARGS ((Inst inst,CrgRst *reset,RgCellCb **cell,RgUeCb **ue,
778 RgErrInfo *errInfo));
780 EXTERN S16 rgCFGCrgCellCfg ARGS((Inst inst,CrgCellCfg *cellCfg, RgErrInfo *errInfo));
781 EXTERN S16 rgCFGCrgUeCfg ARGS((Inst inst,RgCellCb *cell, CrgUeCfg *ueCfg, RgErrInfo
785 EXTERN S16 rgFillAndAddSCellCfg ARGS((Inst inst, RgCellCb *cell,
786 CrgUeRecfg *ueRecfg, CrgCfgTransId transId, Bool *isCfmRqrd));
787 EXTERN S16 rgDelUeFrmAllSCell ARGS(( RgCellCb *cell, RgUeCb *ue));
788 EXTERN S16 rgUtlVltdAddSCellCfg ARGS ((RgPrgUeSCellCfgInfo *ueSCellCb,
792 EXTERN S16 rgCfgAddUeSCellCfg ARGS ((Inst dstMacInst,
793 RgPrgUeSCellCfgInfo *ueSCellCb,
798 EXTERN S16 rgCFGCrgLcCfg ARGS((Inst inst,RgCellCb *cell, RgUeCb *ue, CrgLchCfg
799 *lcCfg, RgErrInfo *errInfo,Bool *isCfmRqrd,CrgCfgTransId transId));
800 EXTERN S16 rgCFGCrgCellRecfg ARGS((Inst inst,RgCellCb *cell, CrgCellRecfg *cellRecfg,
801 RgErrInfo *errInfo));
802 EXTERN S16 rgCFGCrgUeRecfg ARGS((Inst inst,RgCellCb *cell, RgUeCb *ue, CrgUeRecfg
803 *ueRecfg, RgErrInfo *errInfo));
804 EXTERN S16 rgCFGCrgLcRecfg ARGS((Inst inst,RgCellCb *cell, RgUeCb *ue, RgUlLcCb
805 *ulLc, CrgLchRecfg *lcRecfg, RgErrInfo *errInfo, Bool *isCfmRqrd));
806 EXTERN S16 rgCFGCrgCellDel ARGS((Inst inst,CrgDel *cellDelInfo, RgErrInfo *errInfo));
807 EXTERN S16 rgCFGCrgUeDel ARGS((Inst inst,CrgDel *ueDelInfo, RgErrInfo *errInfo));
808 EXTERN S16 rgCFGCrgLcDel ARGS((Inst inst,CrgDel *lcDelInfo, RgErrInfo
809 *errInfo,Bool *isCfmRqrd,CrgCfgTransId transId));
810 EXTERN Void rgCFGFreeCellCb ARGS((RgCellCb *cell));
811 EXTERN Void rgCFGFreeInactvCellCb ARGS((RgCellCb *cell));
812 EXTERN S16 rgSchMacCellRegReq ARGS((Pst* pst,RgInfCellReg* regReq));
813 EXTERN S16 rgCFGCrgUeReset ARGS((RgCellCb *cell,RgUeCb *ue,CrgRst *reset,
814 RgErrInfo *errInfo));
817 * APIs exposed by COM module
819 EXTERN S16 rgCOMCfgReq ARGS((Inst inst,CrgCfgTransId transId, CrgCfgReqInfo
822 /* APIs Exposed by UIM */
823 EXTERN S16 rgUIMRguBndCfm ARGS ((Inst inst,SuId suId, U8 status));
824 EXTERN S16 rgUIMSndDedStaInd ARGS ((Inst inst,RgUpSapCb *rguDlSap,RgRguDedStaInd *staInd));
825 EXTERN S16 rgUIMSndCmnStaInd ARGS ((Inst inst,RgUpSapCb *rguDlSap,RgRguCmnStaInd *staInd));
826 EXTERN S16 rgUIMSndDedDatInd ARGS ((Inst inst,RgUpSapCb *rguDlSap,RgRguDedDatInd *datInd));
828 EXTERN S16 rgL2mCreateMeasCb ARGS((
830 RgInfL2MeasReq *measInfo,
834 EXTERN S16 rgL2mMeasReq ARGS((
836 RgInfL2MeasReq *measInfo,
839 EXTERN S16 rgL2Meas ARGS ((
842 #endif /* LTE_L2_MEAS */
843 EXTERN S16 rgUIMSndCmnDatInd ARGS ((Inst inst,RgUpSapCb *rguSap,RgRguCmnDatInd *datInd));
844 EXTERN S16 rgUIMCrgBndCfm ARGS ((Inst inst,SuId suId,U8 status));
845 EXTERN S16 rgUIMCrgCfgCfm ARGS ((Inst inst,CrgCfgTransId transId,U8 status));
849 * APIs exposed by ROM module
851 EXTERN S16 rgROMDedDatReq ARGS((Inst inst,RgRguDedDatReq *datReq));
852 EXTERN S16 rgROMCmnDatReq ARGS((Inst inst,RgRguCmnDatReq *datReq));
853 EXTERN S16 rgROMDedStaRsp ARGS((Inst inst,RgRguDedStaRsp *staRsp));
854 EXTERN S16 rgROMCmnStaRsp ARGS((Inst inst,RgRguCmnStaRsp *staRsp));
857 EXTERN S16 rgROML2MUlThrpMeasReq ARGS((Inst inst,RgRguL2MUlThrpMeasReq *measReq));
862 * APIs exposed by RAM module
864 EXTERN RgUeCb* rgRAMCreateUeCb ARGS((RgCellCb *cell,
865 CmLteRnti tmpCrnti,Bool insert, RgErrInfo *err));
866 EXTERN S16 rgRAMFreeCell ARGS((RgCellCb *cell));
867 EXTERN Void rgRAMFreeUeCb ARGS((Inst inst,RgUeCb *ueCb));
868 EXTERN S16 rgHndlRaResp ARGS((RgCellCb *cell,CmLteTimingInfo timingInfo,
869 RgInfRarInfo *rarInfo,RgErrInfo *err));
870 EXTERN S16 rgSchMacRlsRntiReq ARGS((Pst *pst,RgInfRlsRnti* rlsRnti));
872 * APIs exposed by UHM module
874 EXTERN Void rgUHMCrgUeCfg ARGS(( RgCellCb *cellCb, RgUeCb *ueCb,
876 EXTERN Void rgUHMCrgUeRecfg ARGS(( RgCellCb *cellCb, RgUeCb *ueCb,
877 CrgUeRecfg *ueRecfg));
879 * APIs exposed by DUX module
881 EXTERN S16 rgDUXDemuxData ARGS((Inst inst,RgMacPdu *pdu, RgInfCeInfo *ceInfo,
882 Buffer **mBuf, RgErrInfo *err));
883 EXTERN S16 rgDUXExtSduLen ARGS
892 * APIs exposed by DBM module
895 EXTERN S16 rgDBMInitInactvCellLst ARGS((U16 numBins));
896 EXTERN S16 rgDBMDeInitInactvCellLst ARGS((Void));
897 EXTERN S16 rgDBMInsInactvCellCb ARGS(( RgCellCb *cellCb));
898 EXTERN RgCellCb* rgDBMGetInactvCellCb ARGS(( CmLteCellId cellId));
899 EXTERN S16 rgDBMDelInactvCellCb ARGS(( RgCellCb *cellCb));
900 EXTERN RgCellCb* rgDBMGetNextInactvCellCb ARGS((RgCellCb *cellCb));
902 EXTERN S16 rgDBMInitCellLst ARGS(( U16 numBins));
903 EXTERN S16 rgDBMDeInitCellLst ARGS((Void));
904 EXTERN S16 rgDBMInsCellCb ARGS(( RgCellCb *cellCb));
905 EXTERN RgCellCb* rgDBMGetCellCb ARGS(( CmLteCellId cellId));
906 EXTERN S16 rgDBMDelCellCb ARGS(( RgCellCb *cellCb));
907 EXTERN RgCellCb* rgDBMGetNextCellCb ARGS((RgCellCb *cellCb));
908 EXTERN S16 rgDBMInitCell ARGS((RgCellCb *cellCb));
910 EXTERN S16 rgDBMDeInitUeCbLst ARGS(( RgCellCb *cellCb));
911 EXTERN S16 rgDBMInsUeCb ARGS(( RgCellCb *cellCb, RgUeCb *ueCb));
912 EXTERN RgUeCb* rgDBMGetUeCb ARGS(( RgCellCb *cellCb, CmLteRnti ueId));
913 EXTERN RgUeCb* rgDBMGetNextUeCb ( RgCellCb *cellCb, RgUeCb *ueCb);
914 EXTERN S16 rgDBMDelUeCb ARGS(( RgCellCb *cellCb, RgUeCb *ueCb));
915 EXTERN Void rgDBMInitUe ARGS((RgUeCb *ueCb));
918 EXTERN Void rgDBMInsUlDedLcCb ARGS((RgUeCb *ueCb, CmLteLcId idx, LteLcgId gId,
921 EXTERN Void rgDBMInsUlDedLcCb ARGS((RgUeCb *ueCb,
922 CmLteLcId idx, LteLcgId gId));
924 EXTERN Void rgDBMUpdUlDedLcCb ARGS((RgUeCb *ueCb,
925 RgUlLcCb *ulLcCb, LteLcgId gId));
927 EXTERN Void rgDBMInsDlDedLcCb ARGS((RgUeCb *ueCb, CmLteLcId idx));
928 EXTERN Void rgDBMDelUlDedLcCb ARGS((RgUeCb *ueCb, RgUlLcCb *ulLcCb));
929 EXTERN Void rgDBMDelDlDedLcCb ARGS((RgUeCb *ueCb, RgDlLcCb *dlLcCb));
930 EXTERN RgDlLcCb* rgDBMGetDlDedLcCb ARGS(( RgUeCb *ueCb, CmLteLcId idx));
931 EXTERN RgUlLcCb* rgDBMGetUlDedLcCb ARGS(( RgUeCb *ueCb, CmLteLcId idx));
932 EXTERN Void rgDBMFreeCmnLcLst ARGS((RgCellCb *cellCb));
933 EXTERN S16 rgDBMChkCmnLcCb ARGS(( RgCellCb *cellCb, CmLteLcId lcId));
934 EXTERN RgBcchBchLcCb* rgDBMGetBcchOnBch ARGS(( RgCellCb *cellCb ));
935 EXTERN RgBcchDlschLcCb* rgDBMGetBcchOnDlsch ARGS(( RgCellCb *cellCb,
937 EXTERN RgPcchLcCb* rgDBMGetPcch ARGS(( RgCellCb *cellCb));
938 EXTERN Void rgDBMInsBcchOnBch ARGS(( RgCellCb *cellCb, CmLteLcId idx));
939 EXTERN Void rgDBMInsBcchOnDlsch ARGS(( RgCellCb *cellCb, CmLteLcId idx));
940 EXTERN Void rgDBMInsPcch ARGS(( RgCellCb *cellCb, CmLteLcId idx));
942 EXTERN Void rgDBMInsUeCbInRachLst ARGS((RgCellCb *cellCb,RgUeCb *ueCb));
943 EXTERN RgUeCb* rgDBMGetUeCbFromRachLst ARGS((RgCellCb *cellCb,CmLteRnti key));
944 EXTERN RgUeCb* rgDBMGetNextUeCbFromRachLst ARGS((RgCellCb *cellCb,
946 EXTERN Void rgDBMDelUeCbFromRachLst ARGS((RgCellCb *cellCb,RgUeCb *ueCb));
947 /* Added support for SPS*/
949 EXTERN S16 rgDBMDeInitSpsUeCbLst ARGS((RgCellCb *cellCb));
950 EXTERN S16 rgDBMInsSpsUeCb ARGS((RgCellCb *cellCb, RgUeCb *ueCb));
951 EXTERN RgUeCb* rgDBMGetSpsUeCb ARGS((RgCellCb *cellCb, CmLteRnti ueId));
952 EXTERN RgUeCb* rgDBMGetNextSpsUeCb ARGS((RgCellCb *cellCb, RgUeCb *ueCb));
953 EXTERN S16 rgDBMDelSpsUeCb ARGS((RgCellCb *cellCb,RgUeCb *ueCb));
954 #endif /* LTEMAC_SPS */
957 * APIs exposed by DHM module
959 EXTERN Void rgCFGFreeUeCb ARGS((RgCellCb *cell, RgUeCb *ue));
960 EXTERN S16 rgDHMHqEntInit ARGS((Inst inst,RgDlHqEnt *hqE, U8 maxHqProcs));
961 EXTERN Void rgDHMRlsHqProc ARGS((RgDlHqProcCb *hqP));
962 EXTERN Void rgDHMUeReset ARGS ((RgCellCb *cell, RgDlHqEnt *hqE));
963 EXTERN Void rgDHMHdlBufFree ARGS((Inst inst, Buffer **mBuf));
964 EXTERN Void rgDHMFreeTbBufs ARGS((Inst inst));
965 EXTERN S16 rgDHMRlsHqProcTB ARGS((RgCellCb *cell, RgDlHqProcCb *hqP,U8 tbIndex));
966 EXTERN S16 rgDHMGetHqProcFrmId ARGS((RgUeCb *ue, U8 idx, RgDlHqProcCb **hqP));
967 /* Changes for MIMO feature addition */
968 /* Removed dependency on MIMO compile-time flag */
969 EXTERN S16 rgDHMSndDatReq ARGS((RgCellCb *cellCb, RgDlSf *dlSf, RgTfuDatReqInfo *datInfo,
970 RgDlHqProcCb *hqProc, RgErrInfo *err));
971 EXTERN S16 rgDHMHndlDedDatReq ARGS((Inst inst,RgDlHqProcCb *hqProc,
972 RgRguDDatReqPerUe *datReq, RgDlSf *dlSf, RgErrInfo *err));
973 /* Changed for contention resolution timer implementation*/
974 EXTERN S16 rgDHMHndlCmnDatReq ARGS((Inst inst,RgDlHqProcCb *hqProc,
975 RgRguCmnDatReq *datReq, RgErrInfo *err));
976 /* Changes for MIMO feature addition */
977 /* Removed dependency on MIMO compile-time flag */
979 EXTERN S16 rgDHMSndConsolidatedStaInd ARGS ((RgCellCb *cell,RgInfUeInfo *ueInfo,
980 CmLteTimingInfo timingInfo, RgErrInfo *err));
982 EXTERN Void rgDHMFreeUe ARGS((Inst inst,RgDlHqEnt *hqE));
983 EXTERN S16 rgSchMacRlsHqReq ARGS((Pst *pst, RgInfRlsHqInfo *rlshqUeInfo));
986 * APIs exposed by MUX module
989 EXTERN S16 rgMUXBldPdu ARGS((Inst inst, RgBldPduInfo *bldPdu, Buffer **txPdu,
992 EXTERN S16 rgMUXBldPdu ARGS((Inst inst, RgBldPduInfo *bldPdu, RgTfuDatReqTbInfo *tb,
994 EXTERN Bool RgUtlIsTbMuxed ARGS((TfuDatReqTbInfo *tb));
996 EXTERN S16 rgMUXBldRarPdu ARGS((RgCellCb *cell, RgInfRaRntiInfo *alloc,
997 Buffer **txPdu, RgErrInfo *err));
1002 EXTERN S16 rgAllocSBuf ARGS((Inst inst,Data **pData, Size size));
1003 EXTERN S16 rgGetMsg ARGS((Inst inst,Buffer **mBuf));
1004 /*ccpu00117052 - MOD Passing double pointer for proper NULLP
1006 EXTERN Void rgFreeSBuf ARGS((Inst inst,Data **data, Size size));
1007 EXTERN Void rgFillDgnParams ARGS((Inst inst,RgUstaDgn *dgn,U8 dgnType));
1008 EXTERN Void rgUpdtRguDedSts ARGS((Inst inst,RgUpSapCb *rguSap,U8 stsType, RgRguDedDatReq *datReq));
1009 EXTERN Void rgUpdtRguCmnSts ARGS((Inst inst,RgUpSapCb *rguSap,U8 stsType));
1010 EXTERN Void rgUpdtCellCnt ARGS((Inst inst,U8 updtType));
1011 EXTERN Void rgUpdtUeCnt ARGS((Inst inst,U8 updtType));
1012 EXTERN Void rgGetPstToInst ARGS((Pst *pst,Inst srcInst, Inst dstInst));
1013 EXTERN S16 rgAllocEventMem ARGS((Inst inst,Ptr *memPtr,Size memSize));
1014 EXTERN S16 rgGetEventMem ARGS((Inst inst,Ptr *ptr,Size len,Ptr memCp));
1015 EXTERN S16 rgAllocShrablSBuf ARGS((Inst inst,Data **pData, Size size));
1016 EXTERN Void rgPrintfSubFrameInfo ARGS((RgDlSf *dlSf));
1017 EXTERN Void printMacCellInfo ARGS((Void));
1018 EXTERN Void rgFreeSharableSBuf ARGS((Inst inst,Data **data, Size size));
1021 EXTERN Void rgDHMFreeAllTbBufs ARGS
1026 EXTERN S16 rgMUXAddPadd ARGS((
1033 EXTERN U16 rgMUXCalcRiv ARGS
1044 #endif /* __cplusplus */
1045 #endif /* __RGX__ */
1048 /**********************************************************************
1050 **********************************************************************/