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 */
48 /* Macro for Ue Context */
49 #define MAX_NUM_LOGICAL_CHANNELS 11
50 #define MAX_NUM_SR_CFG_PER_CELL_GRP 8 /* Max number of scheduling request config per cell group */
51 #define MAC_NUM_TAGS 4 /* Max number of timing advance groups */
52 #define MAX_NUM_BWP 4 /* Max number of BWP per serving cell */
53 #define MAX_NUM_CRSET 3 /* Max number of control resource set in add/modify/release list */
54 #define MAX_NUM_SEARCH_SPC 10 /* Max number of search space in add/modify/release list */
55 #define FREQ_DOM_RSRC_SIZE 6 /* i.e. 6 bytes because Size of frequency domain resource is 45 bits */
56 #define MONITORING_SYMB_WITHIN_SLOT_SIZE 2 /* i.e. 2 bytes because size of monitoring symbols within slot is 14 bits */
57 #define MAX_NUM_DL_ALLOC 16 /* Max number of pdsch time domain downlink allocation */
58 #define MAX_NUM_UL_ALLOC 16 /* Max number of pusch time domain uplink allocation */
59 #define SD_SIZE 3 /* Max size of Slice Differentiator in S-NSSAI */
62 #define MAX_NUM_DRB 64
63 #define MAX_NUM_SCELL 32
66 #define EVENT_MAC_CELL_CONFIG_REQ 200
67 #define EVENT_MAC_CELL_CONFIG_CFM 201
68 #define EVENT_MAC_CELL_START_REQ 202
69 #define EVENT_MAC_CELL_STOP_REQ 203
70 #define EVENT_MAC_SLOT_IND 204
71 #define EVENT_MAC_STOP_IND 205
72 #define EVENT_MAC_UL_CCCH_IND 206
73 #define EVENT_MAC_DL_CCCH_IND 207
74 #define EVENT_MAC_UE_CREATE_REQ 208
75 #define EVENT_MAC_UE_CREATE_RSP 209
91 MAC_GEN_FULL_PBCH_PAYLD, /* MAC generated the full PBCH Payload */
92 PHY_GEN_TIMING_PBCH_BIT, /* PHY generates the timing PBCH bits */
93 PHY_GEN_FULL_PBCH_PAYLD /* PHY generates full PBCH payload */
105 RESTRICTED_SET_TYPE_A,
106 RESTRICTED_SET_TYPE_B
157 /* Enums for Ue Create Request */
159 /* SR PROHIBIT TIMER */
186 TIME_ALIGNMENT_TIMER_MS_500,
187 TIME_ALIGNMENT_TIMER_MS_750,
188 TIME_ALIGNMENT_TIMER_MS_1280,
189 TIME_ALIGNMENT_TIMER_MS_1920,
190 TIME_ALIGNMENT_TIMER_MS_2560,
191 TIME_ALIGNMENT_TIMER_MS_5120,
192 TIME_ALIGNMENT_TIMER_MS_10240,
193 TIME_ALIGNMENT_TIMER_INFINITY
198 PHR_PERIODIC_TIMER_SF_10,
199 PHR_PERIODIC_TIMER_SF_20,
200 PHR_PERIODIC_TIMER_SF_50,
201 PHR_PERIODIC_TIMER_SF_100,
202 PHR_PERIODIC_TIMER_SF_200,
203 PHR_PERIODIC_TIMER_SF_500,
204 PHR_PERIODIC_TIMER_SF_1000,
205 PHR_PERIODIC_TIMER_INFINITY
210 PHR_PROHIBIT_TIMER_SF_0,
211 PHR_PROHIBIT_TIMER_SF_10,
212 PHR_PROHIBIT_TIMER_SF_20,
213 PHR_PROHIBIT_TIMER_SF_50,
214 PHR_PROHIBIT_TIMER_SF_100,
215 PHR_PROHIBIT_TIMER_SF_200,
216 PHR_PROHIBIT_TIMER_SF_500,
217 PHR_PROHIBIT_TIMER_SF_1000
222 PHR_TX_PWR_FACTOR_CHANGE_DB_1,
223 PHR_TX_PWR_FACTOR_CHANGE_DB_3,
224 PHR_TX_PWR_FACTOR_CHANGE_DB_6,
225 PHR_TX_PWR_FACTOR_CHANGE_INFINITY
226 }PhrTxPwrFactorChange;
230 PHR_MODE_OTHER_CG_REAL,
231 PHR_MODE_OTHER_CG_VIRTUAL
236 PDSCH_HARQ_ACK_CODEBOOK_SEMISTATIC,
237 PDSCH_HARQ_ACK_CODEBOOK_DYNAMIC
238 }PdschHarqAckCodebook;
242 NUM_HARQ_PROC_FOR_PDSCH_N_2,
243 NUM_HARQ_PROC_FOR_PDSCH_N_4,
244 NUM_HARQ_PROC_FOR_PDSCH_N_6,
245 NUM_HARQ_PROC_FOR_PDSCH_N_10,
246 NUM_HARQ_PROC_FOR_PDSCH_N_16
247 }NumHarqProcForPdsch;
251 MAX_CODE_BLOCK_GROUP_PER_TB_N_2,
252 MAX_CODE_BLOCK_GROUP_PER_TB_N_4,
253 MAX_CODE_BLOCK_GROUP_PER_TB_N_6,
254 MAX_CODE_BLOCK_GROUP_PER_TB_N_8
266 TRANSFORM_PRECODER_ENABLED,
267 TRANSFORM_PRECODER_DISABLED
272 CCE_REG_MAPPINGTYPE_PR_INTERLEAVED,
273 CCE_REG_MAPPINGTYPE_PR_NONINTERLEAVED
278 SLOTPERIODICITYANDOFFSET_PR_SL1,
279 SLOTPERIODICITYANDOFFSET_PR_SL2,
280 SLOTPERIODICITYANDOFFSET_PR_SL4,
281 SLOTPERIODICITYANDOFFSET_PR_SL5,
282 SLOTPERIODICITYANDOFFSET_PR_SL8,
283 SLOTPERIODICITYANDOFFSET_PR_SL10,
284 SLOTPERIODICITYANDOFFSET_PR_SL16,
285 SLOTPERIODICITYANDOFFSET_PR_SL20,
286 SLOTPERIODICITYANDOFFSET_PR_SL40,
287 SLOTPERIODICITYANDOFFSET_PR_SL80,
288 SLOTPERIODICITYANDOFFSET_PR_SL160,
289 SLOTPERIODICITYANDOFFSET_PR_SL320,
290 SLOTPERIODICITYANDOFFSET_PR_SL640,
291 SLOTPERIODICITYANDOFFSET_PR_SL1280,
292 SLOTPERIODICITYANDOFFSET_PR_SL2560
293 }MSlotPeriodAndOffset;
303 SEARCHSPACETYPE_PR_COMMON,
304 SEARCHSPACETYPE_PR_UE_SPECIFIC
309 AGGREGATIONLEVEL_N0 = 0,
310 AGGREGATIONLEVEL_N1 = 1,
311 AGGREGATIONLEVEL_N2 = 2,
312 AGGREGATIONLEVEL_N3 = 3,
313 AGGREGATIONLEVEL_N4 = 4,
314 AGGREGATIONLEVEL_N5 = 5,
315 AGGREGATIONLEVEL_N6 = 6,
316 AGGREGATIONLEVEL_N8 = 7
321 ADDITIONALPOSITION_POS0,
322 ADDITIONALPOSITION_POS1,
323 ADDITIONALPOSITION_POS3
334 RESOURCEALLOCATION_TYPE0,
335 RESOURCEALLOCATION_TYPE1,
336 RESOURCEALLOCATION_DYNAMICSWITCH
347 CODEWORDS_SCHED_BY_DCI_N1,
348 CODEWORDS_SCHED_BY_DCI_N2
353 TYPE_STATIC_BUNDLING,
354 TYPE_DYNAMIC_BUNDLING
367 TRANSPORT_LAYER_FAIL,
374 UNSPECIFIED_RADIO_NW_CAUSE,
376 UNKNOWN_GNB_CU_UE_F1AP_ID,
377 ALREADY_ALLOCATED_GNB_CU_UE_F1AP_ID,
378 UNKNOWN_GNB_DU_UE_F1AP_ID,
379 ALREADY_ALLOCATED_GNB_DU_UE_F1AP_ID,
380 UNKNOWN_UE_F1AP_ID_PAIR,
381 INCONSISTENT_UE_F1AP_ID_PAIR,
382 INTERACTION_WITH_OTHER_PROCEDURE,
384 ACTION_REQUIRED_FOR_RADIO_REASONS,
385 RADIO_RESOURCES_UNAVAILABLE,
391 RESOURCES_UNAVAILABLE_FOR_SLICE
396 UNSPECIFIED_TRANSPORT_LAYER_CAUSE,
397 TRANSPORT_RESOURCE_UNAVAILABLE
402 TRANSFER_SYNTAX_ERROR,
403 ABSTRACT_SYNTAX_ERROR_REJECT,
404 ABSTRACT_SYNTAX_ERROR_IGNORE_AND_REJECT,
405 INCOMPATIBLE_MESSAGE_FOR_RECEIVER_STATE,
407 ABSTRAXCT_SYNTAX_ERROR_FALSELY_CONSTRUCTED_MSG,
408 UNSPECIFIED_PROTOCOL_CAUSE
413 CONTROL_PROCESSING_OVERLOAD,
415 PLANE_PROCESSING_RESOURCES,
417 INTERVENTION_BY_O_AND_M,
418 UNSPECIFIED_MISC_CAUSE
421 typedef struct failureCause
426 RadioNwLyrCause radioNwCause;
427 TransLyrCause transportCause;
428 ProtCause protcolCause;
429 MiscFailCause miscCause;
433 typedef struct carrierCfg
436 U16 bw; /* DL/UL bandwidth */
437 U32 freq; /* Absolute frequency of DL/UL point A in KHz */
438 U16 k0[NUM_NUMEROLOGY]; /* K0 for DL/UL */
439 U16 gridSize[NUM_NUMEROLOGY]; /* DL/UL Grid size for each numerologies */
440 U16 numAnt; /* Number of Tx/Rx antennas */
443 typedef struct ssbCfg
445 uint32_t ssbPbchPwr; /* SSB block power */
446 BchPduOpt bchPayloadFlag; /* Options for generation of payload */
447 uint8_t scsCmn; /* subcarrier spacing for common */
448 uint16_t ssbOffsetPointA; /* SSB subcarrier offset from point A */
450 SSBPeriod ssbPeriod; /* SSB Periodicity in msec */
451 uint8_t ssbScOffset; /* Subcarrier Offset */
452 uint8_t mibPdu[3]; /* MIB payload */
453 uint32_t ssbMask[SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */
454 uint8_t beamId[NUM_SSB];
455 Bool multCarrBand; /* Multiple carriers in a band */
456 Bool multCellCarr; /* Multiple cells in single carrier */
459 typedef struct fdmInfo
461 U16 rootSeqIdx; /* Root sequence index */
462 U8 numRootSeq; /* Number of root sequences required for FD */
463 U16 k1; /* Frequency Offset for each FD */
464 U8 zeroCorrZoneCfg; /* Zero correlation zone cofig */
465 U8 numUnusedRootSeq; /* Number of unused root sequence */
466 U8 *unsuedRootSeq; /* Unused root sequence per FD */
469 typedef struct prachCfg
472 uint8_t prachCfgIdx; /* PRACH Cfg Index */
473 PrachSeqLen prachSeqLen; /* RACH Sequence length: Long/short */
474 uint8_t prachSubcSpacing; /* Subcarrier spacing of RACH */
475 RstSetCfg prachRstSetCfg; /* PRACH restricted set config */
476 uint16_t msg1FreqStart; /* Msg1-FrequencyStart */
477 uint8_t msg1Fdm; /* PRACH FDM (1,2,4,8) */
478 uint8_t rootSeqLen; /* Root sequence length */
479 PrachFdmInfo fdm[8]; /* FDM info */
480 uint8_t ssbPerRach; /* SSB per RACH occassion */
481 Bool prachMultCarrBand; /* Multiple carriers in Band */
482 uint8_t prachRestrictedSet; /* Support for PRACH restricted set */
483 uint8_t raContResTmr; /* RA Contention Resoultion Timer */
484 uint8_t rsrpThreshSsb; /* RSRP Threshold SSB */
485 uint8_t raRspWindow; /* RA Response Window */
488 typedef struct tddCfg
491 DlUlTxPeriodicity tddPeriod; /* DL UL Transmission periodicity */
492 SlotConfig slotCfg[MAXIMUM_TDD_PERIODICITY][MAX_SYMB_PER_SLOT];
495 typedef struct sib1CellCfg
499 uint16_t sib1NewTxPeriod;
500 uint16_t sib1RepetitionPeriod;
501 uint8_t coresetZeroIndex; /* derived from 4 LSB of pdcchSib1 present in MIB */
502 uint8_t searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */
506 typedef struct bwpParams
511 uint8_t cyclicPrefix;
514 typedef struct candidatesInfo
523 typedef struct searchSpaceCfg
525 uint8_t searchSpaceId;
527 uint16_t monitoringSlot;
529 uint16_t monitoringSymbol;
530 CandidatesInfo candidate;
533 typedef struct pdcchConfigCommon
535 /* only one search space is configured during SIB1 */
536 SearchSpaceCfg commonSearchSpace;
537 uint8_t raSearchSpaceId;
540 typedef struct pdschConfigCommon
545 uint8_t lengthSymbol;
548 typedef struct pucchConfigCommon
550 uint8_t pucchResourceCommon;
551 uint8_t pucchGroupHopping;
554 typedef struct puschConfigCommon
556 /* PUSCH-TimeDomainResourceAllocation info */
560 uint8_t lengthSymbol;
563 typedef struct bwpDlConfig
566 PdcchConfigCommon pdcchCommon;
567 PdschConfigCommon pdschCommon;
570 typedef struct bwpUlConfig
573 // rach config common sent in PrachCfg
574 PucchConfigCommon pucchCommon;
575 PuschConfigCommon puschCommon;
578 typedef struct macCellCfg
580 U16 cellId; /* Cell Id */
581 U8 numTlv; /* Number of configuration TLVs */
582 U8 carrierId; /* Carrired Index */
583 U16 phyCellId; /* Physical cell id */
584 DuplexMode dupType; /* Duplex type: TDD/FDD */
585 CarrierCfg dlCarrCfg; /* DL Carrier configuration */
586 CarrierCfg ulCarrCfg; /* UL Carrier configuration */
587 Bool freqShft; /* Indicates presence of 7.5kHz frequency shift */
588 SsbCfg ssbCfg; /* SSB configuration */
589 PrachCfg prachCfg; /* PRACH Configuration */
590 TDDCfg tddCfg; /* TDD periodicity and slot configuration */
591 RSSIMeasUnit rssiUnit; /* RSSI measurement unit */
592 Sib1CellCfg sib1Cfg; /* SIB1 config */
593 BwpDlConfig initialDlBwp; /* Initial DL BWP */
594 BwpUlConfig initialUlBwp; /* Initial UL BWP */
595 uint8_t dmrsTypeAPos; /* DMRS Type A position */
598 typedef struct macCellCfgCfm
604 typedef struct macCellStartInfo
609 typedef struct macCellStopInfo
614 typedef struct ulCcchInd
621 typedef struct dlCcchInd
625 DlCcchMsgType msgType;
626 uint16_t dlCcchMsgLen;
630 typedef struct bsrTmrCfg
632 uint8_t periodicTimer;
634 uint8_t srDelayTimer;
638 /* Info of Scheduling Request to Add/Modify */
639 typedef struct schedReqInfo
642 SrProhibitTimer srProhibitTmr;
643 SrTransMax srTransMax;
646 /* Scheduling Request Configuration */
647 typedef struct schedReqCfg
649 uint8_t addModListCount;
650 SchedReqInfo addModList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* List of Scheduling req to be added/modified */
651 uint8_t relListCount;
652 uint8_t relList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* list of scheduling request Id to be deleted */
655 typedef struct tagInfo
658 TimeAlignmentTimer timeAlignTimer;
661 typedef struct tagCfg
663 uint8_t addModListCount;
664 TagInfo addModList[MAC_NUM_TAGS]; /* List of Tag to Add/Modify */
665 uint8_t relListCount;
666 uint8_t relList[MAC_NUM_TAGS]; /* list of Tag Id to release */
669 typedef struct phrCfg
671 PhrPeriodicTimer periodicTimer;
672 PhrProhibitTimer prohibitTimer;
673 PhrTxPwrFactorChange txPowerFactor;
676 bool phrType2OtherCell;
677 PhrModeOtherCG phrOtherCG;
680 typedef struct macCellGrpCfg
682 SchedReqCfg schReqCfg;
685 bool phrCfgSetupPres; /* true/false: phrCfgSetup/phrCfgRelease */
689 typedef struct phyCellGrpCfg
691 PdschHarqAckCodebook pdschHarqAckCodebook;
695 /* Control resource set info */
696 typedef struct controlRsrcSet
698 uint8_t cRSetId; /* Control resource set id */
699 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
701 REGMappingType cceRegMappingType;
702 PrecoderGranul precoderGranularity;
703 uint16_t dmrsScramblingId;
706 /* Search Space info */
707 typedef struct searchSpace
709 uint8_t searchSpaceId;
711 MSlotPeriodAndOffset mSlotPeriodicityAndOffset;
712 uint8_t mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
713 AggrLevel numCandidatesAggLevel1; /* Number of candidates for aggregation level 1 */
714 AggrLevel numCandidatesAggLevel2; /* Number of candidates for aggregation level 2 */
715 AggrLevel numCandidatesAggLevel4; /* Number of candidates for aggregation level 4 */
716 AggrLevel numCandidatesAggLevel8; /* Number of candidates for aggregation level 8 */
717 AggrLevel numCandidatesAggLevel16; /* Number of candidates for aggregation level 16 */
718 SearchSpaceType searchSpaceType;
719 uint8_t ueSpecificDciFormat;
722 /* PDCCH cofniguration */
723 typedef struct pdcchConfig
725 uint8_t numCRsetToAddMod;
726 ControlRsrcSet cRSetToAddModList[MAX_NUM_CRSET]; /* List of control resource set to add/modify */
727 uint8_t numCRsetToRel;
728 uint8_t cRSetToRelList[MAX_NUM_CRSET]; /* List of control resource set to release */
729 uint8_t numSearchSpcToAddMod;
730 SearchSpace searchSpcToAddModList[MAX_NUM_SEARCH_SPC]; /* List of search space to add/modify */
731 uint8_t numSearchSpcToRel;
732 uint8_t searchSpcToRelList[MAX_NUM_SEARCH_SPC]; /* List of search space to release */
735 /* PDSCH time domain resource allocation */
736 typedef struct pdschTimeDomRsrcAlloc
738 CommonMappingType mappingType;
740 uint8_t symbolLength;
741 uint8_t startSymbolAndLength;
742 }PdschTimeDomRsrcAlloc;
744 /* DMRS downlink configuration */
745 typedef struct dmrsDlCfg
747 AddPosType addPos; /* DMRS additional position */
750 /* PDSCH Configuration */
751 typedef struct pdschConfig
753 DmrsDlCfg dmrsDlCfgForPdschMapTypeA;
754 ResAllocType resourceAllocType;
755 uint8_t numTimeDomRsrcAlloc;
756 PdschTimeDomRsrcAlloc timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
758 CodeWordsSchedDci numCodeWordsSchByDci; /* Number of code words scheduled by DCI */
759 BundlingType bundlingType;
762 /* Initial Downlink BWP */
763 typedef struct initialDlBwp
766 PdcchConfig pdcchCfg;
768 PdschConfig pdschCfg;
771 /* BWP Downlink common */
772 typedef struct bwpDlCommon
776 /* Downlink BWP information */
777 typedef struct dlBwpInfo
782 /* PDCCH Serving Cell configuration */
783 typedef struct pdschServCellCfg
785 uint8_t *maxMimoLayers;
786 NumHarqProcForPdsch numHarqProcForPdsch;
787 MaxCodeBlkGrpPerTB *maxCodeBlkGrpPerTb;
788 bool *codeBlkGrpFlushInd;
789 PdschXOverhead *xOverhead;
792 /* PUCCH Configuration */
793 typedef struct pucchCfg
795 /* TODO : Not used currently */
798 /* Transform precoding disabled */
799 typedef struct transPrecodDisabled
801 uint16_t scramblingId0;
802 }TransPrecodDisabled;
804 /* DMRS Uplink configuration */
805 typedef struct dmrsUlCfg
807 AddPosType addPos; /* DMRS additional position */
808 TransPrecodDisabled transPrecodDisabled; /* Transform precoding disabled */
811 /* PUSCH Time Domain Resource Allocation */
812 typedef struct puschTimeDomRsrcAlloc
815 CommonMappingType mappingType;
817 uint8_t symbolLength;
818 uint8_t startSymbolAndLength;
819 }PuschTimeDomRsrcAlloc;
821 /* PUSCH Configuration */
822 typedef struct puschCfg
824 DmrsUlCfg dmrsUlCfgForPuschMapTypeA;
825 ResAllocType resourceAllocType;
826 uint8_t numTimeDomRsrcAlloc;
827 PuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
828 TransformPrecoder transformPrecoder;
831 /* Initial Uplink BWP */
832 typedef struct initialUlBwp
840 /* Uplink BWP information */
841 typedef struct ulBwpInfo
846 /* Serving cell configuration */
847 typedef struct servCellCfgInfo
849 InitialDlBwp initDlBwp;
850 uint8_t numDlBwpToAdd;
851 DlBwpInfo DlBwpToAddList[MAX_NUM_BWP];
852 uint8_t firstActvDlBwpId;
853 uint8_t defaultDlBwpId;
854 uint8_t *bwpInactivityTmr;
855 PdschServCellCfg pdschServCellCfg;
856 InitialUlBwp initUlBwp;
857 uint8_t numUlBwpToAdd;
858 UlBwpInfo UlBwpToAddList[MAX_NUM_BWP];
859 uint8_t firstActvUlBwpId;
862 /* Special cell configuration */
863 typedef struct spCellCfg
866 ServCellCfgInfo servCellCfg;
869 typedef struct maxAggrBitRate
875 /* Single Network Slice Selection assistance Info */
876 typedef struct snssai
878 uint8_t sst; /* Slice Type */
879 uint8_t sd[SD_SIZE]; /* Slice Differentiator */
882 typedef struct nonDynFiveQi
887 uint16_t maxDataBurstVol;
890 typedef struct dynFiveQi
893 uint16_t packetDelayBudget;
894 uint8_t packetErrRateScalar;
895 uint8_t packetErrRateExp;
897 uint8_t delayCritical;
899 uint16_t maxDataBurstVol;
902 typedef struct ngRanAllocAndRetPri
904 uint8_t priorityLevel;
905 uint8_t preEmptionCap;
906 uint8_t preEmptionVul;
907 }NgRanAllocAndRetPri;
909 typedef struct grbQosInfo
911 uint32_t maxFlowBitRateDl;
912 uint32_t maxFlowBitRateUl;
913 uint32_t guarFlowBitRateDl;
914 uint32_t guarFlowBitRateUl;
917 typedef struct drbQos
919 uint8_t fiveQiType; /* Dynamic or non-dynamic */
922 NonDynFiveQi nonDyn5Qi;
925 NgRanAllocAndRetPri ngRanRetPri;
926 GrbQosInfo grbQosInfo;
927 uint16_t pduSessionId;
928 uint32_t ulPduSessAggMaxBitRate;
931 typedef struct ulLcCfg
936 uint8_t pbr; // prioritisedBitRate
937 uint8_t bsd; // bucketSizeDuration
940 typedef struct duLcCfg
942 LcPriority lcp; // logical Channel Prioritization
955 typedef struct macUeCfg
960 MacCellGrpCfg macCellGrpCfg;
961 PhyCellGrpCfg phyCellGrpCfg;
963 MaxAggrBitRate *maxAggrBitRate;
965 LcCfg lcCfgList[MAX_NUM_LOGICAL_CHANNELS];
974 typedef struct srbFailInfo
980 typedef struct drbFailInfo
986 typedef struct sCellFailInfo
992 typedef struct ueCfgRsp
997 uint8_t numSRBFailed; /* valid values : 0 to MAX_NUM_SRB */
998 SRBFailInfo *failedSRBlisti;
999 uint8_t numDRBFailed; /* valid values : 0 to MAX_NUM_DRB */
1000 DRBFailInfo *failedDRBlist;
1001 uint8_t numSCellFailed; /* valid values : 0 to MAX_NUM_SCELL */
1002 SCellFailInfo *failedSCellList;
1005 /* Functions for slot Ind from MAC to DU APP*/
1006 typedef uint8_t (*DuMacSlotInd) ARGS((
1008 SlotIndInfo *slotInfo ));
1010 /* Functions for stop Ind from MAC to DU APP*/
1011 typedef uint8_t (*DuMacStopInd) ARGS((
1013 MacCellStopInfo *cellId ));
1015 /* Functions for mac cell start req */
1016 typedef uint8_t (*DuMacCellStartReq) ARGS((
1018 MacCellStartInfo *cellStartInfo ));
1020 /* Functions for mac cell stop request */
1021 typedef uint8_t (*DuMacCellStopReq) ARGS((
1023 MacCellStopInfo *cellStopInfo ));
1025 /* Function pointers for packing macCellCfg Request and Confirm */
1026 typedef uint8_t (*packMacCellCfgReq) ARGS((
1028 MacCellCfg *macCellCfg ));
1030 typedef uint8_t (*packMacCellCfgConfirm) ARGS((
1032 MacCellCfgCfm *macCellCfgCfm ));
1034 typedef uint8_t (*DuMacCellCfgReq) ARGS((
1036 MacCellCfg *macCellCfg));
1038 typedef uint8_t (*DuMacCellCfgCfm) ARGS((
1040 MacCellCfgCfm *macCellCfgCfm ));
1042 /* Functions for UL CCCH Ind from MAC to DU APP*/
1043 typedef uint8_t (*DuMacUlCcchInd) ARGS((
1045 UlCcchIndInfo *ulCcchIndInfo ));
1047 /* Functions for DL CCCH Ind from DU APP to MAC*/
1048 typedef uint8_t (*DuMacDlCcchInd) ARGS((
1050 DlCcchIndInfo *dlCcchIndInfo ));
1052 /* UE create Request from DU APP to MAC*/
1053 typedef uint8_t (*DuMacUeCreateReq) ARGS((
1057 /* UE create Response from MAC to DU APP */
1058 typedef uint8_t (*DuMacUeCreateRspFunc) ARGS((
1060 MacUeCfgRsp *cfgRsp));
1062 uint8_t packMacSlotInd(Pst *pst, SlotIndInfo *slotInfo );
1063 uint8_t unpackMacSlotInd(DuMacSlotInd func, Pst *pst, Buffer *mBuf);
1064 uint8_t duHandleSlotInd(Pst *pst, SlotIndInfo *slotInfo);
1065 uint8_t packMacCellStartReq(Pst *pst, MacCellStartInfo *cellStartInfo);
1066 uint8_t unpackMacCellStartReq(DuMacCellStartReq func, Pst *pst, Buffer *mBuf);
1067 uint8_t MacProcCellStartReq(Pst *pst, MacCellStartInfo *cellStartInfo);
1068 uint8_t packMacCellStopReq(Pst *pst, MacCellStopInfo *cellStopInfo);
1069 uint8_t unpackMacCellStopReq(DuMacCellStopReq func, Pst *pst, Buffer *mBuf);
1070 uint8_t MacProcCellStopReq(Pst *pst, MacCellStopInfo *cellStopInfo);
1071 uint8_t packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg);
1072 uint8_t unpackDuMacCellCfg(DuMacCellCfgReq func, Pst *pst, Buffer *mBuf);
1073 uint8_t MacProcCellCfgReq(Pst *pst, MacCellCfg *macCellCfg);
1074 uint8_t packMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
1075 uint8_t unpackMacCellCfgCfm(DuMacCellCfgCfm func, Pst *pst, Buffer *mBuf);
1076 uint8_t duHandleMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
1077 uint8_t packMacStopInd(Pst *pst, MacCellStopInfo *cellId);
1078 uint8_t unpackMacStopInd(DuMacStopInd func, Pst *pst, Buffer *mBuf);
1079 uint8_t duHandleStopInd(Pst *pst, MacCellStopInfo *cellId);
1080 uint8_t packMacUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
1081 uint8_t unpackMacUlCcchInd(DuMacUlCcchInd func, Pst *pst, Buffer *mBuf);
1082 uint8_t duHandleUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
1083 uint8_t packMacDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
1084 uint8_t unpackMacDlCcchInd(DuMacDlCcchInd func, Pst *pst, Buffer *mBuf);
1085 uint8_t MacProcDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
1086 uint8_t packDuMacUeCreateReq(Pst *pst, MacUeCfg *ueCfg);
1087 uint8_t unpackMacUeCreateReq(DuMacUeCreateReq func, Pst *pst, Buffer *mBuf);
1088 uint8_t MacProcUeCreateReq(Pst *pst, MacUeCfg *ueCfg);
1089 uint8_t packDuMacUeCreateRsp(Pst *pst, MacUeCfgRsp *cfgRsp);
1090 uint8_t unpackDuMacUeCreateRsp(DuMacUeCreateRspFunc func, Pst *pst, Buffer *mBuf);
1091 uint8_t DuHandleMacUeCreateRsp(Pst *pst, MacUeCfgRsp *cfgRsp);
1092 uint8_t sendStopIndMacToDuApp(uint16_t cellId);
1095 /**********************************************************************
1097 **********************************************************************/