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: LTE-RLC ULDL Interface
25 Desc: C source code for INF Interface Module
29 **********************************************************************/
31 /** @file kw_udx_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 "kw_err.h" /* Err defines */
41 #include "kw_env.h" /* RLC environment options */
43 #include "kw.h" /* RLC defines */
47 /* extern (.x) include files */
48 #include "lkw.x" /* LKW */
49 #include "ckw.x" /* CKW */
50 #include "kwu.x" /* KWU */
51 #include "rgu.x" /* RGU */
59 PRIVATE S16 PtUlUdxBndReq ARGS((Pst* pst, SuId suId,SpId spId ));
60 PRIVATE S16 PtUlUdxUbndReq ARGS((Pst* pst, SuId suId,Reason reason));
61 PRIVATE S16 PtUlUdxCfgReq ARGS((Pst *pst, SpId spId, RlcCfgInfo *cfgInfo));
62 PRIVATE S16 PtUlUdxStaUpdReq ARGS((Pst* pst,SpId spId,CmLteRlcId *rlcId,
63 KwUdxStaPdu *pStaPdu ));
64 PRIVATE S16 PtUlUdxUeIdChgReq ARGS((Pst *pst, SpId spId, U32 transId,
65 CkwUeInfo *ueInfo, CkwUeInfo *newUeInfo));
66 PRIVATE S16 PtUlUdxStaPduReq ARGS(( Pst* pst,SpId spId, CmLteRlcId *rlcId,
67 KwUdxDlStaPdu *pStaPdu ));
69 PRIVATE S16 PtUlUdxBndReq
71 Pst *pst, /* post structure */
72 SuId suId, /* Service User Id */
73 SpId spId /* Status */
76 PRIVATE S16 PtUlUdxBndReq(pst, suId,spId)
77 Pst *pst; /* post structure */
78 SuId suId; /* Service User Id */
79 SpId spId; /* Status */
86 } /* end of rlcDlUdxBndReq */
92 * Handler for confirming the bind request received from KWU
97 * This function send the bind confirm primitive to the RLC user,
98 * when it receives a bind request from its service user.
100 * @param[in] pst Post structure
101 * @param[in] suId Service user SAP ID
102 * @param[in] status Status of Confirmation
109 PRIVATE S16 PtUlUdxUbndReq
111 Pst *pst, /* post structure */
112 SpId spId, /* Service User Id */
113 Reason reason /* Status */
116 PRIVATE S16 PtUlUdxUbndReq(pst, suId, status)
117 Pst *pst; /* post structure */
118 SpId spId; /* Service User Id */
119 Reason Reason; /* Status */
126 } /* end of PtDlUdxBndReq */
129 PRIVATE S16 PtUlUdxCfgReq
131 Pst *pst, /* post structure */
132 SpId spId, /* Service User Id */
133 RlcCfgInfo *cfmInfo /* Config Info */
136 PRIVATE S16 PtUlUdxCfgReq(pst, spId, status)
137 Pst *pst; /* post structure */
138 SpId spId; /* Service User Id */
139 RlcCfgInfo *cfmInfo; /* Config Info */
146 } /* end of rlcDlUdxCfgReq */
149 PRIVATE S16 PtUlUdxUeIdChgReq
151 Pst *pst, /* post structure */
152 SpId spId, /* Service User Id */
153 U32 transId, /* transaction Id */
154 CkwUeInfo *ueInfo, /* Config Info */
155 CkwUeInfo *newUeInfo /* Config Info */
158 PRIVATE S16 PtUlUdxUeIdChgReq(pst, spId,transId, ueInfo, newUeInfo)
159 Pst *pst; /* post structure */
160 SpId spId; /* Service User Id */
161 U32 transId; /* transaction Id */
162 CkwUeInfo *ueInfo; /* Config Info */
163 CkwUeInfo *newUeInfo; /* Config Info */
166 TRC3(PtUlUdxUeIdChgReq)
171 } /* end of rlcDlUdxCfgReq */
174 PRIVATE S16 PtUlUdxStaPduReq
179 KwUdxDlStaPdu *pStaPdu
182 TRC3(PtUlUdxStaPduReq);
188 * @brief Request from ULM to DLM for UE Status
192 * Function : KwUdxUdxStatUpd
194 * @param[in] Pst* pst
200 PRIVATE S16 PtUlUdxStaUpdReq
208 PRIVATE S16 PtUlUdxStaUpdReq(pst, rlcId, pStaPdu)
212 KwUdxDlStaPdu *pStaPdu;
216 TRC3(PtUlUdxStaUpdReq);
219 } /* end of RlcUlmDlmStaUpd*/
223 * @brief Request from ULM to DLM for Measurement
227 * Function : KwUdxUdxL2MeasReq
229 * @param[in] Pst* pst
235 PRIVATE S16 PtUlUdxL2MeasReq
238 KwL2MeasReqEvt *measReqEvt
241 PRIVATE S16 PtUlUdxL2MeasReq(pst, measReqEvt )
243 KwL2MeasReqEvt *measReqEvt;
247 TRC3(PtUlUdxL2MeasReq);
253 * @brief Request from ULM to DLM for Measurement
257 * Function : KwUdxUdxL2MeasSendReq
259 * @param[in] Pst* pst
265 PRIVATE S16 PtUlUdxL2MeasSendReq
271 PRIVATE S16 PtUlUdxL2MeasSendReq(pst, status )
277 TRC3(PtUlUdxL2MeasSendReq);
283 * @brief Request from ULM to DLM for Measurement
287 * Function : KwUdxUdxL2MeasStopReq
289 * @param[in] Pst* pst
295 PRIVATE S16 PtUlUdxL2MeasStopReq
301 PRIVATE S16 PtUlUdxL2MeasStopReq(pst, status )
307 TRC3(PtUlUdxL2MeasStopReq);
314 PRIVATE UdxBndReq rlcUlUdxBndReqMt[] =
317 cmPkUdxBndReq, /* 0 - loosely coupled */
319 PtUlUdxBndReq, /* 0 - loosely coupled, portable */
320 #endif /* LCKWUIKWU */
322 cmPkUdxBndReq, /* 1 - loosely coupled */
324 PtUlUdxBndReq, /* 1 - loosely coupled, portable */
325 #endif /* LCKWUIKWU */
327 rlcDlUdxBndReq, /* 2 - tightly coupled, RRC */
329 PtUlUdxBndReq, /* 2 - tightly coupled, portable */
333 PRIVATE UdxUbndReq rlcUlUdxUbndReqMt[] =
336 cmPkUdxUbndReq, /* 0 - loosely coupled */
338 PtUlUdxUbndReq, /* 0 - loosely coupled, portable */
339 #endif /* LCKWUIKWU */
341 cmPkUdxUbndReq, /* 1 - loosely coupled */
343 PtUlUdxUbndReq, /* 1 - loosely coupled, portable */
344 #endif /* LCKWUIKWU */
346 rlcDlUdxUbndReq, /* 2 - tightly coupled, RRC */
348 PtUlUdxUbndReq, /* 2 - tightly coupled, portable */
353 PRIVATE UdxCfgReq rlcUlUdxCfgReqMt[] =
356 cmPkUdxCfgReq, /* 0 - loosely coupled */
358 PtUlUdxCfgReq, /* 0 - loosely coupled, portable */
359 #endif /* LCKWUIKWU */
361 cmPkUdxCfgReq, /* 1 - loosely coupled */
363 PtUlUdxCfgReq, /* 1 - loosely coupled, portable */
364 #endif /* LCKWUIKWU */
366 rlcDlUdxCfgReq, /* 2 - tightly coupled, RRC */
368 PtUlUdxCfgReq, /* 2 - tightly coupled, portable */
372 PRIVATE UdxUeIdChgReq rlcUlUdxUeIdChgReqMt[] =
375 cmPkUdxUeIdChgReq, /* 0 - loosely coupled */
377 PtUlUdxUeIdChgReq, /* 0 - loosely coupled, portable */
378 #endif /* LCKWUIKWU */
380 cmPkUdxUeIdChgReq, /* 1 - loosely coupled */
382 PtUlUdxUeIdChgReq, /* 1 - loosely coupled, portable */
383 #endif /* LCKWUIKWU */
385 rlcDlUdxUeIdChgReq, /* 2 - tightly coupled, RRC */
387 PtUlUdxUeIdChgReq, /* 2 - tightly coupled, portable */
392 PRIVATE CONSTANT UdxStaUpdReq rlcUlUdxStaUpdReqMt[KW_MAX_UDX] =
395 cmPkUdxStaUpdReq, /* 0 - loosely coupled */
397 PtUlUdxStaUpdReq, /* 0 - loosely coupled, portable */
398 #endif /* LCKWUIKWU */
400 cmPkUdxStaUpdReq, /* 1 - loosely coupled */
402 PtUlUdxStaUpdReq, /* 1 - loosely coupled, portable */
403 #endif /* LCKWUIKWU */
405 rlcDlUdxStaUpdReq, /* 2 - tightly coupled, RRC */
407 PtUlUdxStaUpdReq, /* 2 - tightly coupled, portable */
411 PRIVATE CONSTANT UdxStaPduReq rlcUlUdxStaPduReqMt[KW_MAX_UDX] =
414 cmPkUdxStaPduReq, /* 0 - loosely coupled */
416 PtUlUdxStaPduReq, /* 0 - loosely coupled, portable */
417 #endif /* LCKWUIKWU */
419 cmPkUdxStaPduReq, /* 1 - loosely coupled */
421 PtUlUdxStaPduReq, /* 1 - loosely coupled, portable */
422 #endif /* LCKWUIKWU */
424 rlcDlUdxStaPduReq, /* 2 - tightly coupled, RRC */
426 PtUlUdxStaPduReq, /* 2 - tightly coupled, portable */
430 PRIVATE CONSTANT UdxL2MeasReq rlcUlUdxL2MeasReqMt[KW_MAX_UDX] =
433 cmPkUdxL2MeasReq, /* 0 - loosely coupled */
435 PtUlUdxL2MeasReq, /* 0 - loosely coupled, portable */
436 #endif /* LCKWUIKWU */
438 cmPkUdxL2MeasReq, /* 1 - loosely coupled */
440 PtUlUdxL2MeasReq, /* 1 - loosely coupled, portable */
441 #endif /* LCKWUIKWU */
443 rlcDlUdxL2MeasReq, /* 2 - tightly coupled, RRC */
445 PtUlUdxL2MeasReq, /* 2 - tightly coupled, portable */
449 PRIVATE CONSTANT UdxL2MeasSendReq rlcUlUdxL2MeasSendReqMt[KW_MAX_UDX] =
452 cmPkUdxL2MeasSendReq, /* 0 - loosely coupled */
454 PtUlUdxL2MeasSendReq, /* 0 - loosely coupled, portable */
455 #endif /* LCKWUIKWU */
457 cmPkUdxL2MeasSendReq, /* 1 - loosely coupled */
459 PtUlUdxL2MeasSendReq, /* 1 - loosely coupled, portable */
460 #endif /* LCKWUIKWU */
462 rlcDlUdxL2MeasSendReq, /* 2 - tightly coupled, RRC */
464 PtUlUdxL2MeasSendReq, /* 2 - tightly coupled, portable */
468 PRIVATE CONSTANT UdxL2MeasStopReq rlcUlUdxL2MeasStopReqMt[KW_MAX_UDX] =
471 cmPkUdxL2MeasStopReq, /* 0 - loosely coupled */
473 PtUlUdxL2MeasStopReq, /* 0 - loosely coupled, portable */
474 #endif /* LCKWUIKWU */
476 cmPkUdxL2MeasStopReq, /* 1 - loosely coupled */
478 PtUlUdxL2MeasStopReq, /* 1 - loosely coupled, portable */
479 #endif /* LCKWUIKWU */
481 rlcDlUdxL2MeasStopReq, /* 2 - tightly coupled, RRC */
483 PtUlUdxL2MeasStopReq, /* 2 - tightly coupled, portable */
491 * Handler for confirming the bind request received from KWU
496 * This function send the bind confirm primitive to the RLC user,
497 * when it receives a bind request from its service user.
499 * @param[in] pst Post structure
500 * @param[in] suId Service user SAP ID
501 * @param[in] status Status of Confirmation
508 PUBLIC S16 rlcUlUdxBndReq
510 Pst *pst, /* post structure */
511 SuId suId, /* Service User Id */
512 SpId spId /* Status */
515 PUBLIC S16 rlcUlUdxBndReq(pst, suId, status)
516 Pst *pst; /* post structure */
517 SuId suId; /* Service User Id */
518 SpId spId; /* Status */
523 /* jump to specific primitive depending on configured selector */
524 (*rlcUlUdxBndReqMt[pst->selector])(pst, suId, spId);
528 } /* end of rlcDlUdxBndReq */
534 * Handler for confirming the bind request received from KWU
539 * This function send the bind confirm primitive to the RLC user,
540 * when it receives a bind request from its service user.
542 * @param[in] pst Post structure
543 * @param[in] suId Service user SAP ID
544 * @param[in] status Status of Confirmation
551 PUBLIC S16 rlcUlUdxUbndReq
553 Pst *pst, /* post structure */
554 SpId spId, /* Service User Id */
555 Reason reason /* Status */
558 PUBLIC S16 rlcUlUdxUbndReq(pst, suId, status)
559 Pst *pst; /* post structure */
560 SpId spId; /* Service User Id */
561 Reason Reason; /* Status */
564 TRC3(rlcUlUdxUbndReq)
566 /* jump to specific primitive depending on configured selector */
567 (*rlcUlUdxUbndReqMt[pst->selector])(pst, spId,reason );
571 } /* end of rlcDlUdxBndReq */
574 PUBLIC S16 rlcUlUdxCfgReq
576 Pst *pst, /* post structure */
577 SpId spId, /* Service User Id */
578 RlcCfgInfo *cfmInfo /* Config Info */
581 PUBLIC S16 rlcUlUdxCfgReq(pst, suId, status)
582 Pst *pst; /* post structure */
583 SuId spId; /* Service User Id */
584 RlcCfgInfo *cfmInfo; /* Config Info */
589 /* jump to specific primitive depending on configured selector */
590 (*rlcUlUdxCfgReqMt[pst->selector])(pst, spId, cfmInfo);
594 } /* end of rlcDlUdxCfgReq */
597 PUBLIC S16 rlcUlUdxUeIdChgReq
599 Pst *pst, /* post structure */
600 SpId spId, /* Service User Id */
601 U32 transId, /* transaction Id */
602 CkwUeInfo *ueInfo, /* Config Info */
603 CkwUeInfo *newUeInfo /* Config Info */
606 PUBLIC S16 rlcUlUdxUeIdChgReq(pst, spId,transId, ueInfo, newUeInfo)
607 Pst *pst; /* post structure */
608 SpId spId; /* Service User Id */
609 U32 transId; /* transaction Id */
610 CkwUeInfo *ueInfo; /* Config Info */
611 CkwUeInfo *newUeInfo; /* Config Info */
614 TRC3(rlcUlUdxUeIdChgReq)
616 /* jump to specific primitive depending on configured selector */
617 (*rlcUlUdxUeIdChgReqMt[pst->selector])(pst, spId,transId,ueInfo,newUeInfo);
621 } /* end of rlcDlUdxCfgReq */
625 PUBLIC S16 rlcUlUdxStaPduReq
630 KwUdxDlStaPdu *pStaPdu
633 TRC3(rlcUlUdxStaPduReq);
635 return ((*rlcUlUdxStaPduReqMt[pst->selector])(pst,spId, rlcId, pStaPdu));
639 * @brief Request from ULM to DLM for UE Status
643 * Function : KwUdxUdxStatUpd
645 * @param[in] Pst* pst
651 PUBLIC S16 rlcUlUdxStaUpdReq
659 PUBLIC S16 rlcUlUdxStaUpdReq(pst, rlcId, pStaPdu)
663 KwUdxStaPdu *pStaPdu;
667 TRC3(rlcUlUdxStaUpdReq);
669 return ((*rlcUlUdxStaUpdReqMt[pst->selector])(pst,spId, rlcId, pStaPdu));
670 } /* end of RlcUlmDlmStaUpd*/
674 * @brief Request from ULM to DLM for MeasReq
678 * Function : rlcUlUdxL2MeasReq
680 * @param[in] Pst* pst
686 PUBLIC S16 rlcUlUdxL2MeasReq
689 KwL2MeasReqEvt *measReqEvt
692 PUBLIC S16 rlcUlUdxL2MeasReq(pst,measReqEvt)
694 KwL2MeasReqEvt *measReqEvt;
698 TRC3(rlcUlUdxStaUpdReq);
700 return ((*rlcUlUdxL2MeasReqMt[pst->selector])(pst,measReqEvt));
701 } /* end of rlcUlUdxL2MeasReq*/
704 * @brief Request from ULM to DLM for MeasSendReq
708 * Function : rlcUlUdxMeasSendReq
710 * @param[in] Pst* pst
716 PUBLIC S16 rlcUlUdxL2MeasSendReq
722 PUBLIC S16 rlcUlUdxL2MeasSendReq(pst,measReqEvt)
728 TRC3(rlcUlUdxStaUpdReq);
730 return ((*rlcUlUdxL2MeasSendReqMt[pst->selector])(pst,measType));
731 } /* end of rlcUlUdxMesReq*/
734 * @brief Request from ULM to DLM for MeasStopReq
738 * Function : rlcUlUdxL2MeasStopReq
740 * @param[in] Pst* pst
746 PUBLIC S16 rlcUlUdxL2MeasStopReq
752 PUBLIC S16 rlcUlUdxL2MeasStopReq(pst,measReqEvt)
758 TRC3(rlcUlUdxStaUpdReq);
760 return ((*rlcUlUdxL2MeasStopReqMt[pst->selector])(pst,measType));
761 } /* end of rlcUlUdxMesReq*/
763 /**********************************************************************
766 **********************************************************************/