cu link failure fix
[o-du/l2.git] / src / 5gnrrlc / kw_udx.x
1 /*******************************************************************************
2 ################################################################################
3 #   Copyright (c) [2017-2019] [Radisys]                                        #
4 #                                                                              #
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                                    #
8 #                                                                              #
9 #       http://www.apache.org/licenses/LICENSE-2.0                             #
10 #                                                                              #
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 *******************************************************************************/
18
19 /**********************************************************************
20  
21     Name:   LTE RLC layer
22  
23     Type:   C include file
24  
25     Desc:   Defines required by LTE MAC
26  
27     File:   kw_udx.x
28  
29  
30 **********************************************************************/
31 /** @file kw_udx.x
32 @brief This file contains basic data structures for the Uplink Downlink 
33 interface.
34 */
35  
36 #ifndef __UDX_X__
37 #define __UDX_X__
38
39 #include "ckw.h"
40 #include "ckw.x"
41
42 #ifdef __cplusplus
43 extern "C" {
44 #endif /* __cplusplus */
45
46 typedef struct kwNackInfo
47 {
48    U8 nackRange;
49    U8 isSegment;
50    U32 sn;      /*!< Nack Sn */
51    U16 soStart; /*!< Segment offset start */
52    U16 soEnd;   /*!< Segment offset End */
53 }KwNackInfo;
54
55 typedef struct kwUdxStaPdu
56 {
57    U32 ackSn;
58    /* TODO : KW_MAX_NACK_CNT should set to MAx SR delay 
59       It is tradeoff to consider array based instead of dynamic
60       as there are chances where we might loose Status information
61       on spill over*/
62    U8 nackCnt;         /* Cnt of Nacks in the array*/
63    KwNackInfo nackInfo[KW_MAX_NACK_CNT];
64 }KwUdxStaPdu;
65
66 typedef struct kwUdxBufLst
67 {
68    CmLListCp rlsTxLst;      /*!< Stores to be released Tx PDUs */
69    CmLListCp rlsRetxLst;    /*!< Stores to be released Retx PDUs */
70    CmLListCp rlsSduLst;     /*!< Stores to be released SDUs*/
71 }KwUdxBufLst;
72
73 typedef struct kwStatusPdu
74 {
75    U32         ackSn;
76    KwNackInfo  nackInfo[KW_MAX_NACK_CNT];
77    U16         nackCount;
78    U16         controlBo;
79 }KwUdxDlStaPdu;
80 /* ### Umapathi*/
81
82 /**
83   * @brief
84   * UDX APIs
85   */
86 typedef S16 (*UdxBndCfm) ARGS((Pst* pst, SuId suId,U8  status ));
87
88 typedef S16 (*UdxBndReq) ARGS((Pst* pst, SuId suId,SpId  spId ));
89
90 typedef S16 (*UdxUbndReq) ARGS((Pst* pst, SuId suId,Reason reason));
91
92 typedef S16 (*UdxCfgReq) ARGS((Pst *pst, SpId spId, CkwCfgInfo *cfgInfo));
93
94 typedef S16 (*UdxCfgCfm) ARGS((Pst* pst,SuId suId,CkwCfgCfmInfo *cfmInfo));
95
96 typedef S16 (*UdxStaUpdReq) ARGS((Pst* pst,
97                                   SpId spId,
98                                   CmLteRlcId *rlcId,
99                                   KwUdxStaPdu *pStaPdu ));
100
101 typedef S16 (*UdxUeIdChgReq) ARGS((Pst *pst, 
102                                    SpId spId, 
103                                    U32 transId, 
104                                    CkwUeInfo *ueInfo, 
105                                    CkwUeInfo *newUeInfo));
106
107 typedef S16 (*UdxUeIdChgCfm) ARGS((Pst *pst, 
108                                    SuId suId, 
109                                    U32 transId, 
110                                    CmStatus status));
111
112 typedef S16 (*UdxStaUpdCfm) ARGS((Pst* pst,
113                                   SuId  suId,
114                                   CmLteRlcId *rlcId,
115                                   KwUdxBufLst *pBufLst));
116
117 typedef S16 (*UdxStaPduReq) ARGS((Pst* pst,
118                                   SpId  spId, 
119                                   CmLteRlcId *rlcId,
120                                   KwUdxDlStaPdu *pStaPdu));
121
122 typedef S16 (*UdxStaProhTmrStart) ARGS((Pst* pst,
123                                          SuId  suId,
124                                          CmLteRlcId  *rlcId));
125
126 #ifdef LTE_L2_MEAS
127 typedef S16 (*UdxL2MeasReq) ARGS((Pst* pst,
128                                 KwL2MeasReqEvt *measReqEvt));
129
130 typedef S16 (*UdxL2MeasSendReq) ARGS((Pst* pst,
131                                     U8 measType));
132
133 typedef S16 (*UdxL2MeasStopReq) ARGS((Pst* pst,
134                                     U8 measType));
135 #endif
136
137 #ifdef LCUDX
138 EXTERN S16 cmPkUdxBndCfm ARGS((Pst* pst, SuId suId,U8  status ));
139 EXTERN S16 cmPkUdxBndReq ARGS((Pst* pst, SuId suId,SpId  spId ));
140 EXTERN S16 cmPkUdxUbndReq ARGS((Pst* pst, SuId suId,Reason reason));
141 EXTERN S16 cmPkUdxCfgReq ARGS((Pst *pst, SpId spId, CkwCfgInfo *cfgInfo));
142 EXTERN S16 cmPkUdxCfgCfm ARGS(( Pst* pst,SuId suId,CkwCfgCfmInfo *cfmInfo));
143 EXTERN S16 cmPkUdxStaUpdReq ARGS((Pst* pst,SpId spId,CmLteRlcId *rlcId,
144                                KwUdxStaPdu         *pStaPdu ));
145 EXTERN S16 cmPkUdxUeIdChgReq ARGS((Pst *pst, SpId spId, U32 transId, 
146                                   CkwUeInfo *ueInfo, CkwUeInfo *newUeInfo));
147 EXTERN S16 cmPkUdxUeIdChgCfm ARGS((Pst *pst, SuId suId, U32 transId, 
148                                    CmStatus status));
149
150
151 EXTERN S16 cmPkUdxStaUpdCfm ARGS((Pst* pst,SuId  suId,CmLteRlcId  *rlcId,
152                              KwUdxBufLst  *pBufLst));
153
154 EXTERN S16 cmPkUdxStaPduReq ARGS(( Pst* pst,SpId  spId, CmLteRlcId *rlcId,
155                              KwUdxDlStaPdu  *pStaPdu ));
156 EXTERN S16 cmPkUdxStaProhTmrStart ARGS((Pst *pst, 
157                                         SpId spId, 
158                                         CmLteRlcId *rlcId));
159
160 #ifdef LTE_L2_MEAS
161 EXTERN S16 cmPkUdxL2MeasReq ARGS((Pst *pst, KwL2MeasReqEvt *measReqEvt)); 
162 EXTERN S16 cmPkUdxL2MeasSendReq ARGS((Pst *pst, U8 measType)); 
163 EXTERN S16 cmPkUdxL2MeasStopReq ARGS((Pst *pst, U8 measType)); 
164 #endif
165
166 EXTERN S16 cmUnpkUdxBndCfm ARGS((UdxBndCfm func,Pst* pst, Buffer *mBuf ));
167 EXTERN S16 cmUnpkUdxBndReq ARGS((UdxBndReq func,Pst* pst, Buffer *mBuf ));
168 EXTERN S16 cmUnpkUdxUbndReq ARGS((UdxUbndReq func,Pst* pst, Buffer *mBuf));
169 EXTERN S16 cmUnpkUdxCfgReq ARGS((UdxCfgReq func,Pst *pst, Buffer *mBuf));
170 EXTERN S16 cmUnpkUdxCfgCfm ARGS((UdxCfgCfm func , Pst* pst,Buffer *mBuf));
171 EXTERN S16 cmUnpkUdxStaUpdReq ARGS((UdxStaUpdReq func,Pst* pst,Buffer *mBuf));
172 EXTERN S16 cmUnpkUdxUeIdChgReq ARGS((UdxUeIdChgReq func,Pst *pst, Buffer *mBuf)); 
173 EXTERN S16 cmUnpkUdxUeIdChgCfm ARGS((UdxUeIdChgCfm func,Pst *pst, Buffer *mBuf)); 
174
175 EXTERN S16 cmUnpkUdxStaUpdCfm ARGS((UdxStaUpdCfm func,Pst* pst,Buffer *mBuf));
176
177 EXTERN S16 cmUnpkUdxStaPduReq ARGS((UdxStaPduReq func, Pst* pst, Buffer *mBuf));
178
179 EXTERN S16 cmUnpkUdxStaProhTmrStart ARGS((UdxStaProhTmrStart func,
180                                           Pst* pst,
181                                           Buffer *mBuf));
182
183 #ifdef LTE_L2_MEAS
184 EXTERN S16 cmUnpkUdxL2MeasReq ARGS((UdxL2MeasReq func, Pst* pst, Buffer *mBuf));
185 EXTERN S16 cmUnpkUdxL2MeasSendReq ARGS((UdxL2MeasSendReq func, Pst* pst, Buffer *mBuf));
186 EXTERN S16 cmUnpkUdxL2MeasStopReq ARGS((UdxL2MeasStopReq func, Pst* pst, Buffer *mBuf));
187 #endif
188 #endif
189
190 #ifdef KW
191 EXTERN S16 KwUlUdxBndReq ARGS((Pst* pst, SuId suId, SpId spId));
192
193 EXTERN S16 KwDlUdxBndReq ARGS((Pst* pst, SuId suId, SpId spId));
194
195 EXTERN S16 KwDlUdxBndCfm ARGS((Pst* pst, SuId suId, U8 status));
196
197 EXTERN S16 KwUlUdxBndCfm ARGS((Pst* pst, SuId suId, U8 status));
198
199 EXTERN S16 KwDlUdxCfgCfm ARGS((Pst* pst, SuId suId, CkwCfgCfmInfo *cfmInfo));
200
201 EXTERN S16 KwUlUdxCfgCfm ARGS((Pst* pst, SuId suId, CkwCfgCfmInfo *cfmInfo));
202
203 EXTERN S16 KwDlUdxUeIdChgCfm ARGS((Pst *pst, 
204                                    SuId suId, 
205                                    U32 transId,  
206                                    CmStatus status));
207
208 EXTERN S16 KwUlUdxUeIdChgCfm ARGS((Pst *pst, 
209                                    SuId suId, 
210                                    U32 transId, 
211                                    CmStatus status));
212
213 EXTERN S16 KwUlUdxUbndReq ARGS((Pst* pst, SuId suId, Reason reason));
214
215 EXTERN S16 KwDlUdxUbndReq ARGS((Pst* pst, SuId suId, Reason reason));
216
217 EXTERN S16 KwUlUdxUeIdChgReq ARGS((Pst *pst, 
218                                    SpId spId, 
219                                    U32 transId, 
220                                    CkwUeInfo *ueInfo, 
221                                    CkwUeInfo *newUeInfo));
222
223 EXTERN S16 KwUlUdxCfgReq ARGS((Pst *pst, SpId spId, CkwCfgInfo *cfgInfo));
224
225 EXTERN S16 KwDlUdxCfgReq ARGS((Pst *pst, SpId spId, CkwCfgInfo *cfgInfo));
226
227 EXTERN S16 KwUlUdxStaUpdReq ARGS((Pst* pst,
228                                   SpId spId,
229                                   CmLteRlcId *rlcId,
230                                   KwUdxStaPdu *pStaPdu));
231
232 EXTERN S16 KwDlUdxStaUpdReq ARGS((Pst* pst,
233                                   SpId spId,
234                                   CmLteRlcId *rlcId,
235                                   KwUdxStaPdu *pStaPdu));
236
237 EXTERN S16 KwDlUdxStaUpdCfm ARGS((Pst* pst,
238                                   SuId suId,
239                                   CmLteRlcId *rlcId,
240                                   KwUdxBufLst *pBufLst));
241
242 EXTERN S16 KwUlUdxStaUpdCfm ARGS((Pst* pst,
243                                   SuId suId,
244                                   CmLteRlcId *rlcId,
245                                   KwUdxBufLst *pBufLst));
246
247 EXTERN S16 KwUlUdxStaPduReq ARGS((Pst *pst,
248                                   SpId spId,
249                                   CmLteRlcId *rlcId,
250                                   KwUdxDlStaPdu *pStaPdu ));
251
252 EXTERN S16 KwDlUdxStaPduReq ARGS((Pst *pst,
253                                   SpId spId,
254                                   CmLteRlcId *rlcId,
255                                   KwUdxDlStaPdu *pStaPdu));
256
257 EXTERN S16 KwDlUdxUeIdChgReq ARGS((Pst *pst, 
258                                    SpId spId, 
259                                    U32 transId, 
260                                    CkwUeInfo *ueInfo, 
261                                    CkwUeInfo *newUeInfo));
262
263 EXTERN S16 KwDlUdxCfgReq ARGS((Pst *pst, SpId spId, CkwCfgInfo *cfgInfo));
264
265
266 EXTERN S16 KwUlUdxStaUpdCfm ARGS((Pst* pst,
267                                   SuId suId,
268                                   CmLteRlcId *rlcId,
269                                   KwUdxBufLst *pBufLst));
270
271 EXTERN S16 KwDlUdxStaPduReq ARGS((Pst *pst,
272                                   SpId spId,
273                                   CmLteRlcId *rlcId,
274                                   KwUdxDlStaPdu *pStaPdu));
275
276 EXTERN S16 KwUlUdxStaProhTmrStart ARGS((Pst *pst,
277                                         SpId spId,
278                                         CmLteRlcId *rlcId ));
279
280 EXTERN S16 KwDlUdxStaProhTmrStart ARGS((Pst *pst,
281                                         SpId spId,
282                                         CmLteRlcId *rlcId ));
283
284 #ifdef LTE_L2_MEAS
285 EXTERN S16 KwDlUdxL2MeasReq ARGS((Pst *pst, KwL2MeasReqEvt *measReqEvt)); 
286
287 EXTERN S16 KwDlUdxL2MeasSendReq ARGS((Pst *pst, U8 status)); 
288
289 EXTERN S16 KwDlUdxL2MeasStopReq ARGS((Pst *pst, U8 status)); 
290
291 EXTERN S16 KwUlUdxL2MeasReq ARGS((Pst* pst, KwL2MeasReqEvt *measReqEvt));
292
293 EXTERN S16 KwUlUdxL2MeasSendReq ARGS((Pst *pst, U8 status));
294
295 EXTERN S16 KwUlUdxL2MeasStopReq ARGS((Pst* pst, U8 measType));
296 #endif
297
298 #endif
299
300 #ifdef __cplusplus
301 }
302 #endif /* __cplusplus */
303 #endif /* __UDX_X__ */
304
305
306 /**********************************************************************
307          End of file
308 **********************************************************************/