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 /************************************************************************
21 Name: NR RLC ULDL Interface
25 Desc: C source code for INF Interface Module
27 File: rlc_dl_ul_inf_ptul.c
29 **********************************************************************/
31 /** @file rlc_dl_ul_inf_ptul.c
34 /* header include files (.h) */
35 #include "common_def.h"
36 #include "lkw.h" /* LKW defines */
37 #include "ckw.h" /* CKW defines */
38 #include "kwu.h" /* KWU defines */
39 #include "rgu.h" /* RGU defines */
40 #include "rlc_err.h" /* Err defines */
41 #include "rlc_env.h" /* RLC environment options */
43 /* extern (.x) include files */
44 #include "lkw.x" /* LKW */
45 #include "ckw.x" /* CKW */
46 #include "kwu.x" /* KWU */
47 #include "rgu.x" /* RGU */
49 #include "rlc_utils.h" /* RLC defines */
50 #include "rlc_dl_ul_inf.h"
54 static S16 PtUlUdxBndReq ARGS((Pst* pst, SuId suId,SpId spId ));
55 static S16 PtUlUdxUbndReq ARGS((Pst* pst, SuId suId,Reason reason));
56 static S16 PtUlUdxCfgReq ARGS((Pst *pst, SpId spId, RlcCfgInfo *cfgInfo));
57 static S16 PtUlUdxStaUpdReq ARGS((Pst* pst,SpId spId,CmLteRlcId *rlcId,
58 RlcUdxStaPdu *pStaPdu ));
59 static S16 PtUlUdxUeIdChgReq ARGS((Pst *pst, SpId spId, uint32_t transId,
60 CkwUeInfo *ueInfo, CkwUeInfo *newUeInfo));
61 static S16 PtUlUdxStaPduReq ARGS(( Pst* pst,SpId spId, CmLteRlcId *rlcId,
62 RlcUdxDlStaPdu *pStaPdu ));
63 static S16 PtUlUdxBndReq
65 Pst *pst, /* post structure */
66 SuId suId, /* Service User Id */
67 SpId spId /* Status */
73 } /* end of rlcDlUdxBndReq */
79 * Handler for confirming the bind request received from KWU
84 * This function send the bind confirm primitive to the RLC user,
85 * when it receives a bind request from its service user.
87 * @param[in] pst Post structure
88 * @param[in] suId Service user SAP ID
89 * @param[in] status Status of Confirmation
95 static S16 PtUlUdxUbndReq
97 Pst *pst, /* post structure */
98 SpId spId, /* Service User Id */
99 Reason reason /* Status */
105 } /* end of PtDlUdxBndReq */
107 static S16 PtUlUdxCfgReq
109 Pst *pst, /* post structure */
110 SpId spId, /* Service User Id */
111 RlcCfgInfo *cfmInfo /* Config Info */
117 } /* end of rlcDlUdxCfgReq */
119 static S16 PtUlUdxUeIdChgReq
121 Pst *pst, /* post structure */
122 SpId spId, /* Service User Id */
123 uint32_t transId, /* transaction Id */
124 CkwUeInfo *ueInfo, /* Config Info */
125 CkwUeInfo *newUeInfo /* Config Info */
131 } /* end of rlcDlUdxCfgReq */
134 static S16 PtUlUdxStaPduReq
139 RlcUdxDlStaPdu *pStaPdu
147 * @brief Request from ULM to DLM for UE Status
151 * Function : KwUdxUdxStatUpd
153 * @param[in] Pst* pst
158 static S16 PtUlUdxStaUpdReq
163 RlcUdxStaPdu *pStaPdu
168 } /* end of RlcUlmDlmStaUpd*/
172 * @brief Request from ULM to DLM for Measurement
176 * Function : KwUdxUdxL2MeasReq
178 * @param[in] Pst* pst
183 static S16 PtUlUdxL2MeasReq(Pst* pst,RlcL2MeasReqEvt *measReqEvt)
190 * @brief Request from ULM to DLM for Measurement
194 * Function : KwUdxUdxL2MeasSendReq
196 * @param[in] Pst* pst
201 static S16 PtUlUdxL2MeasSendReq(Pst* pst,uint8_t status)
208 * @brief Request from ULM to DLM for Measurement
212 * Function : KwUdxUdxL2MeasStopReq
214 * @param[in] Pst* pst
219 static S16 PtUlUdxL2MeasStopReq(Pst* pst,uint8_t status)
227 static UdxBndReq rlcUlUdxBndReqMt[] =
230 cmPkUdxBndReq, /* 0 - loosely coupled */
232 PtUlUdxBndReq, /* 0 - loosely coupled, portable */
233 #endif /* LCKWUIKWU */
235 cmPkUdxBndReq, /* 1 - loosely coupled */
237 PtUlUdxBndReq, /* 1 - loosely coupled, portable */
238 #endif /* LCKWUIKWU */
240 rlcDlUdxBndReq, /* 2 - tightly coupled, RRC */
242 PtUlUdxBndReq, /* 2 - tightly coupled, portable */
246 static UdxUbndReq rlcUlUdxUbndReqMt[] =
249 cmPkUdxUbndReq, /* 0 - loosely coupled */
251 PtUlUdxUbndReq, /* 0 - loosely coupled, portable */
252 #endif /* LCKWUIKWU */
254 cmPkUdxUbndReq, /* 1 - loosely coupled */
256 PtUlUdxUbndReq, /* 1 - loosely coupled, portable */
257 #endif /* LCKWUIKWU */
259 rlcDlUdxUbndReq, /* 2 - tightly coupled, RRC */
261 PtUlUdxUbndReq, /* 2 - tightly coupled, portable */
266 static UdxCfgReq rlcUlUdxCfgReqMt[] =
269 cmPkUdxCfgReq, /* 0 - loosely coupled */
271 PtUlUdxCfgReq, /* 0 - loosely coupled, portable */
272 #endif /* LCKWUIKWU */
274 cmPkUdxCfgReq, /* 1 - loosely coupled */
276 PtUlUdxCfgReq, /* 1 - loosely coupled, portable */
277 #endif /* LCKWUIKWU */
279 rlcDlUdxCfgReq, /* 2 - tightly coupled, RRC */
281 PtUlUdxCfgReq, /* 2 - tightly coupled, portable */
285 static UdxUeIdChgReq rlcUlUdxUeIdChgReqMt[] =
288 cmPkUdxUeIdChgReq, /* 0 - loosely coupled */
290 PtUlUdxUeIdChgReq, /* 0 - loosely coupled, portable */
291 #endif /* LCKWUIKWU */
293 cmPkUdxUeIdChgReq, /* 1 - loosely coupled */
295 PtUlUdxUeIdChgReq, /* 1 - loosely coupled, portable */
296 #endif /* LCKWUIKWU */
298 rlcDlUdxUeIdChgReq, /* 2 - tightly coupled, RRC */
300 PtUlUdxUeIdChgReq, /* 2 - tightly coupled, portable */
305 static const UdxStaUpdReq rlcUlUdxStaUpdReqMt[RLC_MAX_UDX] =
308 cmPkUdxStaUpdReq, /* 0 - loosely coupled */
310 PtUlUdxStaUpdReq, /* 0 - loosely coupled, portable */
311 #endif /* LCKWUIKWU */
313 cmPkUdxStaUpdReq, /* 1 - loosely coupled */
315 PtUlUdxStaUpdReq, /* 1 - loosely coupled, portable */
316 #endif /* LCKWUIKWU */
318 rlcDlUdxStaUpdReq, /* 2 - tightly coupled, RRC */
320 PtUlUdxStaUpdReq, /* 2 - tightly coupled, portable */
324 static const UdxStaPduReq rlcUlUdxStaPduReqMt[RLC_MAX_UDX] =
327 cmPkUdxStaPduReq, /* 0 - loosely coupled */
329 PtUlUdxStaPduReq, /* 0 - loosely coupled, portable */
330 #endif /* LCKWUIKWU */
332 cmPkUdxStaPduReq, /* 1 - loosely coupled */
334 PtUlUdxStaPduReq, /* 1 - loosely coupled, portable */
335 #endif /* LCKWUIKWU */
337 rlcDlUdxStaPduReq, /* 2 - tightly coupled, RRC */
339 PtUlUdxStaPduReq, /* 2 - tightly coupled, portable */
343 static const UdxL2MeasReq rlcUlUdxL2MeasReqMt[RLC_MAX_UDX] =
346 cmPkUdxL2MeasReq, /* 0 - loosely coupled */
348 PtUlUdxL2MeasReq, /* 0 - loosely coupled, portable */
349 #endif /* LCKWUIKWU */
351 cmPkUdxL2MeasReq, /* 1 - loosely coupled */
353 PtUlUdxL2MeasReq, /* 1 - loosely coupled, portable */
354 #endif /* LCKWUIKWU */
356 rlcDlUdxL2MeasReq, /* 2 - tightly coupled, RRC */
358 PtUlUdxL2MeasReq, /* 2 - tightly coupled, portable */
362 static const UdxL2MeasSendReq rlcUlUdxL2MeasSendReqMt[RLC_MAX_UDX] =
365 cmPkUdxL2MeasSendReq, /* 0 - loosely coupled */
367 PtUlUdxL2MeasSendReq, /* 0 - loosely coupled, portable */
368 #endif /* LCKWUIKWU */
370 cmPkUdxL2MeasSendReq, /* 1 - loosely coupled */
372 PtUlUdxL2MeasSendReq, /* 1 - loosely coupled, portable */
373 #endif /* LCKWUIKWU */
375 rlcDlUdxL2MeasSendReq, /* 2 - tightly coupled, RRC */
377 PtUlUdxL2MeasSendReq, /* 2 - tightly coupled, portable */
381 static const UdxL2MeasStopReq rlcUlUdxL2MeasStopReqMt[RLC_MAX_UDX] =
384 cmPkUdxL2MeasStopReq, /* 0 - loosely coupled */
386 PtUlUdxL2MeasStopReq, /* 0 - loosely coupled, portable */
387 #endif /* LCKWUIKWU */
389 cmPkUdxL2MeasStopReq, /* 1 - loosely coupled */
391 PtUlUdxL2MeasStopReq, /* 1 - loosely coupled, portable */
392 #endif /* LCKWUIKWU */
394 rlcDlUdxL2MeasStopReq, /* 2 - tightly coupled, RRC */
396 PtUlUdxL2MeasStopReq, /* 2 - tightly coupled, portable */
404 * Handler for confirming the bind request received from KWU
409 * This function send the bind confirm primitive to the RLC user,
410 * when it receives a bind request from its service user.
412 * @param[in] pst Post structure
413 * @param[in] suId Service user SAP ID
414 * @param[in] status Status of Confirmation
422 Pst *pst, /* post structure */
423 SuId suId, /* Service User Id */
424 SpId spId /* Status */
427 /* jump to specific primitive depending on configured selector */
428 (*rlcUlUdxBndReqMt[pst->selector])(pst, suId, spId);
432 } /* end of rlcDlUdxBndReq */
438 * Handler for confirming the bind request received from KWU
443 * This function send the bind confirm primitive to the RLC user,
444 * when it receives a bind request from its service user.
446 * @param[in] pst Post structure
447 * @param[in] suId Service user SAP ID
448 * @param[in] status Status of Confirmation
456 Pst *pst, /* post structure */
457 SpId spId, /* Service User Id */
458 Reason reason /* Status */
461 /* jump to specific primitive depending on configured selector */
462 (*rlcUlUdxUbndReqMt[pst->selector])(pst, spId,reason );
466 } /* end of rlcDlUdxBndReq */
470 Pst *pst, /* post structure */
471 SpId spId, /* Service User Id */
472 RlcCfgInfo *cfmInfo /* Config Info */
476 /* jump to specific primitive depending on configured selector */
477 (*rlcUlUdxCfgReqMt[pst->selector])(pst, spId, cfmInfo);
481 } /* end of rlcDlUdxCfgReq */
483 S16 rlcUlUdxUeIdChgReq
485 Pst *pst, /* post structure */
486 SpId spId, /* Service User Id */
487 uint32_t transId, /* transaction Id */
488 CkwUeInfo *ueInfo, /* Config Info */
489 CkwUeInfo *newUeInfo /* Config Info */
493 /* jump to specific primitive depending on configured selector */
494 (*rlcUlUdxUeIdChgReqMt[pst->selector])(pst, spId,transId,ueInfo,newUeInfo);
498 } /* end of rlcDlUdxCfgReq */
502 uint8_t rlcUlUdxStaPduReq(Pst* pst, SpId spId, CmLteRlcId *rlcId, RlcUdxDlStaPdu *pStaPdu)
504 return ((*rlcUlUdxStaPduReqMt[pst->selector])(pst,spId, rlcId, pStaPdu));
508 * @brief Request from ULM to DLM for UE Status
512 * Function : KwUdxUdxStatUpd
514 * @param[in] Pst* pst
519 uint8_t rlcUlUdxStaUpdReq(Pst* pst, SpId spId, CmLteRlcId *rlcId, RlcUdxStaPdu *pStaPdu)
521 return ((*rlcUlUdxStaUpdReqMt[pst->selector])(pst,spId, rlcId, pStaPdu));
522 } /* end of RlcUlmDlmStaUpd*/
526 * @brief Request from ULM to DLM for MeasReq
530 * Function : rlcUlUdxL2MeasReq
532 * @param[in] Pst* pst
537 S16 rlcUlUdxL2MeasReq(Pst* pst,RlcL2MeasReqEvt *measReqEvt )
540 return ((*rlcUlUdxL2MeasReqMt[pst->selector])(pst,measReqEvt));
541 } /* end of rlcUlUdxL2MeasReq*/
544 * @brief Request from ULM to DLM for MeasSendReq
548 * Function : rlcUlUdxMeasSendReq
550 * @param[in] Pst* pst
555 S16 rlcUlUdxL2MeasSendReq(Pst* pst,uint8_t measType)
558 return ((*rlcUlUdxL2MeasSendReqMt[pst->selector])(pst,measType));
559 } /* end of rlcUlUdxMesReq*/
562 * @brief Request from ULM to DLM for MeasStopReq
566 * Function : rlcUlUdxL2MeasStopReq
568 * @param[in] Pst* pst
573 S16 rlcUlUdxL2MeasStopReq(Pst* pst,uint8_t measType)
576 return ((*rlcUlUdxL2MeasStopReqMt[pst->selector])(pst,measType));
577 } /* end of rlcUlUdxMesReq*/
579 /**********************************************************************
582 **********************************************************************/