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 MAXIMUM_TDD_PERIODICITY 5
25 #define MAX_SYMB_PER_SLOT 14
27 #define NUM_SSB 1 /* max value is 64 */
28 #define SSB_MASK_SIZE 1 /* SSB mask size is 32bit for sub6 */
29 #define SIB1_NEW_TX_PERIOD 160
30 #define SIB1_REPETITION_PERIOD 20
31 #define CORESET_0_INDEX 0
32 #define CORESET_1_INDEX 1
33 #define CORESET_2_INDEX 2
34 #define CORESET_3_INDEX 3
35 #define CORESET_4_INDEX 4
36 #define SEARCHSPACE_0_INDEX 0
37 #define SEARCHSPACE_1_INDEX 1
38 #define SEARCHSPACE_2_INDEX 2
39 #define SEARCHSPACE_3_INDEX 3
40 #define SEARCHSPACE_4_INDEX 4
41 #define SS_MONITORING_SLOT_SL1 0 /* all slots */
42 #define SS_MONITORING_SYMBOL 0x2000; /* symbol-0, set 14th bit */
45 /* Macro for Ue Context */
46 #define MAX_NUM_SR_CFG_PER_CELL_GRP 8 /* Max number of scheduling request config per cell group */
47 #define MAC_NUM_TAGS 4 /* Max number of timing advance groups */
48 #define MAX_NUM_BWP 4 /* Max number of BWP per serving cell */
49 #define MAX_NUM_CRSET 3 /* Max number of control resource set in add/modify/release list */
50 #define MAX_NUM_SEARCH_SPC 10 /* Max number of search space in add/modify/release list */
51 #define MONITORING_SYMB_WITHIN_SLOT_SIZE 2 /* i.e. 2 bytes because size of monitoring symbols within slot is 14 bits */
52 #define MAX_NUM_DL_ALLOC 16 /* Max number of pdsch time domain downlink allocation */
53 #define MAX_NUM_UL_ALLOC 16 /* Max number of pusch time domain uplink allocation */
54 #define SD_SIZE 3 /* Max size of Slice Differentiator in S-NSSAI */
57 #define MAX_NUM_DRB 64
58 #define MAX_NUM_SCELL 32
61 #define EVENT_MAC_CELL_CONFIG_REQ 200
62 #define EVENT_MAC_CELL_CONFIG_CFM 201
63 #define EVENT_MAC_CELL_START_REQ 202
64 #define EVENT_MAC_CELL_STOP_REQ 203
65 #define EVENT_MAC_SLOT_IND 204
66 #define EVENT_MAC_STOP_IND 205
67 #define EVENT_MAC_UL_CCCH_IND 206
68 #define EVENT_MAC_DL_CCCH_IND 207
69 #define EVENT_MAC_UE_CREATE_REQ 208
70 #define EVENT_MAC_UE_CREATE_RSP 209
71 #define EVENT_MAC_UE_RECONFIG_REQ 210
72 #define EVENT_MAC_UE_RECONFIG_RSP 211
74 #define BSR_PERIODIC_TIMER_SF_10 10
75 #define BSR_RETX_TIMER_SF_320 320
76 #define BSR_SR_DELAY_TMR_2560 2560
92 MAC_GEN_FULL_PBCH_PAYLD, /* MAC generated the full PBCH Payload */
93 PHY_GEN_TIMING_PBCH_BIT, /* PHY generates the timing PBCH bits */
94 PHY_GEN_FULL_PBCH_PAYLD /* PHY generates full PBCH payload */
106 RESTRICTED_SET_TYPE_A,
107 RESTRICTED_SET_TYPE_B
158 /* Enums for Ue Create Request */
160 /* SR PROHIBIT TIMER */
187 TIME_ALIGNMENT_TIMER_MS_500,
188 TIME_ALIGNMENT_TIMER_MS_750,
189 TIME_ALIGNMENT_TIMER_MS_1280,
190 TIME_ALIGNMENT_TIMER_MS_1920,
191 TIME_ALIGNMENT_TIMER_MS_2560,
192 TIME_ALIGNMENT_TIMER_MS_5120,
193 TIME_ALIGNMENT_TIMER_MS_10240,
194 TIME_ALIGNMENT_TIMER_INFINITY
199 PHR_PERIODIC_TIMER_SF_10,
200 PHR_PERIODIC_TIMER_SF_20,
201 PHR_PERIODIC_TIMER_SF_50,
202 PHR_PERIODIC_TIMER_SF_100,
203 PHR_PERIODIC_TIMER_SF_200,
204 PHR_PERIODIC_TIMER_SF_500,
205 PHR_PERIODIC_TIMER_SF_1000,
206 PHR_PERIODIC_TIMER_INFINITY
211 PHR_PROHIBIT_TIMER_SF_0,
212 PHR_PROHIBIT_TIMER_SF_10,
213 PHR_PROHIBIT_TIMER_SF_20,
214 PHR_PROHIBIT_TIMER_SF_50,
215 PHR_PROHIBIT_TIMER_SF_100,
216 PHR_PROHIBIT_TIMER_SF_200,
217 PHR_PROHIBIT_TIMER_SF_500,
218 PHR_PROHIBIT_TIMER_SF_1000
223 PHR_TX_PWR_FACTOR_CHANGE_DB_1,
224 PHR_TX_PWR_FACTOR_CHANGE_DB_3,
225 PHR_TX_PWR_FACTOR_CHANGE_DB_6,
226 PHR_TX_PWR_FACTOR_CHANGE_INFINITY
227 }PhrTxPwrFactorChange;
231 PHR_MODE_OTHER_CG_REAL,
232 PHR_MODE_OTHER_CG_VIRTUAL
237 PDSCH_HARQ_ACK_CODEBOOK_SEMISTATIC,
238 PDSCH_HARQ_ACK_CODEBOOK_DYNAMIC
239 }PdschHarqAckCodebook;
243 NUM_HARQ_PROC_FOR_PDSCH_N_2,
244 NUM_HARQ_PROC_FOR_PDSCH_N_4,
245 NUM_HARQ_PROC_FOR_PDSCH_N_6,
246 NUM_HARQ_PROC_FOR_PDSCH_N_10,
247 NUM_HARQ_PROC_FOR_PDSCH_N_16
248 }NumHarqProcForPdsch;
252 MAX_CODE_BLOCK_GROUP_PER_TB_N_2,
253 MAX_CODE_BLOCK_GROUP_PER_TB_N_4,
254 MAX_CODE_BLOCK_GROUP_PER_TB_N_6,
255 MAX_CODE_BLOCK_GROUP_PER_TB_N_8
267 TRANSFORM_PRECODER_ENABLED,
268 TRANSFORM_PRECODER_DISABLED
273 CCE_REG_MAPPINGTYPE_PR_INTERLEAVED = 1,
274 CCE_REG_MAPPINGTYPE_PR_NONINTERLEAVED
279 SLOTPERIODICITYANDOFFSET_PR_SL1 = 1,
280 SLOTPERIODICITYANDOFFSET_PR_SL2,
281 SLOTPERIODICITYANDOFFSET_PR_SL4,
282 SLOTPERIODICITYANDOFFSET_PR_SL5,
283 SLOTPERIODICITYANDOFFSET_PR_SL8,
284 SLOTPERIODICITYANDOFFSET_PR_SL10,
285 SLOTPERIODICITYANDOFFSET_PR_SL16,
286 SLOTPERIODICITYANDOFFSET_PR_SL20,
287 SLOTPERIODICITYANDOFFSET_PR_SL40,
288 SLOTPERIODICITYANDOFFSET_PR_SL80,
289 SLOTPERIODICITYANDOFFSET_PR_SL160,
290 SLOTPERIODICITYANDOFFSET_PR_SL320,
291 SLOTPERIODICITYANDOFFSET_PR_SL640,
292 SLOTPERIODICITYANDOFFSET_PR_SL1280,
293 SLOTPERIODICITYANDOFFSET_PR_SL2560
294 }MSlotPeriodAndOffset;
304 SEARCHSPACETYPE_PR_COMMON = 1,
305 SEARCHSPACETYPE_PR_UE_SPECIFIC
316 AGGREGATIONLEVEL_N0 = 0,
317 AGGREGATIONLEVEL_N1 = 1,
318 AGGREGATIONLEVEL_N2 = 2,
319 AGGREGATIONLEVEL_N3 = 3,
320 AGGREGATIONLEVEL_N4 = 4,
321 AGGREGATIONLEVEL_N5 = 5,
322 AGGREGATIONLEVEL_N6 = 6,
323 AGGREGATIONLEVEL_N8 = 7
328 ADDITIONALPOSITION_POS0,
329 ADDITIONALPOSITION_POS1,
330 ADDITIONALPOSITION_POS3
341 RESOURCEALLOCATION_TYPE0,
342 RESOURCEALLOCATION_TYPE1,
343 RESOURCEALLOCATION_DYNAMICSWITCH
354 CODEWORDS_SCHED_BY_DCI_N1,
355 CODEWORDS_SCHED_BY_DCI_N2
360 TYPE_STATIC_BUNDLING = 1,
361 TYPE_DYNAMIC_BUNDLING
374 SET1_SIZE_N2_WIDEBAND,
375 SET1_SIZE_N4_WIDEBAND
429 TRANSPORT_LAYER_FAIL,
436 UNSPECIFIED_RADIO_NW_CAUSE,
438 UNKNOWN_GNB_CU_UE_F1AP_ID,
439 ALREADY_ALLOCATED_GNB_CU_UE_F1AP_ID,
440 UNKNOWN_GNB_DU_UE_F1AP_ID,
441 ALREADY_ALLOCATED_GNB_DU_UE_F1AP_ID,
442 UNKNOWN_UE_F1AP_ID_PAIR,
443 INCONSISTENT_UE_F1AP_ID_PAIR,
444 INTERACTION_WITH_OTHER_PROCEDURE,
446 ACTION_REQUIRED_FOR_RADIO_REASONS,
447 RADIO_RESOURCES_UNAVAILABLE,
453 RESOURCES_UNAVAILABLE_FOR_SLICE
458 UNSPECIFIED_TRANSPORT_LAYER_CAUSE,
459 TRANSPORT_RESOURCE_UNAVAILABLE
464 TRANSFER_SYNTAX_ERROR,
465 ABSTRACT_SYNTAX_ERROR_REJECT,
466 ABSTRACT_SYNTAX_ERROR_IGNORE_AND_REJECT,
467 INCOMPATIBLE_MESSAGE_FOR_RECEIVER_STATE,
469 ABSTRAXCT_SYNTAX_ERROR_FALSELY_CONSTRUCTED_MSG,
470 UNSPECIFIED_PROTOCOL_CAUSE
475 CONTROL_PROCESSING_OVERLOAD,
477 PLANE_PROCESSING_RESOURCES,
479 INTERVENTION_BY_O_AND_M,
480 UNSPECIFIED_MISC_CAUSE
487 MCS_TABLE_QAM64_LOW_SE
490 typedef struct failureCause
495 RadioNwLyrCause radioNwCause;
496 TransLyrCause transportCause;
497 ProtCause protcolCause;
498 MiscFailCause miscCause;
502 typedef struct carrierCfg
505 uint32_t bw; /* DL/UL bandwidth */
506 uint32_t freq; /* Absolute frequency of DL/UL point A in KHz */
507 uint16_t k0[NUM_NUMEROLOGY]; /* K0 for DL/UL */
508 uint16_t gridSize[NUM_NUMEROLOGY]; /* DL/UL Grid size for each numerologies */
509 uint16_t numAnt; /* Number of Tx/Rx antennas */
512 typedef struct ssbCfg
514 uint32_t ssbPbchPwr; /* SSB block power */
515 BchPduOpt bchPayloadFlag; /* Options for generation of payload */
516 uint8_t scsCmn; /* subcarrier spacing for common */
517 uint16_t ssbOffsetPointA; /* SSB subcarrier offset from point A */
519 SSBPeriod ssbPeriod; /* SSB Periodicity in msec */
520 uint8_t ssbScOffset; /* Subcarrier Offset */
521 uint8_t mibPdu[3]; /* MIB payload */
522 uint32_t ssbMask[SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */
523 uint8_t beamId[NUM_SSB];
524 bool multCarrBand; /* Multiple carriers in a band */
525 bool multCellCarr; /* Multiple cells in single carrier */
528 typedef struct fdmInfo
530 uint16_t rootSeqIdx; /* Root sequence index */
531 uint8_t numRootSeq; /* Number of root sequences required for FD */
532 uint16_t k1; /* Frequency Offset for each FD */
533 uint8_t zeroCorrZoneCfg; /* Zero correlation zone cofig */
534 uint8_t numUnusedRootSeq; /* Number of unused root sequence */
535 uint8_t *unsuedRootSeq; /* Unused root sequence per FD */
538 typedef struct prachCfg
541 uint8_t prachCfgIdx; /* PRACH Cfg Index */
542 PrachSeqLen prachSeqLen; /* RACH Sequence length: Long/short */
543 uint8_t prachSubcSpacing; /* Subcarrier spacing of RACH */
544 RstSetCfg prachRstSetCfg; /* PRACH restricted set config */
545 uint16_t msg1FreqStart; /* Msg1-FrequencyStart */
546 uint8_t msg1Fdm; /* PRACH FDM (1,2,4,8) */
547 uint8_t rootSeqLen; /* Root sequence length */
548 PrachFdmInfo fdm[8]; /* FDM info */
549 uint8_t ssbPerRach; /* SSB per RACH occassion */
550 bool prachMultCarrBand; /* Multiple carriers in Band */
551 uint8_t prachRestrictedSet; /* Support for PRACH restricted set */
552 uint8_t raContResTmr; /* RA Contention Resoultion Timer */
553 uint8_t rsrpThreshSsb; /* RSRP Threshold SSB */
554 uint8_t raRspWindow; /* RA Response Window */
557 typedef struct tddCfg
560 DlUlTxPeriodicity tddPeriod; /* DL UL Transmission periodicity */
561 SlotConfig slotCfg[MAXIMUM_TDD_PERIODICITY][MAX_SYMB_PER_SLOT];
564 typedef struct sib1CellCfg
568 uint16_t sib1NewTxPeriod;
569 uint16_t sib1RepetitionPeriod;
570 uint8_t coresetZeroIndex; /* derived from 4 LSB of pdcchSib1 present in MIB */
571 uint8_t searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */
575 typedef struct bwpParams
580 uint8_t cyclicPrefix;
583 typedef struct candidatesInfo
592 typedef struct searchSpaceCfg
594 uint8_t searchSpaceId;
596 uint16_t monitoringSlot;
598 uint16_t monitoringSymbol;
599 CandidatesInfo candidate;
602 typedef struct pdcchConfigCommon
604 /* only one search space is configured during SIB1 */
605 SearchSpaceCfg commonSearchSpace;
606 uint8_t raSearchSpaceId;
609 typedef struct pdschConfigCommon
614 uint8_t lengthSymbol;
617 typedef struct pucchConfigCommon
619 uint8_t pucchResourceCommon;
620 uint8_t pucchGroupHopping;
623 typedef struct puschConfigCommon
625 /* PUSCH-TimeDomainResourceAllocation info */
629 uint8_t lengthSymbol;
632 typedef struct bwpDlConfig
635 PdcchConfigCommon pdcchCommon;
636 PdschConfigCommon pdschCommon;
639 typedef struct bwpUlConfig
642 // rach config common sent in PrachCfg
643 PucchConfigCommon pucchCommon;
644 PuschConfigCommon puschCommon;
647 typedef struct macCellCfg
649 uint16_t cellId; /* Cell Id */
650 uint8_t carrierId; /* Carrired Index */
651 uint16_t phyCellId; /* Physical cell id */
652 uint8_t numerology; /* Supported numerology */
653 DuplexMode dupType; /* Duplex type: TDD/FDD */
654 CarrierCfg dlCarrCfg; /* DL Carrier configuration */
655 CarrierCfg ulCarrCfg; /* UL Carrier configuration */
656 bool freqShft; /* Indicates presence of 7.5kHz frequency shift */
657 SsbCfg ssbCfg; /* SSB configuration */
658 PrachCfg prachCfg; /* PRACH Configuration */
659 TDDCfg tddCfg; /* TDD periodicity and slot configuration */
660 RSSIMeasUnit rssiUnit; /* RSSI measurement unit */
661 Sib1CellCfg sib1Cfg; /* SIB1 config */
662 BwpDlConfig initialDlBwp; /* Initial DL BWP */
663 BwpUlConfig initialUlBwp; /* Initial UL BWP */
664 uint8_t dmrsTypeAPos; /* DMRS Type A position */
667 typedef struct macCellCfgCfm
673 typedef struct macCellStartInfo
678 typedef struct macCellStopInfo
683 typedef struct ulCcchInd
687 uint16_t ulCcchMsgLen;
691 typedef struct dlCcchInd
695 DlCcchMsgType msgType;
696 uint16_t dlCcchMsgLen;
700 typedef struct bsrTmrCfg
702 uint16_t periodicTimer;
704 uint16_t srDelayTimer;
708 /* Info of Scheduling Request to Add/Modify */
709 typedef struct schedReqInfo
712 SrProhibitTimer srProhibitTmr;
713 SrTransMax srTransMax;
716 /* Scheduling Request Configuration */
717 typedef struct schedReqCfg
719 uint8_t addModListCount;
720 SchedReqInfo addModList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* List of Scheduling req to be added/modified */
721 uint8_t relListCount;
722 uint8_t relList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* list of scheduling request Id to be deleted */
725 typedef struct tagInfo
728 TimeAlignmentTimer timeAlignTimer;
731 typedef struct tagCfg
733 uint8_t addModListCount;
734 TagInfo addModList[MAC_NUM_TAGS]; /* List of Tag to Add/Modify */
735 uint8_t relListCount;
736 uint8_t relList[MAC_NUM_TAGS]; /* list of Tag Id to release */
739 typedef struct phrCfg
741 PhrPeriodicTimer periodicTimer;
742 PhrProhibitTimer prohibitTimer;
743 PhrTxPwrFactorChange txPowerFactor;
746 bool phrType2OtherCell;
747 PhrModeOtherCG phrOtherCG;
750 typedef struct macCellGrpCfg
752 SchedReqCfg schReqCfg;
755 bool phrCfgSetupPres; /* true/false: phrCfgSetup/phrCfgRelease */
759 typedef struct phyCellGrpCfg
761 PdschHarqAckCodebook pdschHarqAckCodebook;
765 /* Control resource set info */
766 typedef struct controlRsrcSet
768 uint8_t cRSetId; /* Control resource set id */
769 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
771 REGMappingType cceRegMappingType;
772 PrecoderGranul precoderGranularity;
773 uint16_t dmrsScramblingId;
776 /* Search Space info */
777 typedef struct searchSpace
779 uint8_t searchSpaceId;
781 MSlotPeriodAndOffset mSlotPeriodicityAndOffset;
782 uint8_t mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
783 AggrLevel numCandidatesAggLevel1; /* Number of candidates for aggregation level 1 */
784 AggrLevel numCandidatesAggLevel2; /* Number of candidates for aggregation level 2 */
785 AggrLevel numCandidatesAggLevel4; /* Number of candidates for aggregation level 4 */
786 AggrLevel numCandidatesAggLevel8; /* Number of candidates for aggregation level 8 */
787 AggrLevel numCandidatesAggLevel16; /* Number of candidates for aggregation level 16 */
788 SearchSpaceType searchSpaceType;
789 uint8_t ueSpecificDciFormat;
792 /* PDCCH cofniguration */
793 typedef struct pdcchConfig
795 uint8_t numCRsetToAddMod;
796 ControlRsrcSet cRSetToAddModList[MAX_NUM_CRSET]; /* List of control resource set to add/modify */
797 uint8_t numCRsetToRel;
798 uint8_t cRSetToRelList[MAX_NUM_CRSET]; /* List of control resource set to release */
799 uint8_t numSearchSpcToAddMod;
800 SearchSpace searchSpcToAddModList[MAX_NUM_SEARCH_SPC]; /* List of search space to add/modify */
801 uint8_t numSearchSpcToRel;
802 uint8_t searchSpcToRelList[MAX_NUM_SEARCH_SPC]; /* List of search space to release */
805 /* PDSCH time domain resource allocation */
806 typedef struct pdschTimeDomRsrcAlloc
808 CommonMappingType mappingType;
810 uint8_t symbolLength;
811 uint8_t startSymbolAndLength;
812 }PdschTimeDomRsrcAlloc;
815 typedef struct pdschBundling
817 struct staticBundling
819 BundlingSizeSet2 size;
821 struct dynamicBundling
823 BundlingSizeSet1 sizeSet1;
824 BundlingSizeSet2 sizeSet2;
828 /* DMRS downlink configuration */
829 typedef struct dmrsDlCfg
831 AddPosType addPos; /* DMRS additional position */
834 /* PDSCH Configuration */
835 typedef struct pdschConfig
837 DmrsDlCfg dmrsDlCfgForPdschMapTypeA;
838 ResAllocType resourceAllocType;
839 uint8_t numTimeDomRsrcAlloc;
840 PdschTimeDomRsrcAlloc timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
842 CodeWordsSchedDci numCodeWordsSchByDci; /* Number of code words scheduled by DCI */
843 BundlingType bundlingType;
844 PdschBundling bundlingInfo;
847 /* Initial Downlink BWP */
848 typedef struct initialDlBwp
851 PdcchConfig pdcchCfg;
853 PdschConfig pdschCfg;
856 /* BWP Downlink common */
857 typedef struct bwpDlCommon
861 /* Downlink BWP information */
862 typedef struct dlBwpInfo
867 /* PDCCH Serving Cell configuration */
868 typedef struct pdschServCellCfg
870 uint8_t *maxMimoLayers;
871 NumHarqProcForPdsch numHarqProcForPdsch;
872 MaxCodeBlkGrpPerTB *maxCodeBlkGrpPerTb;
873 bool *codeBlkGrpFlushInd;
874 PdschXOverhead *xOverhead;
877 /* PUCCH Configuration */
878 typedef struct pucchCfg
880 /* TODO : Not used currently */
883 /* Transform precoding disabled */
884 typedef struct transPrecodDisabled
886 uint16_t scramblingId0;
887 }TransPrecodDisabled;
889 /* DMRS Uplink configuration */
890 typedef struct dmrsUlCfg
892 AddPosType addPos; /* DMRS additional position */
893 TransPrecodDisabled transPrecodDisabled; /* Transform precoding disabled */
896 /* PUSCH Time Domain Resource Allocation */
897 typedef struct puschTimeDomRsrcAlloc
900 CommonMappingType mappingType;
902 uint8_t symbolLength;
903 uint8_t startSymbolAndLength;
904 }PuschTimeDomRsrcAlloc;
906 /* PUSCH Configuration */
907 typedef struct puschCfg
909 uint8_t dataScramblingId;
910 DmrsUlCfg dmrsUlCfgForPuschMapTypeA;
911 ResAllocType resourceAllocType;
912 uint8_t numTimeDomRsrcAlloc;
913 PuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
914 TransformPrecoder transformPrecoder;
917 /* Initial Uplink BWP */
918 typedef struct initialUlBwp
926 /* Uplink BWP information */
927 typedef struct ulBwpInfo
932 /* Serving cell configuration */
933 typedef struct servCellCfgInfo
935 InitialDlBwp initDlBwp;
936 uint8_t numDlBwpToAdd;
937 DlBwpInfo DlBwpToAddList[MAX_NUM_BWP];
938 uint8_t firstActvDlBwpId;
939 uint8_t defaultDlBwpId;
940 uint8_t *bwpInactivityTmr;
941 PdschServCellCfg pdschServCellCfg;
942 InitialUlBwp initUlBwp;
943 uint8_t numUlBwpToAdd;
944 UlBwpInfo UlBwpToAddList[MAX_NUM_BWP];
945 uint8_t firstActvUlBwpId;
948 /* Special cell configuration */
949 typedef struct spCellCfg
952 ServCellCfgInfo servCellCfg;
955 typedef struct ambrCfg
957 uint32_t ulBr; /* UL Bit rate */
958 uint32_t dlBr; /* DL Bit rate */
961 /* Single Network Slice Selection assistance Info */
962 typedef struct snssai
964 uint8_t sst; /* Slice Type */
965 uint8_t sd[SD_SIZE]; /* Slice Differentiator */
968 typedef struct nonDynFiveQi
973 uint16_t maxDataBurstVol;
976 typedef struct dynFiveQi
979 uint16_t packetDelayBudget;
980 uint8_t packetErrRateScalar;
981 uint8_t packetErrRateExp;
983 uint8_t delayCritical;
985 uint16_t maxDataBurstVol;
988 typedef struct ngRanAllocAndRetPri
990 uint8_t priorityLevel;
991 uint8_t preEmptionCap;
992 uint8_t preEmptionVul;
993 }NgRanAllocAndRetPri;
995 typedef struct grbQosInfo
997 uint32_t maxFlowBitRateDl;
998 uint32_t maxFlowBitRateUl;
999 uint32_t guarFlowBitRateDl;
1000 uint32_t guarFlowBitRateUl;
1003 typedef struct drbQos
1005 QosType fiveQiType; /* Dynamic or non-dynamic */
1008 NonDynFiveQi nonDyn5Qi;
1011 NgRanAllocAndRetPri ngRanRetPri;
1012 GrbQosInfo grbQosInfo;
1013 uint16_t pduSessionId;
1014 uint32_t ulPduSessAggMaxBitRate;
1017 typedef struct ulLcCfg
1022 PBitRate pbr; // prioritisedBitRate
1023 BucketSizeDur bsd; // bucketSizeDuration
1026 typedef struct duLcCfg
1028 LcPriority lcp; // logical Channel Prioritization
1031 typedef struct lcCfg
1033 ConfigType configType;
1042 typedef struct modulationInfo
1044 uint8_t modOrder; /* Modulation order */
1045 uint8_t mcsIndex; /* MCS Index */
1046 McsTable mcsTable; /* MCS table */
1049 typedef struct macUeCfg
1054 MacCellGrpCfg macCellGrpCfg;
1055 PhyCellGrpCfg phyCellGrpCfg;
1056 SpCellCfg spCellCfg;
1058 ModulationInfo dlModInfo; /* DL modulation info */
1059 ModulationInfo ulModInfo; /* UL modulation info */
1061 LcCfg lcCfgList[MAX_NUM_LC];
1062 UeCfgState macUeCfgState; /* InActive / Completed */
1065 typedef struct nrcgi
1071 typedef struct srbFailInfo
1077 typedef struct drbFailInfo
1083 typedef struct sCellFailInfo
1089 typedef struct ueCfgRsp
1094 uint8_t numSRBFailed; /* valid values : 0 to MAX_NUM_SRB */
1095 SRBFailInfo *failedSRBlisti;
1096 uint8_t numDRBFailed; /* valid values : 0 to MAX_NUM_DRB */
1097 DRBFailInfo *failedDRBlist;
1098 uint8_t numSCellFailed; /* valid values : 0 to MAX_NUM_SCELL */
1099 SCellFailInfo *failedSCellList;
1102 /* Functions for slot Ind from MAC to DU APP*/
1103 typedef uint8_t (*DuMacSlotInd) ARGS((
1105 SlotIndInfo *slotInfo ));
1107 /* Functions for stop Ind from MAC to DU APP*/
1108 typedef uint8_t (*DuMacStopInd) ARGS((
1110 MacCellStopInfo *cellId ));
1112 /* Functions for mac cell start req */
1113 typedef uint8_t (*DuMacCellStartReq) ARGS((
1115 MacCellStartInfo *cellStartInfo ));
1117 /* Functions for mac cell stop request */
1118 typedef uint8_t (*DuMacCellStopReq) ARGS((
1120 MacCellStopInfo *cellStopInfo ));
1122 /* Function pointers for packing macCellCfg Request and Confirm */
1123 typedef uint8_t (*packMacCellCfgReq) ARGS((
1125 MacCellCfg *macCellCfg ));
1127 typedef uint8_t (*packMacCellCfgConfirm) ARGS((
1129 MacCellCfgCfm *macCellCfgCfm ));
1131 typedef uint8_t (*DuMacCellCfgReq) ARGS((
1133 MacCellCfg *macCellCfg));
1135 typedef uint8_t (*DuMacCellCfgCfm) ARGS((
1137 MacCellCfgCfm *macCellCfgCfm ));
1139 /* Functions for UL CCCH Ind from MAC to DU APP*/
1140 typedef uint8_t (*DuMacUlCcchInd) ARGS((
1142 UlCcchIndInfo *ulCcchIndInfo ));
1144 /* Functions for DL CCCH Ind from DU APP to MAC*/
1145 typedef uint8_t (*DuMacDlCcchInd) ARGS((
1147 DlCcchIndInfo *dlCcchIndInfo ));
1149 /* UE create Request from DU APP to MAC*/
1150 typedef uint8_t (*DuMacUeCreateReq) ARGS((
1154 /* UE create Response from MAC to DU APP */
1155 typedef uint8_t (*MacDuUeCfgRspFunc) ARGS((
1157 MacUeCfgRsp *cfgRsp));
1159 /* UE Reconfig Request from DU APP to MAC*/
1160 typedef uint8_t (*DuMacUeReconfigReq) ARGS((
1164 uint8_t packMacSlotInd(Pst *pst, SlotIndInfo *slotInfo );
1165 uint8_t unpackMacSlotInd(DuMacSlotInd func, Pst *pst, Buffer *mBuf);
1166 uint8_t duHandleSlotInd(Pst *pst, SlotIndInfo *slotInfo);
1167 uint8_t packMacCellStartReq(Pst *pst, MacCellStartInfo *cellStartInfo);
1168 uint8_t unpackMacCellStartReq(DuMacCellStartReq func, Pst *pst, Buffer *mBuf);
1169 uint8_t MacProcCellStartReq(Pst *pst, MacCellStartInfo *cellStartInfo);
1170 uint8_t packMacCellStopReq(Pst *pst, MacCellStopInfo *cellStopInfo);
1171 uint8_t unpackMacCellStopReq(DuMacCellStopReq func, Pst *pst, Buffer *mBuf);
1172 uint8_t MacProcCellStopReq(Pst *pst, MacCellStopInfo *cellStopInfo);
1173 uint8_t packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg);
1174 uint8_t unpackDuMacCellCfg(DuMacCellCfgReq func, Pst *pst, Buffer *mBuf);
1175 uint8_t MacProcCellCfgReq(Pst *pst, MacCellCfg *macCellCfg);
1176 uint8_t packMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
1177 uint8_t unpackMacCellCfgCfm(DuMacCellCfgCfm func, Pst *pst, Buffer *mBuf);
1178 uint8_t duHandleMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
1179 uint8_t packMacStopInd(Pst *pst, MacCellStopInfo *cellId);
1180 uint8_t unpackMacStopInd(DuMacStopInd func, Pst *pst, Buffer *mBuf);
1181 uint8_t duHandleStopInd(Pst *pst, MacCellStopInfo *cellId);
1182 uint8_t packMacUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
1183 uint8_t unpackMacUlCcchInd(DuMacUlCcchInd func, Pst *pst, Buffer *mBuf);
1184 uint8_t duHandleUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
1185 uint8_t packMacDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
1186 uint8_t unpackMacDlCcchInd(DuMacDlCcchInd func, Pst *pst, Buffer *mBuf);
1187 uint8_t MacProcDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
1188 uint8_t packDuMacUeCreateReq(Pst *pst, MacUeCfg *ueCfg);
1189 uint8_t unpackMacUeCreateReq(DuMacUeCreateReq func, Pst *pst, Buffer *mBuf);
1190 uint8_t MacProcUeCreateReq(Pst *pst, MacUeCfg *ueCfg);
1191 uint8_t sendStopIndMacToDuApp(uint16_t cellId);
1192 uint8_t packDuMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp);
1193 uint8_t unpackDuMacUeCfgRsp(MacDuUeCfgRspFunc func, Pst *pst, Buffer *mBuf);
1194 uint8_t DuProcMacUeCfgRsp(Pst *pst, MacUeCfgRsp *cfgRsp);
1195 uint8_t packDuMacUeReconfigReq(Pst *pst, MacUeCfg *ueCfg);
1196 uint8_t unpackMacUeReconfigReq(DuMacUeReconfigReq func, Pst *pst, Buffer *mBuf);
1197 uint8_t MacProcUeReconfigReq(Pst *pst, MacUeCfg *ueCfg);
1201 /**********************************************************************
1203 **********************************************************************/