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 */
32 #define EVENT_MAC_CELL_CONFIG_REQ 200
33 #define EVENT_MAC_CELL_CONFIG_CFM 201
43 MAC_GEN_FULL_PBCH_PAYLD, /* MAC generated the full PBCH Payload */
44 PHY_GEN_TIMING_PBCH_BIT, /* PHY generates the timing PBCH bits */
45 PHY_GEN_FULL_PBCH_PAYLD /* PHY generates full PBCH payload */
57 RESTRICTED_SET_TYPE_A,
103 typedef struct carrierCfg
106 U16 bw; /* DL/UL bandwidth */
107 U32 freq; /* Absolute frequency of DL/UL point A in KHz */
108 U16 k0[NUM_NUMEROLOGY]; /* K0 for DL/UL */
109 U16 gridSize[NUM_NUMEROLOGY]; /* DL/UL Grid size for each numerologies */
110 U16 numAnt; /* Number of Tx/Rx antennas */
113 typedef struct ssbCfg
115 U32 ssbPbchPwr; /* SSB block power */
116 BchPduOpt bchPayloadOption; /* Options for generation of payload */
117 U8 scsCmn; /* subcarrier spacing for common */
118 U16 ssbPrbOffset; /* SSB PRB offset from point A */
120 SSBPeriod ssbPeriod; /* SSB Periodicity in msec */
121 U8 ssbSubcOffset; /* Subcarrier Offset */
122 U32 mibPdu; /* MIB payload */
123 U32 nSSBMask[SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */
125 Bool multCarrBand; /* Multiple carriers in a band */
126 Bool multCellCarr; /* Multiple cells in single carrier */
129 typedef struct fdmInfo
131 U16 rootSeqIdx; /* Root sequence index */
132 U8 numRootSeq; /* Number of root sequences required for FD */
133 U16 k1; /* Frequency Offset for each FD */
134 U8 zeroCorrZoneCfg; /* Zero correlation zone cofig */
135 U8 numUnusedRootSeq; /* Number of unused root sequence */
136 U8 *unsuedRootSeq; /* Unused root sequence per FD */
139 typedef struct prachCfg
142 PrachSeqLen prachSeqLen; /* RACH Sequence length: Long/short */
143 U8 prachSubcSpacing; /* Subcarrier spacing of RACH */
144 RstSetCfg prachRstSetCfg; /* PRACH restricted set config */
145 U8 prachFdm; /* PRACH FDM (1,2,4,8) */
147 U8 ssbPerRach; /* SSB per RACH occassion */
148 Bool prachMultCarrBand; /* Multiple carriers in Band */
151 typedef struct tddCfg
154 DlUlTxPeriodicity tddPeriod; /* DL UL Transmission periodicity */
155 SlotConfig slotCfg[MAXIMUM_TDD_PERIODICITY][MAX_SYMB_PER_SLOT];
158 typedef struct macCellCfg
161 U16 cellId; /* Cell Id */
162 U8 numTlv; /* Number of configuration TLVs */
163 U8 carrierId; /* Carrired Index */
164 U16 phyCellId; /* Physical cell id */
165 DuplexMode dupType; /* Duplex type: TDD/FDD */
166 CarrierCfg dlCarrCfg; /* DL Carrier configuration */
167 CarrierCfg ulCarrCfg; /* UL Carrier configuration */
168 Bool freqShft; /* Indicates presence of 7.5kHz frequency shift */
169 SsbCfg ssbCfg; /* SSB configuration */
170 PrachCfg prachCfg; /* PRACH Configuration */
171 TDDCfg tddCfg; /* TDD periodicity and slot configuration */
172 RSSIMeasUnit rssiUnit; /* RSSI measurement unit */
175 typedef struct macCellCfgCfm
180 /* function pointers for packing macCellCfg Request */
181 typedef S16 (*packMacCellCfgReq) ARGS((
183 MacCellCfg *macCellCfg
186 typedef S16 (*packMacCellCfgCfm) ARGS((
188 MacCellCfgCfm *macCellCfgCfm
191 typedef S16 (*DuMacCellCfgReq) ARGS((
192 Pst *pst, /* Post Structure */
193 MacCellCfg *macCellCfg /* Config Structure */
196 typedef S16 (*DuMacCellCfgCfm) ARGS((
197 MacCellCfgCfm *macCellCfgCfm /* Config Structure */
200 S16 packLcMacCellCfg(Pst *pst, MacCellCfg *macCellCfg);
201 S16 packLwLcMacCellCfg(Pst *pst, MacCellCfg *macCellCfg);
204 EXTERN S16 handleMacCellCfgReq
207 MacCellCfg *macCellCfg
210 void cmUnpackLwLcMacCellCfg(
211 DuMacCellCfgReq func,
215 S16 unpackMacCellCfgCfm(
216 DuMacCellCfgCfm func,
220 EXTERN S16 duHandleMacCellCfgCfm
222 MacCellCfgCfm *macCellCfgCfm
227 /**********************************************************************
229 **********************************************************************/