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 *******************************************************************************/
20 #define EVENT_SCH_CELL_CFG 1
21 #define EVENT_SCH_CELL_CFG_CFM 2
24 #define MAC_SCH_LC_SELECTOR 0
25 #define MAC_SCH_TC_SELECTOR 1
26 #define MAC_SCH_LWLC_SELECTOR 2
30 #define SSB_TRANSMISSION 1
32 #define MAX_SSB_IDX 1 /* forcing it as 1 for now. Right value is 64 */
43 typedef struct schCellCfg
45 U16 cellId; /* Cell Id */
46 U16 phyCellId; /* Physical cell id */
47 U8 bandwidth; /* Supported B/W */
48 DuplexMode dupMode; /* Duplex type: TDD/FDD */
49 U32 ssbPbchPwr; /* SSB block power */
50 U8 scsCommon; /* subcarrier spacing for common [0-3]*/
51 U16 ssbOffsetPointA; /* SSB sub carrier offset from point A */
52 SSBPeriod ssbPeriod; /* SSB Periodicity in msec */
53 U8 ssbSubcOffset; /* Subcarrier Offset(Kssb) */
54 U32 nSSBMask[SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */
57 typedef struct schCellCfgCfm
59 U16 cellId; /* Cell Id */
63 typedef struct timeDomainAlloc
65 uint16_t ssbStartSymbIdx;
66 uint16_t ssbSymbolDuration;
69 typedef struct freqDomainAlloc
71 uint16_t ssbStartPrbIdx;
72 uint16_t ssbPrbDuration;
75 typedef struct ssbInfo
77 uint8_t ssbIdx; /* SSB Index */
78 TimeDomainAlloc tdAlloc; /* Time domain allocation */
79 FreqDomainAlloc fdAlloc; /* Freq domain allocation */
82 /* Interface structure signifying DL broadcast allocation for SSB, SIB1 */
83 typedef struct dlBrdcstAlloc
85 uint16_t cellId; /* Cell Id */
86 SlotIndInfo slotIndInfo; /* Slot Info: sfn, slot number */
87 /* Ssb transmission is determined as follows:
89 * 1 : SSB Transmission
90 * 2 : SSB Repetition */
92 uint8_t ssbIdxSupported;
93 SsbInfo ssbInfo[MAX_SSB_IDX];
94 /* Sib1 transmission is determined as follows:
96 * 1 : SIB1 Transmission
97 * 2 : SIB1 Repetition */
101 /* function pointers */
103 typedef int (*SchMacDlBrdcstAllocFunc) ARGS((
104 Pst *pst, /* Post Structure */
105 DlBrdcstAlloc *dlBrdcstAlloc /* slot ind Info */
108 typedef int (*SchCellCfgCfmFunc) ARGS((
109 Pst *pst, /* Post Structure */
110 SchCellCfgCfm *schCellCfgCfm /* Cell Cfg Cfm */
113 typedef int (*SchCellCfgFunc) ARGS((
114 Pst *pst, /* Post Structure */
115 SchCellCfg *schCellCfg /* Cell Cfg */
117 /* function declarations */
118 int packMacSchSlotInd(Pst *pst, SlotIndInfo *slotInd);
119 int packSchMacDlBrdcstAlloc(Pst *pst, DlBrdcstAlloc *dlBrdcstAlloc);
120 EXTERN int packSchCellCfg(Pst *pst, SchCellCfg *schCellCfg);
121 EXTERN int packSchCellCfgCfm(Pst *pst, SchCellCfgCfm *schCellCfgCfm);
123 EXTERN int MacProcDlBrdcstAlloc(Pst *pst, DlBrdcstAlloc *dlBrdcstAlloc);
124 EXTERN int MacProcSchCellCfg(Pst *pst, SchCellCfg *schCellCfg);
125 EXTERN int MacProcSchCellCfgCfm(Pst *pst, SchCellCfgCfm *schCellCfgCfm);
126 EXTERN int SchHdlCellCfgReq(Pst *pst, SchCellCfg *schCellCfg);
127 EXTERN int schActvInit(Ent entity, Inst instId, Region region, Reason reason);
128 EXTERN S16 SchSendCfgCfm(Pst *pst, RgMngmt *cfm);
130 /**********************************************************************
132 **********************************************************************/