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
343 MacCellCfg macCellCfg; /* MAC cell config paramters */
348 * Uplink HARQ entity information per UE.
350 typedef struct rgUlHqEnt
352 U8 maxHqRetx; /*!< Maximum number of harq
353 * re-transmissions */
358 * @brief Structure to hold Uplink throughtput info for L2 measurement.
361 * - outStndngBs : outstanding buffer status
362 * - firstDatSegRcvd : first dat req seg recvd
363 * - frstSegTimInfo : fisrt seg time information
364 * - nextSegTimInfo : next seg time information
365 * - segInd : UL thrgouthput indication
366 * - fSegTtiCycNum : First Seg tti cycles
367 * - nSegTtiCycNum : next seg tti cycles
369 typedef struct rgL2MeasUlThrP
371 S32 outStndngBs; /*!< outstanding buffer status*/
372 Bool firstDatSegRcvd; /*!< first dat req seg recvd*/
373 CmLteTimingInfo frstSegTimInfo; /*!< fisrt seg time information*/
374 CmLteTimingInfo nextSegTimInfo; /*!< next seg time information*/
375 RguL2MUlThrpSegInd segInd; /*!< UL thrgouthput indication*/
376 U32 fSegTtiCycNum; /*!< First Seg tti cycles*/
377 U32 nSegTtiCycNum; /*!< next seg tti cycles*/
383 * Logical channel group
387 /* Right now not keeping associated logical channels, searching for
388 * associated channels needed only during config */
389 LteLcgId lcgId; /*!< Group ID */
393 RgL2MeasUlThrP lcgBsInfo;
396 Bool isGbr; /*!< Indicate if LCG is GBR LCG */
404 * Uplink control block for UE specific information
406 typedef struct rgUeUlCb
408 RgUlHqEnt hqEnt; /*!< Uplink HARQ information for the UE */
409 RgUlLcCb lcCb[RG_MAX_LC_PER_UE]; /*!< Dedicated Uplink logical channel
411 RgLcgCb lcgArr[RG_MAX_LCG_PER_UE]; /*!< Logical channel groups */
412 /* Added support for SPS*/
414 Bool spsLcId[RG_MAX_LC_PER_UE]; /*!< Set to TRUE for SPS LCs */
415 U8 implRelCntr; /*!< Number of empty sps transmissions for
416 implicit(?) release */
417 U8 implRelCnt; /*!< Configured value of implicitRelAfter +
418 RG_ADDL_SPS_OCC_FOR_EXP_REL */
419 U8 explRelCntr;/*!< Counter to track explicit release */
420 U8 explRelCnt; /*!< Count to trigger explicit release */
421 /*Added for explicit release - start*/
422 U8 spsDatRcvd; /*!< Count to track SPS data for explicit
424 U32 totSpsDatRcvd; /*!< total number of SPS data recieved
431 * Logical channel data as being scheduled by the scheduler.
433 typedef struct rgLchSchdData
435 CmLteLcId lcId; /*!< Logical channel ID */
436 U32 schdSz; /*!< Scheduled logical channel data */
441 * Contention Resolution ID.
443 typedef struct RgContResId
445 U8 resId[RG_CRES_LEN];
450 * Used to keep sf and SfLnk in Tb.
452 typedef struct rgTbSfLnkInfo
454 RgDlSf *sf; /*!< Sf pointer to check if SfAlloc came for Tb in a SF */
455 CmLList sfLnk; /*!< Used to queue it up on a subfrm */
460 * Transport Block Info scheduled by the scheduler.
462 typedef struct rgTbInfo{
464 RgLchSchdData schdData[RG_MAX_NUM_DED_LC];
465 TknU8 schdTa; /*!< TA scheduled to be sent */
466 /* Changed as a result of CR timer implementation*/
467 U8 contResCe; /*!< Contention Resolution CE scheduled
469 RgContResId *contResId; /*!< Contention Resolution Identity */
471 Buffer *tb; /*!< Multiplexed Pdu */
473 /* L2 Optimization for mUe/Tti:Pre-allocated MAC Hdr, MAC CEs and padding
474 * will be used to store and send to CL. These pointer will be allocated
475 * during Harq Proc creation. CL shall not free these pointers.
476 * These pointers will be freed duing harq proc deletion
478 RgTfuDatReqTbInfo tb; /* TB to be sent to CL/PHY*/
480 /* Changes for MIMO feature addition */
481 /* Removed dependency on MIMO compile-time flag */
482 U32 tbSz; /*!< TB size scheduled for the hqP */
483 RgPdcch pdcch; /*!< PDCCH allocated for this HQ Proc */
484 /* Adding Array of sfLnk in case of repetitions because same lnk in mutiple
485 * list causing issues*/
486 RgTbSfLnkInfo sfLnkInfo[2]; /*!< Used to queue it up on a subfrm */
488 CmLteTimingInfo timingInfo; /*!<This field holds the scheduled time */
491 Bool puschRptUsd; /*!< True if Precoding Info in PDCCH has to be
492 in-accordance with the latest PUSCH report */
493 TfuDlCqiPuschInfo puschPmiInfo;/*!< PUSCH report details for explicit PMI
494 * information to PHY during a PDSCH */
495 /* LTE_ADV_FLAG_REMOVED_START */
497 U8 pa; /* DL Power control paramter P_A
498 configured by higher layers
499 Ref: RRC 36.331, 6.3.2,
504 TknU8 sCellActCe; /*!< SCell Act ce scheduled to be sent */
506 /* LTE_ADV_FLAG_REMOVED_END */
511 * Downlink HARQ process information per UE.
515 U8 procId; /*!< HARQ process ID */
516 /* Changes for MIMO feature addition */
517 /* Removed dependency on MIMO compile-time flag */
519 RgTbInfo tbInfo[RG_MAX_TB_PER_UE];
523 U32 tbId[RGU_MAX_TB]; /*!< RLC's internal tbId */
524 U16 status[RGU_MAX_TB]; /*!< Status back to RLC ACK/NACK*/
525 #endif /* LTE_L2_MEAS */
526 /* Changes for MIMO feature addition */
527 /* Removed dependency on MIMO compile-time flag */
533 * Downlink HARQ entity information per UE.
538 RgDlHqProcCb *procs[RG_MAX_DL_HARQ_NUM]; /*!< Downlink harq processes */
539 CmLListCp savedProcLst[RG_MAX_DL_HARQ_NUM]; /*!< laa: Saved TBs for the release Hq Procs*/
546 * Downlink control block for UE specific information.
548 typedef struct rgUeDlCb
550 RgDlHqEnt hqEnt; /*!< Downlink HARQ information for the UE */
551 RgDlLcCb lcCb[RG_MAX_LC_PER_UE];/*!< Dedicated Downlink logical channels in
556 typedef struct rgSCellAddCfgCfmInfo
558 CrgCfgTransId transId; /*!< Scell add transaction id*/
559 U8 numSCells; /*!< Used to check if config cfm rcvd from all Scells*/
560 U8 cfgCfgCount; /*!< Keep count of cfg confirms recvd */
561 U8 mask; /*!< Cfg cfm mask */
562 }RgSCellAddCfgCfmInfo;
564 typedef struct rgSCelInfo
566 Bool isSCellAdded; /*!< is Cell Added TRUE/FALSE */
567 Inst macInst; /*!< MAC Instance of that
569 CmLteCellId sCellId; /*!< Secondary Cell ID */
576 * UE control block for UE specific information
580 CmHashListEnt ueLstEnt; /*!< Hash List entity for UE List */
581 /* Added suport for SPS*/
583 CmHashListEnt spsUeLstEnt;/*!< Hash List entity for SPS Rnti */
585 CmLList rachLstEnt; /*!< Link List entity for RACH UE List*/
586 CmLteRnti ueId; /*!< UE identifier */
587 /* Added suport for SPS*/
589 CmLteRnti spsRnti; /*!< SPS-Rnti for the UE */
591 RgContResId contResId; /*!< Contention Resolution Identity */
592 RgUeUlCb ul; /*!< UE Specific Uplink information */
593 RgUeDlCb dl; /*!< UE Specific Downlink information */
594 /* Changes for MIMO feature addition */
595 /* Removed dependency on MIMO compile-time flag */
596 CrgTxMode txMode; /*!< UE Transmission mode Cfg */
597 RgUpSapCb *rguDlSap; /*!< RGU SAP Control Block for RLC DL */
598 RgUpSapCb *rguUlSap; /*!< RGU SAP Control Block for RLC UL*/
600 RgSCelInfo sCelInfo[RG_MAX_SCELL_PER_UE]; /*!<sCell Information */
601 RgSCellAddCfgCfmInfo cfgCfmInfo; /*!< Scell add cfg cfm info*/
607 * structure holding Layer Manager Response information cached from control
610 typedef struct rgLmResponse
612 TranId transId; /*!< Transaction ID */
613 Resp response; /*!< Response */
618 * Structure holding LTE MAC's General Configuration Information.
620 typedef struct rgGenCb
622 U8 tmrRes; /*!< Timer resolution */
623 RgLmResponse trcResp; /*!< Response value for Trace Indication */
624 RgLmResponse ustaResp; /*!< Respones value for Alarms */
625 RgLmResponse bndCfmResp; /*!< Respones value for Bind Confirm */
626 Status memUpperThr; /*!< upper threshold of the memory pool */
627 Status memLowerThr; /*!< lower threshold of the memory pool */
634 * Global Control block for LTE-MAC.
638 TskInit rgInit; /*!< Task Init information */
639 S16 trcLen; /*!< trace length */
640 RgGenCb genCfg; /*!< General Config information */
641 U8 numRguSaps; /*!< Numb of RGU SAP Control Block */
642 RgUpSapCb *rguSap; /*!< RGU SAP Control Block */
643 RgUpSapCb crgSap; /*!< CRG SAP Control Block */
644 RgLowSapCb tfuSap; /*!< TFU SAP Control Block */
645 RgGenSts genSts; /*!< General Statistics */
646 CmTqCp tmrTqCp; /*!< Timer Task Queue Cntrl Point */
647 CmTqType tmrTq[RG_TQ_SIZE]; /*!< Timer Task Queue */
648 CmTimer tmrBlk[RG_MAX_TIMER]; /*!< Timer Block */
649 RgCellCb *inactiveCell; /*!< Reference of last accessed cellCb*/
650 RgCellCb *cell; /*!< Reference of last accessed cellCb*/
651 RgCellCb *prevCell; /*!< Reference of last accessed cellCb*/
652 U8 bufCnt; /*!< Count of buffers in buffersToFree[] */
653 Buffer *bufToFree[RG_MAX_DFRD_FREE_BUFS];/*!< List of Shared Buffers to be freed */
656 /* Declaration for RgCb */
657 EXTERN RgCb rgCb[RG_MAX_INST];
661 * Subheader of MAC SDU.
663 typedef struct rgMacSdu
665 CmLList sduLstEnt; /*!< List entry for MAC SDU subheader */
666 CmLteLcId lcId; /*!< Logical channel ID */
667 U16 len; /*!< Length of the SDU */
668 Buffer *mBuf; /*!< SDU Buffer */
675 typedef struct rgMacPdu
677 CmMemListCp memCp; /*!< Memory control point */
678 CmLListCp sduLst; /*!< List of SDUs */
683 * Carries the Error Information.
687 U8 errType; /*!< Error Type */
688 U16 errCause; /*!< Cause of Error */
693 * Carries the Information to build PDU.
695 typedef struct rgBldPduInfo
697 Void *datReq; /*!< Common/Dedicated Dat Request */
698 U8 reqType; /*!< EVTRGUCDATREQ/EVTRGUDDATREQ */
699 MsgLen schdTbSz; /*!< Schedule TB size */
700 U8 tbIndex; /*!< Transport Block Index */
701 TknU8 ta; /*!< Timing Advance */
702 RgContResId *contResId; /*!< Contention Resolution ID */
704 TknU8 sCellActCe; /*!< SCell Act CE info */
710 /* APIs exposed by LIM */
712 #ifdef LTE_L2_MEAS /*LTE_L2_MEAS_PHASE2*/
713 EXTERN S16 rgAddToL2MeasPerQci ARGS ((RgCellCb *cell,U8 qci));
715 EXTERN S16 rgLIMTfuBndReq ARGS((
720 EXTERN S16 rgLIMTfuUbndReq ARGS((
725 EXTERN S16 rgLIMTfuDatReq ARGS((
727 TfuDatReqInfo *datReq));
729 EXTERN S16 rgLIMTfuDelDatReq ARGS((
731 TfuDelDatReqInfo *datReq));
733 /* APIs exposed by TOM */
735 EXTERN S16 rgTOMDatInd ARGS((
737 TfuDatIndInfo *datInd));
739 EXTERN S16 macProcessSlotInd ARGS((
741 SlotIndInfo slotInd));
742 EXTERN Void rgTOMRlsSf ARGS((Inst inst,RgDlSf *dlSf));
744 EXTERN S16 rgSchMacSfAllocReq ARGS((Pst *pst, RgInfSfAlloc *sfInfo));
747 * APIs exposed by LMM
749 EXTERN S16 rgLMMStartTmr ARGS((Inst inst,S16 tmrEvnt, U32 tmrVal, PTR cb));
750 EXTERN S16 rgLMMStopTmr ARGS((Inst inst,S16 tmrEvnt, PTR cb));
751 EXTERN S16 rgLMMTmrExpiry ARGS((PTR cb, S16 tmrEvnt));
752 /* To send a Unsolicited Status Indication to Layer Manager */
753 EXTERN S16 rgLMMStaInd ARGS((Inst inst,U16 category, U16 event, U16 cause, RgUstaDgn *dgn));
754 /* To send a Trace Indication to Layer Manager.
755 * srcMbuf is not freed. caller has to take care. */
756 EXTERN Void rgLMMTrcInd ARGS((Inst inst,Buffer *srcMbuf, U8 event));
757 /* LIM uses this to forward the BndCfm to LMM. This function invokes a
758 * Control Confirmation to the LM. */
759 EXTERN S16 rgLMMBndCfm ARGS((Pst *pst, SuId suId, U8 status));
760 EXTERN S16 rgActvTmr ARGS((Ent ent, Inst inst ));
761 EXTERN S16 rgActvInit ARGS((Ent entity, Inst inst, Region
762 region, Reason reason));
763 EXTERN S16 rgActvTsk ARGS((Pst *pst, Buffer *mBuf));
766 * APIs exposed by CFG module
768 EXTERN S16 rgCFGVldtCrgCellCfg ARGS((Inst inst,CrgCellCfg *cellCfg, RgErrInfo *errInfo));
769 EXTERN S16 rgCFGVldtCrgUeCfg ARGS((Inst inst,CrgUeCfg *ueCfg, RgCellCb **cell, RgErrInfo
771 EXTERN S16 rgCFGVldtCrgLcCfg ARGS((Inst inst,CrgLchCfg *lcCfg, RgCellCb **cell, RgUeCb
772 **ue, RgErrInfo *errInfo));
773 EXTERN S16 rgCFGVldtCrgCellRecfg ARGS((Inst inst,CrgCellRecfg *cellRecfg, RgCellCb **cell,
774 RgErrInfo *errInfo));
775 EXTERN S16 rgCFGVldtCrgUeRecfg ARGS((Inst inst,CrgUeRecfg *ueRecfg, RgCellCb **cell,
776 RgUeCb **ue, RgErrInfo *errInfo));
777 EXTERN S16 rgCFGVldtCrgLcRecfg ARGS((Inst inst,CrgLchRecfg *lcRecfg, RgCellCb **cell,
778 RgUeCb **ue, RgUlLcCb **ulLc, RgErrInfo *errInfo));
779 EXTERN S16 rgCFGVldtCrgUeReset ARGS ((Inst inst,CrgRst *reset,RgCellCb **cell,RgUeCb **ue,
780 RgErrInfo *errInfo));
782 EXTERN S16 rgCFGCrgCellCfg ARGS((Inst inst,CrgCellCfg *cellCfg, RgErrInfo *errInfo));
783 EXTERN S16 rgCFGCrgUeCfg ARGS((Inst inst,RgCellCb *cell, CrgUeCfg *ueCfg, RgErrInfo
787 EXTERN S16 rgFillAndAddSCellCfg ARGS((Inst inst, RgCellCb *cell,
788 CrgUeRecfg *ueRecfg, CrgCfgTransId transId, Bool *isCfmRqrd));
789 EXTERN S16 rgDelUeFrmAllSCell ARGS(( RgCellCb *cell, RgUeCb *ue));
790 EXTERN S16 rgUtlVltdAddSCellCfg ARGS ((RgPrgUeSCellCfgInfo *ueSCellCb,
794 EXTERN S16 rgCfgAddUeSCellCfg ARGS ((Inst dstMacInst,
795 RgPrgUeSCellCfgInfo *ueSCellCb,
800 EXTERN S16 rgCFGCrgLcCfg ARGS((Inst inst,RgCellCb *cell, RgUeCb *ue, CrgLchCfg
801 *lcCfg, RgErrInfo *errInfo,Bool *isCfmRqrd,CrgCfgTransId transId));
802 EXTERN S16 rgCFGCrgCellRecfg ARGS((Inst inst,RgCellCb *cell, CrgCellRecfg *cellRecfg,
803 RgErrInfo *errInfo));
804 EXTERN S16 rgCFGCrgUeRecfg ARGS((Inst inst,RgCellCb *cell, RgUeCb *ue, CrgUeRecfg
805 *ueRecfg, RgErrInfo *errInfo));
806 EXTERN S16 rgCFGCrgLcRecfg ARGS((Inst inst,RgCellCb *cell, RgUeCb *ue, RgUlLcCb
807 *ulLc, CrgLchRecfg *lcRecfg, RgErrInfo *errInfo, Bool *isCfmRqrd));
808 EXTERN S16 rgCFGCrgCellDel ARGS((Inst inst,CrgDel *cellDelInfo, RgErrInfo *errInfo));
809 EXTERN S16 rgCFGCrgUeDel ARGS((Inst inst,CrgDel *ueDelInfo, RgErrInfo *errInfo));
810 EXTERN S16 rgCFGCrgLcDel ARGS((Inst inst,CrgDel *lcDelInfo, RgErrInfo
811 *errInfo,Bool *isCfmRqrd,CrgCfgTransId transId));
812 EXTERN Void rgCFGFreeCellCb ARGS((RgCellCb *cell));
813 EXTERN Void rgCFGFreeInactvCellCb ARGS((RgCellCb *cell));
814 EXTERN S16 rgSchMacCellRegReq ARGS((Pst* pst,RgInfCellReg* regReq));
815 EXTERN S16 rgCFGCrgUeReset ARGS((RgCellCb *cell,RgUeCb *ue,CrgRst *reset,
816 RgErrInfo *errInfo));
819 * APIs exposed by COM module
821 EXTERN S16 rgCOMCfgReq ARGS((Inst inst,CrgCfgTransId transId, CrgCfgReqInfo
824 /* APIs Exposed by UIM */
825 EXTERN S16 rgUIMRguBndCfm ARGS ((Inst inst,SuId suId, U8 status));
826 EXTERN S16 rgUIMSndDedStaInd ARGS ((Inst inst,RgUpSapCb *rguDlSap,RgRguDedStaInd *staInd));
827 EXTERN S16 rgUIMSndCmnStaInd ARGS ((Inst inst,RgUpSapCb *rguDlSap,RgRguCmnStaInd *staInd));
828 EXTERN S16 rgUIMSndDedDatInd ARGS ((Inst inst,RgUpSapCb *rguDlSap,RgRguDedDatInd *datInd));
830 EXTERN S16 rgL2mCreateMeasCb ARGS((
832 RgInfL2MeasReq *measInfo,
836 EXTERN S16 rgL2mMeasReq ARGS((
838 RgInfL2MeasReq *measInfo,
841 EXTERN S16 rgL2Meas ARGS ((
844 #endif /* LTE_L2_MEAS */
845 EXTERN S16 rgUIMSndCmnDatInd ARGS ((Inst inst,RgUpSapCb *rguSap,RgRguCmnDatInd *datInd));
846 EXTERN S16 rgUIMCrgBndCfm ARGS ((Inst inst,SuId suId,U8 status));
847 EXTERN S16 rgUIMCrgCfgCfm ARGS ((Inst inst,CrgCfgTransId transId,U8 status));
851 * APIs exposed by ROM module
853 EXTERN S16 rgROMDedDatReq ARGS((Inst inst,RgRguDedDatReq *datReq));
854 EXTERN S16 rgROMCmnDatReq ARGS((Inst inst,RgRguCmnDatReq *datReq));
855 EXTERN S16 rgROMDedStaRsp ARGS((Inst inst,RgRguDedStaRsp *staRsp));
856 EXTERN S16 rgROMCmnStaRsp ARGS((Inst inst,RgRguCmnStaRsp *staRsp));
859 EXTERN S16 rgROML2MUlThrpMeasReq ARGS((Inst inst,RgRguL2MUlThrpMeasReq *measReq));
864 * APIs exposed by RAM module
866 EXTERN RgUeCb* rgRAMCreateUeCb ARGS((RgCellCb *cell,
867 CmLteRnti tmpCrnti,Bool insert, RgErrInfo *err));
868 EXTERN S16 rgRAMFreeCell ARGS((RgCellCb *cell));
869 EXTERN Void rgRAMFreeUeCb ARGS((Inst inst,RgUeCb *ueCb));
870 EXTERN S16 rgHndlRaResp ARGS((RgCellCb *cell,CmLteTimingInfo timingInfo,
871 RgInfRarInfo *rarInfo,RgErrInfo *err));
872 EXTERN S16 rgSchMacRlsRntiReq ARGS((Pst *pst,RgInfRlsRnti* rlsRnti));
874 * APIs exposed by UHM module
876 EXTERN Void rgUHMCrgUeCfg ARGS(( RgCellCb *cellCb, RgUeCb *ueCb,
878 EXTERN Void rgUHMCrgUeRecfg ARGS(( RgCellCb *cellCb, RgUeCb *ueCb,
879 CrgUeRecfg *ueRecfg));
881 * APIs exposed by DUX module
883 EXTERN S16 rgDUXDemuxData ARGS((Inst inst,RgMacPdu *pdu, RgInfCeInfo *ceInfo,
884 Buffer **mBuf, RgErrInfo *err));
885 EXTERN S16 rgDUXExtSduLen ARGS
894 * APIs exposed by DBM module
897 EXTERN S16 rgDBMInitInactvCellLst ARGS((U16 numBins));
898 EXTERN S16 rgDBMDeInitInactvCellLst ARGS((Void));
899 EXTERN S16 rgDBMInsInactvCellCb ARGS(( RgCellCb *cellCb));
900 EXTERN RgCellCb* rgDBMGetInactvCellCb ARGS(( CmLteCellId cellId));
901 EXTERN S16 rgDBMDelInactvCellCb ARGS(( RgCellCb *cellCb));
902 EXTERN RgCellCb* rgDBMGetNextInactvCellCb ARGS((RgCellCb *cellCb));
904 EXTERN S16 rgDBMInitCellLst ARGS(( U16 numBins));
905 EXTERN S16 rgDBMDeInitCellLst ARGS((Void));
906 EXTERN S16 rgDBMInsCellCb ARGS(( RgCellCb *cellCb));
907 EXTERN RgCellCb* rgDBMGetCellCb ARGS(( CmLteCellId cellId));
908 EXTERN S16 rgDBMDelCellCb ARGS(( RgCellCb *cellCb));
909 EXTERN RgCellCb* rgDBMGetNextCellCb ARGS((RgCellCb *cellCb));
910 EXTERN S16 rgDBMInitCell ARGS((RgCellCb *cellCb));
912 EXTERN S16 rgDBMDeInitUeCbLst ARGS(( RgCellCb *cellCb));
913 EXTERN S16 rgDBMInsUeCb ARGS(( RgCellCb *cellCb, RgUeCb *ueCb));
914 EXTERN RgUeCb* rgDBMGetUeCb ARGS(( RgCellCb *cellCb, CmLteRnti ueId));
915 EXTERN RgUeCb* rgDBMGetNextUeCb ( RgCellCb *cellCb, RgUeCb *ueCb);
916 EXTERN S16 rgDBMDelUeCb ARGS(( RgCellCb *cellCb, RgUeCb *ueCb));
917 EXTERN Void rgDBMInitUe ARGS((RgUeCb *ueCb));
920 EXTERN Void rgDBMInsUlDedLcCb ARGS((RgUeCb *ueCb, CmLteLcId idx, LteLcgId gId,
923 EXTERN Void rgDBMInsUlDedLcCb ARGS((RgUeCb *ueCb,
924 CmLteLcId idx, LteLcgId gId));
926 EXTERN Void rgDBMUpdUlDedLcCb ARGS((RgUeCb *ueCb,
927 RgUlLcCb *ulLcCb, LteLcgId gId));
929 EXTERN Void rgDBMInsDlDedLcCb ARGS((RgUeCb *ueCb, CmLteLcId idx));
930 EXTERN Void rgDBMDelUlDedLcCb ARGS((RgUeCb *ueCb, RgUlLcCb *ulLcCb));
931 EXTERN Void rgDBMDelDlDedLcCb ARGS((RgUeCb *ueCb, RgDlLcCb *dlLcCb));
932 EXTERN RgDlLcCb* rgDBMGetDlDedLcCb ARGS(( RgUeCb *ueCb, CmLteLcId idx));
933 EXTERN RgUlLcCb* rgDBMGetUlDedLcCb ARGS(( RgUeCb *ueCb, CmLteLcId idx));
934 EXTERN Void rgDBMFreeCmnLcLst ARGS((RgCellCb *cellCb));
935 EXTERN S16 rgDBMChkCmnLcCb ARGS(( RgCellCb *cellCb, CmLteLcId lcId));
936 EXTERN RgBcchBchLcCb* rgDBMGetBcchOnBch ARGS(( RgCellCb *cellCb ));
937 EXTERN RgBcchDlschLcCb* rgDBMGetBcchOnDlsch ARGS(( RgCellCb *cellCb,
939 EXTERN RgPcchLcCb* rgDBMGetPcch ARGS(( RgCellCb *cellCb));
940 EXTERN Void rgDBMInsBcchOnBch ARGS(( RgCellCb *cellCb, CmLteLcId idx));
941 EXTERN Void rgDBMInsBcchOnDlsch ARGS(( RgCellCb *cellCb, CmLteLcId idx));
942 EXTERN Void rgDBMInsPcch ARGS(( RgCellCb *cellCb, CmLteLcId idx));
944 EXTERN Void rgDBMInsUeCbInRachLst ARGS((RgCellCb *cellCb,RgUeCb *ueCb));
945 EXTERN RgUeCb* rgDBMGetUeCbFromRachLst ARGS((RgCellCb *cellCb,CmLteRnti key));
946 EXTERN RgUeCb* rgDBMGetNextUeCbFromRachLst ARGS((RgCellCb *cellCb,
948 EXTERN Void rgDBMDelUeCbFromRachLst ARGS((RgCellCb *cellCb,RgUeCb *ueCb));
949 /* Added support for SPS*/
951 EXTERN S16 rgDBMDeInitSpsUeCbLst ARGS((RgCellCb *cellCb));
952 EXTERN S16 rgDBMInsSpsUeCb ARGS((RgCellCb *cellCb, RgUeCb *ueCb));
953 EXTERN RgUeCb* rgDBMGetSpsUeCb ARGS((RgCellCb *cellCb, CmLteRnti ueId));
954 EXTERN RgUeCb* rgDBMGetNextSpsUeCb ARGS((RgCellCb *cellCb, RgUeCb *ueCb));
955 EXTERN S16 rgDBMDelSpsUeCb ARGS((RgCellCb *cellCb,RgUeCb *ueCb));
956 #endif /* LTEMAC_SPS */
959 * APIs exposed by DHM module
961 EXTERN Void rgCFGFreeUeCb ARGS((RgCellCb *cell, RgUeCb *ue));
962 EXTERN S16 rgDHMHqEntInit ARGS((Inst inst,RgDlHqEnt *hqE, U8 maxHqProcs));
963 EXTERN Void rgDHMRlsHqProc ARGS((RgDlHqProcCb *hqP));
964 EXTERN Void rgDHMUeReset ARGS ((RgCellCb *cell, RgDlHqEnt *hqE));
965 EXTERN Void rgDHMHdlBufFree ARGS((Inst inst, Buffer **mBuf));
966 EXTERN Void rgDHMFreeTbBufs ARGS((Inst inst));
967 EXTERN S16 rgDHMRlsHqProcTB ARGS((RgCellCb *cell, RgDlHqProcCb *hqP,U8 tbIndex));
968 EXTERN S16 rgDHMGetHqProcFrmId ARGS((RgUeCb *ue, U8 idx, RgDlHqProcCb **hqP));
969 /* Changes for MIMO feature addition */
970 /* Removed dependency on MIMO compile-time flag */
971 EXTERN S16 rgDHMSndDatReq ARGS((RgCellCb *cellCb, RgDlSf *dlSf, RgTfuDatReqInfo *datInfo,
972 RgDlHqProcCb *hqProc, RgErrInfo *err));
973 EXTERN S16 rgDHMHndlDedDatReq ARGS((Inst inst,RgDlHqProcCb *hqProc,
974 RgRguDDatReqPerUe *datReq, RgDlSf *dlSf, RgErrInfo *err));
975 /* Changed for contention resolution timer implementation*/
976 EXTERN S16 rgDHMHndlCmnDatReq ARGS((Inst inst,RgDlHqProcCb *hqProc,
977 RgRguCmnDatReq *datReq, RgErrInfo *err));
978 /* Changes for MIMO feature addition */
979 /* Removed dependency on MIMO compile-time flag */
981 EXTERN S16 rgDHMSndConsolidatedStaInd ARGS ((RgCellCb *cell,RgInfUeInfo *ueInfo,
982 CmLteTimingInfo timingInfo, RgErrInfo *err));
984 EXTERN Void rgDHMFreeUe ARGS((Inst inst,RgDlHqEnt *hqE));
985 EXTERN S16 rgSchMacRlsHqReq ARGS((Pst *pst, RgInfRlsHqInfo *rlshqUeInfo));
988 * APIs exposed by MUX module
991 EXTERN S16 rgMUXBldPdu ARGS((Inst inst, RgBldPduInfo *bldPdu, Buffer **txPdu,
994 EXTERN S16 rgMUXBldPdu ARGS((Inst inst, RgBldPduInfo *bldPdu, RgTfuDatReqTbInfo *tb,
996 EXTERN Bool RgUtlIsTbMuxed ARGS((TfuDatReqTbInfo *tb));
998 EXTERN S16 rgMUXBldRarPdu ARGS((RgCellCb *cell, RgInfRaRntiInfo *alloc,
999 Buffer **txPdu, RgErrInfo *err));
1004 EXTERN S16 rgAllocSBuf ARGS((Inst inst,Data **pData, Size size));
1005 EXTERN S16 rgGetMsg ARGS((Inst inst,Buffer **mBuf));
1006 /*ccpu00117052 - MOD Passing double pointer for proper NULLP
1008 EXTERN Void rgFreeSBuf ARGS((Inst inst,Data **data, Size size));
1009 EXTERN Void rgFillDgnParams ARGS((Inst inst,RgUstaDgn *dgn,U8 dgnType));
1010 EXTERN Void rgUpdtRguDedSts ARGS((Inst inst,RgUpSapCb *rguSap,U8 stsType, RgRguDedDatReq *datReq));
1011 EXTERN Void rgUpdtRguCmnSts ARGS((Inst inst,RgUpSapCb *rguSap,U8 stsType));
1012 EXTERN Void rgUpdtCellCnt ARGS((Inst inst,U8 updtType));
1013 EXTERN Void rgUpdtUeCnt ARGS((Inst inst,U8 updtType));
1014 EXTERN Void rgGetPstToInst ARGS((Pst *pst,Inst srcInst, Inst dstInst));
1015 EXTERN S16 rgAllocEventMem ARGS((Inst inst,Ptr *memPtr,Size memSize));
1016 EXTERN S16 rgGetEventMem ARGS((Inst inst,Ptr *ptr,Size len,Ptr memCp));
1017 EXTERN S16 rgAllocShrablSBuf ARGS((Inst inst,Data **pData, Size size));
1018 EXTERN Void rgPrintfSubFrameInfo ARGS((RgDlSf *dlSf));
1019 EXTERN Void printMacCellInfo ARGS((Void));
1020 EXTERN Void rgFreeSharableSBuf ARGS((Inst inst,Data **data, Size size));
1021 EXTERN void MacSendCellCfgCfm(uint8_t response);
1024 EXTERN Void rgDHMFreeAllTbBufs ARGS
1029 EXTERN S16 rgMUXAddPadd ARGS((
1036 EXTERN U16 rgMUXCalcRiv ARGS
1047 #endif /* __cplusplus */
1048 #endif /* __RGX__ */
1051 /**********************************************************************
1053 **********************************************************************/