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
92 #define EVENT_MAC_STATISTICS_REQ 229
93 #define EVENT_MAC_STATISTICS_RSP 230
95 #define BSR_PERIODIC_TIMER_SF_10 10
96 #define BSR_RETX_TIMER_SF_320 320
97 #define BSR_SR_DELAY_TMR_2560 2560
99 #define PAGING_SCHED_DELTA 4
102 /********************* Global Variable ********************/
103 uint64_t ueBitMapPerCell[MAX_NUM_CELL]; /* Bit Map to store used/free UE-IDX per Cell */
105 /********************* Interface structure definition ********************/
121 SSB_PER_RACH_OCCASION_ONE_EIGHTH,
122 SSB_PER_RACH_OCCASION_ONE_FOURTH,
123 SSB_PER_RACH_OCCASION_ONE_HALF,
124 SSB_PER_RACH_OCCASION_ONE,
125 SSB_PER_RACH_OCCASION_TWO,
126 SSB_PER_RACH_OCCASION_FOUR,
127 SSB_PER_RACH_OCCASION_EIGHT,
128 SSB_PER_RACH_OCCASION_SIXTEEN
183 OUT_OF_SUNC_MAX_RETRIES
194 MAC_GEN_FULL_PBCH_PAYLD, /* MAC generated the full PBCH Payload */
195 PHY_GEN_TIMING_PBCH_BIT, /* PHY generates the timing PBCH bits */
196 PHY_GEN_FULL_PBCH_PAYLD /* PHY generates full PBCH payload */
208 RESTRICTED_SET_TYPE_A,
209 RESTRICTED_SET_TYPE_B
241 /* Enums for Ue Create Request */
243 /* SR PROHIBIT TIMER */
270 TIME_ALIGNMENT_TIMER_MS_500,
271 TIME_ALIGNMENT_TIMER_MS_750,
272 TIME_ALIGNMENT_TIMER_MS_1280,
273 TIME_ALIGNMENT_TIMER_MS_1920,
274 TIME_ALIGNMENT_TIMER_MS_2560,
275 TIME_ALIGNMENT_TIMER_MS_5120,
276 TIME_ALIGNMENT_TIMER_MS_10240,
277 TIME_ALIGNMENT_TIMER_INFINITY
282 PHR_PERIODIC_TIMER_SF_10,
283 PHR_PERIODIC_TIMER_SF_20,
284 PHR_PERIODIC_TIMER_SF_50,
285 PHR_PERIODIC_TIMER_SF_100,
286 PHR_PERIODIC_TIMER_SF_200,
287 PHR_PERIODIC_TIMER_SF_500,
288 PHR_PERIODIC_TIMER_SF_1000,
289 PHR_PERIODIC_TIMER_INFINITY
294 PHR_PROHIBIT_TIMER_SF_0,
295 PHR_PROHIBIT_TIMER_SF_10,
296 PHR_PROHIBIT_TIMER_SF_20,
297 PHR_PROHIBIT_TIMER_SF_50,
298 PHR_PROHIBIT_TIMER_SF_100,
299 PHR_PROHIBIT_TIMER_SF_200,
300 PHR_PROHIBIT_TIMER_SF_500,
301 PHR_PROHIBIT_TIMER_SF_1000
306 PHR_TX_PWR_FACTOR_CHANGE_DB_1,
307 PHR_TX_PWR_FACTOR_CHANGE_DB_3,
308 PHR_TX_PWR_FACTOR_CHANGE_DB_6,
309 PHR_TX_PWR_FACTOR_CHANGE_INFINITY
310 }PhrTxPwrFactorChange;
314 PHR_MODE_OTHER_CG_REAL,
315 PHR_MODE_OTHER_CG_VIRTUAL
320 PDSCH_HARQ_ACK_CODEBOOK_SEMISTATIC,
321 PDSCH_HARQ_ACK_CODEBOOK_DYNAMIC
322 }PdschHarqAckCodebook;
326 NUM_HARQ_PROC_FOR_PDSCH_N_2,
327 NUM_HARQ_PROC_FOR_PDSCH_N_4,
328 NUM_HARQ_PROC_FOR_PDSCH_N_6,
329 NUM_HARQ_PROC_FOR_PDSCH_N_10,
330 NUM_HARQ_PROC_FOR_PDSCH_N_16
331 }NumHarqProcForPdsch;
335 MAX_CODE_BLOCK_GROUP_PER_TB_N_2,
336 MAX_CODE_BLOCK_GROUP_PER_TB_N_4,
337 MAX_CODE_BLOCK_GROUP_PER_TB_N_6,
338 MAX_CODE_BLOCK_GROUP_PER_TB_N_8
350 TRANSFORM_PRECODER_ENABLED,
351 TRANSFORM_PRECODER_DISABLED
356 CCE_REG_MAPPINGTYPE_PR_INTERLEAVED = 1,
357 CCE_REG_MAPPINGTYPE_PR_NONINTERLEAVED
362 SLOTPERIODICITYANDOFFSET_PR_SL1 = 1,
363 SLOTPERIODICITYANDOFFSET_PR_SL2,
364 SLOTPERIODICITYANDOFFSET_PR_SL4,
365 SLOTPERIODICITYANDOFFSET_PR_SL5,
366 SLOTPERIODICITYANDOFFSET_PR_SL8,
367 SLOTPERIODICITYANDOFFSET_PR_SL10,
368 SLOTPERIODICITYANDOFFSET_PR_SL16,
369 SLOTPERIODICITYANDOFFSET_PR_SL20,
370 SLOTPERIODICITYANDOFFSET_PR_SL40,
371 SLOTPERIODICITYANDOFFSET_PR_SL80,
372 SLOTPERIODICITYANDOFFSET_PR_SL160,
373 SLOTPERIODICITYANDOFFSET_PR_SL320,
374 SLOTPERIODICITYANDOFFSET_PR_SL640,
375 SLOTPERIODICITYANDOFFSET_PR_SL1280,
376 SLOTPERIODICITYANDOFFSET_PR_SL2560
377 }MSlotPeriodAndOffset;
387 SEARCHSPACETYPE_PR_COMMON = 1,
388 SEARCHSPACETYPE_PR_UE_SPECIFIC
399 AGGREGATIONLEVEL_N0 = 0,
400 AGGREGATIONLEVEL_N1 = 1,
401 AGGREGATIONLEVEL_N2 = 2,
402 AGGREGATIONLEVEL_N3 = 3,
403 AGGREGATIONLEVEL_N4 = 4,
404 AGGREGATIONLEVEL_N5 = 5,
405 AGGREGATIONLEVEL_N6 = 6,
406 AGGREGATIONLEVEL_N8 = 7
411 ADDITIONALPOSITION_POS0,
412 ADDITIONALPOSITION_POS1,
413 ADDITIONALPOSITION_POS3
424 RESOURCEALLOCATION_TYPE0,
425 RESOURCEALLOCATION_TYPE1,
426 RESOURCEALLOCATION_DYNAMICSWITCH
437 CODEWORDS_SCHED_BY_DCI_N1,
438 CODEWORDS_SCHED_BY_DCI_N2
443 TYPE_STATIC_BUNDLING = 1,
444 TYPE_DYNAMIC_BUNDLING
457 SET1_SIZE_N2_WIDEBAND,
458 SET1_SIZE_N4_WIDEBAND
512 TRANSPORT_LAYER_FAIL,
519 UNSPECIFIED_RADIO_NW_CAUSE,
521 UNKNOWN_GNB_CU_UE_F1AP_ID,
522 ALREADY_ALLOCATED_GNB_CU_UE_F1AP_ID,
523 UNKNOWN_GNB_DU_UE_F1AP_ID,
524 ALREADY_ALLOCATED_GNB_DU_UE_F1AP_ID,
525 UNKNOWN_UE_F1AP_ID_PAIR,
526 INCONSISTENT_UE_F1AP_ID_PAIR,
527 INTERACTION_WITH_OTHER_PROCEDURE,
529 ACTION_REQUIRED_FOR_RADIO_REASONS,
530 RADIO_RESOURCES_UNAVAILABLE,
536 RESOURCES_UNAVAILABLE_FOR_SLICE
541 UNSPECIFIED_TRANSPORT_LAYER_CAUSE,
542 TRANSPORT_RESOURCE_UNAVAILABLE
547 TRANSFER_SYNTAX_ERROR,
548 ABSTRACT_SYNTAX_ERROR_REJECT,
549 ABSTRACT_SYNTAX_ERROR_IGNORE_AND_REJECT,
550 INCOMPATIBLE_MESSAGE_FOR_RECEIVER_STATE,
552 ABSTRAXCT_SYNTAX_ERROR_FALSELY_CONSTRUCTED_MSG,
553 UNSPECIFIED_PROTOCOL_CAUSE
558 CONTROL_PROCESSING_OVERLOAD,
560 PLANE_PROCESSING_RESOURCES,
562 INTERVENTION_BY_O_AND_M,
563 UNSPECIFIED_MISC_CAUSE
570 MCS_TABLE_QAM64_LOW_SE
577 RSRC_RRC_CONNECTED_USERS
582 TRANSMISSION_ALLOWED,
585 }DataTransmissionAction;
587 /* Performance measurements from 3GPP TS 28.552 Release 15 */
590 MAC_DL_TOTAL_PRB_USAGE,
591 MAC_UL_TOTAL_PRB_USAGE
594 typedef struct failureCause
599 RadioNwLyrCause radioNwResult;
600 TransLyrCause transportResult;
601 ProtCause protcolResult;
602 MiscFailCause miscResult;
606 typedef struct carrierCfg
608 uint32_t dlBw; /* DL bandwidth */
609 uint32_t dlFreq; /* Absolute frequency of DL point A in KHz */
610 uint32_t ulBw; /* UL bandwidth */
611 uint32_t ulFreq; /* Absolute frequency of UL point A in KHz */
612 uint16_t numTxAnt; /* Number of Tx antennas */
613 uint16_t numRxAnt; /* Number of Rx antennas */
636 /*Spec Ref: 38.331: RadioLinkMonitoringConfig*/
642 }PurposeOfFailureDet;
644 typedef struct plmnInfoList
647 uint8_t numSupportedSlice; /* Total slice supporting */
648 Snssai **snssai; /* List of supporting snssai*/
651 typedef struct schPageCfg
653 uint8_t numPO; /*Derived from Ns*/
654 bool poPresent; /*Whether FirstPDCCH-MonitoringPO is present or not*/
655 uint16_t pagingOcc[MAX_PO_PER_PF]; /*FirstPDCCH-Monitoring Paging Occasion*/
658 typedef struct pdcchConfigSib1
660 uint8_t coresetZeroIndex; /* derived from 4 LSB of pdcchSib1 present in MIB */
661 uint8_t searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */
664 typedef struct sib1CellCfg
666 PdcchConfigSib1 pdcchCfgSib1; /*Freq pos where UE may find SS/PBCH block with SIB1*/
669 SchPageCfg pagingCfg;
672 typedef struct bwpParams
677 uint8_t cyclicPrefix;
680 typedef struct candidatesInfo
689 typedef struct searchSpaceCfg
691 uint8_t searchSpaceId;
693 uint16_t monitoringSlot;
695 uint16_t monitoringSymbol;
696 CandidatesInfo candidate;
699 typedef struct pdcchConfigCommon
701 /* only one search space is configured during SIB1 */
702 SearchSpaceCfg commonSearchSpace;
703 uint8_t raSearchSpaceId;
706 typedef struct pdschCfgCommTimeDomRsrcAlloc
711 uint8_t lengthSymbol;
712 }PdschCfgCommTimeDomRsrcAlloc;
714 typedef struct pdschConfigCommon
716 uint8_t numTimeDomAlloc;
717 /* PDSCH time domain DL resource allocation list */
718 PdschCfgCommTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_DL_ALLOC];
721 typedef struct pucchConfigCommon
723 uint8_t pucchResourceCommon;
724 uint8_t pucchGroupHopping;
727 /* PUSCH Time Domain Resource Allocation */
728 typedef struct puschTimeDomRsrcAlloc
731 CommonMappingType mappingType;
733 uint8_t symbolLength;
734 uint8_t startSymbolAndLength;
735 }PuschTimeDomRsrcAlloc;
737 typedef struct puschConfigCommon
739 /* PUSCH-TimeDomainResourceAllocation info */
740 uint8_t numTimeDomRsrcAlloc;
741 PuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
744 typedef struct bwpDlConfig
747 PdcchConfigCommon pdcchCommon;
748 PdschConfigCommon pdschCommon;
751 typedef struct bwpUlConfig
754 // rach config common sent in PrachCfg
755 PucchConfigCommon pucchCommon;
756 PuschConfigCommon puschCommon;
760 typedef struct cellCfg
763 MacAdminState adminState;
764 MacCellState cellState;
765 PlmnInfoList plmnInfoList[MAX_PLMN]; /* Consits of PlmnId and Snssai list */
766 uint32_t phyCellId; /* Physical cell id */
769 uint16_t subCarrSpacing;
770 DuplexMode dupType; /* Duplex type: TDD/FDD */
771 Sib1CellCfg sib1Cfg; /* SIB1 config */
772 BwpDlConfig initialDlBwp; /* Initial DL BWP */
773 BwpUlConfig initialUlBwp; /* Initial UL BWP */
776 typedef struct ssbCfg
778 uint32_t ssbPbchPwr; /* SSB block power */
779 uint8_t scsCmn; /* subcarrier spacing for common */
780 uint16_t ssbOffsetPointA; /* SSB subcarrier offset from point A */
781 SSBPeriod ssbPeriod; /* SSB Periodicity in msec */
782 uint8_t ssbScOffset; /* Subcarrier Offset */
783 uint32_t ssbMask[SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */
784 uint8_t beamId[NUM_SSB];
786 BchPduOpt bchPayloadFlag; /* Options for generation of payload */
787 uint8_t mibPdu[3]; /* MIB payload */
788 uint8_t dmrsTypeAPos; /* DMRS Type A position */
791 typedef struct fdmInfo
793 uint16_t rootSeqIdx; /* Root sequence index */
794 uint8_t numRootSeq; /* Number of root sequences required for FD */
795 uint16_t k1; /* Frequency Offset for each FD */
796 uint8_t zeroCorrZoneCfg; /* Zero correlation zone cofig */
799 typedef struct prachCfg
801 PrachSeqLen prachSeqLen; /* RACH Sequence length: Long/short */
802 uint8_t prachSubcSpacing; /* Subcarrier spacing of RACH */
803 uint8_t msg1Fdm; /* Number of RACH frequency domain occasions/ PRACH FDM (1,2,4,8) */
804 uint8_t prachCfgIdx; /* PRACH Cfg Index */
805 PrachFdmInfo fdm[8]; /* FDM info */
806 RstSetCfg prachRstSetCfg; /* PRACH restricted set config */
807 uint8_t ssbPerRach; /* SSB per RACH occassion */
808 uint8_t totalNumRaPreamble; /* Total number of RA preambles */
809 uint8_t numCbPreamblePerSsb; /* Number of CB preamble per SSB */
810 uint16_t msg1FreqStart; /* Msg1-FrequencyStart */
811 uint8_t raContResTmr; /* RA Contention Resoultion Timer */
812 uint8_t rsrpThreshSsb; /* RSRP Threshold SSB */
813 uint8_t raRspWindow; /* RA Response Window */
817 /* The following list of structures is taken from the DRX-Config section of specification 33.331. */
818 typedef struct drxOnDurationTimer
820 bool onDurationTimerValInMs;
823 uint8_t subMilliSeconds;
824 uint16_t milliSeconds;
825 }onDurationtimerValue;
828 typedef struct drxLongCycleStartOffset
830 uint16_t drxLongCycleStartOffsetChoice;
831 uint16_t drxLongCycleStartOffsetVal;
832 }DrxLongCycleStartOffset;
834 typedef struct shortDrx
836 uint16_t drxShortCycle;
837 uint8_t drxShortCycleTimer;
840 typedef struct drxCfg
842 DrxOnDurationTimer drxOnDurationTimer;
843 uint16_t drxInactivityTimer;
844 uint8_t drxHarqRttTimerDl;
845 uint8_t drxHarqRttTimerUl;
846 uint16_t drxRetransmissionTimerDl;
847 uint16_t drxRetransmissionTimerUl;
848 DrxLongCycleStartOffset drxLongCycleStartOffset;
851 uint8_t drxSlotOffset;
855 typedef struct precodingConf
858 uint16_t numAntPorts;
861 typedef struct beamformingConf
867 uint32_t beamAzimuth;
869 uint32_t beamHorizWidth;
870 uint32_t beamVertWidth;
871 uint32_t coverageShape;
872 uint32_t digitalTilt;
873 uint32_t digitalAzimuth;
876 typedef struct csiRsCfg
878 uint8_t *csiFreqDomainAlloc;
879 uint8_t csiNrofPorts;
880 uint8_t csirsfirstOFDMSymbolInTimeDomain;
881 uint8_t csirsfirstOFDMSymbolInTimeDomain2;
882 uint8_t csirscdmType;
883 uint8_t csirsdensity;
884 uint8_t csirsdensitydot5;
885 uint8_t powerControlOffset;
886 uint8_t powerControlOffsetSS;
887 uint16_t periodicityAndOffset;
890 typedef struct macCellCfg
892 uint16_t cellId; /* Cell Id */
893 CarrierCfg carrCfg; /* Carrier configuration */
894 CellCfg cellCfg; /* Cell Configuration*/
895 SsbCfg ssbCfg; /* SSB configuration */
896 CsiRsCfg csiRsCfg; /*Reference: 38.331 CSI-MeasConfig*/
897 PrachCfg prachCfg; /* PRACH Configuration */
899 TDDCfg tddCfg; /* TDD periodicity and slot configuration */
901 PrecodingConf precodingConf;
902 BeamformingConf beamCfg;
905 typedef struct macCellCfgCfm
911 typedef struct ulCcchInd
915 uint16_t ulCcchMsgLen;
919 typedef struct dlCcchInd
923 DlCcchMsgType msgType;
924 uint16_t dlCcchMsgLen;
928 typedef struct bsrTmrCfg
930 uint16_t periodicTimer;
932 uint16_t srDelayTimer;
936 /* Info of Scheduling Request to Add/Modify */
937 typedef struct schedReqInfo
940 SrProhibitTimer srProhibitTmr;
941 SrTransMax srTransMax;
944 /* Scheduling Request Configuration */
945 typedef struct schedReqCfg
947 uint8_t addModListCount;
948 SchedReqInfo addModList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* List of Scheduling req to be added/modified */
949 uint8_t relListCount;
950 uint8_t relList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* list of scheduling request Id to be deleted */
953 typedef struct tagInfo
956 TimeAlignmentTimer timeAlignTimer;
959 typedef struct tagCfg
961 uint8_t addModListCount;
962 TagInfo addModList[MAC_NUM_TAGS]; /* List of Tag to Add/Modify */
963 uint8_t relListCount;
964 uint8_t relList[MAC_NUM_TAGS]; /* list of Tag Id to release */
967 typedef struct phrCfg
969 PhrPeriodicTimer periodicTimer;
970 PhrProhibitTimer prohibitTimer;
971 PhrTxPwrFactorChange txPowerFactor;
974 bool phrType2OtherCell;
975 PhrModeOtherCG phrOtherCG;
978 typedef struct macCellGrpCfg
980 SchedReqCfg schReqCfg;
983 bool phrCfgSetupPres; /* true/false: phrCfgSetup/phrCfgRelease */
991 typedef struct phyCellGrpCfg
993 PdschHarqAckCodebook pdschHarqAckCodebook;
997 /* Control resource set info */
998 typedef struct controlRsrcSet
1000 uint8_t cRSetId; /* Control resource set id */
1001 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
1003 REGMappingType cceRegMappingType;
1004 PrecoderGranul precoderGranularity;
1005 uint16_t dmrsScramblingId;
1008 /* Search Space info */
1009 typedef struct searchSpace
1011 uint8_t searchSpaceId;
1013 MSlotPeriodAndOffset mSlotPeriodicityAndOffset;
1014 uint8_t mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
1015 AggrLevel numCandidatesAggLevel1; /* Number of candidates for aggregation level 1 */
1016 AggrLevel numCandidatesAggLevel2; /* Number of candidates for aggregation level 2 */
1017 AggrLevel numCandidatesAggLevel4; /* Number of candidates for aggregation level 4 */
1018 AggrLevel numCandidatesAggLevel8; /* Number of candidates for aggregation level 8 */
1019 AggrLevel numCandidatesAggLevel16; /* Number of candidates for aggregation level 16 */
1020 SearchSpaceType searchSpaceType;
1021 uint8_t ueSpecificDciFormat;
1024 /* PDCCH cofniguration */
1025 typedef struct pdcchConfig
1027 uint8_t numCRsetToAddMod;
1028 ControlRsrcSet cRSetToAddModList[MAX_NUM_CRSET]; /* List of control resource set to add/modify */
1029 uint8_t numCRsetToRel;
1030 uint8_t cRSetToRelList[MAX_NUM_CRSET]; /* List of control resource set to release */
1031 uint8_t numSearchSpcToAddMod;
1032 SearchSpace searchSpcToAddModList[MAX_NUM_SEARCH_SPC]; /* List of search space to add/modify */
1033 uint8_t numSearchSpcToRel;
1034 uint8_t searchSpcToRelList[MAX_NUM_SEARCH_SPC]; /* List of search space to release */
1037 /* PDSCH time domain resource allocation */
1038 typedef struct pdschTimeDomRsrcAlloc
1041 CommonMappingType mappingType;
1042 uint8_t startSymbol;
1043 uint8_t symbolLength;
1044 uint8_t startSymbolAndLength;
1045 }PdschTimeDomRsrcAlloc;
1048 typedef struct pdschBundling
1050 struct staticBundling
1052 BundlingSizeSet2 size;
1054 struct dynamicBundling
1056 BundlingSizeSet1 sizeSet1;
1057 BundlingSizeSet2 sizeSet2;
1061 /* DMRS downlink configuration */
1062 typedef struct dmrsDlCfg
1064 AddPosType addPos; /* DMRS additional position */
1067 /* PDSCH Configuration */
1068 typedef struct pdschConfig
1070 DmrsDlCfg dmrsDlCfgForPdschMapTypeA;
1071 ResAllocType resourceAllocType;
1072 uint8_t numTimeDomRsrcAlloc;
1073 PdschTimeDomRsrcAlloc timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
1075 CodeWordsSchedDci numCodeWordsSchByDci; /* Number of code words scheduled by DCI */
1076 BundlingType bundlingType;
1077 PdschBundling bundlingInfo;
1080 /* Initial Downlink BWP */
1081 typedef struct initialDlBwp
1084 PdcchConfig pdcchCfg;
1086 PdschConfig pdschCfg;
1089 /*Spec 38.331 "SPS-Config'*/
1090 typedef struct spsConfig
1092 uint16_t periodicity;
1093 uint8_t numOfHqProcess;
1098 typedef uint8_t RadioLinkMonitoringRsId;
1100 typedef struct radioLinkMonRS
1102 RadioLinkMonitoringRsId radioLinkMonitoringRsId;
1103 PurposeOfFailureDet purpose;
1107 uint8_t nzpCsiRsResId;
1111 typedef struct radioLinkConfig
1113 RadioLinkMonRS failurDetResAddModList[1];
1114 RadioLinkMonitoringRsId failurDetResRelList[1];
1115 uint8_t beamFailureInstanceMaxCount;
1116 uint8_t beamFailureDetectionTimer;
1119 /* Spec 38.331, 'BWP-DownlinkDedicated'*/
1120 typedef struct bwpDlCfgDed
1122 PdcchConfig pdcchCfgDed;
1123 PdschConfig pdschCfgDed;
1124 SpsConfig spsCfgDed;
1125 RadioLinkConfig radioLnkMonCfgDed;
1128 /* Downlink BWP information */
1129 typedef struct dlBwpInfo
1132 BwpDlConfig bwpCommon;
1133 BwpDlCfgDed bwpDedicated;
1136 /* PDCCH Serving Cell configuration */
1137 typedef struct pdschServCellCfg
1139 uint8_t *maxMimoLayers;
1140 NumHarqProcForPdsch numHarqProcForPdsch;
1141 MaxCodeBlkGrpPerTB *maxCodeBlkGrpPerTb;
1142 bool *codeBlkGrpFlushInd;
1143 PdschXOverhead *xOverhead;
1146 /* PUCCH Configuration */
1148 typedef struct pucchResrcSetInfo
1151 uint8_t resrcListCount;
1152 uint8_t resrcList[MAX_NUM_PUCCH_PER_RESRC_SET];
1153 uint8_t maxPayLoadSize;
1156 typedef struct pucchResrcSetCfg
1158 uint8_t resrcSetToAddModListCount;
1159 PucchResrcSetInfo resrcSetToAddModList[MAX_NUM_PUCCH_RESRC_SET];
1160 uint8_t resrcSetToRelListCount;
1161 uint8_t resrcSetToRelList[MAX_NUM_PUCCH_RESRC];
1164 typedef struct pucchFormat0
1166 uint8_t initialCyclicShift;
1168 uint8_t startSymbolIdx;
1171 typedef struct pucchFormat1
1173 uint8_t initialCyclicShift;
1175 uint8_t startSymbolIdx;
1179 typedef struct pucchFormat2_3
1183 uint8_t startSymbolIdx;
1186 typedef struct pucchFormat4
1191 uint8_t startSymbolIdx;
1194 typedef struct pucchResrcInfo
1198 uint8_t intraFreqHop;
1199 uint16_t secondPrbHop;
1200 uint8_t pucchFormat;
1203 PucchFormat0 *format0;
1204 PucchFormat1 *format1;
1205 PucchFormat2_3 *format2;
1206 PucchFormat2_3 *format3;
1207 PucchFormat4 *format4;
1211 typedef struct pucchResrcCfg
1213 uint8_t resrcToAddModListCount;
1214 PucchResrcInfo resrcToAddModList[MAX_NUM_PUCCH_RESRC];
1215 uint8_t resrcToRelListCount;
1216 uint8_t resrcToRelList[MAX_NUM_PUCCH_RESRC];
1219 typedef struct pucchFormatCfg
1221 bool interSlotFreqHop;
1223 uint8_t maxCodeRate;
1229 typedef struct schedReqResrcInfo
1233 uint8_t periodicity;
1238 typedef struct pucchSchedReqCfg
1240 uint8_t schedAddModListCount;
1241 SchedReqResrcInfo schedAddModList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1242 uint8_t schedRelListCount;
1243 uint8_t schedRelList[MAX_NUM_SR_CFG_PER_CELL_GRP];
1246 typedef struct spatialRelationInfo
1248 uint8_t spatialRelationId;
1249 uint8_t servCellIdx;
1250 uint8_t pathLossRefRSId;
1252 uint8_t closeLoopIdx;
1253 }SpatialRelationInfo;
1255 typedef struct pucchSpatialCfg
1257 uint8_t spatialAddModListCount;
1258 SpatialRelationInfo spatialAddModList[MAX_NUM_SPATIAL_RELATIONS];
1259 uint8_t spatialRelListCount;
1260 uint8_t spatialRelList[MAX_NUM_SPATIAL_RELATIONS];
1263 typedef struct p0PucchCfg
1269 typedef struct pathLossRefRSCfg
1271 uint8_t pathLossRefRSId;
1274 typedef struct pucchMultiCsiCfg
1276 uint8_t multiCsiResrcListCount;
1277 uint8_t multiCsiResrcList[MAX_NUM_PUCCH_RESRC-1];
1280 typedef struct pucchDlDataToUlAck
1282 uint8_t dlDataToUlAckListCount;
1283 uint8_t dlDataToUlAckList[MAX_NUM_DL_DATA_TO_UL_ACK];
1284 }PucchDlDataToUlAck;
1286 typedef struct pucchPowerControl
1294 P0PucchCfg p0Set[MAX_NUM_PUCCH_P0_PER_SET];
1295 uint8_t pathLossRefRSListCount;
1296 PathLossRefRSCfg pathLossRefRSList[MAX_NUM_PATH_LOSS_REF_RS];
1299 typedef struct pucchCfg
1301 PucchResrcSetCfg *resrcSet;
1302 PucchResrcCfg *resrc;
1303 PucchFormatCfg *format1;
1304 PucchFormatCfg *format2;
1305 PucchFormatCfg *format3;
1306 PucchFormatCfg *format4;
1307 PucchSchedReqCfg *schedReq;
1308 PucchMultiCsiCfg *multiCsiCfg;
1309 PucchSpatialCfg *spatialInfo;
1310 PucchDlDataToUlAck *dlDataToUlAck;
1311 PucchPowerControl *powerControl;
1314 /* Transform precoding disabled */
1315 typedef struct transPrecodDisabled
1317 uint16_t scramblingId0;
1318 }TransPrecodDisabled;
1320 /* DMRS Uplink configuration */
1321 typedef struct dmrsUlCfg
1323 AddPosType addPos; /* DMRS additional position */
1324 TransPrecodDisabled transPrecodDisabled; /* Transform precoding disabled */
1327 /* PUSCH Configuration */
1328 typedef struct puschCfg
1330 uint8_t dataScramblingId;
1331 DmrsUlCfg dmrsUlCfgForPuschMapTypeA;
1332 ResAllocType resourceAllocType;
1333 uint8_t numTimeDomRsrcAlloc;
1334 PuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
1335 TransformPrecoder transformPrecoder;
1338 /* Initial Uplink BWP */
1339 typedef struct initialUlBwp
1347 typedef struct bwpUlCfgDed
1353 /* Uplink BWP information */
1354 typedef struct ulBwpInfo
1357 BwpUlConfig bwpCommon;
1361 typedef struct rachCfgGeneric
1363 uint8_t prachCfgIdx; /* PRACH config idx */
1364 uint8_t msg1Fdm; /* PRACH FDM (1,2,4,8) */
1365 uint16_t msg1FreqStart; /* Msg1-FrequencyStart */
1366 uint8_t zeroCorrZoneCfg; /* Zero correlation zone cofig */
1367 int16_t preambleRcvdTargetPower; /*Prach Target power received*/
1368 uint8_t preambleTransMax; /*Preamble Transmission Max power*/
1369 uint8_t pwrRampingStep; /*Power Ramping Step*/
1370 uint8_t raRspWindow; /* RA Response Window */
1373 typedef struct raPrioritization
1375 uint8_t powerRampingStepHighPriority;
1376 uint8_t scalingFactorBI;
1379 typedef struct bfrCsiRsRes
1383 uint8_t raPreambleIndex;
1386 typedef struct bfrSsbRes
1389 uint8_t raPreambleIndex;
1392 typedef struct prachResDedBfr
1398 /*Spec 38.331 'BeamFailureRecoveryConfig' */
1399 typedef struct beamFailRecoveryCfg
1401 uint8_t rootSeqIndexBfr;
1402 RachCfgGeneric rachCfgBfr;
1403 uint8_t rsrpThreshSsbBfr;
1404 PrachResDedBfr candidteBeamRSList;
1405 uint8_t ssbPerachBfr;
1406 uint8_t raSsbOccMaskIndex;
1407 uint8_t recoverySearchSpaceId;
1408 RaPrioritization raPrioBfr;
1410 uint8_t msg1SubcSpacing;
1411 }BeamFailRecoveryCfg;
1413 /* Serving cell configuration */
1414 typedef struct servCellCfgInfo
1416 InitialDlBwp initDlBwp;
1417 RadioLinkConfig radioLinkMonConfig;
1418 uint8_t numDlBwpToAdd;
1419 DlBwpInfo dlBwpToAddList[MAX_NUM_BWP];
1420 uint8_t firstActvDlBwpId;
1421 uint8_t defaultDlBwpId;
1422 uint8_t *bwpInactivityTmr;
1423 PdschServCellCfg pdschServCellCfg;
1424 InitialUlBwp initUlBwp;
1425 BeamFailRecoveryCfg beamFailureRecoveryCfg;
1426 uint8_t numUlBwpToAdd;
1427 UlBwpInfo ulBwpToAddList[MAX_NUM_BWP];
1428 uint8_t firstActvUlBwpId;
1431 /* Special cell configuration */
1432 typedef struct spCellCfg
1434 uint8_t servCellIdx;
1435 ServCellCfgInfo servCellCfg;
1438 typedef struct bwpRelInfo
1443 /* Serving cell Re-configuration */
1444 typedef struct servCellRecfgInfo
1446 InitialDlBwp initDlBwp;
1447 RadioLinkConfig radioLinkMonConfig;
1448 uint8_t numDlBwpToAddOrMod;
1449 DlBwpInfo dlBwpToAddOrModList[MAX_NUM_BWP];
1450 uint8_t numDlBwpToRel;
1451 BwpRelInfo dlBwpToRelList[MAX_NUM_BWP];
1452 uint8_t firstActvDlBwpId;
1453 uint8_t defaultDlBwpId;
1454 uint8_t *bwpInactivityTmr;
1455 PdschServCellCfg pdschServCellCfg;
1456 InitialUlBwp initUlBwp;
1457 uint8_t numUlBwpToAddOrMod;
1458 UlBwpInfo ulBwpToAddOrModList[MAX_NUM_BWP];
1459 uint8_t numUlBwpToRel;
1460 BwpRelInfo ulBwpToRelList[MAX_NUM_BWP];
1461 uint8_t firstActvUlBwpId;
1464 /* Special cell Re-configuration */
1465 typedef struct spCellRecfg
1467 uint8_t servCellIdx;
1468 ServCellRecfgInfo servCellCfg;
1471 typedef struct ambrCfg
1473 uint32_t ulBr; /* UL Bit rate */
1476 typedef struct nonDynFiveQi
1481 uint16_t maxDataBurstVol;
1484 typedef struct dynFiveQi
1487 uint16_t packetDelayBudget;
1488 uint8_t packetErrRateScalar;
1489 uint8_t packetErrRateExp;
1491 uint8_t delayCritical;
1493 uint16_t maxDataBurstVol;
1496 typedef struct ngRanAllocAndRetPri
1498 uint8_t priorityLevel;
1499 uint8_t preEmptionCap;
1500 uint8_t preEmptionVul;
1501 }NgRanAllocAndRetPri;
1503 typedef struct grbQosInfo
1505 uint32_t maxFlowBitRateDl;
1506 uint32_t maxFlowBitRateUl;
1507 uint32_t guarFlowBitRateDl;
1508 uint32_t guarFlowBitRateUl;
1511 typedef struct drbQos
1513 QosType fiveQiType; /* Dynamic or non-dynamic */
1516 NonDynFiveQi nonDyn5Qi;
1519 NgRanAllocAndRetPri ngRanRetPri;
1520 GrbQosInfo grbQosInfo;
1521 uint16_t pduSessionId;
1522 uint32_t ulPduSessAggMaxBitRate;
1525 typedef struct ulLcCfg
1530 PBitRate pbr; // prioritisedBitRate
1531 BucketSizeDur bsd; // bucketSizeDuration
1534 typedef struct dlLcCfg
1536 LcPriority lcp; // logical Channel Prioritization
1539 typedef struct lcCfg
1549 typedef struct modulationInfo
1551 uint8_t modOrder; /* Modulation order */
1552 uint8_t mcsIndex; /* MCS Index */
1553 McsTable mcsTable; /* MCS table */
1556 typedef struct macUeCreateReq
1562 bool macCellGrpCfgPres;
1563 MacCellGrpCfg macCellGrpCfg;
1564 bool phyCellGrpCfgPres;
1565 PhyCellGrpCfg phyCellGrpCfg;
1567 SpCellCfg spCellCfg;
1569 ModulationInfo dlModInfo; /* DL modulation info */
1570 ModulationInfo ulModInfo; /* UL modulation info */
1572 LcCfg lcCfgList[MAX_NUM_LC];
1575 /* UE Re-configuration */
1576 typedef struct macUeRecfg
1582 bool macCellGrpRecfgPres;
1583 MacCellGrpCfg macCellGrpRecfg;
1584 bool phyCellGrpRecfgPres;
1585 PhyCellGrpCfg phyCellGrpRecfg;
1586 bool spCellRecfgPres;
1587 SpCellRecfg spCellRecfg;
1589 ModulationInfo dlModInfo;
1590 ModulationInfo ulModInfo;
1591 uint8_t numLcsToAdd;
1592 LcCfg lcCfgAdd[MAX_NUM_LC];
1593 uint8_t numLcsToDel;
1594 uint8_t lcIdToDel[MAX_NUM_LC];
1595 uint8_t numLcsToMod;
1596 LcCfg lcCfgMod[MAX_NUM_LC];
1597 DataTransmissionAction transmissionAction;
1599 bool drxConfigIndicatorRelease;
1603 typedef struct nrcgi
1609 typedef struct srbFailInfo
1615 typedef struct drbFailInfo
1621 typedef struct sCellFailInfo
1627 typedef struct macUeCreateRsp
1632 uint8_t numSRBFailed; /* valid values : 0 to MAX_NUM_SRB */
1633 SRBFailInfo *failedSRBlisti;
1634 uint8_t numDRBFailed; /* valid values : 0 to MAX_NUM_DRB */
1635 DRBFailInfo *failedDRBlist;
1636 uint8_t numSCellFailed; /* valid values : 0 to MAX_NUM_SCELL */
1637 SCellFailInfo *failedSCellList;
1638 uint8_t numDRBModFailed; /* valid values : 0 to MAX_NUM_DRB */
1639 DRBFailInfo *failedDRBModlist;
1642 typedef struct macUeCreateRsp MacUeRecfgRsp;
1644 typedef struct rachRsrcReq
1649 uint8_t ssbIdx[MAX_NUM_SSB];
1652 typedef struct macCfraSsbResource
1655 uint8_t raPreambleIdx;
1656 }MacCfraSsbResource;
1658 typedef struct macCfraResource
1661 MacCfraSsbResource ssbResource[MAX_NUM_SSB];
1664 typedef struct macRachRsrcRsp
1669 uint16_t newCrnti; /* This parameter maps to 3GPP TS 38.331 newUE-Identity */
1670 MacCfraResource cfraResource;
1673 typedef struct macRachRsrcRel
1680 typedef struct ueDelete
1687 typedef struct ueDeleteRsp
1691 CauseOfResult status;
1694 typedef struct macCellDeleteReq
1699 typedef struct macCellDeleteRsp
1702 CauseOfResult status;
1705 typedef struct macSliceCfgRsp
1709 CauseOfResult cause;
1712 typedef struct rrmPolicyRatio
1716 uint8_t dedicatedRatio;
1719 typedef struct rrmPolicyMemberList
1723 }RrmPolicyMemberList;
1725 typedef struct macSliceRrmPolicy
1727 ResourceType resourceType;
1728 uint8_t numOfRrmPolicyMem;
1729 RrmPolicyMemberList **rRMPolicyMemberList;
1730 RrmPolicyRatio policyRatio;
1733 typedef struct macSliceCfgReq
1735 uint8_t numOfRrmPolicy;
1736 MacSliceRrmPolicy **listOfRrmPolicy;
1739 /*As per ORAN-WG8, Slice Cfg and ReCfg are same structures*/
1740 typedef struct macSliceCfgReq MacSliceRecfgReq;
1741 typedef struct macSliceCfgRsp MacSliceRecfgRsp;
1743 /* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.17 DL PCCH Indication */
1744 typedef struct dlPcchInd
1754 /* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.1 Cell Start */
1755 typedef struct cellInfo
1757 SlotTimingInfo slotInfo;
1761 typedef struct cellInfo CellStartInfo;
1762 typedef struct cellInfo CellStopInfo;
1764 /* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.12 UE Reset Request */
1765 typedef struct ueReset
1771 /* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.13 UE Reset Response */
1772 typedef struct ueResetRsp
1776 CauseOfResult status;
1779 /* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.14 UE Sync Status Indication */
1780 typedef struct ueSyncStatusInd
1785 }MacUeSyncStatusInd;
1787 /* The following list of structures is taken from the SI-SchedulingInfo section of specification 33.331. */
1788 typedef struct sibTypeInfo
1795 typedef struct sibMappingInfo
1797 uint8_t numSibTypeInfo;
1798 SibTypeInfo sibTypeInfo[NUM_SIB];
1801 typedef struct schedulingInfo
1803 SiBroadcastStatus siBroadcastStatus;
1804 SiPeriodicity siPeriodicity;
1805 SibMappingInfo sibMappingInfo;
1808 typedef struct rachOccasionsSi
1810 RachCfgGeneric rachConfigSi;
1811 SsbPerRachOccasion ssbPerRachOccasion;
1814 typedef struct siReqRsrc
1816 uint8_t raPreambleStartIndex;
1817 uint8_t raAssociationPeriodIndex;
1818 uint8_t raSsbOccasionMaskIndex;
1821 typedef struct siRequestResource
1823 uint8_t numOfSiReqRsrc;
1824 SiReqRsrc siReqRsrc[MAX_SI_MESSAGE];
1827 typedef struct siRequestConfig
1829 RachOccasionsSi rachOccasionsSi;
1830 SiRequestPeriod siRequestPeriod;
1831 SiRequestResource siRequestResource;
1834 typedef struct schedulingInfoList
1837 SchedulingInfo schedulingInfo[MAX_SI_MESSAGE];
1838 }SchedulingInfoList;
1840 typedef struct siSchedulingInfo
1842 SchedulingInfoList schInfoList;
1843 SiWindowLength siWindowLength;
1844 SiRequestConfig siRequestConfig;
1845 SiRequestConfig siRequestConfigSUL;
1849 /* Ref: ORAN_WG8.V7.0.0 Sec 1.1.1.18 DL Broadcast Request */
1850 typedef struct macDlBroadcastReq
1854 SiSchedulingInfo **siSchedulingInfo;
1857 typedef struct macStatsInfo
1859 MacMeasurementType type;
1860 uint16_t periodicity; /* In milliseconds */
1863 typedef struct macStatsReq
1866 MacStatsInfo statsList[MAX_NUM_STATS];
1869 typedef struct macStatsRsp
1872 CauseOfResult cause;
1875 /****************** FUNCTION POINTERS ********************************/
1877 /* DL broadcast req from DU APP to MAC*/
1878 typedef uint8_t (*DuMacDlBroadcastReq) ARGS((
1880 MacDlBroadcastReq *dlBroadcast));
1882 /* Functions for CellUp Ind from MAC to DU APP*/
1883 typedef uint8_t (*DuMacCellUpInd) ARGS((
1885 OduCellId *cellId ));
1887 /* Functions for slot Ind from MAC to DU APP*/
1888 typedef uint8_t (*DuMacSlotInd) ARGS((
1890 SlotTimingInfo *slotIndInfo));
1892 /* Functions for stop Ind from MAC to DU APP*/
1893 typedef uint8_t (*DuMacStopInd) ARGS((
1895 OduCellId *cellId ));
1897 /* Functions for mac cell start req */
1898 typedef uint8_t (*DuMacCellStart) ARGS((
1900 CellStartInfo *cellId));
1902 /* Functions for mac cell stop request */
1903 typedef uint8_t (*DuMacCellStop) ARGS((
1905 CellStopInfo *cellId ));
1907 /* Function pointers for packing macCellCfg Request and Confirm */
1908 typedef uint8_t (*packMacCellCfgReq) ARGS((
1910 MacCellCfg *macCellCfg ));
1912 typedef uint8_t (*packMacCellCfgConfirm) ARGS((
1914 MacCellCfgCfm *macCellCfgCfm ));
1916 typedef uint8_t (*DuMacCellCfgReq) ARGS((
1918 MacCellCfg *macCellCfg));
1920 typedef uint8_t (*DuMacCellCfgCfm) ARGS((
1922 MacCellCfgCfm *macCellCfgCfm ));
1924 /* Functions for UL CCCH Ind from MAC to DU APP*/
1925 typedef uint8_t (*DuMacUlCcchInd) ARGS((
1927 UlCcchIndInfo *ulCcchIndInfo ));
1929 /* Functions for DL CCCH Ind from DU APP to MAC*/
1930 typedef uint8_t (*DuMacDlCcchInd) ARGS((
1932 DlCcchIndInfo *dlCcchIndInfo ));
1934 /* UE create Request from DU APP to MAC*/
1935 typedef uint8_t (*DuMacUeCreateReq) ARGS((
1937 MacUeCreateReq *ueCfg ));
1939 /* UE create Response from MAC to DU APP */
1940 typedef uint8_t (*MacDuUeCreateRspFunc) ARGS((
1942 MacUeCreateRsp *cfgRsp));
1944 /* UE Reconfig Request from DU APP to MAC */
1945 typedef uint8_t (*DuMacUeReconfigReq) ARGS((
1947 MacUeRecfg *ueCfg ));
1949 /* UE Reconfig Response from MAC to DU APP */
1950 typedef uint8_t (*MacDuUeRecfgRspFunc) ARGS((
1952 MacUeRecfgRsp *cfgRsp));
1954 /* RACH Resource Request from DU APP to MAC */
1955 typedef uint8_t (*DuMacRachRsrcReq) ARGS((
1957 MacRachRsrcReq *rachRsrcReq));
1959 /* RACH Resource Response from MAC to DU APP */
1960 typedef uint8_t (*MacDuRachRsrcRspFunc) ARGS((
1962 MacRachRsrcRsp *rachRsrcRsp));
1964 /* RACH Resource Release from DU APP to MAC */
1965 typedef uint8_t (*DuMacRachRsrcRel) ARGS((
1967 MacRachRsrcRel *rachRsrcRel));
1969 /* UE Delete Request from DU APP to MAC*/
1970 typedef uint8_t (*DuMacUeDeleteReq) ARGS((
1972 MacUeDelete *ueDel ));
1974 /* UE Delete Response from MAC to DU APP*/
1975 typedef uint8_t (*MacDuUeDeleteRspFunc) ARGS((
1977 MacUeDeleteRsp *deleteRsp));
1979 /* Cell Delete Request from DU APP to MAC*/
1980 typedef uint8_t (*DuMacCellDeleteReq) ARGS((
1982 MacCellDeleteReq *cellDelete ));
1984 /* Cell Delete Response from MAC to DU APP*/
1985 typedef uint8_t (*MacDuCellDeleteRspFunc) ARGS((
1987 MacCellDeleteRsp *cellDeleteRsp));
1989 /* Slice Cfg Request from DU APP to MAC*/
1990 typedef uint8_t (*DuMacSliceCfgReq) ARGS((
1992 MacSliceCfgReq *CfgReq));
1994 /* Slice Cfg Response from MAC to DU APP */
1995 typedef uint8_t (*MacDuSliceCfgRspFunc) ARGS((
1997 MacSliceCfgRsp *cfgRsp));
1999 /* Slice ReReCfg Request from DU APP to MAC*/
2000 typedef uint8_t (*DuMacSliceRecfgReq) ARGS((
2002 MacSliceRecfgReq *CfgReq));
2004 /* Slice ReReCfg Response from MAC to DU APP */
2005 typedef uint8_t (*MacDuSliceRecfgRspFunc) ARGS((
2007 MacSliceRecfgRsp *cfgRsp));
2009 /* Pcch indication from DU APP to MAC*/
2010 typedef uint8_t (*DuMacDlPcchInd) ARGS((
2012 DlPcchInd *pcchInd));
2014 /* UE Reset Request from DU APP to MAC*/
2015 typedef uint8_t (*DuMacUeResetReq) ARGS((
2017 MacUeResetReq *ueReset ));
2019 /* UE Reset Response from MAC to DU APP*/
2020 typedef uint8_t (*MacDuUeResetRspFunc) ARGS((
2022 MacUeResetRsp *resetRsp));
2024 /* UE sync status indication from MAC to DU APP*/
2025 typedef uint8_t (*MacDuUeSyncStatusIndFunc) ARGS((
2027 MacUeSyncStatusInd *syncStatusInd));
2029 /* Statitics Request from DU APP to MAC */
2030 typedef uint8_t (*DuMacStatsReqFunc) ARGS((
2032 MacStatsReq *statsReq));
2034 /* Statistics Response from MAC to DU APP */
2035 typedef uint8_t (*MacDuStatsRspFunc) ARGS((
2037 MacStatsRsp *statsRsp));
2039 /******************** FUNCTION DECLARATIONS ********************************/
2040 uint8_t packMacCellUpInd(Pst *pst, OduCellId *cellId);
2041 uint8_t unpackMacCellUpInd(DuMacCellUpInd func, Pst *pst, Buffer *mBuf);
2042 uint8_t duHandleCellUpInd(Pst *pst, OduCellId *cellId);
2044 uint8_t packMacCellStart(Pst *pst, CellStartInfo *cellStartInfo);
2045 uint8_t unpackMacCellStart(DuMacCellStart func, Pst *pst, Buffer *mBuf);
2046 uint8_t MacProcCellStart(Pst *pst, CellStartInfo *cellStartInfo);
2048 uint8_t packMacCellStop(Pst *pst, CellStopInfo *cellStopInfo);
2049 uint8_t unpackMacCellStop(DuMacCellStop func, Pst *pst, Buffer *mBuf);
2050 uint8_t MacProcCellStop(Pst *pst, CellStopInfo *cellStopInfo);
2052 uint8_t packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg);
2053 uint8_t unpackDuMacCellCfg(DuMacCellCfgReq func, Pst *pst, Buffer *mBuf);
2054 uint8_t MacProcCellCfgReq(Pst *pst, MacCellCfg *macCellCfg);
2056 uint8_t packMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
2057 uint8_t unpackMacCellCfgCfm(DuMacCellCfgCfm func, Pst *pst, Buffer *mBuf);
2058 uint8_t duHandleMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
2060 uint8_t packMacStopInd(Pst *pst, OduCellId *cellId);
2061 uint8_t unpackMacStopInd(DuMacStopInd func, Pst *pst, Buffer *mBuf);
2062 uint8_t duHandleStopInd(Pst *pst, OduCellId *cellId);
2063 uint8_t sendStopIndMacToDuApp(uint16_t cellId);
2065 uint8_t packMacUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
2066 uint8_t unpackMacUlCcchInd(DuMacUlCcchInd func, Pst *pst, Buffer *mBuf);
2067 uint8_t duHandleUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
2069 uint8_t packMacDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
2070 uint8_t unpackMacDlCcchInd(DuMacDlCcchInd func, Pst *pst, Buffer *mBuf);
2071 uint8_t MacProcDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
2073 uint8_t packDuMacUeCreateReq(Pst *pst, MacUeCreateReq *ueCfg);
2074 uint8_t unpackMacUeCreateReq(DuMacUeCreateReq func, Pst *pst, Buffer *mBuf);
2075 uint8_t MacProcUeCreateReq(Pst *pst, MacUeCreateReq *ueCfg);
2077 uint8_t packDuMacUeCreateRsp(Pst *pst, MacUeCreateRsp *cfgRsp);
2078 uint8_t unpackDuMacUeCreateRsp(MacDuUeCreateRspFunc func, Pst *pst, Buffer *mBuf);
2079 uint8_t DuProcMacUeCreateRsp(Pst *pst, MacUeCreateRsp *cfgRsp);
2081 uint8_t packDuMacUeReconfigReq(Pst *pst, MacUeRecfg *ueRecfg);
2082 uint8_t unpackMacUeReconfigReq(DuMacUeReconfigReq func, Pst *pst, Buffer *mBuf);
2083 uint8_t MacProcUeReconfigReq(Pst *pst, MacUeRecfg *ueRecfg);
2085 uint8_t packDuMacUeRecfgRsp(Pst *pst, MacUeRecfgRsp *recfgRsp);
2086 uint8_t unpackDuMacUeRecfgRsp(MacDuUeRecfgRspFunc func, Pst *pst, Buffer *mBuf);
2087 uint8_t DuProcMacUeRecfgRsp(Pst *pst, MacUeRecfgRsp *recfgRsp);
2089 uint8_t packDuMacRachRsrcReq(Pst *pst, MacRachRsrcReq *rachRsrcReq);
2090 uint8_t unpackMacRachRsrcReq(DuMacRachRsrcReq func, Pst *pst, Buffer *mBuf);
2091 uint8_t MacProcRachRsrcReq(Pst *pst, MacRachRsrcReq *rachRsrcReq);
2093 uint8_t packDuMacRachRsrcRsp(Pst *pst, MacRachRsrcRsp *rachRsrcRsp);
2094 uint8_t unpackDuMacRachRsrcRsp(MacDuRachRsrcRspFunc func, Pst *pst, Buffer *mBuf);
2095 uint8_t DuProcMacRachRsrcRsp(Pst *pst, MacRachRsrcRsp *rachRsrcRsp);
2097 uint8_t packDuMacRachRsrcRel(Pst *pst, MacRachRsrcRel *rachRsrcRel);
2098 uint8_t unpackMacRachRsrcRel(DuMacRachRsrcRel func, Pst *pst, Buffer *mBuf);
2099 uint8_t MacProcRachRsrcRel(Pst *pst, MacRachRsrcRel *rachRsrcRel);
2101 uint8_t packDuMacUeDeleteReq(Pst *pst, MacUeDelete *ueDelete);
2102 uint8_t MacProcUeDeleteReq(Pst *pst, MacUeDelete *ueDelete);
2103 uint8_t unpackMacUeDeleteReq(DuMacUeDeleteReq func, Pst *pst, Buffer *mBuf);
2105 uint8_t packDuMacUeDeleteRsp(Pst *pst, MacUeDeleteRsp *deleteRsp);
2106 uint8_t DuProcMacUeDeleteRsp(Pst *pst, MacUeDeleteRsp *deleteRsp);
2107 uint8_t unpackDuMacUeDeleteRsp(MacDuUeDeleteRspFunc func, Pst *pst, Buffer *mBuf);
2109 uint8_t packDuMacCellDeleteReq(Pst *pst, MacCellDeleteReq *cellDelete);
2110 uint8_t MacProcCellDeleteReq(Pst *pst, MacCellDeleteReq *cellDelete);
2111 uint8_t unpackMacCellDeleteReq(DuMacCellDeleteReq func, Pst *pst, Buffer *mBuf);
2113 uint8_t packDuMacCellDeleteRsp(Pst *pst, MacCellDeleteRsp *cellDeleteRsp);
2114 uint8_t DuProcMacCellDeleteRsp(Pst *pst, MacCellDeleteRsp *cellDeleteRsp);
2115 uint8_t unpackDuMacCellDeleteRsp(MacDuCellDeleteRspFunc func, Pst *pst, Buffer *mBuf);
2117 uint8_t packDuMacSliceCfgReq(Pst *pst, MacSliceCfgReq *sliceCfgReq);
2118 uint8_t MacProcSliceCfgReq(Pst *pst, MacSliceCfgReq *sliceCfgReq);
2119 uint8_t unpackMacSliceCfgReq(DuMacSliceCfgReq func, Pst *pst, Buffer *mBuf);
2121 uint8_t DuProcMacSliceCfgRsp(Pst *pst, MacSliceCfgRsp *cfgRsp);
2122 uint8_t packDuMacSliceCfgRsp(Pst *pst, MacSliceCfgRsp *cfgRsp);
2123 uint8_t unpackDuMacSliceCfgRsp(MacDuSliceCfgRspFunc func, Pst *pst, Buffer *mBuf);
2125 uint8_t packDuMacSliceRecfgReq(Pst *pst, MacSliceRecfgReq *sliceRecfgReq);
2126 uint8_t MacProcSliceRecfgReq(Pst *pst, MacSliceRecfgReq *sliceRecfgReq);
2127 uint8_t unpackMacSliceRecfgReq(DuMacSliceRecfgReq func, Pst *pst, Buffer *mBuf);
2129 uint8_t DuProcMacSliceRecfgRsp(Pst *pst, MacSliceRecfgRsp *sliceRecfgRsp);
2130 uint8_t packDuMacSliceRecfgRsp(Pst *pst, MacSliceRecfgRsp *sliceRecfgRsp);
2131 uint8_t unpackDuMacSliceRecfgRsp(MacDuSliceRecfgRspFunc func, Pst *pst, Buffer *mBuf);
2133 uint8_t duHandleSlotInd(Pst *pst, SlotTimingInfo *slotIndInfo);
2134 uint8_t packMacSlotInd(Pst *pst, SlotTimingInfo *slotIndInfo);
2135 uint8_t unpackDuMacSlotInd(DuMacSlotInd func, Pst *pst, Buffer *mBuf);
2137 uint8_t packDuMacDlPcchInd(Pst *pst, DlPcchInd *pcchInd);
2138 uint8_t MacProcDlPcchInd(Pst *pst, DlPcchInd *pcchInd);
2139 uint8_t unpackMacDlPcchInd(DuMacDlPcchInd func, Pst *pst, Buffer *mBuf);
2141 int8_t getFreeBitFromUeBitMap(uint16_t cellId);
2142 void unsetBitInUeBitMap(uint16_t cellId, uint8_t bitPos);
2144 uint8_t packDuMacUeResetReq(Pst *pst, MacUeResetReq *ueReset);
2145 uint8_t MacProcUeResetReq(Pst *pst, MacUeResetReq *ueReset);
2146 uint8_t unpackMacUeResetReq(DuMacUeResetReq func, Pst *pst, Buffer *mBuf);
2148 uint8_t packDuMacUeResetRsp(Pst *pst, MacUeResetRsp *resetRsp);
2149 uint8_t DuProcMacUeResetRsp(Pst *pst, MacUeResetRsp *resetRsp);
2150 uint8_t unpackDuMacUeResetRsp(MacDuUeResetRspFunc func, Pst *pst, Buffer *mBuf);
2152 uint8_t packDuMacUeSyncStatusInd(Pst *pst, MacUeSyncStatusInd *ueSyncStatusInd);
2153 uint8_t DuProcMacUeSyncStatusInd(Pst *pst, MacUeSyncStatusInd *ueSyncStatusInd);
2154 uint8_t unpackDuMacUeSyncStatusInd(MacDuUeSyncStatusIndFunc func, Pst *pst, Buffer *mBuf);
2156 uint8_t packDuMacDlBroadcastReq(Pst *pst, MacDlBroadcastReq *dlBroadcastReq);
2157 uint8_t MacProcDlBroadcastReq(Pst *pst, MacDlBroadcastReq *dlBroadcastReq);
2158 uint8_t unpackMacDlBroadcastReq(DuMacDlBroadcastReq func, Pst *pst, Buffer *mBuf);
2160 uint8_t packDuMacStatsReq(Pst *pst, MacStatsReq *statsReq);
2161 uint8_t MacProcStatsReq(Pst *pst, MacStatsReq *statsReq);
2162 uint8_t unpackMacStatsReq(DuMacStatsReqFunc func, Pst *pst, Buffer *mBuf);
2164 uint8_t packDuMacStatsRsp(Pst *pst, MacStatsRsp *statsRsp);
2165 uint8_t DuProcMacStatsRsp(Pst *pst, MacStatsRsp *statsRsp);
2166 uint8_t unpackDuMacStatsRsp(MacDuStatsRspFunc func, Pst *pst, Buffer *mBuf);
2171 /**********************************************************************
2173 **********************************************************************/