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 */
25 #define NUM_NUMEROLOGY 5 /* Number of numerology */
26 #define MAXIMUM_TDD_PERIODICITY 5
27 #define MAX_SYMB_PER_SLOT 14
29 #define NUM_SSB 1 /* max value is 64 */
30 #define SSB_MASK_SIZE 1 /* SSB mask size is 32bit for sub6 */
31 #define SIB1_NEW_TX_PERIOD 160
32 #define SIB1_REPETITION_PERIOD 20
33 #define CORESET_0_INDEX 0
34 #define CORESET_1_INDEX 1
35 #define CORESET_2_INDEX 2
36 #define CORESET_3_INDEX 3
37 #define CORESET_4_INDEX 4
38 #define SEARCHSPACE_0_INDEX 0
39 #define SEARCHSPACE_1_INDEX 1
40 #define SEARCHSPACE_2_INDEX 2
41 #define SEARCHSPACE_3_INDEX 3
42 #define SEARCHSPACE_4_INDEX 4
43 #define SS_MONITORING_SLOT_SL1 0 /* all slots */
44 #define SS_MONITORING_SYMBOL 0x2000; /* symbol-0, set 14th bit */
50 /* Macro for Ue Context */
51 #define MAX_NUM_LOGICAL_CHANNELS 11
52 #define MAX_NUM_SR_CFG_PER_CELL_GRP 8 /* Max number of scheduling request config per cell group */
53 #define MAC_NUM_TAGS 4 /* Max number of timing advance groups */
54 #define MAX_NUM_BWP 4 /* Max number of BWP per serving cell */
55 #define MAX_NUM_CRSET 3 /* Max number of control resource set in add/modify/release list */
56 #define MAX_NUM_SEARCH_SPC 10 /* Max number of search space in add/modify/release list */
57 #define FREQ_DOM_RSRC_SIZE 6 /* i.e. 6 bytes because Size of frequency domain resource is 45 bits */
58 #define MONITORING_SYMB_WITHIN_SLOT_SIZE 2 /* i.e. 2 bytes because size of monitoring symbols within slot is 14 bits */
59 #define MAX_NUM_DL_ALLOC 16 /* Max number of pdsch time domain downlink allocation */
60 #define MAX_NUM_UL_ALLOC 16 /* Max number of pusch time domain uplink allocation */
61 #define SD_SIZE 3 /* Max size of Slice Differentiator in S-NSSAI */
64 #define MAX_NUM_DRB 64
65 #define MAX_NUM_SCELL 32
68 #define EVENT_MAC_CELL_CONFIG_REQ 200
69 #define EVENT_MAC_CELL_CONFIG_CFM 201
70 #define EVENT_MAC_CELL_START_REQ 202
71 #define EVENT_MAC_CELL_STOP_REQ 203
72 #define EVENT_MAC_SLOT_IND 204
73 #define EVENT_MAC_STOP_IND 205
74 #define EVENT_MAC_UL_CCCH_IND 206
75 #define EVENT_MAC_DL_CCCH_IND 207
76 #define EVENT_MAC_UE_CREATE_REQ 208
77 #define EVENT_MAC_UE_CREATE_RSP 209
93 MAC_GEN_FULL_PBCH_PAYLD, /* MAC generated the full PBCH Payload */
94 PHY_GEN_TIMING_PBCH_BIT, /* PHY generates the timing PBCH bits */
95 PHY_GEN_FULL_PBCH_PAYLD /* PHY generates full PBCH payload */
107 RESTRICTED_SET_TYPE_A,
108 RESTRICTED_SET_TYPE_B
159 /* Enums for Ue Create Request */
161 /* SR PROHIBIT TIMER */
188 TIME_ALIGNMENT_TIMER_MS_500,
189 TIME_ALIGNMENT_TIMER_MS_750,
190 TIME_ALIGNMENT_TIMER_MS_1280,
191 TIME_ALIGNMENT_TIMER_MS_1920,
192 TIME_ALIGNMENT_TIMER_MS_2560,
193 TIME_ALIGNMENT_TIMER_MS_5120,
194 TIME_ALIGNMENT_TIMER_MS_10240,
195 TIME_ALIGNMENT_TIMER_INFINITY
200 PHR_PERIODIC_TIMER_SF_10,
201 PHR_PERIODIC_TIMER_SF_20,
202 PHR_PERIODIC_TIMER_SF_50,
203 PHR_PERIODIC_TIMER_SF_100,
204 PHR_PERIODIC_TIMER_SF_200,
205 PHR_PERIODIC_TIMER_SF_500,
206 PHR_PERIODIC_TIMER_SF_1000,
207 PHR_PERIODIC_TIMER_INFINITY
212 PHR_PROHIBIT_TIMER_SF_0,
213 PHR_PROHIBIT_TIMER_SF_10,
214 PHR_PROHIBIT_TIMER_SF_20,
215 PHR_PROHIBIT_TIMER_SF_50,
216 PHR_PROHIBIT_TIMER_SF_100,
217 PHR_PROHIBIT_TIMER_SF_200,
218 PHR_PROHIBIT_TIMER_SF_500,
219 PHR_PROHIBIT_TIMER_SF_1000
224 PHR_TX_PWR_FACTOR_CHANGE_DB_1,
225 PHR_TX_PWR_FACTOR_CHANGE_DB_3,
226 PHR_TX_PWR_FACTOR_CHANGE_DB_6,
227 PHR_TX_PWR_FACTOR_CHANGE_INFINITY
228 }PhrTxPwrFactorChange;
232 PHR_MODE_OTHER_CG_REAL,
233 PHR_MODE_OTHER_CG_VIRTUAL
238 PDSCH_HARQ_ACK_CODEBOOK_SEMISTATIC,
239 PDSCH_HARQ_ACK_CODEBOOK_DYNAMIC
240 }PdschHarqAckCodebook;
244 NUM_HARQ_PROC_FOR_PDSCH_N_2,
245 NUM_HARQ_PROC_FOR_PDSCH_N_4,
246 NUM_HARQ_PROC_FOR_PDSCH_N_6,
247 NUM_HARQ_PROC_FOR_PDSCH_N_10,
248 NUM_HARQ_PROC_FOR_PDSCH_N_16
249 }NumHarqProcForPdsch;
253 MAX_CODE_BLOCK_GROUP_PER_TB_N_2,
254 MAX_CODE_BLOCK_GROUP_PER_TB_N_4,
255 MAX_CODE_BLOCK_GROUP_PER_TB_N_6,
256 MAX_CODE_BLOCK_GROUP_PER_TB_N_8
268 TRANSFORM_PRECODER_ENABLED,
269 TRANSFORM_PRECODER_DISABLED
274 CCE_REG_MAPPINGTYPE_PR_INTERLEAVED,
275 CCE_REG_MAPPINGTYPE_PR_NONINTERLEAVED
280 SLOTPERIODICITYANDOFFSET_PR_SL1,
281 SLOTPERIODICITYANDOFFSET_PR_SL2,
282 SLOTPERIODICITYANDOFFSET_PR_SL4,
283 SLOTPERIODICITYANDOFFSET_PR_SL5,
284 SLOTPERIODICITYANDOFFSET_PR_SL8,
285 SLOTPERIODICITYANDOFFSET_PR_SL10,
286 SLOTPERIODICITYANDOFFSET_PR_SL16,
287 SLOTPERIODICITYANDOFFSET_PR_SL20,
288 SLOTPERIODICITYANDOFFSET_PR_SL40,
289 SLOTPERIODICITYANDOFFSET_PR_SL80,
290 SLOTPERIODICITYANDOFFSET_PR_SL160,
291 SLOTPERIODICITYANDOFFSET_PR_SL320,
292 SLOTPERIODICITYANDOFFSET_PR_SL640,
293 SLOTPERIODICITYANDOFFSET_PR_SL1280,
294 SLOTPERIODICITYANDOFFSET_PR_SL2560
295 }MSlotPeriodAndOffset;
305 SEARCHSPACETYPE_PR_COMMON,
306 SEARCHSPACETYPE_PR_UE_SPECIFIC
311 AGGREGATIONLEVEL_N0 = 0,
312 AGGREGATIONLEVEL_N1 = 1,
313 AGGREGATIONLEVEL_N2 = 2,
314 AGGREGATIONLEVEL_N3 = 3,
315 AGGREGATIONLEVEL_N4 = 4,
316 AGGREGATIONLEVEL_N5 = 5,
317 AGGREGATIONLEVEL_N6 = 6,
318 AGGREGATIONLEVEL_N8 = 7
323 ADDITIONALPOSITION_POS0,
324 ADDITIONALPOSITION_POS1,
325 ADDITIONALPOSITION_POS3
336 RESOURCEALLOCATION_TYPE0,
337 RESOURCEALLOCATION_TYPE1,
338 RESOURCEALLOCATION_DYNAMICSWITCH
349 CODEWORDS_SCHED_BY_DCI_N1,
350 CODEWORDS_SCHED_BY_DCI_N2
355 TYPE_STATIC_BUNDLING,
356 TYPE_DYNAMIC_BUNDLING
369 TRANSPORT_LAYER_FAIL,
376 UNSPECIFIED_RADIO_NW_CAUSE,
378 UNKNOWN_GNB_CU_UE_F1AP_ID,
379 ALREADY_ALLOCATED_GNB_CU_UE_F1AP_ID,
380 UNKNOWN_GNB_DU_UE_F1AP_ID,
381 ALREADY_ALLOCATED_GNB_DU_UE_F1AP_ID,
382 UNKNOWN_UE_F1AP_ID_PAIR,
383 INCONSISTENT_UE_F1AP_ID_PAIR,
384 INTERACTION_WITH_OTHER_PROCEDURE,
386 ACTION_REQUIRED_FOR_RADIO_REASONS,
387 RADIO_RESOURCES_UNAVAILABLE,
393 RESOURCES_UNAVAILABLE_FOR_SLICE
398 UNSPECIFIED_TRANSPORT_LAYER_CAUSE,
399 TRANSPORT_RESOURCE_UNAVAILABLE
404 TRANSFER_SYNTAX_ERROR,
405 ABSTRACT_SYNTAX_ERROR_REJECT,
406 ABSTRACT_SYNTAX_ERROR_IGNORE_AND_REJECT,
407 INCOMPATIBLE_MESSAGE_FOR_RECEIVER_STATE,
409 ABSTRAXCT_SYNTAX_ERROR_FALSELY_CONSTRUCTED_MSG,
410 UNSPECIFIED_PROTOCOL_CAUSE
415 CONTROL_PROCESSING_OVERLOAD,
417 PLANE_PROCESSING_RESOURCES,
419 INTERVENTION_BY_O_AND_M,
420 UNSPECIFIED_MISC_CAUSE
423 typedef struct failureCause
428 RadioNwLyrCause radioNwCause;
429 TransLyrCause transportCause;
430 ProtCause protcolCause;
431 MiscFailCause miscCause;
435 typedef struct carrierCfg
438 U16 bw; /* DL/UL bandwidth */
439 U32 freq; /* Absolute frequency of DL/UL point A in KHz */
440 U16 k0[NUM_NUMEROLOGY]; /* K0 for DL/UL */
441 U16 gridSize[NUM_NUMEROLOGY]; /* DL/UL Grid size for each numerologies */
442 U16 numAnt; /* Number of Tx/Rx antennas */
445 typedef struct ssbCfg
447 uint32_t ssbPbchPwr; /* SSB block power */
448 BchPduOpt bchPayloadFlag; /* Options for generation of payload */
449 uint8_t scsCmn; /* subcarrier spacing for common */
450 uint16_t ssbOffsetPointA; /* SSB subcarrier offset from point A */
452 SSBPeriod ssbPeriod; /* SSB Periodicity in msec */
453 uint8_t ssbScOffset; /* Subcarrier Offset */
454 uint8_t mibPdu[3]; /* MIB payload */
455 uint32_t ssbMask[SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */
456 uint8_t beamId[NUM_SSB];
457 Bool multCarrBand; /* Multiple carriers in a band */
458 Bool multCellCarr; /* Multiple cells in single carrier */
461 typedef struct fdmInfo
463 U16 rootSeqIdx; /* Root sequence index */
464 U8 numRootSeq; /* Number of root sequences required for FD */
465 U16 k1; /* Frequency Offset for each FD */
466 U8 zeroCorrZoneCfg; /* Zero correlation zone cofig */
467 U8 numUnusedRootSeq; /* Number of unused root sequence */
468 U8 *unsuedRootSeq; /* Unused root sequence per FD */
471 typedef struct prachCfg
474 uint8_t prachCfgIdx; /* PRACH Cfg Index */
475 PrachSeqLen prachSeqLen; /* RACH Sequence length: Long/short */
476 uint8_t prachSubcSpacing; /* Subcarrier spacing of RACH */
477 RstSetCfg prachRstSetCfg; /* PRACH restricted set config */
478 uint16_t msg1FreqStart; /* Msg1-FrequencyStart */
479 uint8_t msg1Fdm; /* PRACH FDM (1,2,4,8) */
480 uint8_t rootSeqLen; /* Root sequence length */
481 PrachFdmInfo fdm[8]; /* FDM info */
482 uint8_t ssbPerRach; /* SSB per RACH occassion */
483 Bool prachMultCarrBand; /* Multiple carriers in Band */
484 uint8_t prachRestrictedSet; /* Support for PRACH restricted set */
485 uint8_t raContResTmr; /* RA Contention Resoultion Timer */
486 uint8_t rsrpThreshSsb; /* RSRP Threshold SSB */
487 uint8_t raRspWindow; /* RA Response Window */
490 typedef struct tddCfg
493 DlUlTxPeriodicity tddPeriod; /* DL UL Transmission periodicity */
494 SlotConfig slotCfg[MAXIMUM_TDD_PERIODICITY][MAX_SYMB_PER_SLOT];
497 typedef struct sib1CellCfg
501 uint16_t sib1NewTxPeriod;
502 uint16_t sib1RepetitionPeriod;
503 uint8_t coresetZeroIndex; /* derived from 4 LSB of pdcchSib1 present in MIB */
504 uint8_t searchSpaceZeroIndex; /* derived from 4 MSB of pdcchSib1 present in MIB */
508 typedef struct bwpParams
513 uint8_t cyclicPrefix;
516 typedef struct candidatesInfo
525 typedef struct searchSpaceCfg
527 uint8_t searchSpaceId;
529 uint16_t monitoringSlot;
531 uint16_t monitoringSymbol;
532 CandidatesInfo candidate;
535 typedef struct pdcchConfigCommon
537 /* only one search space is configured during SIB1 */
538 SearchSpaceCfg commonSearchSpace;
539 uint8_t raSearchSpaceId;
542 typedef struct pdschConfigCommon
547 uint8_t lengthSymbol;
550 typedef struct pucchConfigCommon
552 uint8_t pucchResourceCommon;
553 uint8_t pucchGroupHopping;
556 typedef struct puschConfigCommon
558 /* PUSCH-TimeDomainResourceAllocation info */
562 uint8_t lengthSymbol;
565 typedef struct bwpDlConfig
568 PdcchConfigCommon pdcchCommon;
569 PdschConfigCommon pdschCommon;
572 typedef struct bwpUlConfig
575 // rach config common sent in PrachCfg
576 PucchConfigCommon pucchCommon;
577 PuschConfigCommon puschCommon;
580 typedef struct macCellCfg
582 U16 cellId; /* Cell Id */
583 U8 numTlv; /* Number of configuration TLVs */
584 U8 carrierId; /* Carrired Index */
585 U16 phyCellId; /* Physical cell id */
586 DuplexMode dupType; /* Duplex type: TDD/FDD */
587 CarrierCfg dlCarrCfg; /* DL Carrier configuration */
588 CarrierCfg ulCarrCfg; /* UL Carrier configuration */
589 Bool freqShft; /* Indicates presence of 7.5kHz frequency shift */
590 SsbCfg ssbCfg; /* SSB configuration */
591 PrachCfg prachCfg; /* PRACH Configuration */
592 TDDCfg tddCfg; /* TDD periodicity and slot configuration */
593 RSSIMeasUnit rssiUnit; /* RSSI measurement unit */
594 Sib1CellCfg sib1Cfg; /* SIB1 config */
595 BwpDlConfig initialDlBwp; /* Initial DL BWP */
596 BwpUlConfig initialUlBwp; /* Initial UL BWP */
597 uint8_t dmrsTypeAPos; /* DMRS Type A position */
600 typedef struct macCellCfgCfm
606 typedef struct slotInfo
613 typedef struct macCellStartInfo
618 typedef struct macCellStopInfo
623 typedef struct ulCcchInd
630 typedef struct dlCcchInd
634 DlCcchMsgType msgType;
635 uint16_t dlCcchMsgLen;
639 typedef struct bsrTmrCfg
641 uint8_t periodicTimer;
643 uint8_t srDelayTimer;
647 /* Info of Scheduling Request to Add/Modify */
648 typedef struct schedReqInfo
651 SrProhibitTimer srProhibitTmr;
652 SrTransMax srTransMax;
655 /* Scheduling Request Configuration */
656 typedef struct schedReqCfg
658 uint8_t addModListCount;
659 SchedReqInfo addModList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* List of Scheduling req to be added/modified */
660 uint8_t relListCount;
661 uint8_t relList[MAX_NUM_SR_CFG_PER_CELL_GRP]; /* list of scheduling request Id to be deleted */
664 typedef struct tagInfo
667 TimeAlignmentTimer timeAlignTimer;
670 typedef struct tagCfg
672 uint8_t addModListCount;
673 TagInfo addModList[MAC_NUM_TAGS]; /* List of Tag to Add/Modify */
674 uint8_t relListCount;
675 uint8_t relList[MAC_NUM_TAGS]; /* list of Tag Id to release */
678 typedef struct phrCfg
680 PhrPeriodicTimer periodicTimer;
681 PhrProhibitTimer prohibitTimer;
682 PhrTxPwrFactorChange txPowerFactor;
685 bool phrType2OtherCell;
686 PhrModeOtherCG phrOtherCG;
689 typedef struct macCellGrpCfg
691 SchedReqCfg schReqCfg;
694 bool phrCfgSetupPres; /* true/false: phrCfgSetup/phrCfgRelease */
698 typedef struct phyCellGrpCfg
700 PdschHarqAckCodebook pdschHarqAckCodebook;
704 /* Control resource set info */
705 typedef struct controlRsrcSet
707 uint8_t cRSetId; /* Control resource set id */
708 uint8_t freqDomainRsrc[FREQ_DOM_RSRC_SIZE]; /* Frequency domain resource */
710 REGMappingType cceRegMappingType;
711 PrecoderGranul precoderGranularity;
712 uint16_t dmrsScramblingId;
715 /* Search Space info */
716 typedef struct searchSpace
718 uint8_t searchSpaceId;
720 MSlotPeriodAndOffset mSlotPeriodicityAndOffset;
721 uint8_t mSymbolsWithinSlot[MONITORING_SYMB_WITHIN_SLOT_SIZE];
722 AggrLevel numCandidatesAggLevel1; /* Number of candidates for aggregation level 1 */
723 AggrLevel numCandidatesAggLevel2; /* Number of candidates for aggregation level 2 */
724 AggrLevel numCandidatesAggLevel4; /* Number of candidates for aggregation level 4 */
725 AggrLevel numCandidatesAggLevel8; /* Number of candidates for aggregation level 8 */
726 AggrLevel numCandidatesAggLevel16; /* Number of candidates for aggregation level 16 */
727 SearchSpaceType searchSpaceType;
728 uint8_t ueSpecificDciFormat;
731 /* PDCCH cofniguration */
732 typedef struct pdcchConfig
734 uint8_t numCRsetToAddMod;
735 ControlRsrcSet cRSetToAddModList[MAX_NUM_CRSET]; /* List of control resource set to add/modify */
736 uint8_t numCRsetToRel;
737 uint8_t cRSetToRelList[MAX_NUM_CRSET]; /* List of control resource set to release */
738 uint8_t numSearchSpcToAddMod;
739 SearchSpace searchSpcToAddModList[MAX_NUM_SEARCH_SPC]; /* List of search space to add/modify */
740 uint8_t numSearchSpcToRel;
741 uint8_t searchSpcToRelList[MAX_NUM_SEARCH_SPC]; /* List of search space to release */
744 /* PDSCH time domain resource allocation */
745 typedef struct pdschTimeDomRsrcAlloc
747 CommonMappingType mappingType;
749 uint8_t symbolLength;
750 uint8_t startSymbolAndLength;
751 }PdschTimeDomRsrcAlloc;
753 /* DMRS downlink configuration */
754 typedef struct dmrsDlCfg
756 AddPosType addPos; /* DMRS additional position */
759 /* PDSCH Configuration */
760 typedef struct pdschConfig
762 DmrsDlCfg dmrsDlCfgForPdschMapTypeA;
763 ResAllocType resourceAllocType;
764 uint8_t numTimeDomRsrcAlloc;
765 PdschTimeDomRsrcAlloc timeDomRsrcAllociList[MAX_NUM_DL_ALLOC]; /* PDSCH time domain DL resource allocation list */
767 CodeWordsSchedDci numCodeWordsSchByDci; /* Number of code words scheduled by DCI */
768 BundlingType bundlingType;
771 /* Initial Downlink BWP */
772 typedef struct initialDlBwp
775 PdcchConfig pdcchCfg;
777 PdschConfig pdschCfg;
780 /* BWP Downlink common */
781 typedef struct bwpDlCommon
785 /* Downlink BWP information */
786 typedef struct dlBwpInfo
791 /* PDCCH Serving Cell configuration */
792 typedef struct pdschServCellCfg
794 uint8_t *maxMimoLayers;
795 NumHarqProcForPdsch numHarqProcForPdsch;
796 MaxCodeBlkGrpPerTB *maxCodeBlkGrpPerTb;
797 bool *codeBlkGrpFlushInd;
798 PdschXOverhead *xOverhead;
801 /* PUCCH Configuration */
802 typedef struct pucchCfg
804 /* TODO : Not used currently */
807 /* Transform precoding disabled */
808 typedef struct transPrecodDisabled
810 uint16_t scramblingId0;
811 }TransPrecodDisabled;
813 /* DMRS Uplink configuration */
814 typedef struct dmrsUlCfg
816 AddPosType addPos; /* DMRS additional position */
817 TransPrecodDisabled transPrecodDisabled; /* Transform precoding disabled */
820 /* PUSCH Time Domain Resource Allocation */
821 typedef struct puschTimeDomRsrcAlloc
824 CommonMappingType mappingType;
826 uint8_t symbolLength;
827 uint8_t startSymbolAndLength;
828 }PuschTimeDomRsrcAlloc;
830 /* PUSCH Configuration */
831 typedef struct puschCfg
833 DmrsUlCfg dmrsUlCfgForPuschMapTypeA;
834 ResAllocType resourceAllocType;
835 uint8_t numTimeDomRsrcAlloc;
836 PuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
837 TransformPrecoder transformPrecoder;
840 /* Initial Uplink BWP */
841 typedef struct initialUlBwp
849 /* Uplink BWP information */
850 typedef struct ulBwpInfo
855 /* Serving cell configuration */
856 typedef struct servCellCfgInfo
858 InitialDlBwp initDlBwp;
859 uint8_t numDlBwpToAdd;
860 DlBwpInfo DlBwpToAddList[MAX_NUM_BWP];
861 uint8_t firstActvDlBwpId;
862 uint8_t defaultDlBwpId;
863 uint8_t *bwpInactivityTmr;
864 PdschServCellCfg pdschServCellCfg;
865 InitialUlBwp initUlBwp;
866 uint8_t numUlBwpToAdd;
867 UlBwpInfo UlBwpToAddList[MAX_NUM_BWP];
868 uint8_t firstActvUlBwpId;
871 /* Special cell configuration */
872 typedef struct spCellCfg
875 ServCellCfgInfo servCellCfg;
878 typedef struct maxAggrBitRate
884 /* Single Network Slice Selection assistance Info */
885 typedef struct snssai
887 uint8_t sst; /* Slice Type */
888 uint8_t sd[SD_SIZE]; /* Slice Differentiator */
891 typedef struct nonDynFiveQi
896 uint16_t maxDataBurstVol;
899 typedef struct dynFiveQi
902 uint16_t packetDelayBudget;
903 uint8_t packetErrRateScalar;
904 uint8_t packetErrRateExp;
906 uint8_t delayCritical;
908 uint16_t maxDataBurstVol;
911 typedef struct ngRanAllocAndRetPri
913 uint8_t priorityLevel;
914 uint8_t preEmptionCap;
915 uint8_t preEmptionVul;
916 }NgRanAllocAndRetPri;
918 typedef struct grbQosInfo
920 uint32_t maxFlowBitRateDl;
921 uint32_t maxFlowBitRateUl;
922 uint32_t guarFlowBitRateDl;
923 uint32_t guarFlowBitRateUl;
926 typedef struct drbQos
928 uint8_t fiveQiType; /* Dynamic or non-dynamic */
931 NonDynFiveQi nonDyn5Qi;
934 NgRanAllocAndRetPri ngRanRetPri;
935 GrbQosInfo grbQosInfo;
936 uint16_t pduSessionId;
937 uint32_t ulPduSessAggMaxBitRate;
940 typedef struct ulLcCfg
945 uint8_t pbr; // prioritisedBitRate
946 uint8_t bsd; // bucketSizeDuration
949 typedef struct duLcCfg
951 LcPriority lcp; // logical Channel Prioritization
964 typedef struct macUeCfg
969 MacCellGrpCfg macCellGrpCfg;
970 PhyCellGrpCfg phyCellGrpCfg;
972 MaxAggrBitRate *maxAggrBitRate;
974 LcCfg lcCfgList[MAX_NUM_LOGICAL_CHANNELS];
977 typedef struct plmnId
989 typedef struct srbFailInfo
995 typedef struct drbFailInfo
1001 typedef struct sCellFailInfo
1007 typedef struct ueCfgRsp
1012 uint8_t numSRBFailed; /* valid values : 0 to MAX_NUM_SRB */
1013 SRBFailInfo *failedSRBlisti;
1014 uint8_t numDRBFailed; /* valid values : 0 to MAX_NUM_DRB */
1015 DRBFailInfo *failedDRBlist;
1016 uint8_t numSCellFailed; /* valid values : 0 to MAX_NUM_SCELL */
1017 SCellFailInfo *failedSCellList;
1020 /* Functions for slot Ind from MAC to DU APP*/
1021 typedef uint16_t (*DuMacSlotInd) ARGS((
1023 SlotInfo *slotInfo ));
1025 /* Functions for stop Ind from MAC to DU APP*/
1026 typedef uint16_t (*DuMacStopInd) ARGS((
1028 MacCellStopInfo *cellId ));
1030 /* Functions for mac cell start req */
1031 typedef uint16_t (*DuMacCellStartReq) ARGS((
1033 MacCellStartInfo *cellStartInfo ));
1035 /* Functions for mac cell stop request */
1036 typedef uint16_t (*DuMacCellStopReq) ARGS((
1038 MacCellStopInfo *cellStopInfo ));
1040 /* Function pointers for packing macCellCfg Request and Confirm */
1041 typedef int (*packMacCellCfgReq) ARGS((
1043 MacCellCfg *macCellCfg ));
1045 typedef int (*packMacCellCfgConfirm) ARGS((
1047 MacCellCfgCfm *macCellCfgCfm ));
1049 typedef int (*DuMacCellCfgReq) ARGS((
1051 MacCellCfg *macCellCfg));
1053 typedef int (*DuMacCellCfgCfm) ARGS((
1055 MacCellCfgCfm *macCellCfgCfm ));
1057 /* Functions for UL CCCH Ind from MAC to DU APP*/
1058 typedef uint16_t (*DuMacUlCcchInd) ARGS((
1060 UlCcchIndInfo *ulCcchIndInfo ));
1062 /* Functions for DL CCCH Ind from DU APP to MAC*/
1063 typedef uint16_t (*DuMacDlCcchInd) ARGS((
1065 DlCcchIndInfo *dlCcchIndInfo ));
1067 /* UE create Request from DU APP to MAC*/
1068 typedef uint8_t (*DuMacUeCreateReq) ARGS((
1072 /* UE create Response from MAC to DU APP */
1073 typedef uint8_t (*DuMacUeCreateRspFunc) ARGS((
1075 MacUeCfgRsp *cfgRsp));
1077 extern uint16_t packMacSlotInd(Pst *pst, SlotInfo *slotInfo );
1078 extern uint16_t unpackMacSlotInd(DuMacSlotInd func, Pst *pst, Buffer *mBuf);
1079 extern uint16_t duHandleSlotInd(Pst *pst, SlotInfo *slotInfo);
1080 extern uint16_t packMacCellStartReq(Pst *pst, MacCellStartInfo *cellStartInfo);
1081 extern uint16_t unpackMacCellStartReq(DuMacCellStartReq func, Pst *pst, Buffer *mBuf);
1082 extern uint16_t MacHdlCellStartReq(Pst *pst, MacCellStartInfo *cellStartInfo);
1083 extern uint16_t packMacCellStopReq(Pst *pst, MacCellStopInfo *cellStopInfo);
1084 extern uint16_t unpackMacCellStopReq(DuMacCellStopReq func, Pst *pst, Buffer *mBuf);
1085 extern uint16_t MacHdlCellStopReq(Pst *pst, MacCellStopInfo *cellStopInfo);
1086 extern int packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg);
1087 extern int MacHdlCellCfgReq(Pst *pst, MacCellCfg *macCellCfg);
1088 extern void cmUnpackLwLcMacCellCfg(DuMacCellCfgReq func, Pst *pst, Buffer *mBuf);
1089 extern int unpackMacCellCfgCfm(DuMacCellCfgCfm func, Pst *pst, Buffer *mBuf);
1090 extern int duHandleMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm);
1091 extern uint16_t packMacStopInd(Pst *pst, MacCellStopInfo *cellId);
1092 extern uint16_t unpackMacStopInd(DuMacStopInd func, Pst *pst, Buffer *mBuf);
1093 extern uint16_t duHandleStopInd(Pst *pst, MacCellStopInfo *cellId);
1094 extern uint16_t packMacUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
1095 extern uint16_t unpackMacUlCcchInd(DuMacUlCcchInd func, Pst *pst, Buffer *mBuf);
1096 extern uint16_t duHandleUlCcchInd(Pst *pst, UlCcchIndInfo *ulCcchIndInfo);
1097 extern uint16_t packMacDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
1098 extern uint16_t unpackMacDlCcchInd(DuMacDlCcchInd func, Pst *pst, Buffer *mBuf);
1099 extern uint16_t MacHdlDlCcchInd(Pst *pst, DlCcchIndInfo *dlCcchIndInfo);
1100 extern uint8_t packDuMacUeCreateReq(Pst *pst, MacUeCfg *ueCfg);
1101 extern uint8_t unpackMacUeCreateReq(DuMacUeCreateReq func, Pst *pst, Buffer *mBuf);
1102 extern uint8_t MacHdlUeCreateReq(Pst *pst, MacUeCfg *ueCfg);
1103 uint8_t sendStopIndMacToDuApp();
1104 extern uint8_t packDuMacUeCreateRsp(Pst *pst, MacUeCfgRsp *cfgRsp);
1105 extern uint8_t unpackDuMacUeCreateRsp(DuMacUeCreateRspFunc func, Pst *pst, Buffer *mBuf);
1106 extern uint8_t duHandleMacUeCreateRsp(Pst *pst, MacUeCfgRsp *cfgRsp);
1109 /**********************************************************************
1111 **********************************************************************/