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 /************************************************************************
25 Desc: C source code for Entry point fucntions
29 **********************************************************************/
32 @brief APIs related to Downlink HARQ.
35 /* header include files (.h) */
36 #include "common_def.h"
37 #include "tfu.h" /* RGU Interface defines */
39 /* header/extern include files (.x) */
40 #include "tfu.x" /* RGU Interface includes */
45 #endif /* __cplusplus */
47 #if !(defined(LCRGLITFU) && defined(TF) && defined(LWLCRGLITFU))
52 /* MAX Number of Service Providers of RG */
53 #define RG_MAX_TFU_PROV 3
56 /** @brief This API is used to send a Bind Request from MAC to PHY.
57 * @param pst Pointer to the post structure.
58 * @param suId SAP ID of the service user.
59 * @param spId SAP ID of the service provider.
62 EXTERN S16 PtLiTfuBndReq ARGS((Pst * pst, SuId suId, SpId spId));
63 /** @brief This API is used to send a Bind Request from Scheduler to PHY.
64 * @param pst Pointer to the post structure.
65 * @param suId SAP ID of the service user.
66 * @param spId SAP ID of the service provider.
69 EXTERN S16 PtLiTfuSchBndReq ARGS((Pst * pst, SuId suId, SpId spId));
70 /** @brief This API is used to send an Unbind Request from MAC to PHY.
71 * @param pst Pointer to the post structure.
72 * @param suId SAP ID of the service provider.
73 * @param reason Reason for Unbind request.
76 EXTERN S16 PtLiTfuUbndReq ARGS((Pst * pst, SpId spId, Reason reason));
77 /** @brief This API is used to send an Unbind Request from Scheduler to PHY.
78 * @param pst Pointer to the post structure.
79 * @param suId SAP ID of the service provider.
80 * @param reason Reason for Unbind request.
83 EXTERN S16 PtLiTfuSchUbndReq ARGS((Pst * pst, SpId spId, Reason reason));
84 /** @brief This primitive is sent from Scheduler to PHY.
85 * @details This primitive provides PHY with all the information required by
86 * PHY to decode transmissions from the UE on either PUCCH or PUSCH.
87 * -# On PUCCH UE can transmit the following
93 * -# On PUSCH UE can transmit the following
96 * -# Data + HARQ Feedback
97 * This primitive carries all the information for the expected subframe for all
98 * the UEs that have been scheduled to transmit.
99 * @param pst Pointer to the post structure.
100 * @param spId SAP ID of the service provider.
101 * @param recpReq Pointer to the TfuRecpReqInfo structure.
102 * @return ROK/RFAILED
104 EXTERN S16 PtLiTfuRecpReq ARGS((Pst * pst, SpId spId, TfuRecpReqInfo * recpReq));
105 /** @brief This Primitive is sent from Scheduler to PHY. It provides PHY with
106 * all the control information
107 * @details This primitive carries the information sent on the following
115 * @param cntrlReq pointer to TfuCntrlReqInfo
116 * @return ROK/RFAILED
118 EXTERN S16 PtLiTfuCntrlReq ARGS((Pst * pst, SpId spId, TfuCntrlReqInfo * cntrlReq));
119 /** @brief This Primitive carries the Data PDUs from MAC to PHY for
121 * @details The data being sent in this primitive is meant to be transmitted on
122 * the downlink channel PDSCH and PBCH (if present). To facilitate physical
123 * layer processing, requisite control information is also sent along with the
125 * @sa TfUiTfuCntrlReq
128 * @param tfuDatReq pointer to TfuDatReqInfo
131 EXTERN S16 PtLiTfuDatReq ARGS((Pst * pst, SpId spId, TfuDatReqInfo * datReq));
133 /** @brief This Primitive carries cellId and UeId for which datReq need to be deleted.
134 * @details This primitive is used to send delDatReq to CL to delete the PDUs of
135 * UE which has been deleted in MAC due to ueId change or anyother scenario
136 * @details The data being sent in this primitive is meant to be transmitted on
137 * @sa TfUiTfuDelDatReq
140 * @param tfuDelDatReq pointer to TfuDelDatReqInfo
143 EXTERN S16 PtLiTfuDelDatReq ARGS((Pst * pst, SpId spId, TfuDelDatReqInfo * datReq));
145 #endif /*--#ifdef PTRGLITFU--*/
147 /** @brief This API is used to send a Bind Request from MAC to PHY.
148 * @param pst Pointer to the post structure.
149 * @param suId SAP ID of the service user.
150 * @param spId SAP ID of the service provider.
151 * @return ROK/RFAILED
153 PRIVATE CONSTANT TfuBndReq RgLiTfuBndReqMt[RG_MAX_TFU_PROV] =
172 /** @brief This API is used to send a Bind Request from Scheduler to PHY.
173 * @param pst Pointer to the post structure.
174 * @param suId SAP ID of the service user.
175 * @param spId SAP ID of the service provider.
176 * @return ROK/RFAILED
178 PRIVATE CONSTANT TfuSchBndReq RgLiTfuSchBndReqMt[RG_MAX_TFU_PROV] =
197 /** @brief This API is used to send an Unbind Request from MAC to PHY.
198 * @param pst Pointer to the post structure.
199 * @param suId SAP ID of the service provider.
200 * @param reason Reason for Unbind request.
201 * @return ROK/RFAILED
203 PRIVATE CONSTANT TfuUbndReq RgLiTfuUbndReqMt[RG_MAX_TFU_PROV] =
222 /** @brief This API is used to send an Unbind Request from Scheduler to PHY.
223 * @param pst Pointer to the post structure.
224 * @param suId SAP ID of the service provider.
225 * @param reason Reason for Unbind request.
226 * @return ROK/RFAILED
228 PRIVATE CONSTANT TfuSchUbndReq RgLiTfuSchUbndReqMt[RG_MAX_TFU_PROV] =
247 /** @brief This primitive is sent from Scheduler to PHY.
248 * @details This primitive provides PHY with all the information required by
249 * PHY to decode transmissions from the UE on either PUCCH or PUSCH.
250 * -# On PUCCH UE can transmit the following
256 * -# On PUSCH UE can transmit the following
259 * -# Data + HARQ Feedback
260 * This primitive carries all the information for the expected subframe for all
261 * the UEs that have been scheduled to transmit.
262 * @param pst Pointer to the post structure.
263 * @param spId SAP ID of the service provider.
264 * @param recpReq Pointer to the TfuRecpReqInfo structure.
265 * @return ROK/RFAILED
267 PRIVATE CONSTANT TfuRecpReq RgLiTfuRecpReqMt[RG_MAX_TFU_PROV] =
286 /** @brief This Primitive is sent from Scheduler to PHY. It provides PHY with
287 * all the control information
288 * @details This primitive carries the information sent on the following
296 * @param cntrlReq pointer to TfuCntrlReqInfo
297 * @return ROK/RFAILED
299 PRIVATE CONSTANT TfuCntrlReq RgLiTfuCntrlReqMt[RG_MAX_TFU_PROV] =
318 /** @brief This Primitive carries the Data PDUs from MAC to PHY for
320 * @details The data being sent in this primitive is meant to be transmitted on
321 * the downlink channel PDSCH and PBCH (if present). To facilitate physical
322 * layer processing, requisite control information is also sent along with the
324 * @sa TfUiTfuCntrlReq
327 * @param tfuDatReq pointer to TfuDatReqInfo
330 PRIVATE CONSTANT TfuDatReq RgLiTfuDatReqMt[RG_MAX_TFU_PROV] =
350 /** @brief This Primitive carries cellId and UeId for which datReq need to be deleted.
351 * @details This primitive is used to send delDatReq to CL to delete the PDUs of
352 * UE which has been deleted in MAC due to ueId change or anyother scenario
353 * NOTE:: This API is only supported for TC because race condition issue
354 * happens only in case of TC
355 * @sa TfUiTfuDelDatReq
358 * @param tfuDelDatReq pointer to TfuDelDatReqInfo
361 PRIVATE CONSTANT TfuDelDatReq RgLiTfuDelDatReqMt[RG_MAX_TFU_PROV] =
364 PtLiTfuDelDatReq, /*calling dummy api as LC not required for this privitive*/
374 PtLiTfuDelDatReq, /*calling dummy api as LWLC not required for this privitive*/
385 /***********************************************************
387 * Func : RgLiTfuBndReq
390 * Desc : This API is used to send a Bind Request from MAC to PHY.
391 * @param pst Pointer to the post structure.
392 * @param suId SAP ID of the service user.
393 * @param spId SAP ID of the service provider.
394 * @return ROK/RFAILED
403 **********************************************************/
405 PUBLIC S16 RgLiTfuBndReq
412 PUBLIC S16 RgLiTfuBndReq(pst, suId, spId)
421 RETVALUE((*RgLiTfuBndReqMt[pst->selector])(pst, suId, spId));
427 /***********************************************************
429 * Func : RgLiTfuSchBndReq
432 * Desc : This API is used to send a Bind Request from Scheduler to PHY.
433 * @param pst Pointer to the post structure.
434 * @param suId SAP ID of the service user.
435 * @param spId SAP ID of the service provider.
436 * @return ROK/RFAILED
445 **********************************************************/
447 PUBLIC S16 RgLiTfuSchBndReq
454 PUBLIC S16 RgLiTfuSchBndReq(pst, suId, spId)
461 TRC3(RgLiTfuSchBndReq)
463 RETVALUE((*RgLiTfuSchBndReqMt[pst->selector])(pst, suId, spId));
469 /***********************************************************
471 * Func : RgLiTfuUbndReq
474 * Desc : This API is used to send an Unbind Request from MAC to PHY.
475 * @param pst Pointer to the post structure.
476 * @param suId SAP ID of the service provider.
477 * @param reason Reason for Unbind request.
478 * @return ROK/RFAILED
487 **********************************************************/
489 PUBLIC S16 RgLiTfuUbndReq
496 PUBLIC S16 RgLiTfuUbndReq(pst, spId, reason)
505 RETVALUE((*RgLiTfuUbndReqMt[pst->selector])(pst, spId, reason));
511 /***********************************************************
513 * Func : RgLiTfuSchUbndReq
516 * Desc : This API is used to send an Unbind Request from Scheduler to PHY.
517 * @param pst Pointer to the post structure.
518 * @param suId SAP ID of the service provider.
519 * @param reason Reason for Unbind request.
520 * @return ROK/RFAILED
529 **********************************************************/
531 PUBLIC S16 RgLiTfuSchUbndReq
538 PUBLIC S16 RgLiTfuSchUbndReq(pst, spId, reason)
545 TRC3(RgLiTfuSchUbndReq)
547 RETVALUE((*RgLiTfuSchUbndReqMt[pst->selector])(pst, spId, reason));
553 /***********************************************************
555 * Func : RgLiTfuRecpReq
558 * Desc : This primitive is sent from Scheduler to PHY.
559 * @details This primitive provides PHY with all the information required by
560 * PHY to decode transmissions from the UE on either PUCCH or PUSCH.
561 * -# On PUCCH UE can transmit the following
567 * -# On PUSCH UE can transmit the following
570 * -# Data + HARQ Feedback
571 * This primitive carries all the information for the expected subframe for all
572 * the UEs that have been scheduled to transmit.
573 * @param pst Pointer to the post structure.
574 * @param spId SAP ID of the service provider.
575 * @param recpReq Pointer to the TfuRecpReqInfo structure.
576 * @return ROK/RFAILED
585 **********************************************************/
587 PUBLIC S16 RgLiTfuRecpReq
591 TfuRecpReqInfo * recpReq
594 PUBLIC S16 RgLiTfuRecpReq(pst, spId, recpReq)
597 TfuRecpReqInfo * recpReq;
603 RETVALUE((*RgLiTfuRecpReqMt[pst->selector])(pst, spId, recpReq));
609 /***********************************************************
611 * Func : RgLiTfuCntrlReq
614 * Desc : This Primitive is sent from Scheduler to PHY. It provides PHY with
615 * all the control information
616 * @details This primitive carries the information sent on the following
624 * @param cntrlReq pointer to TfuCntrlReqInfo
625 * @return ROK/RFAILED
634 **********************************************************/
636 PUBLIC S16 RgLiTfuCntrlReq
640 TfuCntrlReqInfo * cntrlReq
643 PUBLIC S16 RgLiTfuCntrlReq(pst, spId, cntrlReq)
646 TfuCntrlReqInfo * cntrlReq;
650 TRC3(RgLiTfuCntrlReq)
652 RETVALUE((*RgLiTfuCntrlReqMt[pst->selector])(pst, spId, cntrlReq));
658 /***********************************************************
660 * Func : RgLiTfuDatReq
663 * Desc : This Primitive carries the Data PDUs from MAC to PHY for
665 * @details The data being sent in this primitive is meant to be transmitted on
666 * the downlink channel PDSCH and PBCH (if present). To facilitate physical
667 * layer processing, requisite control information is also sent along with the
669 * @sa TfUiTfuCntrlReq
672 * @param tfuDatReq pointer to TfuDatReqInfo
682 **********************************************************/
684 PUBLIC S16 RgLiTfuDatReq
688 TfuDatReqInfo * datReq
691 PUBLIC S16 RgLiTfuDatReq(pst, spId, datReq)
694 TfuDatReqInfo * datReq;
700 RETVALUE((*RgLiTfuDatReqMt[pst->selector])(pst, spId, datReq));
706 /***********************************************************
708 * Func : RgLiTfuDelDatReq
711 * Desc : This Primitive is used to delete datReq in CL when there is ueId change.
712 * @details: This primitive is required when L2_OPMZ flag is elabed. this is required
713 * To delete datRq PDUs from CL for the Ue for which Ue Id got changed or
714 * anyother similar scenario
715 * @sa TfUiTfuDelDatReq
718 * @param tfuDelDatReq pointer to TfuDelDatReqInfo
728 **********************************************************/
730 PUBLIC S16 RgLiTfuDelDatReq
734 TfuDelDatReqInfo * delDatReq
737 PUBLIC S16 RgLiTfuDelDatReq(pst, spId, delDatReq)
740 TfuDelDatReqInfo * delDatReq;
744 TRC3(RgLiTfuDelDatReq)
746 RETVALUE((*RgLiTfuDelDatReqMt[pst->selector])(pst, spId, delDatReq));
751 #endif /*--ifdef RG--*/
757 /***********************************************************
759 * Func : PtLiTfuBndReq
762 * Desc : This API is used to send a Bind Request from MAC to PHY.
763 * @param pst Pointer to the post structure.
764 * @param suId SAP ID of the service user.
765 * @param spId SAP ID of the service provider.
766 * @return ROK/RFAILED
775 **********************************************************/
777 PUBLIC S16 PtLiTfuBndReq
784 PUBLIC S16 PtLiTfuBndReq(pst, suId, spId)
803 /***********************************************************
805 * Func : PtLiTfuSchBndReq
808 * Desc : This API is used to send a Bind Request from Scheduler to PHY.
809 * @param pst Pointer to the post structure.
810 * @param suId SAP ID of the service user.
811 * @param spId SAP ID of the service provider.
812 * @return ROK/RFAILED
821 **********************************************************/
823 PUBLIC S16 PtLiTfuSchBndReq
830 PUBLIC S16 PtLiTfuSchBndReq(pst, suId, spId)
837 TRC3(PtLiTfuSchBndReq)
849 /***********************************************************
851 * Func : PtLiTfuUbndReq
854 * Desc : This API is used to send an Unbind Request from MAC to PHY.
855 * @param pst Pointer to the post structure.
856 * @param suId SAP ID of the service provider.
857 * @param reason Reason for Unbind request.
858 * @return ROK/RFAILED
867 **********************************************************/
869 PUBLIC S16 PtLiTfuUbndReq
876 PUBLIC S16 PtLiTfuUbndReq(pst, spId, reason)
895 /***********************************************************
897 * Func : PtLiTfuSchUbndReq
900 * Desc : This API is used to send an Unbind Request from Scheduler to PHY.
901 * @param pst Pointer to the post structure.
902 * @param suId SAP ID of the service provider.
903 * @param reason Reason for Unbind request.
904 * @return ROK/RFAILED
913 **********************************************************/
915 PUBLIC S16 PtLiTfuSchUbndReq
922 PUBLIC S16 PtLiTfuSchUbndReq(pst, spId, reason)
929 TRC3(PtLiTfuSchUbndReq)
941 /***********************************************************
943 * Func : PtLiTfuRecpReq
946 * Desc : This primitive is sent from Scheduler to PHY.
947 * @details This primitive provides PHY with all the information required by
948 * PHY to decode transmissions from the UE on either PUCCH or PUSCH.
949 * -# On PUCCH UE can transmit the following
955 * -# On PUSCH UE can transmit the following
958 * -# Data + HARQ Feedback
959 * This primitive carries all the information for the expected subframe for all
960 * the UEs that have been scheduled to transmit.
961 * @param pst Pointer to the post structure.
962 * @param spId SAP ID of the service provider.
963 * @param recpReq Pointer to the TfuRecpReqInfo structure.
964 * @return ROK/RFAILED
973 **********************************************************/
975 PUBLIC S16 PtLiTfuRecpReq
979 TfuRecpReqInfo * recpReq
982 PUBLIC S16 PtLiTfuRecpReq(pst, spId, recpReq)
985 TfuRecpReqInfo * recpReq;
1001 /***********************************************************
1003 * Func : PtLiTfuCntrlReq
1006 * Desc : This Primitive is sent from Scheduler to PHY. It provides PHY with
1007 * all the control information
1008 * @details This primitive carries the information sent on the following
1016 * @param cntrlReq pointer to TfuCntrlReqInfo
1017 * @return ROK/RFAILED
1026 **********************************************************/
1028 PUBLIC S16 PtLiTfuCntrlReq
1032 TfuCntrlReqInfo * cntrlReq
1035 PUBLIC S16 PtLiTfuCntrlReq(pst, spId, cntrlReq)
1038 TfuCntrlReqInfo * cntrlReq;
1042 TRC3(PtLiTfuCntrlReq)
1054 /***********************************************************
1056 * Func : PtLiTfuDatReq
1059 * Desc : This Primitive carries the Data PDUs from MAC to PHY for
1061 * @details The data being sent in this primitive is meant to be transmitted on
1062 * the downlink channel PDSCH and PBCH (if present). To facilitate physical
1063 * layer processing, requisite control information is also sent along with the
1065 * @sa TfUiTfuCntrlReq
1068 * @param tfuDatReq pointer to TfuDatReqInfo
1078 **********************************************************/
1080 PUBLIC S16 PtLiTfuDatReq
1084 TfuDatReqInfo * datReq
1087 PUBLIC S16 PtLiTfuDatReq(pst, spId, datReq)
1090 TfuDatReqInfo * datReq;
1106 /***********************************************************
1108 * Func : PtLiTfuDelDatReq
1111 * @brief This Primitive carries cellId and UeId for which datReq need to be deleted.
1112 * @details This primitive is used to send delDatReq to CL to delete the PDUs of
1113 * UE which has been deleted in MAC due to ueId change or anyother scenario
1115 * @details The data being sent in this primitive is meant to be transmitted on
1116 * @sa TfUiTfuDelDatReq
1119 * @param tfuDelDatReq pointer to TfuDelDatReqInfo
1129 **********************************************************/
1131 PUBLIC S16 PtLiTfuDelDatReq
1135 TfuDelDatReqInfo * delDatReq
1138 PUBLIC S16 PtLiTfuDelDatReq(pst, spId, delDatReq)
1141 TfuDelDatReqInfo * DelDatReq;
1145 TRC3(PtLiTfuDelDatReq)
1156 #endif /*--ifdef PTRGLITFU--*/
1160 #endif /* __cplusplus */
1162 /**********************************************************************
1165 **********************************************************************/