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 /* Defines APIs exchanged between du_app and cl module of MAC */
23 #define NUM_NUMEROLOGY 5 /* Number of numerology */
24 #define MAX_SI_MESSAGE 32 /* As per 138 331 V15.3, RRC Multiplicity and type constraint definitions maxSI-Message = 32 */
25 #define NUM_SIB 32 /* As per 138 331 V15.3, RRC Multiplicity and type constraint definitions maxSIB = 32 */
26 #define NUM_SSB 1 /* max value is 64 */
27 #define SSB_MASK_SIZE 1 /* SSB mask size is 32bit for sub6 */
28 #define SIB1_REPETITION_PERIOD 20
29 #define CORESET_0_INDEX 0
30 #define CORESET_1_INDEX 1
31 #define CORESET_2_INDEX 2
32 #define CORESET_3_INDEX 3
33 #define CORESET_4_INDEX 4
34 #define SEARCHSPACE_0_INDEX 0
35 #define SEARCHSPACE_1_INDEX 1
36 #define SEARCHSPACE_2_INDEX 2
37 #define SEARCHSPACE_3_INDEX 3
38 #define SEARCHSPACE_4_INDEX 4
39 #define SS_MONITORING_SLOT_SL1 0 /* all slots */
40 #define SS_MONITORING_SYMBOL 0x2000; /* symbol-0, set 14th bit */
42 /* Macro for Ue Context */
43 #define MAX_NUM_SR_CFG_PER_CELL_GRP 8 /* Max number of scheduling request config per cell group */
44 #define MAC_NUM_TAGS 4 /* Max number of timing advance groups */
45 #define MAX_NUM_BWP 4 /* Max number of BWP per serving cell */
46 #define MAX_NUM_CRSET 3 /* Max number of control resource set in add/modify/release list */
47 #define MAX_NUM_SEARCH_SPC 10 /* Max number of search space in add/modify/release list */
48 #define MONITORING_SYMB_WITHIN_SLOT_SIZE 2 /* i.e. 2 bytes because size of monitoring symbols within slot is 14 bits */
49 #define MAX_NUM_DL_ALLOC 16 /* Max number of pdsch time domain downlink allocation */
50 #define MAX_NUM_UL_ALLOC 16 /* Max number of pusch time domain uplink allocation */
51 #define MAX_NUM_SCELL 32
53 /* PUCCH Configuration Macro */
54 #define MAX_NUM_PUCCH_RESRC 128
55 #define MAX_NUM_PUCCH_RESRC_SET 4
56 #define MAX_NUM_PUCCH_PER_RESRC_SET 32
57 #define MAX_NUM_SPATIAL_RELATIONS 8
58 #define MAX_NUM_PUCCH_P0_PER_SET 8
59 #define MAX_NUM_PATH_LOSS_REF_RS 4
60 #define MAX_NUM_DL_DATA_TO_UL_ACK 15
63 #define EVENT_MAC_CELL_CONFIG_REQ 200
64 #define EVENT_MAC_CELL_CONFIG_CFM 201
65 #define EVENT_MAC_CELL_START 202
66 #define EVENT_MAC_CELL_STOP 203
67 #define EVENT_MAC_CELL_UP_IND 204
68 #define EVENT_MAC_STOP_IND 205
69 #define EVENT_MAC_UL_CCCH_IND 206
70 #define EVENT_MAC_DL_CCCH_IND 207
71 #define EVENT_MAC_UE_CREATE_REQ 208
72 #define EVENT_MAC_UE_CREATE_RSP 209
73 #define EVENT_MAC_UE_RECONFIG_REQ 210
74 #define EVENT_MAC_UE_RECONFIG_RSP 211
75 #define EVENT_MAC_UE_DELETE_REQ 212
76 #define EVENT_MAC_UE_DELETE_RSP 213
77 #define EVENT_MAC_CELL_DELETE_REQ 214
78 #define EVENT_MAC_CELL_DELETE_RSP 215
79 #define EVENT_MAC_SLICE_CFG_REQ 216
80 #define EVENT_MAC_SLICE_CFG_RSP 217
81 #define EVENT_MAC_SLICE_RECFG_REQ 218
82 #define EVENT_MAC_SLICE_RECFG_RSP 219
83 #define EVENT_MAC_SLOT_IND 220
84 #define EVENT_MAC_RACH_RESOURCE_REQ 221
85 #define EVENT_MAC_RACH_RESOURCE_RSP 222
86 #define EVENT_MAC_RACH_RESOURCE_REL 223
87 #define EVENT_MAC_DL_PCCH_IND 224
88 #define EVENT_MAC_UE_RESET_REQ 225
89 #define EVENT_MAC_UE_RESET_RSP 226
90 #define EVENT_MAC_UE_SYNC_STATUS_IND 227
91 #define EVENT_MAC_DL_BROADCAST_REQ 228
93 #define BSR_PERIODIC_TIMER_SF_10 10
94 #define BSR_RETX_TIMER_SF_320 320
95 #define BSR_SR_DELAY_TMR_2560 2560
97 #define PAGING_SCHED_DELTA 4
115 SSB_PER_RACH_OCCASION_ONE_EIGHTH,
116 SSB_PER_RACH_OCCASION_ONE_FOURTH,
117 SSB_PER_RACH_OCCASION_ONE_HALF,
118 SSB_PER_RACH_OCCASION_ONE,
119 SSB_PER_RACH_OCCASION_TWO,
120 SSB_PER_RACH_OCCASION_FOUR,
121 SSB_PER_RACH_OCCASION_EIGHT,
122 SSB_PER_RACH_OCCASION_SIXTEEN
177 OUT_OF_SUNC_MAX_RETRIES
188 MAC_GEN_FULL_PBCH_PAYLD, /* MAC generated the full PBCH Payload */
189 PHY_GEN_TIMING_PBCH_BIT, /* PHY generates the timing PBCH bits */
190 PHY_GEN_FULL_PBCH_PAYLD /* PHY generates full PBCH payload */
202 RESTRICTED_SET_TYPE_A,
203 RESTRICTED_SET_TYPE_B
235 /* Enums for Ue Create Request */
237 /* SR PROHIBIT TIMER */
264 TIME_ALIGNMENT_TIMER_MS_500,
265 TIME_ALIGNMENT_TIMER_MS_750,
266 TIME_ALIGNMENT_TIMER_MS_1280,
267 TIME_ALIGNMENT_TIMER_MS_1920,
268 TIME_ALIGNMENT_TIMER_MS_2560,
269 TIME_ALIGNMENT_TIMER_MS_5120,
270 TIME_ALIGNMENT_TIMER_MS_10240,
271 TIME_ALIGNMENT_TIMER_INFINITY
276 PHR_PERIODIC_TIMER_SF_10,
277 PHR_PERIODIC_TIMER_SF_20,
278 PHR_PERIODIC_TIMER_SF_50,
279 PHR_PERIODIC_TIMER_SF_100,
280 PHR_PERIODIC_TIMER_SF_200,
281 PHR_PERIODIC_TIMER_SF_500,
282 PHR_PERIODIC_TIMER_SF_1000,
283 PHR_PERIODIC_TIMER_INFINITY
288 PHR_PROHIBIT_TIMER_SF_0,
289 PHR_PROHIBIT_TIMER_SF_10,
290 PHR_PROHIBIT_TIMER_SF_20,
291 PHR_PROHIBIT_TIMER_SF_50,
292 PHR_PROHIBIT_TIMER_SF_100,
293 PHR_PROHIBIT_TIMER_SF_200,
294 PHR_PROHIBIT_TIMER_SF_500,
295 PHR_PROHIBIT_TIMER_SF_1000
300 PHR_TX_PWR_FACTOR_CHANGE_DB_1,
301 PHR_TX_PWR_FACTOR_CHANGE_DB_3,
302 PHR_TX_PWR_FACTOR_CHANGE_DB_6,
303 PHR_TX_PWR_FACTOR_CHANGE_INFINITY
304 }PhrTxPwrFactorChange;
308 PHR_MODE_OTHER_CG_REAL,
309 PHR_MODE_OTHER_CG_VIRTUAL
314 PDSCH_HARQ_ACK_CODEBOOK_SEMISTATIC,
315 PDSCH_HARQ_ACK_CODEBOOK_DYNAMIC
316 }PdschHarqAckCodebook;
320 NUM_HARQ_PROC_FOR_PDSCH_N_2,
321 NUM_HARQ_PROC_FOR_PDSCH_N_4,
322 NUM_HARQ_PROC_FOR_PDSCH_N_6,
323 NUM_HARQ_PROC_FOR_PDSCH_N_10,
324 NUM_HARQ_PROC_FOR_PDSCH_N_16
325 }NumHarqProcForPdsch;
329 MAX_CODE_BLOCK_GROUP_PER_TB_N_2,
330 MAX_CODE_BLOCK_GROUP_PER_TB_N_4,
331 MAX_CODE_BLOCK_GROUP_PER_TB_N_6,
332 MAX_CODE_BLOCK_GROUP_PER_TB_N_8
344 TRANSFORM_PRECODER_ENABLED,
345 TRANSFORM_PRECODER_DISABLED
350 CCE_REG_MAPPINGTYPE_PR_INTERLEAVED = 1,
351 CCE_REG_MAPPINGTYPE_PR_NONINTERLEAVED
356 SLOTPERIODICITYANDOFFSET_PR_SL1 = 1,
357 SLOTPERIODICITYANDOFFSET_PR_SL2,
358 SLOTPERIODICITYANDOFFSET_PR_SL4,
359 SLOTPERIODICITYANDOFFSET_PR_SL5,
360 SLOTPERIODICITYANDOFFSET_PR_SL8,
361 SLOTPERIODICITYANDOFFSET_PR_SL10,
362 SLOTPERIODICITYANDOFFSET_PR_SL16,
363 SLOTPERIODICITYANDOFFSET_PR_SL20,
364 SLOTPERIODICITYANDOFFSET_PR_SL40,
365 SLOTPERIODICITYANDOFFSET_PR_SL80,
366 SLOTPERIODICITYANDOFFSET_PR_SL160,
367 SLOTPERIODICITYANDOFFSET_PR_SL320,
368 SLOTPERIODICITYANDOFFSET_PR_SL640,
369 SLOTPERIODICITYANDOFFSET_PR_SL1280,
370 SLOTPERIODICITYANDOFFSET_PR_SL2560
371 }MSlotPeriodAndOffset;
381 SEARCHSPACETYPE_PR_COMMON = 1,
382 SEARCHSPACETYPE_PR_UE_SPECIFIC
393 AGGREGATIONLEVEL_N0 = 0,
394 AGGREGATIONLEVEL_N1 = 1,
395 AGGREGATIONLEVEL_N2 = 2,
396 AGGREGATIONLEVEL_N3 = 3,
397 AGGREGATIONLEVEL_N4 = 4,
398 AGGREGATIONLEVEL_N5 = 5,
399 AGGREGATIONLEVEL_N6 = 6,
400 AGGREGATIONLEVEL_N8 = 7
405 ADDITIONALPOSITION_POS0,
406 ADDITIONALPOSITION_POS1,
407 ADDITIONALPOSITION_POS3
418 RESOURCEALLOCATION_TYPE0,
419 RESOURCEALLOCATION_TYPE1,
420 RESOURCEALLOCATION_DYNAMICSWITCH
431 CODEWORDS_SCHED_BY_DCI_N1,
432 CODEWORDS_SCHED_BY_DCI_N2
437 TYPE_STATIC_BUNDLING = 1,
438 TYPE_DYNAMIC_BUNDLING
451 SET1_SIZE_N2_WIDEBAND,
452 SET1_SIZE_N4_WIDEBAND
506 TRANSPORT_LAYER_FAIL,
513 UNSPECIFIED_RADIO_NW_CAUSE,
515 UNKNOWN_GNB_CU_UE_F1AP_ID,
516 ALREADY_ALLOCATED_GNB_CU_UE_F1AP_ID,
517 UNKNOWN_GNB_DU_UE_F1AP_ID,
518 ALREADY_ALLOCATED_GNB_DU_UE_F1AP_ID,
519 UNKNOWN_UE_F1AP_ID_PAIR,
520 INCONSISTENT_UE_F1AP_ID_PAIR,
521 INTERACTION_WITH_OTHER_PROCEDURE,
523 ACTION_REQUIRED_FOR_RADIO_REASONS,
524 RADIO_RESOURCES_UNAVAILABLE,
530 RESOURCES_UNAVAILABLE_FOR_SLICE
535 UNSPECIFIED_TRANSPORT_LAYER_CAUSE,
536 TRANSPORT_RESOURCE_UNAVAILABLE
541 TRANSFER_SYNTAX_ERROR,
542 ABSTRACT_SYNTAX_ERROR_REJECT,
543 ABSTRACT_SYNTAX_ERROR_IGNORE_AND_REJECT,
544 INCOMPATIBLE_MESSAGE_FOR_RECEIVER_STATE,
546 ABSTRAXCT_SYNTAX_ERROR_FALSELY_CONSTRUCTED_MSG,
547 UNSPECIFIED_PROTOCOL_CAUSE
552 CONTROL_PROCESSING_OVERLOAD,
554 PLANE_PROCESSING_RESOURCES,
556 INTERVENTION_BY_O_AND_M,
557 UNSPECIFIED_MISC_CAUSE
564 MCS_TABLE_QAM64_LOW_SE
571 RSRC_RRC_CONNECTED_USERS
576 TRANSMISSION_ALLOWED,
579 }DataTransmissionAction;
581 typedef struct failureCause
586 RadioNwLyrCause radioNwResult;
587 TransLyrCause transportResult;
588 ProtCause protcolResult;
589 MiscFailCause miscResult;
593 typedef struct carrierCfg
595 uint32_t dlBw; /* DL bandwidth */
596 uint32_t dlFreq; /* Absolute frequency of DL point A in KHz */
597 uint32_t ulBw; /* UL bandwidth */
598 uint32_t ulFreq; /* Absolute frequency of UL point A in KHz */
599 uint16_t numTxAnt; /* Number of Tx antennas */
600 uint16_t numRxAnt; /* Number of Rx antennas */
623 /*Spec Ref: 38.331: RadioLinkMonitoringConfig*/
629 }PurposeOfFailureDet;
631 typedef struct plmnInfoList
634 uint8_t numSupportedSlice; /* Total slice supporting */
635 Snssai **snssai; /* List of supporting snssai*/
638 typedef struct schPageCfg
640 uint8_t numPO; /*Derived from Ns*/
641 bool poPresent; /*Whether FirstPDCCH-MonitoringPO is present or not*/
642 uint16_t pagingOcc[MAX_PO_PER_PF]; /*FirstPDCCH-Monitoring Paging Occasion*/
645 typedef struct pdcchConfigSib1
647 uint8_t coresetZeroIndex; /* derived from 4 LSB of pdcchSib1 present in MIB */
648 uint8_t searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */
651 typedef struct sib1CellCfg
653 PdcchConfigSib1 pdcchCfgSib1; /*Freq pos where UE may find SS/PBCH block with SIB1*/
656 SchPageCfg pagingCfg;
659 typedef struct bwpParams
664 uint8_t cyclicPrefix;
667 typedef struct candidatesInfo
676 typedef struct searchSpaceCfg
678 uint8_t searchSpaceId;
680 uint16_t monitoringSlot;
682 uint16_t monitoringSymbol;
683 CandidatesInfo candidate;
686 typedef struct pdcchConfigCommon
688 /* only one search space is configured during SIB1 */
689 SearchSpaceCfg commonSearchSpace;
690 uint8_t raSearchSpaceId;
693 typedef struct pdschCfgCommTimeDomRsrcAlloc
698 uint8_t lengthSymbol;
699 }PdschCfgCommTimeDomRsrcAlloc;
701 typedef struct pdschConfigCommon
703 uint8_t numTimeDomAlloc;
704 /* PDSCH time domain DL resource allocation list */
705 PdschCfgCommTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_DL_ALLOC];
708 typedef struct pucchConfigCommon
710 uint8_t pucchResourceCommon;
711 uint8_t pucchGroupHopping;
714 /* PUSCH Time Domain Resource Allocation */
715 typedef struct puschTimeDomRsrcAlloc
718 CommonMappingType mappingType;
720 uint8_t symbolLength;
721 uint8_t startSymbolAndLength;
722 }PuschTimeDomRsrcAlloc;
724 typedef struct puschConfigCommon
726 /* PUSCH-TimeDomainResourceAllocation info */
727 uint8_t numTimeDomRsrcAlloc;
728 PuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
731 typedef struct bwpDlConfig
734 PdcchConfigCommon pdcchCommon;
735 PdschConfigCommon pdschCommon;
738 typedef struct bwpUlConfig
741 // rach config common sent in PrachCfg
742 PucchConfigCommon pucchCommon;
743 PuschConfigCommon puschCommon;
747 typedef struct cellCfg
750 MacAdminState adminState;
751 MacCellState cellState;
752 PlmnInfoList plmnInfoList[MAX_PLMN]; /* Consits of PlmnId and Snssai list */
753 uint32_t phyCellId; /* Physical cell id */
756 uint16_t subCarrSpacing;
757 DuplexMode dupType; /* Duplex type: TDD/FDD */
758 Sib1CellCfg sib1Cfg; /* SIB1 config */
759 BwpDlConfig initialDlBwp; /* Initial DL BWP */
760 BwpUlConfig initialUlBwp; /* Initial UL BWP */
763 typedef struct ssbCfg
765 uint32_t ssbPbchPwr; /* SSB block power */
766 uint8_t scsCmn; /* subcarrier spacing for common */
767 uint16_t ssbOffsetPointA; /* SSB subcarrier offset from point A */
768 SSBPeriod ssbPeriod; /* SSB Periodicity in msec */
769 uint8_t ssbScOffset; /* Subcarrier Offset */
770 uint32_t ssbMask[SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */
771 uint8_t beamId[NUM_SSB];
773 BchPduOpt bchPayloadFlag; /* Options for generation of payload */
774 uint8_t mibPdu[3]; /* MIB payload */
775 uint8_t dmrsTypeAPos; /* DMRS Type A position */
778 typedef struct fdmInfo
780 uint16_t rootSeqIdx; /* Root sequence index */
781 uint8_t numRootSeq; /* Number of root sequences required for FD */
782 uint16_t k1; /* Frequency Offset for each FD */
783 uint8_t zeroCorrZoneCfg; /* Zero correlation zone cofig */
786 typedef struct prachCfg
788 PrachSeqLen prachSeqLen; /* RACH Sequence length: Long/short */
789 uint8_t prachSubcSpacing; /* Subcarrier spacing of RACH */
790 uint8_t msg1Fdm; /* Number of RACH frequency domain occasions/ PRACH FDM (1,2,4,8) */
791 uint8_t prachCfgIdx; /* PRACH Cfg Index */
792 PrachFdmInfo fdm[8]; /* FDM info */
793 RstSetCfg prachRstSetCfg; /* PRACH restricted set config */
794 uint8_t ssbPerRach; /* SSB per RACH occassion */
795 uint8_t totalNumRaPreamble; /* Total number of RA preambles */
796 uint8_t numCbPreamblePerSsb; /* Number of CB preamble per SSB */
797 uint16_t msg1FreqStart; /* Msg1-FrequencyStart */
798 uint8_t raContResTmr; /* RA Contention Resoultion Timer */
799 uint8_t rsrpThreshSsb; /* RSRP Threshold SSB */
800 uint8_t raRspWindow; /* RA Response Window */
804 /* The following list of structures is taken from the DRX-Config section of specification 33.331. */
805 typedef struct drxOnDurationTimer
807 bool onDurationTimerValInMs;
810 uint8_t subMilliSeconds;
811 uint16_t milliSeconds;
812 }onDurationtimerValue;
815 typedef struct drxLongCycleStartOffset
817 uint16_t drxLongCycleStartOffsetChoice;
818 uint16_t drxLongCycleStartOffsetVal;
819 }DrxLongCycleStartOffset;
821 typedef struct shortDrx
823 uint16_t drxShortCycle;
824 uint8_t drxShortCycleTimer;
827 typedef struct drxCfg
829 DrxOnDurationTimer drxOnDurationTimer;
830 uint16_t drxInactivityTimer;
831 uint8_t drxHarqRttTimerDl;
832 uint8_t drxHarqRttTimerUl;
833 uint16_t drxRetransmissionTimerDl;
834 uint16_t drxRetransmissionTimerUl;
835 DrxLongCycleStartOffset drxLongCycleStartOffset;
838 uint8_t drxSlotOffset;
842 typedef struct precodingConf
845 uint16_t numAntPorts;
848 typedef struct beamformingConf
854 uint32_t beamAzimuth;
856 uint32_t beamHorizWidth;
857 uint32_t beamVertWidth;
858 uint32_t coverageShape;
859 uint32_t digitalTilt;
860 uint32_t digitalAzimuth;
863 typedef struct csiRsCfg
865 uint8_t *csiFreqDomainAlloc;
866 uint8_t csiNrofPorts;
867 uint8_t csirsfirstOFDMSymbolInTimeDomain;
868 uint8_t csirsfirstOFDMSymbolInTimeDomain2;
869 uint8_t csirscdmType;
870 uint8_t csirsdensity;
871 uint8_t csirsdensitydot5;
872 uint8_t powerControlOffset;
873 uint8_t powerControlOffsetSS;
874 uint16_t periodicityAndOffset;
877 typedef struct macCellCfg
879 uint16_t cellId; /* Cell Id */
880 CarrierCfg carrCfg; /* Carrier configuration */
881 CellCfg cellCfg; /* Cell Configuration*/
882 SsbCfg ssbCfg; /* SSB configuration */
883 CsiRsCfg csiRsCfg; /*Reference: 38.331 CSI-MeasConfig*/
884 PrachCfg prachCfg; /* PRACH Configuration */
886 TDDCfg tddCfg; /* TDD periodicity and slot configuration */
888 PrecodingConf precodingConf;
889 BeamformingConf beamCfg;
892 typedef struct macCellCfgCfm
898 typedef struct ulCcchInd
902 uint16_t ulCcchMsgLen;
906 typedef struct dlCcchInd
910 DlCcchMsgType msgType;
911 uint16_t dlCcchMsgLen;
915 typedef struct bsrTmrCfg
917 uint16_t periodicTimer;
919 uint16_t srDelayTimer;
923 /* Info of Scheduling Request to Add/Modify */
924 typedef struct schedReqInfo
927 SrProhibitTimer srProhibitTmr;
928 SrTransMax srTransMax;
931 /* Scheduling Request Configuration */
932 typedef struct schedReqCfg
934 uint8_t addModListCount;
935 SchedReqInfo addModList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* List of Scheduling req to be added/modified */
936 uint8_t relListCount;
937 uint8_t relList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* list of scheduling request Id to be deleted */
940 typedef struct tagInfo
943 TimeAlignmentTimer timeAlignTimer;
946 typedef struct tagCfg
948 uint8_t addModListCount;
949 TagInfo addModList[MAC_NUM_TAGS]; /* List of Tag to Add/Modify */
950 uint8_t relListCount;
951 uint8_t relList[MAC_NUM_TAGS]; /* list of Tag Id to release */
954 typedef struct phrCfg
956 PhrPeriodicTimer periodicTimer;
957 PhrProhibitTimer prohibitTimer;
958 PhrTxPwrFactorChange txPowerFactor;
961 bool phrType2OtherCell;
962 PhrModeOtherCG phrOtherCG;
965 typedef struct macCellGrpCfg
967 SchedReqCfg schReqCfg;
970 bool phrCfgSetupPres; /* true/false: phrCfgSetup/phrCfgRelease */
978 typedef struct phyCellGrpCfg
980 PdschHarqAckCodebook pdschHarqAckCodebook;
984 /* Control resource set info */
985 typedef struct controlRsrcSet
987 uint8_t cRSetId; /* Control resource set id */
988 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
990 REGMappingType cceRegMappingType;
991 PrecoderGranul precoderGranularity;
992 uint16_t dmrsScramblingId;
995 /* Search Space info */
996 typedef struct searchSpace
998 uint8_t searchSpaceId;
1000 MSlotPeriodAndOffset mSlotPeriodicityAndOffset;
1001 uint8_t mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
1002 AggrLevel numCandidatesAggLevel1; /* Number of candidates for aggregation level 1 */
1003 AggrLevel numCandidatesAggLevel2; /* Number of candidates for aggregation level 2 */
1004 AggrLevel numCandidatesAggLevel4; /* Number of candidates for aggregation level 4 */
1005 AggrLevel numCandidatesAggLevel8; /* Number of candidates for aggregation level 8 */
1006 AggrLevel numCandidatesAggLevel16; /* Number of candidates for aggregation level 16 */
1007 SearchSpaceType searchSpaceType;
1008 uint8_t ueSpecificDciFormat;
1011 /* PDCCH cofniguration */
1012 typedef struct pdcchConfig
1014 uint8_t numCRsetToAddMod;
1015 ControlRsrcSet cRSetToAddModList[MAX_NUM_CRSET]; /* List of control resource set to add/modify */
1016 uint8_t numCRsetToRel;
1017 uint8_t cRSetToRelList[MAX_NUM_CRSET]; /* List of control resource set to release */
1018 uint8_t numSearchSpcToAddMod;
1019 SearchSpace searchSpcToAddModList[MAX_NUM_SEARCH_SPC]; /* List of search space to add/modify */
1020 uint8_t numSearchSpcToRel;
1021 uint8_t searchSpcToRelList[MAX_NUM_SEARCH_SPC]; /* List of search space to release */
1024 /* PDSCH time domain resource allocation */
1025 typedef struct pdschTimeDomRsrcAlloc
1028 CommonMappingType mappingType;
1029 uint8_t startSymbol;
1030 uint8_t symbolLength;
1031 uint8_t startSymbolAndLength;
1032 }PdschTimeDomRsrcAlloc;
1035 typedef struct pdschBundling
1037 struct staticBundling
1039 BundlingSizeSet2 size;
1041 struct dynamicBundling
1043 BundlingSizeSet1 sizeSet1;
1044 BundlingSizeSet2 sizeSet2;
1048 /* DMRS downlink configuration */
1049 typedef struct dmrsDlCfg
1051 AddPosType addPos; /* DMRS additional position */
1054 /* PDSCH Configuration */
1055 typedef struct pdschConfig
1057 DmrsDlCfg dmrsDlCfgForPdschMapTypeA;
1058 ResAllocType resourceAllocType;
1059 uint8_t numTimeDomRsrcAlloc;
1060 PdschTimeDomRsrcAlloc timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
1062 CodeWordsSchedDci numCodeWordsSchByDci; /* Number of code words scheduled by DCI */
1063 BundlingType bundlingType;
1064 PdschBundling bundlingInfo;
1067 /* Initial Downlink BWP */
1068 typedef struct initialDlBwp
1071 PdcchConfig pdcchCfg;
1073 PdschConfig pdschCfg;
1076 /*Spec 38.331 "SPS-Config'*/
1077 typedef struct spsConfig
1079 uint16_t periodicity;
1080 uint8_t numOfHqProcess;
1085 typedef uint8_t RadioLinkMonitoringRsId;
1087 typedef struct radioLinkMonRS
1089 RadioLinkMonitoringRsId radioLinkMonitoringRsId;
1090 PurposeOfFailureDet purpose;
1094 uint8_t nzpCsiRsResId;
1098 typedef struct radioLinkConfig
1100 RadioLinkMonRS failurDetResAddModList[1];
1101 RadioLinkMonitoringRsId failurDetResRelList[1];
1102 uint8_t beamFailureInstanceMaxCount;
1103 uint8_t beamFailureDetectionTimer;
1106 /* Spec 38.331, 'BWP-DownlinkDedicated'*/
1107 typedef struct bwpDlCfgDed
1109 PdcchConfig pdcchCfgDed;
1110 PdschConfig pdschCfgDed;
1111 SpsConfig spsCfgDed;
1112 RadioLinkConfig radioLnkMonCfgDed;
1115 /* Downlink BWP information */
1116 typedef struct dlBwpInfo
1119 BwpDlConfig bwpCommon;
1120 BwpDlCfgDed bwpDedicated;
1123 /* PDCCH Serving Cell configuration */
1124 typedef struct pdschServCellCfg
1126 uint8_t *maxMimoLayers;
1127 NumHarqProcForPdsch numHarqProcForPdsch;
1128 MaxCodeBlkGrpPerTB *maxCodeBlkGrpPerTb;
1129 bool *codeBlkGrpFlushInd;
1130 PdschXOverhead *xOverhead;
1133 /* PUCCH Configuration */
1135 typedef struct pucchResrcSetInfo
1138 uint8_t resrcListCount;
1139 uint8_t resrcList[MAX_NUM_PUCCH_PER_RESRC_SET];
1140 uint8_t maxPayLoadSize;
1143 typedef struct pucchResrcSetCfg
1145 uint8_t resrcSetToAddModListCount;
1146 PucchResrcSetInfo resrcSetToAddModList[MAX_NUM_PUCCH_RESRC_SET];
1147 uint8_t resrcSetToRelListCount;
1148 uint8_t resrcSetToRelList[MAX_NUM_PUCCH_RESRC];
1151 typedef struct pucchFormat0
1153 uint8_t initialCyclicShift;
1155 uint8_t startSymbolIdx;
1158 typedef struct pucchFormat1
1160 uint8_t initialCyclicShift;
1162 uint8_t startSymbolIdx;
1166 typedef struct pucchFormat2_3
1170 uint8_t startSymbolIdx;
1173 typedef struct pucchFormat4
1178 uint8_t startSymbolIdx;
1181 typedef struct pucchResrcInfo
1185 uint8_t intraFreqHop;
1186 uint16_t secondPrbHop;
1187 uint8_t pucchFormat;
1190 PucchFormat0 *format0;
1191 PucchFormat1 *format1;
1192 PucchFormat2_3 *format2;
1193 PucchFormat2_3 *format3;
1194 PucchFormat4 *format4;
1198 typedef struct pucchResrcCfg
1200 uint8_t resrcToAddModListCount;
1201 PucchResrcInfo resrcToAddModList[MAX_NUM_PUCCH_RESRC];
1202 uint8_t resrcToRelListCount;
1203 uint8_t resrcToRelList[MAX_NUM_PUCCH_RESRC];
1206 typedef struct pucchFormatCfg
1208 bool interSlotFreqHop;
1210 uint8_t maxCodeRate;
1216 typedef struct schedReqResrcInfo
1220 uint8_t periodicity;
1225 typedef struct pucchSchedReqCfg
1227 uint8_t schedAddModListCount;
1228 SchedReqResrcInfo schedAddModList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1229 uint8_t schedRelListCount;
1230 uint8_t schedRelList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1233 typedef struct spatialRelationInfo
1235 uint8_t spatialRelationId;
1236 uint8_t servCellIdx;
1237 uint8_t pathLossRefRSId;
1239 uint8_t closeLoopIdx;
1240 }SpatialRelationInfo;
1242 typedef struct pucchSpatialCfg
1244 uint8_t spatialAddModListCount;
1245 SpatialRelationInfo spatialAddModList[MAX_NUM_SPATIAL_RELATIONS];
1246 uint8_t spatialRelListCount;
1247 uint8_t spatialRelList[MAX_NUM_SPATIAL_RELATIONS];
1250 typedef struct p0PucchCfg
1256 typedef struct pathLossRefRSCfg
1258 uint8_t pathLossRefRSId;
1261 typedef struct pucchMultiCsiCfg
1263 uint8_t multiCsiResrcListCount;
1264 uint8_t multiCsiResrcList[MAX_NUM_PUCCH_RESRC-1];
1267 typedef struct pucchDlDataToUlAck
1269 uint8_t dlDataToUlAckListCount;
1270 uint8_t dlDataToUlAckList[MAX_NUM_DL_DATA_TO_UL_ACK];
1271 }PucchDlDataToUlAck;
1273 typedef struct pucchPowerControl
1281 P0PucchCfg p0Set[MAX_NUM_PUCCH_P0_PER_SET];
1282 uint8_t pathLossRefRSListCount;
1283 PathLossRefRSCfg pathLossRefRSList[MAX_NUM_PATH_LOSS_REF_RS];
1286 typedef struct pucchCfg
1288 PucchResrcSetCfg *resrcSet;
1289 PucchResrcCfg *resrc;
1290 PucchFormatCfg *format1;
1291 PucchFormatCfg *format2;
1292 PucchFormatCfg *format3;
1293 PucchFormatCfg *format4;
1294 PucchSchedReqCfg *schedReq;
1295 PucchMultiCsiCfg *multiCsiCfg;
1296 PucchSpatialCfg *spatialInfo;
1297 PucchDlDataToUlAck *dlDataToUlAck;
1298 PucchPowerControl *powerControl;
1301 /* Transform precoding disabled */
1302 typedef struct transPrecodDisabled
1304 uint16_t scramblingId0;
1305 }TransPrecodDisabled;
1307 /* DMRS Uplink configuration */
1308 typedef struct dmrsUlCfg
1310 AddPosType addPos; /* DMRS additional position */
1311 TransPrecodDisabled transPrecodDisabled; /* Transform precoding disabled */
1314 /* PUSCH Configuration */
1315 typedef struct puschCfg
1317 uint8_t dataScramblingId;
1318 DmrsUlCfg dmrsUlCfgForPuschMapTypeA;
1319 ResAllocType resourceAllocType;
1320 uint8_t numTimeDomRsrcAlloc;
1321 PuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
1322 TransformPrecoder transformPrecoder;
1325 /* Initial Uplink BWP */
1326 typedef struct initialUlBwp
1334 typedef struct bwpUlCfgDed
1340 /* Uplink BWP information */
1341 typedef struct ulBwpInfo
1344 BwpUlConfig bwpCommon;
1348 typedef struct rachCfgGeneric
1350 uint8_t prachCfgIdx; /* PRACH config idx */
1351 uint8_t msg1Fdm; /* PRACH FDM (1,2,4,8) */
1352 uint16_t msg1FreqStart; /* Msg1-FrequencyStart */
1353 uint8_t zeroCorrZoneCfg; /* Zero correlation zone cofig */
1354 int16_t preambleRcvdTargetPower; /*Prach Target power received*/
1355 uint8_t preambleTransMax; /*Preamble Transmission Max power*/
1356 uint8_t pwrRampingStep; /*Power Ramping Step*/
1357 uint8_t raRspWindow; /* RA Response Window */
1360 typedef struct raPrioritization
1362 uint8_t powerRampingStepHighPriority;
1363 uint8_t scalingFactorBI;
1366 typedef struct bfrCsiRsRes
1370 uint8_t raPreambleIndex;
1373 typedef struct bfrSsbRes
1376 uint8_t raPreambleIndex;
1379 typedef struct prachResDedBfr
1385 /*Spec 38.331 'BeamFailureRecoveryConfig' */
1386 typedef struct beamFailRecoveryCfg
1388 uint8_t rootSeqIndexBfr;
1389 RachCfgGeneric rachCfgBfr;
1390 uint8_t rsrpThreshSsbBfr;
1391 PrachResDedBfr candidteBeamRSList;
1392 uint8_t ssbPerachBfr;
1393 uint8_t raSsbOccMaskIndex;
1394 uint8_t recoverySearchSpaceId;
1395 RaPrioritization raPrioBfr;
1397 uint8_t msg1SubcSpacing;
1398 }BeamFailRecoveryCfg;
1400 /* Serving cell configuration */
1401 typedef struct servCellCfgInfo
1403 InitialDlBwp initDlBwp;
1404 RadioLinkConfig radioLinkMonConfig;
1405 uint8_t numDlBwpToAdd;
1406 DlBwpInfo dlBwpToAddList[MAX_NUM_BWP];
1407 uint8_t firstActvDlBwpId;
1408 uint8_t defaultDlBwpId;
1409 uint8_t *bwpInactivityTmr;
1410 PdschServCellCfg pdschServCellCfg;
1411 InitialUlBwp initUlBwp;
1412 BeamFailRecoveryCfg beamFailureRecoveryCfg;
1413 uint8_t numUlBwpToAdd;
1414 UlBwpInfo ulBwpToAddList[MAX_NUM_BWP];
1415 uint8_t firstActvUlBwpId;
1418 /* Special cell configuration */
1419 typedef struct spCellCfg
1421 uint8_t servCellIdx;
1422 ServCellCfgInfo servCellCfg;
1425 typedef struct bwpRelInfo
1430 /* Serving cell Re-configuration */
1431 typedef struct servCellRecfgInfo
1433 InitialDlBwp initDlBwp;
1434 RadioLinkConfig radioLinkMonConfig;
1435 uint8_t numDlBwpToAddOrMod;
1436 DlBwpInfo dlBwpToAddOrModList[MAX_NUM_BWP];
1437 uint8_t numDlBwpToRel;
1438 BwpRelInfo dlBwpToRelList[MAX_NUM_BWP];
1439 uint8_t firstActvDlBwpId;
1440 uint8_t defaultDlBwpId;
1441 uint8_t *bwpInactivityTmr;
1442 PdschServCellCfg pdschServCellCfg;
1443 InitialUlBwp initUlBwp;
1444 uint8_t numUlBwpToAddOrMod;
1445 UlBwpInfo ulBwpToAddOrModList[MAX_NUM_BWP];
1446 uint8_t numUlBwpToRel;
1447 BwpRelInfo ulBwpToRelList[MAX_NUM_BWP];
1448 uint8_t firstActvUlBwpId;
1451 /* Special cell Re-configuration */
1452 typedef struct spCellRecfg
1454 uint8_t servCellIdx;
1455 ServCellRecfgInfo servCellCfg;
1458 typedef struct ambrCfg
1460 uint32_t ulBr; /* UL Bit rate */
1463 typedef struct nonDynFiveQi
1468 uint16_t maxDataBurstVol;
1471 typedef struct dynFiveQi
1474 uint16_t packetDelayBudget;
1475 uint8_t packetErrRateScalar;
1476 uint8_t packetErrRateExp;
1478 uint8_t delayCritical;
1480 uint16_t maxDataBurstVol;
1483 typedef struct ngRanAllocAndRetPri
1485 uint8_t priorityLevel;
1486 uint8_t preEmptionCap;
1487 uint8_t preEmptionVul;
1488 }NgRanAllocAndRetPri;
1490 typedef struct grbQosInfo
1492 uint32_t maxFlowBitRateDl;
1493 uint32_t maxFlowBitRateUl;
1494 uint32_t guarFlowBitRateDl;
1495 uint32_t guarFlowBitRateUl;
1498 typedef struct drbQos
1500 QosType fiveQiType; /* Dynamic or non-dynamic */
1503 NonDynFiveQi nonDyn5Qi;
1506 NgRanAllocAndRetPri ngRanRetPri;
1507 GrbQosInfo grbQosInfo;
1508 uint16_t pduSessionId;
1509 uint32_t ulPduSessAggMaxBitRate;
1512 typedef struct ulLcCfg
1517 PBitRate pbr; // prioritisedBitRate
1518 BucketSizeDur bsd; // bucketSizeDuration
1521 typedef struct dlLcCfg
1523 LcPriority lcp; // logical Channel Prioritization
1526 typedef struct lcCfg
1536 typedef struct modulationInfo
1538 uint8_t modOrder; /* Modulation order */
1539 uint8_t mcsIndex; /* MCS Index */
1540 McsTable mcsTable; /* MCS table */
1543 typedef struct macUeCreateReq
1549 bool macCellGrpCfgPres;
1550 MacCellGrpCfg macCellGrpCfg;
1551 bool phyCellGrpCfgPres;
1552 PhyCellGrpCfg phyCellGrpCfg;
1554 SpCellCfg spCellCfg;
1556 ModulationInfo dlModInfo; /* DL modulation info */
1557 ModulationInfo ulModInfo; /* UL modulation info */
1559 LcCfg lcCfgList[MAX_NUM_LC];
1562 /* UE Re-configuration */
1563 typedef struct macUeRecfg
1569 bool macCellGrpRecfgPres;
1570 MacCellGrpCfg macCellGrpRecfg;
1571 bool phyCellGrpRecfgPres;
1572 PhyCellGrpCfg phyCellGrpRecfg;
1573 bool spCellRecfgPres;
1574 SpCellRecfg spCellRecfg;
1576 ModulationInfo dlModInfo;
1577 ModulationInfo ulModInfo;
1578 uint8_t numLcsToAdd;
1579 LcCfg lcCfgAdd[MAX_NUM_LC];
1580 uint8_t numLcsToDel;
1581 uint8_t lcIdToDel[MAX_NUM_LC];
1582 uint8_t numLcsToMod;
1583 LcCfg lcCfgMod[MAX_NUM_LC];
1584 DataTransmissionAction transmissionAction;
1586 bool drxConfigIndicatorRelease;
1590 typedef struct nrcgi
1596 typedef struct srbFailInfo
1602 typedef struct drbFailInfo
1608 typedef struct sCellFailInfo
1614 typedef struct macUeCreateRsp
1619 uint8_t numSRBFailed; /* valid values : 0 to MAX_NUM_SRB */
1620 SRBFailInfo *failedSRBlisti;
1621 uint8_t numDRBFailed; /* valid values : 0 to MAX_NUM_DRB */
1622 DRBFailInfo *failedDRBlist;
1623 uint8_t numSCellFailed; /* valid values : 0 to MAX_NUM_SCELL */
1624 SCellFailInfo *failedSCellList;
1625 uint8_t numDRBModFailed; /* valid values : 0 to MAX_NUM_DRB */
1626 DRBFailInfo *failedDRBModlist;
1629 typedef struct macUeCreateRsp MacUeRecfgRsp;
1631 typedef struct rachRsrcReq
1636 uint8_t ssbIdx[MAX_NUM_SSB];
1639 typedef struct macCfraSsbResource
1642 uint8_t raPreambleIdx;
1643 }MacCfraSsbResource;
1645 typedef struct macCfraResource
1648 MacCfraSsbResource ssbResource[MAX_NUM_SSB];
1651 typedef struct macRachRsrcRsp
1656 uint16_t newCrnti; /* This parameter maps to 3GPP TS 38.331 newUE-Identity */
1657 MacCfraResource cfraResource;
1660 typedef struct macRachRsrcRel
1667 typedef struct ueDelete
1674 typedef struct ueDeleteRsp
1678 CauseOfResult status;
1681 typedef struct macCellDeleteReq
1686 typedef struct macCellDeleteRsp
1689 CauseOfResult status;
1692 typedef struct macSliceCfgRsp
1696 CauseOfResult cause;
1699 typedef struct rrmPolicyRatio
1703 uint8_t dedicatedRatio;
1706 typedef struct rrmPolicyMemberList
1710 }RrmPolicyMemberList;
1712 typedef struct macSliceRrmPolicy
1714 ResourceType resourceType;
1715 uint8_t numOfRrmPolicyMem;
1716 RrmPolicyMemberList **rRMPolicyMemberList;
1717 RrmPolicyRatio policyRatio;
1720 typedef struct macSliceCfgReq
1722 uint8_t numOfRrmPolicy;
1723 MacSliceRrmPolicy **listOfRrmPolicy;
1726 /*As per ORAN-WG8, Slice Cfg and ReCfg are same structures*/
1727 typedef struct macSliceCfgReq MacSliceRecfgReq;
1728 typedef struct macSliceCfgRsp MacSliceRecfgRsp;
1730 /* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.17 DL PCCH Indication */
1731 typedef struct dlPcchInd
1741 /* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.1 Cell Start */
1742 typedef struct cellInfo
1744 SlotTimingInfo slotInfo;
1748 typedef struct cellInfo CellStartInfo;
1749 typedef struct cellInfo CellStopInfo;
1751 /* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.12 UE Reset Request */
1752 typedef struct ueReset
1758 /* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.13 UE Reset Response */
1759 typedef struct ueResetRsp
1763 CauseOfResult status;
1766 /* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.14 UE Sync Status Indication */
1767 typedef struct ueSyncStatusInd
1772 }MacUeSyncStatusInd;
1774 /* The following list of structures is taken from the SI-SchedulingInfo section of specification 33.331. */
1775 typedef struct sibTypeInfo
1782 typedef struct sibMappingInfo
1784 uint8_t numSibTypeInfo;
1785 SibTypeInfo sibTypeInfo[NUM_SIB];
1788 typedef struct schedulingInfo
1790 SiBroadcastStatus siBroadcastStatus;
1791 SiPeriodicity siPeriodicity;
1792 SibMappingInfo sibMappingInfo;
1795 typedef struct rachOccasionsSi
1797 RachCfgGeneric rachConfigSi;
1798 SsbPerRachOccasion ssbPerRachOccasion;
1801 typedef struct siReqRsrc
1803 uint8_t raPreambleStartIndex;
1804 uint8_t raAssociationPeriodIndex;
1805 uint8_t raSsbOccasionMaskIndex;
1808 typedef struct siRequestResource
1810 uint8_t numOfSiReqRsrc;
1811 SiReqRsrc siReqRsrc[MAX_SI_MESSAGE];
1814 typedef struct siRequestConfig
1816 RachOccasionsSi rachOccasionsSi;
1817 SiRequestPeriod siRequestPeriod;
1818 SiRequestResource siRequestResource;
1821 typedef struct schedulingInfoList
1824 SchedulingInfo schedulingInfo[MAX_SI_MESSAGE];
1825 }SchedulingInfoList;
1827 typedef struct siSchedulingInfo
1829 SchedulingInfoList schInfoList;
1830 SiWindowLength siWindowLength;
1831 SiRequestConfig siRequestConfig;
1832 SiRequestConfig siRequestConfigSUL;
1836 /* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.18 DL Broadcast Request */
1837 typedef struct macDlBroadcastReq
1841 SiSchedulingInfo **siSchedulingInfo;
1844 /* DL broadcast req from DU APP to MAC*/
1845 typedef uint8_t (*DuMacDlBroadcastReq) ARGS((
1847 MacDlBroadcastReq *dlBroadcast));
1849 /* Functions for CellUp Ind from MAC to DU APP*/
1850 typedef uint8_t (*DuMacCellUpInd) ARGS((
1852 OduCellId *cellId ));
1854 /* Functions for slot Ind from MAC to DU APP*/
1855 typedef uint8_t (*DuMacSlotInd) ARGS((
1857 SlotTimingInfo *slotIndInfo));
1859 /* Functions for stop Ind from MAC to DU APP*/
1860 typedef uint8_t (*DuMacStopInd) ARGS((
1862 OduCellId *cellId ));
1864 /* Functions for mac cell start req */
1865 typedef uint8_t (*DuMacCellStart) ARGS((
1867 CellStartInfo *cellId));
1869 /* Functions for mac cell stop request */
1870 typedef uint8_t (*DuMacCellStop) ARGS((
1872 CellStopInfo *cellId ));
1874 /* Function pointers for packing macCellCfg Request and Confirm */
1875 typedef uint8_t (*packMacCellCfgReq) ARGS((
1877 MacCellCfg *macCellCfg ));
1879 typedef uint8_t (*packMacCellCfgConfirm) ARGS((
1881 MacCellCfgCfm *macCellCfgCfm ));
1883 typedef uint8_t (*DuMacCellCfgReq) ARGS((
1885 MacCellCfg *macCellCfg));
1887 typedef uint8_t (*DuMacCellCfgCfm) ARGS((
1889 MacCellCfgCfm *macCellCfgCfm ));
1891 /* Functions for UL CCCH Ind from MAC to DU APP*/
1892 typedef uint8_t (*DuMacUlCcchInd) ARGS((
1894 UlCcchIndInfo *ulCcchIndInfo ));
1896 /* Functions for DL CCCH Ind from DU APP to MAC*/
1897 typedef uint8_t (*DuMacDlCcchInd) ARGS((
1899 DlCcchIndInfo *dlCcchIndInfo ));
1901 /* UE create Request from DU APP to MAC*/
1902 typedef uint8_t (*DuMacUeCreateReq) ARGS((
1904 MacUeCreateReq *ueCfg ));
1906 /* UE create Response from MAC to DU APP */
1907 typedef uint8_t (*MacDuUeCreateRspFunc) ARGS((
1909 MacUeCreateRsp *cfgRsp));
1911 /* UE Reconfig Request from DU APP to MAC */
1912 typedef uint8_t (*DuMacUeReconfigReq) ARGS((
1914 MacUeRecfg *ueCfg ));
1916 /* UE Reconfig Response from MAC to DU APP */
1917 typedef uint8_t (*MacDuUeRecfgRspFunc) ARGS((
1919 MacUeRecfgRsp *cfgRsp));
1921 /* RACH Resource Request from DU APP to MAC */
1922 typedef uint8_t (*DuMacRachRsrcReq) ARGS((
1924 MacRachRsrcReq *rachRsrcReq));
1926 /* RACH Resource Response from MAC to DU APP */
1927 typedef uint8_t (*MacDuRachRsrcRspFunc) ARGS((
1929 MacRachRsrcRsp *rachRsrcRsp));
1931 /* RACH Resource Release from DU APP to MAC */
1932 typedef uint8_t (*DuMacRachRsrcRel) ARGS((
1934 MacRachRsrcRel *rachRsrcRel));
1936 /* UE Delete Request from DU APP to MAC*/
1937 typedef uint8_t (*DuMacUeDeleteReq) ARGS((
1939 MacUeDelete *ueDel ));
1941 /* UE Delete Response from MAC to DU APP*/
1942 typedef uint8_t (*MacDuUeDeleteRspFunc) ARGS((
1944 MacUeDeleteRsp *deleteRsp));
1946 /* Cell Delete Request from DU APP to MAC*/
1947 typedef uint8_t (*DuMacCellDeleteReq) ARGS((
1949 MacCellDeleteReq *cellDelete ));
1951 /* Cell Delete Response from MAC to DU APP*/
1952 typedef uint8_t (*MacDuCellDeleteRspFunc) ARGS((
1954 MacCellDeleteRsp *cellDeleteRsp));
1956 /* Slice Cfg Request from DU APP to MAC*/
1957 typedef uint8_t (*DuMacSliceCfgReq) ARGS((
1959 MacSliceCfgReq *CfgReq));
1961 /* Slice Cfg Response from MAC to DU APP */
1962 typedef uint8_t (*MacDuSliceCfgRspFunc) ARGS((
1964 MacSliceCfgRsp *cfgRsp));
1966 /* Slice ReReCfg Request from DU APP to MAC*/
1967 typedef uint8_t (*DuMacSliceRecfgReq) ARGS((
1969 MacSliceRecfgReq *CfgReq));
1971 /* Slice ReReCfg Response from MAC to DU APP */
1972 typedef uint8_t (*MacDuSliceRecfgRspFunc) ARGS((
1974 MacSliceRecfgRsp *cfgRsp));
1976 /* Pcch indication from DU APP to MAC*/
1977 typedef uint8_t (*DuMacDlPcchInd) ARGS((
1979 DlPcchInd *pcchInd));
1981 /* UE Reset Request from DU APP to MAC*/
1982 typedef uint8_t (*DuMacUeResetReq) ARGS((
1984 MacUeResetReq *ueReset ));
1986 /* UE Reset Response from MAC to DU APP*/
1987 typedef uint8_t (*MacDuUeResetRspFunc) ARGS((
1989 MacUeResetRsp *resetRsp));
1991 /* UE sync status indication from MAC to DU APP*/
1992 typedef uint8_t (*MacDuUeSyncStatusIndFunc) ARGS((
1994 MacUeSyncStatusInd *syncStatusInd));
1996 uint64_t ueBitMapPerCell[MAX_NUM_CELL]; /* Bit Map to store used/free UE-IDX per Cell */
1998 uint8_t packMacCellUpInd(Pst *pst, OduCellId *cellId);
1999 uint8_t unpackMacCellUpInd(DuMacCellUpInd func, Pst *pst, Buffer *mBuf);
2000 uint8_t duHandleCellUpInd(Pst *pst, OduCellId *cellId);
2001 uint8_t packMacCellStart(Pst *pst, CellStartInfo *cellStartInfo);
2002 uint8_t unpackMacCellStart(DuMacCellStart func, Pst *pst, Buffer *mBuf);
2003 uint8_t MacProcCellStart(Pst *pst, CellStartInfo *cellStartInfo);
2004 uint8_t packMacCellStop(Pst *pst, CellStopInfo *cellStopInfo);
2005 uint8_t unpackMacCellStop(DuMacCellStop func, Pst *pst, Buffer *mBuf);
2006 uint8_t MacProcCellStop(Pst *pst, CellStopInfo *cellStopInfo);
2007 uint8_t packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg);
2008 uint8_t unpackDuMacCellCfg(DuMacCellCfgReq func, Pst *pst, Buffer *mBuf);
2009 uint8_t MacProcCellCfgReq(Pst *pst, MacCellCfg *macCellCfg);
2010 uint8_t packMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
2011 uint8_t unpackMacCellCfgCfm(DuMacCellCfgCfm func, Pst *pst, Buffer *mBuf);
2012 uint8_t duHandleMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
2013 uint8_t packMacStopInd(Pst *pst, OduCellId *cellId);
2014 uint8_t unpackMacStopInd(DuMacStopInd func, Pst *pst, Buffer *mBuf);
2015 uint8_t duHandleStopInd(Pst *pst, OduCellId *cellId);
2016 uint8_t packMacUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
2017 uint8_t unpackMacUlCcchInd(DuMacUlCcchInd func, Pst *pst, Buffer *mBuf);
2018 uint8_t duHandleUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
2019 uint8_t packMacDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
2020 uint8_t unpackMacDlCcchInd(DuMacDlCcchInd func, Pst *pst, Buffer *mBuf);
2021 uint8_t MacProcDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
2022 uint8_t packDuMacUeCreateReq(Pst *pst, MacUeCreateReq *ueCfg);
2023 uint8_t unpackMacUeCreateReq(DuMacUeCreateReq func, Pst *pst, Buffer *mBuf);
2024 uint8_t MacProcUeCreateReq(Pst *pst, MacUeCreateReq *ueCfg);
2025 uint8_t sendStopIndMacToDuApp(uint16_t cellId);
2026 uint8_t packDuMacUeCreateRsp(Pst *pst, MacUeCreateRsp *cfgRsp);
2027 uint8_t unpackDuMacUeCreateRsp(MacDuUeCreateRspFunc func, Pst *pst, Buffer *mBuf);
2028 uint8_t DuProcMacUeCreateRsp(Pst *pst, MacUeCreateRsp *cfgRsp);
2029 uint8_t packDuMacUeReconfigReq(Pst *pst, MacUeRecfg *ueRecfg);
2030 uint8_t unpackMacUeReconfigReq(DuMacUeReconfigReq func, Pst *pst, Buffer *mBuf);
2031 uint8_t MacProcUeReconfigReq(Pst *pst, MacUeRecfg *ueRecfg);
2032 uint8_t packDuMacUeRecfgRsp(Pst *pst, MacUeRecfgRsp *recfgRsp);
2033 uint8_t unpackDuMacUeRecfgRsp(MacDuUeRecfgRspFunc func, Pst *pst, Buffer *mBuf);
2034 uint8_t DuProcMacUeRecfgRsp(Pst *pst, MacUeRecfgRsp *recfgRsp);
2035 uint8_t packDuMacRachRsrcReq(Pst *pst, MacRachRsrcReq *rachRsrcReq);
2036 uint8_t unpackMacRachRsrcReq(DuMacRachRsrcReq func, Pst *pst, Buffer *mBuf);
2037 uint8_t MacProcRachRsrcReq(Pst *pst, MacRachRsrcReq *rachRsrcReq);
2038 uint8_t packDuMacRachRsrcRsp(Pst *pst, MacRachRsrcRsp *rachRsrcRsp);
2039 uint8_t unpackDuMacRachRsrcRsp(MacDuRachRsrcRspFunc func, Pst *pst, Buffer *mBuf);
2040 uint8_t DuProcMacRachRsrcRsp(Pst *pst, MacRachRsrcRsp *rachRsrcRsp);
2041 uint8_t packDuMacRachRsrcRel(Pst *pst, MacRachRsrcRel *rachRsrcRel);
2042 uint8_t unpackMacRachRsrcRel(DuMacRachRsrcRel func, Pst *pst, Buffer *mBuf);
2043 uint8_t MacProcRachRsrcRel(Pst *pst, MacRachRsrcRel *rachRsrcRel);
2044 uint8_t packDuMacUeDeleteReq(Pst *pst, MacUeDelete *ueDelete);
2045 uint8_t MacProcUeDeleteReq(Pst *pst, MacUeDelete *ueDelete);
2046 uint8_t unpackMacUeDeleteReq(DuMacUeDeleteReq func, Pst *pst, Buffer *mBuf);
2047 uint8_t packDuMacUeDeleteRsp(Pst *pst, MacUeDeleteRsp *deleteRsp);
2048 uint8_t DuProcMacUeDeleteRsp(Pst *pst, MacUeDeleteRsp *deleteRsp);
2049 uint8_t unpackDuMacUeDeleteRsp(MacDuUeDeleteRspFunc func, Pst *pst, Buffer *mBuf);
2050 uint8_t packDuMacCellDeleteReq(Pst *pst, MacCellDeleteReq *cellDelete);
2051 uint8_t MacProcCellDeleteReq(Pst *pst, MacCellDeleteReq *cellDelete);
2052 uint8_t unpackMacCellDeleteReq(DuMacCellDeleteReq func, Pst *pst, Buffer *mBuf);
2053 uint8_t packDuMacCellDeleteRsp(Pst *pst, MacCellDeleteRsp *cellDeleteRsp);
2054 uint8_t DuProcMacCellDeleteRsp(Pst *pst, MacCellDeleteRsp *cellDeleteRsp);
2055 uint8_t unpackDuMacCellDeleteRsp(MacDuCellDeleteRspFunc func, Pst *pst, Buffer *mBuf);
2056 uint8_t packDuMacSliceCfgReq(Pst *pst, MacSliceCfgReq *sliceCfgReq);
2057 uint8_t MacProcSliceCfgReq(Pst *pst, MacSliceCfgReq *sliceCfgReq);
2058 uint8_t unpackMacSliceCfgReq(DuMacSliceCfgReq func, Pst *pst, Buffer *mBuf);
2059 uint8_t DuProcMacSliceCfgRsp(Pst *pst, MacSliceCfgRsp *cfgRsp);
2060 uint8_t packDuMacSliceCfgRsp(Pst *pst, MacSliceCfgRsp *cfgRsp);
2061 uint8_t unpackDuMacSliceCfgRsp(MacDuSliceCfgRspFunc func, Pst *pst, Buffer *mBuf);
2062 uint8_t packDuMacSliceRecfgReq(Pst *pst, MacSliceRecfgReq *sliceRecfgReq);
2063 uint8_t MacProcSliceRecfgReq(Pst *pst, MacSliceRecfgReq *sliceRecfgReq);
2064 uint8_t unpackMacSliceRecfgReq(DuMacSliceRecfgReq func, Pst *pst, Buffer *mBuf);
2065 uint8_t DuProcMacSliceRecfgRsp(Pst *pst, MacSliceRecfgRsp *sliceRecfgRsp);
2066 uint8_t packDuMacSliceRecfgRsp(Pst *pst, MacSliceRecfgRsp *sliceRecfgRsp);
2067 uint8_t unpackDuMacSliceRecfgRsp(MacDuSliceRecfgRspFunc func, Pst *pst, Buffer *mBuf);
2068 uint8_t duHandleSlotInd(Pst *pst, SlotTimingInfo *slotIndInfo);
2069 uint8_t packMacSlotInd(Pst *pst, SlotTimingInfo *slotIndInfo);
2070 uint8_t unpackDuMacSlotInd(DuMacSlotInd func, Pst *pst, Buffer *mBuf);
2071 uint8_t packDuMacDlPcchInd(Pst *pst, DlPcchInd *pcchInd);
2072 uint8_t MacProcDlPcchInd(Pst *pst, DlPcchInd *pcchInd);
2073 uint8_t unpackMacDlPcchInd(DuMacDlPcchInd func, Pst *pst, Buffer *mBuf);
2074 int8_t getFreeBitFromUeBitMap(uint16_t cellId);
2075 void unsetBitInUeBitMap(uint16_t cellId, uint8_t bitPos);
2076 uint8_t packDuMacUeResetReq(Pst *pst, MacUeResetReq *ueReset);
2077 uint8_t MacProcUeResetReq(Pst *pst, MacUeResetReq *ueReset);
2078 uint8_t unpackMacUeResetReq(DuMacUeResetReq func, Pst *pst, Buffer *mBuf);
2079 uint8_t packDuMacUeResetRsp(Pst *pst, MacUeResetRsp *resetRsp);
2080 uint8_t DuProcMacUeResetRsp(Pst *pst, MacUeResetRsp *resetRsp);
2081 uint8_t unpackDuMacUeResetRsp(MacDuUeResetRspFunc func, Pst *pst, Buffer *mBuf);
2082 uint8_t packDuMacUeSyncStatusInd(Pst *pst, MacUeSyncStatusInd *ueSyncStatusInd);
2083 uint8_t DuProcMacUeSyncStatusInd(Pst *pst, MacUeSyncStatusInd *ueSyncStatusInd);
2084 uint8_t unpackDuMacUeSyncStatusInd(MacDuUeSyncStatusIndFunc func, Pst *pst, Buffer *mBuf);
2085 uint8_t packDuMacDlBroadcastReq(Pst *pst, MacDlBroadcastReq *dlBroadcastReq);
2086 uint8_t MacProcDlBroadcastReq(Pst *pst, MacDlBroadcastReq *dlBroadcastReq);
2087 uint8_t unpackMacDlBroadcastReq(DuMacDlBroadcastReq func, Pst *pst, Buffer *mBuf);
2091 /**********************************************************************
2093 **********************************************************************/