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: Structures, variables, and typedefs required by the interface between
30 **********************************************************************/
33 @brief Structure declarations and definitions for MAC-SCH interface.
44 * @brief This structure contains the uplink grant information that is sent in
45 response to the random access request from the UE for CEmodeA.
47 typedef struct rgInfEmtcCEmodeARarUlGrt
49 uint8_t msg3PUSCHNbIdx; /*!< Indicates the Msg3 PUSCH narrowband index. */
50 uint8_t rbStart; /*!< Start Resource block of allocation. */
51 uint8_t numRb; /*!< Number of resource blocks allocated. */
52 uint8_t msg3PUSCHNumRep; /*!< Number of repetitions for Msg3 PUSCH. */
53 uint8_t iMcsCrnt; /*!< Current MCS index of the grant. */
54 uint8_t tpc; /*!< TPC command for the uplink grant. */
55 uint8_t cqiBit; /*!< Indicates the CQI is enabled or not. */
56 uint8_t delayBit; /*!< Indicates the Delay bit. */
57 uint8_t msg34MPDCCHNbIdx; /*!< Indicates Msg3/4 MPDCCH narrowband index. */
58 } RgInfEmtcCEmodeARarUlGrnt;
61 * @brief This structure contains the uplink grant information that is sent in
62 response to the random access request from the UE for CEmodeB.
64 typedef struct rgInfEmtcCEmodeBRarUlGrnt
66 uint8_t msg3PUSCHNbIdx; /*!< Indicates the Msg3 PUSCH narrowband index. */
67 uint8_t rbStart; /*!< Start Resource block of allocation. */
68 uint8_t numRb; /*!< Number of resource blocks allocated. */
69 uint8_t msg3PUSCHNumRep; /*!< Number of repetitions for Msg3 PUSCH. */
70 uint8_t iTbsCrnt; /*!< Current TBS index of the grant. */
71 uint8_t msg34MPDCCHNbIdx; /*!< Indicates Msg3/4 MPDCCH narrowband index. */
72 }RgInfEmtcCEmodeBRarUlGrnt;
74 typedef enum rgEmtcCEmodeType
82 * @brief This structure contains the uplink grant information that is sent in
83 response to the random access request from the UE for EMTC.
85 typedef struct rgInfEmtcRarUlGrnt
87 uint8_t rgEmtcCEmodeType;
90 RgInfEmtcCEmodeARarUlGrnt emtcCEmodeARarUlGrnt;
91 RgInfEmtcCEmodeBRarUlGrnt emtcCEmodeBRarUlGrnt;
95 #endif /* EMTC_ENABLE */
97 * @brief This structure contains common channel buffer occupancy report information.
99 typedef struct rgInfCmnBoRpt
102 CmLteCellId cellId; /*!< Identifies the cell. CellId value must be within the set of configured cell IDs. */
103 CmLteLcId lcId; /*!< Identifies the logical channel. lcId value range is defined in
104 Section 6.2.1 in 36.321 specification. */
105 CmLteLcType lcType; /*!< Identifies the Logical channel type.lcType can take the following values:
111 S32 bo; /*!< Buffer occupancy reported by RLC in bytes. */
113 uint8_t emtcDIReason; /*!< Reason for DI message to send. */
114 uint8_t pnb; /*!< Pagging narrowBand on which Ue perfom paging reception*/
116 union /*!< lcType in the primitive is the union selector. */
118 CmLteTimingInfo timeToTx; /*!< Timing info for the BO, applicable for BCCH and PCCH. */
119 CmLteRnti rnti; /*!< Temporary C-RNTI, only for CCCH. RNTI range is specified
120 in Section 7.1 in 36.321 specification. */
124 * @brief This structure contains dedicated channel buffer occupancy report
127 typedef struct rgInfDedBoRpt
129 S16 cellSapId; /*!< Identifies the cell SAP. cellSapId value must be within the set of configured cell SAP IDs. */
130 CmLteCellId cellId; /*!< Identifies the cell. CellId value must be within the set of configured cellIds. */
131 CmLteRnti rnti; /*!< Identifies the UE. RNTI value range is specified in Section 7.1 in 25.321 specification. */
132 CmLteLcId lcId; /*!< Identifies the logical channel. lcId value range is defined in Section 6.2.1 in 36.321 specification. */
133 S32 bo; /*!< Number of bytes reported as Buffer occupancy by RLC. */
135 Bool staPduPrsnt; /*!< Is status PDU present reported by RLC. */
136 uint16_t estRlcHdrSz;/*!< Estimated hader size reported by RLC */
138 uint32_t staPduBo; /*!< Number of bytes reported as Buffer occupancy for status PDU by RLC.
139 This is already included in BO.*/
140 uint32_t oldestSduArrTime; /*!< Oldest SDU Arrival Time from Upper Layer */
141 Bool setMaxUlPrio; /*!< set when Pollbit is set from RLC in PDU */
142 Bool setMaxDlPrio; /*!< Set when there is a status PDU in the DL*/
145 /*Fix: start: Indicate UE deletion from MAC to Scheduler*/
147 * @brief This structure contains the RNTI which is deleted at MAC
150 typedef struct rgInfUeDelInd
152 S16 cellSapId; /*!< Identifies the cell SAP. cellSapId value must be within the set of configured cell SAP IDs. */
153 CmLteCellId cellId; /*!< Identifies the cell. CellId value must be within the set of configured cellIds. */
154 CmLteRnti rnti; /*!< Identifies the UE. RNTI value range is specified in Section 7.1 in 25.321 specification. */
157 /*Fix: end: Indicate UE deletion from MAC to Scheduler*/
162 * @brief This structure contains the uplink grant information that is sent in
163 response to the random access request from the UE.
165 typedef struct rgInfRarUlGrnt
167 #ifndef MAC_5GTF_UPDATE
168 uint8_t hop; /*!< Indicates the hopping flag. */
170 uint8_t xPuschRange; /*!< xPUSCH range */
172 uint8_t rbStart; /*!< Start Resource block of allocation. */
173 uint8_t numRb; /*!< Number of resource blocks allocated. */
174 uint8_t tpc; /*!< TPC command for the uplink grant. */
175 uint8_t iMcsCrnt; /*!< Current MCS index of the grant. */
176 uint8_t delayBit; /*!< Indicates the Delay bit. */
177 #ifndef MAC_5GTF_UPDATE
178 uint8_t cqiBit; /*!< Indicates the CQI is enabled or not. */
180 uint8_t numBsiRep; /*!< Number of BSI reports. */
181 uint8_t bsiBetaOffIdx; /*!< Index of BSI beta offset used in Msg3 */
182 uint8_t pcrs; /*!< UL dual PCRS */
187 * @brief This structure carries timing adjustment, uplink grant information for the specific temporary C-RNTI.
189 typedef struct rgInfCrntiInfo
191 CmLteRnti tmpCrnti; /*!< Temporary C-RNTI. RNTI range is specified in Section 7.1 in 36.321 specification. */
192 uint8_t rapId; /*!< rapId identifies the index of the Random Access Preamble. rapId ranges from 0 to 63.*/
193 TknUInt16 ta; /*!< Timing Adjustment. Timing Adjustment Value range is defined in Section 6.1.3.5 in 36.321 specification. */
194 RgInfRarUlGrnt grnt; /*!< Uplink Grant to go in RAR. */
195 Bool isContFree; /*!< Indicates whether the procedure is contention-free or not. */
197 RgInfEmtcRarUlGrnt emtcGrnt; /*!< Uplink grant for EMTC UE to go in RAR. */
202 * @brief This structure carries information about downlink control format, scheduled TB size,
203 backoff indicator value, and the set of Random Access Responses within this RA-RNTI.
205 typedef struct rgInfRaRntiInfo
207 uint16_t raRnti; /*!< RA-RNTI. RNTI range is specified in Section 7.1 in 36.321 specification. */
208 TfuPdschDciInfo dciInfo; /*!< PDCCH allocated for RA-RNTI. For more information
209 refer to <i>TFU Interface Service Definition</i> (p/n 1100091). */
210 uint32_t schdTbSz; /*!< Scheduled TB size. schdTbSz value range is defined in Section 7.1.7.2.1 in 36.213
212 TknUInt8 backOffInd; /*!< Indicates the Backoff Indicator value. backOffInd value range
213 is defined in Section 7.2 in 36.321 specification. */
214 uint8_t numCrnti; /*!< Number of valid RARs in the array. */
215 RgInfCrntiInfo *crntiInfo; /*!< RAR information. */
219 * @brief This structure contains information about the RA-RNTIs for which
220 * random access responses are generated.
222 typedef struct rgInfRarInfo
224 uint8_t numRaRntis; /*!< Indicates the number of valid RA-RNTIs present. */
225 RgInfRaRntiInfo *raRntiInfo; /*!< Contains allocation information per RA-RNTI. */
226 uint16_t txPwrOffset; /*!< PDSCH tx power offset for RAR transmission */
230 * @brief Logical channel allocation information.
232 typedef struct rgInfLcDatInfo
234 CmLList lchLstEnt; /*!< Is not used when part of resource allocation. */
235 uint8_t lcId; /*!< Identifies the logical channel. lcId value range is defined
236 in Section 6.2.1 in 36.321 specification. */
237 uint32_t numBytes; /*!< Number of bytes allocated/received to logical channel. */
241 * @brief This structure contains control element information received from a
242 * particular UE.Extended PHR information
244 typedef struct rgInfExtPhrSCellInfo
246 uint8_t sCellIdx; /*!< SCELL index for which PHR is reported */
247 uint8_t phr; /*!< PHR value. PHR value is defined in Section 6.1.3.6a in 36.321 specification. */
248 uint8_t pCmax; /*!< PCMAX value. PCMAX value is defined in Table 6.1.3.6a-1 in 36.321 specification. */
249 uint8_t pBackOff; /*!< If UE applied back off due to P-MPRc in 36.321 specification. */
250 }RgInfExtPhrSCellInfo;
251 typedef struct rgInfExtPhrCEInfo
253 uint8_t type2Phr; /*!< PHR value. PHR value is defined in Section 6.1.3.6a in 36.321 specification. */
254 uint8_t type2PCMax; /*!< PCMAX value. PCMAX value is defined in Table 6.1.3.6a-1 in 36.321 specification. */
255 uint8_t numServCells; /*!< Number of serving cells for which PHR is reported */
256 RgInfExtPhrSCellInfo servCellPhr[CM_LTE_MAX_CELLS];
257 }RgInfExtPhrCEInfo; /*!< EXT PHR value. EXT PHR value is defined in Section 6.1.3.6a in 36.321 R10 specification. */
260 * @brief This structure contains control element information received from a
263 typedef struct rgInfCeInfo
265 uint16_t bitMask; /*!< Bitmask for the MAC Control elements present. */
268 uint16_t cRnti; /*!< C-RNTI value. RNTI range is specified in Section 7.1 in 36.321 specification. */
269 uint8_t phr; /*!< PHR value. PHR value is defined in Section 6.1.3.6 in 36.321 specification. */
272 uint8_t truncBsr; /*!< Truncated BSR value. BSR value is defined in
273 Section 6.1.3.1 in 36.321 specification. */
274 uint8_t shortBsr; /*!< Short BSR value.BSR value is defined in
275 Section 6.1.3.1 in 36.321 specification. */
278 uint8_t bs1; /*!< Buffer size 1 of long BSR. */
279 uint8_t bs2; /*!< Buffer size 2 of long BSR. */
280 uint8_t bs3; /*!< Buffer size 3 of long BSR. */
281 uint8_t bs4; /*!< Buffer size 4 of long BSR. */
282 }longBsr; /*!< BSR value is defined in Section 6.1.3.1 in 36.321 specification. */
284 RgInfExtPhrCEInfo extPhr; /*!< EXT PHR value. EXT PHR value is defined in Section 6.1.3.6a in 36.321 R10 specification. */
285 #ifdef MAC_5GTF_UPDATE
288 uint8_t bar; /*!< Beam Adjusment Request */
289 uint8_t numBsiFields; /*!< Number of BSI fields UE sent in BSI Feedback */
292 uint16_t bi; /*!< BSI Feedback : 9 bits Beam Index */
293 uint8_t brsrp; /*!< BSI Feedback :7 bits BRSRP */
300 uint8_t ulActLCs[RGINF_MAX_NUM_DED_LC];
301 /*!< List of LCs for which Data is received in UL */
311 typedef struct rgInfLcgInfo
313 uint8_t lcgId; /*!< LCGID. GBR DRB LCG */
314 uint32_t bytesRcvd; /*!< Contains bytes received for LCG */
318 * @brief This structure contains control element information received from a
319 * particular UE identified by the RNTI.
321 typedef struct rgInfUeDatInd
323 CmLteRnti rnti; /*!< RNTI. RNTI range is specified in Section 7.1 in 36.321 specification. */
324 CmLList ueLstEnt; /*!< UE linked list entry. */
325 RgInfCeInfo ceInfo; /*!< Contains the control elements received from the UE. */
326 RgInfLcgInfo lcgInfo[RGINF_MAX_LCG_PER_UE - 1]; /*!< Contains the bytes received per DRB LCG. */
330 * @brief This structure carries the control element information received for a
331 set of UEs along with timing information.
333 typedef struct rgInfSfDatInd
335 CmMemListCp memCp; /*!< Memory control point. */
336 CmLListCp ueLst; /*!< Pointer to the UE linked list. */
338 uint32_t qcisUlPrbCnt[RGINF_MAX_GBR_QCI_REPORTS];/*!< UL gbr LC's PRB count*/
340 S16 cellSapId; /*!< Cell SAP Identifier. CellSAP ID value must be within the set of configured cell SAP IDs. */
341 CmLteCellId cellId; /*!< Identifies the cell. CellId must be within the set of configured cell IDs. */
342 CmLteTimingInfo timingInfo; /*!< Contains information about SFN and subframe. SFN ranges from 0 to 1023 whereas subframe ranges from 0 to 9. */
346 * @brief This structure carries the information about scheduled logical
347 * channels within this transport block along with timing adjustment
350 typedef struct rgInfUeTbInfo
352 Bool disTb; /*!< Currently, not used, but is
353 applicable in MIMO case. */
354 Bool isReTx; /*!< Indicates the TB transmission type. */
355 TknUInt8 ta; /*!< Timing Adjustment. */
357 TknUInt8 sCellActCe; /* !< SCell Act values and whether
361 /* Changed as a result of CR timer implementation*/
362 uint8_t contResCe; /*!< Indicating presence of Contention Resolution CE across MAC-SCH
364 * identify CCCH SDU transmissions which need to
365 * be done without the
366 * contention resolution CE.*/
368 uint8_t numSchLch; /*!< Indicates the number of logical
369 channels scheduled. */
371 RgInfLcDatInfo schdDat[RGINF_MAX_NUM_DED_LC]; /*!< Contains
372 information about scheduled logical
377 @brief This structure carries the information reagarding secondary MAC like its
378 instance Id and HARQ process's Id
380 typedef struct rgLaaTbReqInfo
389 * @brief This structure carries the UE-specific Resource allocation
390 * information like RNTI, downlink control format, HARQ process Identifier,
391 * scheduled TB size, and Transport Block information.
393 typedef struct rgInfUeAlloc
395 CmLteRnti rnti; /*!< RNTI. RNTI range is specified in Section 7.1 in 36.321 specification. */
397 /* Added support for SPS*/
399 CmLteRnti pdcchRnti; /*!< RNTI used for PDCCH scrambling */
404 TfuPdschDciInfo dciInfo; /*!< Contains Downlink Control Information. For more information,
405 refer to <i>TFU Interface Service Definition</i> (p/n 1100091). */
406 uint8_t hqProcId; /*!< HARQ process Identifier. hqProcId ranges between 1 and 8 for FDD mode and 1 and 15 for TDD mode */
410 Bool puschRptUsd;/*!< True, if Precoding Information in PDCCH has to be
411 in-accordance with the latest PUSCH report */
412 TfuDlCqiPuschInfo puschPmiInfo;/*!< PUSCH report details for explicit PMI
413 * information to PHY during a PDSCH */
416 uint8_t nmbOfTBs; /*!< Indicates the number of TBs. Currently this is set to 1. */
417 RgInfUeTbInfo tbInfo[RGINF_MAX_TB_PER_UE]; /*!< Contains TB identifier. */
418 /* LTE_ADV_FLAG_REMOVED_START */
420 uint8_t pa; /*!< DL Power control paramter P_A
421 configured by higher layers
422 Ref: RRC 36.331, 6.3.2, PDSCH-Config */
424 uint8_t isEnbSFR; /*To check if SFR is enabled*/
425 /* LTE_ADV_FLAG_REMOVED_END */
427 Bool fillCtrlPdu; /*!< Based upon this flag RLC will fill RLC Control PDU
428 In a tti if P-cell is present then control PDU
429 should be kept in P-cell otherwise S-cell*/
431 RgLaaTbReqInfo tbReqInfo; /*!< LAA: TB information for the TBs which
432 need to be fetched from the SCell*/
436 * @brief This structure carries the Resource allocation information for the
437 * set of scheduled UEs.
439 typedef struct rgInfUeInfo
441 uint8_t numUes; /*!< Number of UEs allocated. */
442 RgInfUeAlloc *allocInfo; /*!< Allocation information per UE. */
446 * @brief This structure contains the RNTI and downlink control format
447 * information for the scheduled BCCH logical channel.
449 typedef struct rgInfBcchInfo
451 CmLteRnti rnti; /*!< RNTI range is specified in Section 7.1 in 36.321 specification. */
452 TfuPdschDciInfo dciInfo; /*!< Downlink Control Information. For more information,
453 refer to <i>TFU Interface Service Definition</i> (p/n 1100091).*/
454 /* Modified for SI Enhancement*/
456 CmLteLcId lcId; /*!< Logical Channel Identifier.lcId value range is defined in
457 Section 6.2.1 in 36.321 specification. */
458 Bool sndStatInd; /*!< Currently this is set to 1 for fresh transmission of BCCH data. */
460 Buffer *pdu; /*!< PDU being specified for BCCH. */
462 uint16_t txPwrOffset; /*!< PDSCH tx power offset for BCCH
467 * @brief This structure contains the RNTI and the downlink control information for the scheduled PCCH logical channel.
469 typedef struct rgInfPcchInfo
471 CmLteRnti rnti; /*!< RNTI range is specified in Section 7.1 in 36.321 specification. */
472 TfuPdschDciInfo dciInfo; /*!< Downlink Control Information.
473 For more information, refer to <i>TFU Interface Service Definition</i> (p/n 1100091). */
474 CmLteLcId lcId; /*!< Logical Channel Identifier. lcId value range is defined in
475 Section 6.2.1 in 36.321 specification. */
477 uint16_t txPwrOffset; /*!< PDSCH tx power offset for PCCH
482 * @brief This structure contains the scheduled logical channel information
483 * mapped onto the BCH transport channel.
485 typedef struct rgInfBchInfo
487 /* Modified for SI Enhancement*/
489 CmLteLcId lcId; /*!< Logical Channel Identifier. lcId value range is defined in Section 6.2.1 in 36.321 specification. */
491 Buffer *pdu; /*!< PDU being specified for BCH */
496 * @brief This structure contains the scheduling information of BCH, PCCH, and
497 * BCCH channel information.
499 typedef struct rgInfCmnLcInfo
501 uint16_t bitMask; /*!< Bitmask representing all the common channels present. */
502 RgInfBchInfo bchInfo; /*!< BCH channel Information. */
503 RgInfPcchInfo pcchInfo; /*!< Paging Logical Channel Information. */
504 RgInfBcchInfo bcchInfo; /*!< Broadcast Logical Channel Information. */
509 * @brief This structure contains the scheduled logical channel information
510 * mapped onto the BCH transport channel.
512 typedef struct rgInfEmtcBcchInfo
514 CmLteRnti rnti; /*!< RNTI range is specified in Section 7.1 in 36.321 specification. */
515 TfuPdschDciInfo dciInfo; /*!< Downlink Control Information. For more information */
516 Buffer *pdu; /*!< PDU being specified for BCH */
520 * @brief This structure contains the scheduling information of BCH, PCCH, and
521 * BCCH channel information.
523 typedef struct rgInfEmtcCmnLcInfo
525 uint16_t bitMask; /*!< Bitmask representing all the common channels present. */
526 RgInfBchInfo bchInfo; /*!< BCH channel Information. */
527 RgInfPcchInfo pcchInfo; /*!< Paging Logical Channel Information. */
528 RgInfEmtcBcchInfo emtcBcchInfo; /*!< Broadcast Logical Channel Information. */
534 * @brief UE-specific allocation information needed for measurements.
536 typedef struct rgInfUeUlAlloc
538 CmLteRnti rnti; /*!< UE ID */
539 uint8_t numPrb; /*!< Number of total PRB's allocated for this UE */
543 * @brief Allocation information of all UEs in this subframe.
545 typedef struct rgInfUlUeInfo
547 uint8_t numUes; /*!< Number of UE's*/
548 CmLteTimingInfo timingInfo; /*!< Uplink timing information */
549 RgInfUeUlAlloc *ulAllocInfo;/*!< Uplink Allocations information */
551 #endif /*LTE_L2_MEAS */
554 *@brief this structure contains the lcId on which flow control need to be performed and the number of packets allowed for admission */
555 typedef struct rgInfLcInfo
557 CmLteLcId lcId; /*!< lcId for flow control*/
558 uint32_t pktAdmitCnt; /*!<Pkts allowed for the LC */
559 uint32_t maxBo4FlowCtrl; /*!< MAX BO of Queued SDUs at RLC beyond which Flow is Controlled */
560 }RgInfLcFlowCntrlInfo;
564 * @brief This structure contains the flow control information per UE */
565 typedef struct rgInfUeFlowCntrlInfo
567 CmLteRnti ueId; /*!<ueId for flow control*/
568 uint32_t numLcs;/*!<numLcs in the UE*/
569 RgInfLcFlowCntrlInfo lcInfo[RGINF_MAX_NUM_DED_LC]; /*!<LC list*/
570 }RgInfUeFlowCntrlInfo;
572 * @brief This structure contains the flow control information to be sent to MAC */
573 typedef struct rgInfFlowCntrlInfo
575 uint32_t numUes;/*!<Num UEs for flow control */
576 RgInfUeFlowCntrlInfo ueFlowCntrlInfo[RGINF_MAX_NUM_UE_PER_TTI]; /*!<Ue Info for flow control */
579 typedef struct rgInfEmtcInfo
581 RgInfEmtcCmnLcInfo cmnLcInfo; /*!< Contains Information about commmon channels. */
582 RgInfRarInfo rarInfo; /*!< Contains Information about EMTC Random Access Responses. */
583 RgInfUeInfo ueInfo; /*!< Contains UE specific allocation
584 information for EMTC UEs. */
588 * @brief This structure contains the scheduling information of common channels, random access responses and UE specific allocations along with timing information.
590 typedef struct rgInfSfAlloc
592 CmLteCellId cellId; /*!< Identifies the cell. CellId value should be within the set of configured
594 CmLteTimingInfo timingInfo; /*!< Contains Information about SFN and subframe. SFN ranges from 0 to 1023 where as subframe is from 0 to 9. */
595 RgInfCmnLcInfo cmnLcInfo; /*!< Contains Information about commmon channels. */
597 RgInfEmtcInfo emtcInfo;
599 RgInfRarInfo rarInfo; /*!< Contains Information about Random Access Responses. */
600 RgInfUeInfo ueInfo; /*!< Contains UE specific allocation information. */
602 RgInfUlUeInfo ulUeInfo; /*!< Uplink allocation information needed at MAC */
603 #endif /* LTE_L2_MEAS */
604 RgInfFlowCntrlInfo flowCntrlInfo; /*!<Flow Control information */
608 * @brief This structure contains regarding the ue for
609 * resettng the harqentiry of a scell
611 typedef struct rgInfResetHqEnt
613 CmLteCellId cellId; /*!< Identifies the sec cell for which harq entity reset
615 CmLteRnti crnti; /*!< RNTI for which harq entity needs to be
620 * @brief This structure contains the UE specific HARQ and Transport Block
621 * information to be released.
623 typedef struct rgInfUeHqInfo
625 CmLteRnti rnti; /*!< RNTI which uniquely identifies the UE. RNTI value range is
626 specified in Section 7.1 in 25.321 */
627 uint8_t hqProcId; /*!< HARQ Process Identifier.
628 hqProcId ranges between 1 and 8 for FDD mode and 1 and 15 for TDD mode. */
629 uint8_t numOfTBs; /*!< Identifies the number of TBs. Currently this is set to 1. */
630 uint8_t tbId[RGINF_MAX_TB_PER_UE]; /*!< Indicates the TB Identifier. */
631 /* MS_WORKAROUND: to increase Harq Fail Counter .
632 The status field is required for tracking the number of harq faliures at MAC.
633 As this is already present under L2_MEAS flag, we have replaced it with platform flag */
634 uint8_t status[RGINF_MAX_TB_PER_UE]; /*!< Indicates HARQ ACK or NACK */
635 uint8_t rlsOperationType; /*!< Decides action to be taken in MAC
636 0x00 RGINF_RLS_HQ_NO_ACTION - Free Hq Procs and TBs
637 0x01 RGINF_RLS_HQ_SAVE_TB - Free Hq Proc but save the TBs
638 0x02 RGINF_RLS_HQ_DEL_TB - Del already saved TBs */
639 uint16_t saveId; /*!< Uniquely identify an particular HqP save */
643 * @brief This structure contains HARQ process information and buffer
644 * information for a set of UEs to be released in a cell identified by the
647 typedef struct rgInfRlsHqInfo
649 CmLteCellId cellId; /*!< Identifies Cell. CellId should be within
650 the set of configured cell IDs. */
651 uint8_t numUes; /*!< Indicates number of UEs present. */
652 RgInfUeHqInfo *ueHqInfo; /*!< Contains UE specific HARQ information. */
656 * @brief This structure contains the released RNTI in a particular cell
657 * identified by a cellId.
659 typedef struct rgInfRlsRnti
661 CmLteCellId cellId; /*!< cellId uniquely identifies the
662 cell. cellId value should be within the set of configured cell IDs. */
663 CmLteRnti rnti; /*!< RNTI which uniquely identifies the UE.
664 RNTI range is specified in Section 7.1 in 25.321 specification. */
665 /* Fix : syed ueId change as part of reestablishment.
666 * Now SCH to trigger this. CRG ueRecfg for ueId change
668 Bool ueIdChng; /*!< Indicates if there is a ueId change as part
669 of reestablishment */
670 CmLteRnti newRnti; /*!< new RNTI changed as part of reestablishment */
672 Bool isUeSCellDel; /*!< TRUE means UeSCellDel*/
677 * @brief This structure contains the cell information along with the
678 * maximum number of downlink HARQ processes configured per UE in the cell.
680 typedef struct rgInfCellReg
682 CmLteCellId cellId; /*!< Identifies the cell. cellId value should be within the set of configured cell IDs. */
683 S16 cellSapId; /*!< Identifies the cell SAP. cellSapId value should be within the set of configured cell SAP IDs. */
684 uint8_t maxDlHqProcPerUe; /*!< Indicates Maximum number of downlink HARQ processes per UE. */
689 * @brief struture to hold measurement request for Uplink Average PRB usage per
692 typedef struct rgInfPrbReq
694 uint8_t numQci; /*!< Number fo QCI's in Request */
695 uint8_t qci[LRG_MAX_QCI_PER_REQ]; /*!< QCI for which PRB has
700 typedef struct prbUsage
702 uint8_t qciValue; /*!< Qci Value */
703 uint32_t prbUsage; /*!<Prb Usage for this Qci */
706 * @brief struture to hold measurement confirm for Uplink Average PRB usage per
709 typedef struct rgInfPrbCfm
711 uint8_t numQci; /*!< Number fo QCI's in Request */
712 PrbUsage prbUsage[LRG_MAX_QCI_PER_REQ]; /*!< Average PRB usage
717 * @brief Structure used by Scheduler to send the measurement request to MAC
719 typedef struct RgInfL2MeasReq
721 uint32_t transId; /*!< TransId to uniquely identify request */
722 uint16_t measType; /*!< For action type Avegare PRB usage
724 uint16_t timePrd; /*!< Time Period for which measurement
726 CmLteCellId cellId; /*!< CellId for which measurement done*/
728 RgInfPrbReq prbReq; /*!< Avgerage PRB usage per QCI*/
733 * @brief Structure used by Scheduler to send the measurement stop request to MAC
735 typedef struct RgInfL2MeasStopReq
737 uint32_t transId; /*!< TransId to uniquely identify request */
738 uint8_t measType; /*!< For action type Avegare PRB usage
740 CmLteCellId cellId; /*!< CellId for which measurement done*/
741 } RgInfL2MeasStopReq;
745 * @brief Structure used by Scheduler to send the measurement send request to MAC
747 typedef struct RgInfL2MeasSndReq
749 uint32_t transId; /*!< TransId to uniquely identify request */
750 uint8_t measType; /*!< For action type Avegare PRB usage
752 uint16_t timePrd; /*!< Time Period for which measurement
754 CmLteCellId cellId; /*!< CellId for which measurement done*/
758 * @brief Structure used MAC to send the confirm back to scheduler
760 typedef struct rgInfL2MeasCfm
762 uint16_t transId; /*!< transId to map to request */
763 uint8_t measType; /*!< Action for which measurement done */
764 CmLteCellId cellId; /*!< CellId for which measurement done*/
765 CmStatus cfm; /*!< Confirmation possible Values when measType
766 is invalid status -> NOK and reason -> INVALID */
768 RgInfPrbCfm prbCfm; /*!< Avgerage PRB usage per QCI*/
773 * @brief This API is invoked from l2 Measurements module at scheduler.
774 * When Scheduler receives a measurement request from stack manager for Average
775 * PRB usage Per QCI in Uplink, Scheduler invokes this API towards LTE MAC
776 * for the calculations. LTE MAC utilizes the uplink allocations information provided
777 * by scheduler for every subframe and data indications received for this calculation.
778 * This API carries a transId to uniquely identify the confirm received for
779 * this request from LTEMAC.
781 S16 RgSchMacL2MeasReq ARGS((
783 RgInfL2MeasReq* l2MeasReq
786 * @brief This API is invoked from l2 Measurements module at scheduler.
787 * When Scheduler receives a measurement send request from stack manager,
788 * it sends L2 measurement to layer manager.
791 S16 RgSchMacL2MeasSendReq ARGS((
793 RgInfL2MeasSndReq* l2MeasReq
796 * @brief This API is invoked from l2 Measurements module at scheduler.
797 * When Scheduler receives a measurement stop request from stack manager,
798 * it stops L2 Measurement
800 S16 RgSchMacL2MeasStopReq ARGS((
802 RgInfL2MeasStopReq* l2MeasReq
806 * @brief This API is invoked from L2 Measurement module at LTE MAC. When LTE MAC
807 * completes calculation of Avergae PRB usage per QCI in Uplink for a given time
808 * period, It invokes this API to indicate result back to scheduler. LTE
809 * MAC sends the same transId received in measurement request from Scheduler.
811 S16 RgMacSchL2MeasCfm ARGS((
813 RgInfL2MeasCfm* l2MeasCfm
816 * @brief This API is invoked from L2 Measurement module at LTE MAC. When LTE MAC
817 * stops L2 measurement, it sends L2 measurement cfm.
820 S16 RgMacSchL2MeasStopCfm ARGS((
822 RgInfL2MeasCfm* l2MeasCfm
825 S16 RgMacSchL2MeasStop ARGS
828 RgInfL2MeasCfm *measInfo
830 #endif /* LTE_L2_MEAS */
833 /* Added support for SPS*/
836 * @brief This structure contains the logical channel information related to
837 * uplink SPS for a particular UE identified by the CRNTI.
839 typedef struct rgInfSpsLcInfo
841 CmLteCellId cellId; /*!< Cell Identifier */
842 CmLteRnti crnti; /*!< RNTI which uniquely identifies the UE
843 RNTI range is specified in Section
844 7.1 in 25.321 Specification. */
845 CmLteRnti spsRnti; /*!< SPS RNTI. RNTI range is specified in
846 Section 7.1 in 25.321 Specification. */
847 uint8_t spsLcCnt; /*!< identifies the number of SPS
848 configured logical channels */
849 uint8_t spsLcId[RGINF_MAX_NUM_DED_LC]; /*!< Logical Channel
850 Identifier. lcId value range is
851 defined in Section 6.2.1
852 in 36.321 Specification. */
853 uint8_t implRelCnt; /*!< "implicitRelAfter" vallue */
854 uint16_t spsPrd; /*!< SPS periodicity of the UE */
858 * @brief This structure contains the information to release UL SPS for a UE */
859 typedef struct rgInfSpsRelInfo
861 S16 cellSapId; /*!< identifies the cell SAP. Value range
862 should be within the set of
863 configured cell SAP(s).*/
864 CmLteRnti cRnti; /*!< RNTI of the UE */
865 Bool isExplRel; /*!< TRUE if explicit release needs to be
868 #endif /* LTEMAC_SPS */
871 * Function Prototypes
874 * @brief Request from Scheduler to MAC to register a cell.
875 * @details This primitive is used for light-weight loose coupling.
877 S16 cmPkSchMacCellRegReq ARGS((
882 typedef S16 (*CellRegReq) ARGS((
888 * @brief Request from Scheduler to MAC to register a cell.
889 * @details The scheduler invokes this primitive after the scheduler cell
890 * configuration is completed. Before calling this primitive, the scheduler
891 * creates a mapping of the cell which is uniquely idetified by cell ID and
892 * scheduler instance that is serving the cell.
894 S16 RgSchMacCellRegReq ARGS((
899 * @brief Request from Scheduler to MAC to register a cell.
900 * @details This primitive is used for light-weight loose coupling.
902 S16 cmUnpkSchMacCellRegReq ARGS((
908 * @brief Request from MAC to scheduler to update dedicated BO.
909 * @details This primitive is used for light-weight loose coupling.
911 S16 cmPkMacSchDedBoUpdtReq ARGS((
916 typedef S16 (*DedBoUpdtReq) ARGS((
922 * @brief Request from MAC to scheduler to update dedicated BO.
923 * @details MAC layer invokes this primitive towards scheduler when it
924 * receives status response from the RLC for dedicated channels. Scheduler
925 * takes the buffer occupancy information into consideration while taking
926 * scheduling decisons.
928 S16 RgMacSchDedBoUpdtReq ARGS((
933 * @brief Request from MAC to scheduler to update dedicated BO.
934 * @details This primitive is used for light-weight loose coupling.
936 S16 cmUnpkMacSchDedBoUpdtReq ARGS((
942 * @brief Request from MAC to scheduler to update common channel BO.
943 * @details This primitive is used for light-weight loose coupling.
945 S16 cmPkMacSchCmnBoUpdtReq ARGS((
950 typedef S16 (*CmnBoUpdtReq) ARGS((
956 * @brief Request from MAC to scheduler to update common channel BO.
957 * @details MAC layer invokes this primitive towards scheduler when it
958 * receives status response from the RLC for common channels. Scheduler
959 * takes the buffer occupancy information into consideration while taking
960 * scheduling decisons.
962 S16 RgMacSchCmnBoUpdtReq ARGS((
967 * @brief Request from MAC to scheduler to update common channel BO.
968 * @details This primitive is used for light-weight loose coupling.
970 S16 cmUnpkMacSchCmnBoUpdtReq ARGS((
976 /*Fix: start:Indicate UE deletion at MAC to scheduler*/
978 * @brief UE delete indication from MAC to scheduler.
979 * @details This primitive is used for light-weight loose coupling.
981 S16 cmPkMacSchUeDelInd ARGS((
983 RgInfUeDelInd* ueDelInd
986 typedef S16 (*UeDelInd) ARGS((
988 RgInfUeDelInd* ueDelInd
992 * @brief UE deletion indication from MAC to scheduler.
993 * @details MAC layer invokes this primitive towards scheduler when it
994 * receives UE delete Request. As the UE is now deleted at MAC, it should
997 S16 RgMacSchUeDelInd ARGS((
999 RgInfUeDelInd* ueDelInd
1002 * @brief UE delete Indication Request from MAC to scheduler.
1003 * @details This primitive is used for light-weight loose coupling.
1005 S16 cmUnpkMacSchUeDelInd ARGS((
1010 /*Fix: end:Indicate UE deletion at MAC to scheduler*/
1012 * @brief Data Indication Request from MAC to scheduler.
1013 * @details This primitive is used for light-weight loose coupling.
1015 S16 cmPkMacSchSfRecpInd ARGS((
1017 RgInfSfDatInd* datInd
1020 typedef S16 (*SfRecpInd) ARGS((
1022 RgInfSfDatInd* datInd
1026 * @brief Data Indication Request from MAC to scheduler.
1027 * @details MAC layer invokes this primitive towards scheduler when it
1028 * receives MAC Control Elements from the data received from the UE. Scheduler
1029 * takes these control elements into consideration while taking scheduling
1030 * decisons for the uplink.
1032 S16 RgMacSchSfRecpInd ARGS((
1034 RgInfSfDatInd* datInd
1037 * @brief Data Indication Request from MAC to scheduler.
1038 * @details This primitive is used for light-weight loose coupling.
1040 S16 cmUnpkMacSchSfRecpInd ARGS((
1046 * @brief Resource Allocation Request from Scheduler to MAC.
1047 * @details This primitive is used for light-weight loose coupling.
1049 S16 cmPkSchMacSfAllocReq ARGS((
1051 RgInfSfAlloc* resAllocReq
1054 typedef S16 (*SfAllocReq) ARGS((
1056 RgInfSfAlloc* resAllocReq
1060 * @brief Resource Allocation Request from Scheduler to MAC.
1061 * @details Scheduler invokes this primitive for every TTI towards MAC to
1062 * inform the scheduling decisions taken for uplink grants, common channels
1063 * and list of UEs to be scheduling during this TTI.
1065 S16 RgSchMacSfAllocReq ARGS((
1067 RgInfSfAlloc* resAllocReq
1070 * @brief Resource Allocation Request from Scheduler to MAC.
1071 * @details This primitive is used for light-weight loose coupling.
1073 S16 cmUnpkSchMacSfAllocReq ARGS((
1079 * @brief Request from Scheduler to release HARQ processes at MAC.
1080 * @details This primitive is used for light-weight loose coupling.
1082 S16 cmPkSchMacRlsHqReq ARGS((
1084 RgInfRlsHqInfo* sfHqInfo
1087 typedef S16 (*RlsHqReq) ARGS((
1089 RgInfRlsHqInfo* sfHqInfo
1093 * @brief Request from Scheduler to release HARQ processes at MAC.
1094 * @details Scheduler calls this primitive to send the list of UEs for
1095 * which the HARQ buffers are released to MAC. The Scheduler invokes this
1096 * primitive when a positive acknowledgement is received for the TB transmitted
1097 * or a TB is retransmitted for the allowed maximum number of retransmissions.
1099 S16 RgSchMacRlsHqReq ARGS((
1101 RgInfRlsHqInfo* sfHqInfo
1104 * @brief Request from Scheduler to release HARQ processes at MAC.
1105 * @details This primitive is used for light-weight loose coupling.
1108 S16 cmUnpkSchMacRlsHqReq ARGS((
1115 * @brief Request from Scheduler to reset HARQ Entity at MAC.
1116 * @details This primitive is used for light-weight loose coupling.
1118 S16 cmPkSchMacRstHqEntReq ARGS((
1120 RgInfResetHqEnt* hqEntInfo
1123 typedef S16 (*RstHqEntReq) ARGS((
1125 RgInfResetHqEnt* hqEntInfo
1129 * @brief Request from Scheduler to reset HARQ entity at MAC for a scell of an ue.
1130 * This is triggered upon deactivation of a scell
1132 S16 RgSchMacRstHqEntReq ARGS((
1134 RgInfResetHqEnt* hqEntInfo
1137 * @brief Request from Scheduler to release HARQ processes at MAC.
1138 * @details This primitive is used for light-weight loose coupling.
1141 S16 cmUnpkSchMacRstHqEntReq ARGS((
1147 * @brief Request from Scheduler to release RNTI at MAC.
1148 * @details This primitive is used for light-weight loose coupling.
1150 S16 cmPkSchMacRlsRntiReq ARGS((
1152 RgInfRlsRnti* rlsRnti
1155 typedef S16 (*RlsRntiReq) ARGS((
1157 RgInfRlsRnti* rlsRnti
1161 * @brief Request from Scheduler to release RNTI at MAC.
1162 * @details The Scheduler calls this primitive to send the list of RNTIs for
1163 * which the RRC Connection is being rejected.
1165 S16 RgSchMacRlsRntiReq ARGS((
1167 RgInfRlsRnti* rlsRnt
1170 * @brief Request from Scheduler to release RNTI at MAC.
1171 * @details This primitive is used for light-weight loose coupling.
1173 S16 cmUnpkSchMacRlsRntiReq ARGS((
1178 /* Added support for SPS*/
1182 * @brief Primitive from MAC to Scheduler to indicate release of UL SPS for a UE
1183 * @details This primitive is used for light-weight loose coupling.
1185 S16 cmPkMacSchSpsRelInd ARGS((
1187 RgInfSpsRelInfo* relInfo
1190 typedef S16 (*SpsRelInd) ARGS((
1192 RgInfSpsRelInfo* relInfo
1196 * @brief Indication from MAC to Scheduler to release UL SPS for a UE
1197 * @details MAC calls this primitive to inform the scheduler that UL SPS needs
1198 * to be released for a UE
1200 S16 RgMacSchSpsRelInd ARGS((Pst *pst, RgInfSpsRelInfo *relInfo));
1202 S16 cmUnpkMacSchSpsRelInd ARGS((
1210 S16 cmPkMacSchL2MeasCfm ARGS((
1212 RgInfL2MeasCfm *measCfm
1215 S16 cmPkMacSchL2MeasStopCfm ARGS((
1217 RgInfL2MeasCfm *measCfm
1221 S16 cmPkSchMacL2MeasReq ARGS((
1223 RgInfL2MeasReq *measInfo
1226 S16 cmPkSchMacL2MeasStopReq ARGS((
1228 RgInfL2MeasStopReq *measInfo
1231 S16 cmPkSchMacL2MeasSendReq ARGS((
1233 RgInfL2MeasSndReq *measInfo
1235 typedef S16 (*L2MeasReq) ARGS((
1237 RgInfL2MeasReq *measInfo
1240 typedef S16 (*L2MeasStopReq) ARGS((
1242 RgInfL2MeasStopReq *measInfo
1245 typedef S16 (*L2MeasSendReq) ARGS((
1247 RgInfL2MeasSndReq *measInfo
1249 typedef S16 (*L2MeasStopCfm) ARGS((
1251 RgInfL2MeasCfm *measCfm
1254 typedef S16 (*L2MeasCfm) ARGS((
1256 RgInfL2MeasCfm *measCfm
1258 S16 cmUnpkMacSchL2MeasCfm ARGS
1264 S16 cmUnpkSchMacL2MeasReq ARGS((
1269 S16 cmUnpkSchMacL2MeasSendReq ARGS((
1274 S16 cmUnpkSchMacL2MeasStopReq ARGS((
1280 S16 cmUnpkMacSchL2MeasStopCfm ARGS((
1286 S16 RgSchMacRlsRnti ARGS((Pst* pst, RgInfRlsRnti* rlsRnti));
1287 S16 RgSchMacRlsHq ARGS((Pst* pst, RgInfRlsHqInfo* sfHqInfo));
1288 S16 RgSchMacSfAlloc ARGS((Pst* pst, RgInfSfAlloc* resAllocReq));
1289 S16 RgSchMacRstHqEnt ARGS((Pst* pst, RgInfResetHqEnt* hqEntInfo));
1290 S16 RgMacSchSfRecp ARGS((Pst* pst, RgInfSfDatInd* datInd));
1291 S16 RgMacSchCmnBoUpdt ARGS(( Pst* pst, RgInfCmnBoRpt* boRpt));
1292 S16 RgMacSchDedBoUpdt ARGS(( Pst* pst, RgInfDedBoRpt* boRpt));
1293 S16 RgSchMacCellReg ARGS((Pst* pst,RgInfCellReg* regReq));
1295 S16 RgSchMacL2Meas ARGS((Pst* pst, RgInfL2MeasReq* l2MeasReq));
1296 S16 RgMacSchL2Meas ARGS((Pst* pst, RgInfL2MeasCfm* l2MeasCfm));
1297 S16 RgSchMacL2MeasStop ARGS((Pst* pst, RgInfL2MeasStopReq *measInfo));
1298 S16 RgSchMacL2MeasSend ARGS((Pst* pst, RgInfL2MeasSndReq *measInfo));
1299 #endif /* LTE_L2_MEAS */
1300 /* Added support for SPS*/
1302 S16 RgSchMacSpsLcReg ARGS((Pst *pst, RgInfSpsLcInfo *lcInfo));
1303 S16 RgSchMacSpsLcDereg ARGS((Pst *pst, CmLteCellId cellId, CmLteRnti
1305 S16 RgMacSchSpsRel ARGS((Pst *pst, RgInfSpsRelInfo* relInfo));
1307 S16 RgMacSchUeDel ARGS((Pst* pst, RgInfUeDelInd* ueDelInd));
1311 #endif /* __GKSCH_X__*/
1313 /**********************************************************************
1316 **********************************************************************/