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 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 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 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 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 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 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 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 S16 PtLiTfuDelDatReq ARGS((Pst * pst, SpId spId, TfuDelDatReqInfo * datReq));
145 #endif /*--#ifdef PTRGLITFU--*/
148 /** @brief This Primitive carries cellId and UeId for which datReq need to be deleted.
149 * @details This primitive is used to send delDatReq to CL to delete the PDUs of
150 * UE which has been deleted in MAC due to ueId change or anyother scenario
151 * NOTE:: This API is only supported for TC because race condition issue
152 * happens only in case of TC
153 * @sa TfUiTfuDelDatReq
156 * @param tfuDelDatReq pointer to TfuDelDatReqInfo
159 static const TfuDelDatReq RgLiTfuDelDatReqMt[RG_MAX_TFU_PROV] =
162 PtLiTfuDelDatReq, /*calling dummy api as LC not required for this privitive*/
172 PtLiTfuDelDatReq, /*calling dummy api as LWLC not required for this privitive*/
184 /***********************************************************
186 * Func : RgLiTfuDelDatReq
189 * Desc : This Primitive is used to delete datReq in CL when there is ueId change.
190 * @details: This primitive is required when L2_OPMZ flag is elabed. this is required
191 * To delete datRq PDUs from CL for the Ue for which Ue Id got changed or
192 * anyother similar scenario
193 * @sa TfUiTfuDelDatReq
196 * @param tfuDelDatReq pointer to TfuDelDatReqInfo
206 **********************************************************/
212 TfuDelDatReqInfo * delDatReq
215 S16 RgLiTfuDelDatReq(pst, spId, delDatReq)
218 TfuDelDatReqInfo * delDatReq;
222 return ((*RgLiTfuDelDatReqMt[pst->selector])(pst, spId, delDatReq));
227 #endif /*--ifdef RG--*/
233 /***********************************************************
235 * Func : PtLiTfuBndReq
238 * Desc : This API is used to send a Bind Request from MAC to PHY.
239 * @param pst Pointer to the post structure.
240 * @param suId SAP ID of the service user.
241 * @param spId SAP ID of the service provider.
242 * @return ROK/RFAILED
251 **********************************************************/
260 S16 PtLiTfuBndReq(pst, suId, spId)
278 /***********************************************************
280 * Func : PtLiTfuSchBndReq
283 * Desc : This API is used to send a Bind Request from Scheduler to PHY.
284 * @param pst Pointer to the post structure.
285 * @param suId SAP ID of the service user.
286 * @param spId SAP ID of the service provider.
287 * @return ROK/RFAILED
296 **********************************************************/
305 S16 PtLiTfuSchBndReq(pst, suId, spId)
322 /***********************************************************
324 * Func : PtLiTfuUbndReq
327 * Desc : This API is used to send an Unbind Request from MAC to PHY.
328 * @param pst Pointer to the post structure.
329 * @param suId SAP ID of the service provider.
330 * @param reason Reason for Unbind request.
331 * @return ROK/RFAILED
340 **********************************************************/
349 S16 PtLiTfuUbndReq(pst, spId, reason)
366 /***********************************************************
368 * Func : PtLiTfuSchUbndReq
371 * Desc : This API is used to send an Unbind Request from Scheduler to PHY.
372 * @param pst Pointer to the post structure.
373 * @param suId SAP ID of the service provider.
374 * @param reason Reason for Unbind request.
375 * @return ROK/RFAILED
384 **********************************************************/
386 S16 PtLiTfuSchUbndReq
393 S16 PtLiTfuSchUbndReq(pst, spId, reason)
410 /***********************************************************
412 * Func : PtLiTfuRecpReq
415 * Desc : This primitive is sent from Scheduler to PHY.
416 * @details This primitive provides PHY with all the information required by
417 * PHY to decode transmissions from the UE on either PUCCH or PUSCH.
418 * -# On PUCCH UE can transmit the following
424 * -# On PUSCH UE can transmit the following
427 * -# Data + HARQ Feedback
428 * This primitive carries all the information for the expected subframe for all
429 * the UEs that have been scheduled to transmit.
430 * @param pst Pointer to the post structure.
431 * @param spId SAP ID of the service provider.
432 * @param recpReq Pointer to the TfuRecpReqInfo structure.
433 * @return ROK/RFAILED
442 **********************************************************/
448 TfuRecpReqInfo * recpReq
451 S16 PtLiTfuRecpReq(pst, spId, recpReq)
454 TfuRecpReqInfo * recpReq;
468 /***********************************************************
470 * Func : PtLiTfuCntrlReq
473 * Desc : This Primitive is sent from Scheduler to PHY. It provides PHY with
474 * all the control information
475 * @details This primitive carries the information sent on the following
483 * @param cntrlReq pointer to TfuCntrlReqInfo
484 * @return ROK/RFAILED
493 **********************************************************/
499 TfuCntrlReqInfo * cntrlReq
502 S16 PtLiTfuCntrlReq(pst, spId, cntrlReq)
505 TfuCntrlReqInfo * cntrlReq;
519 /***********************************************************
521 * Func : PtLiTfuDatReq
524 * Desc : This Primitive carries the Data PDUs from MAC to PHY for
526 * @details The data being sent in this primitive is meant to be transmitted on
527 * the downlink channel PDSCH and PBCH (if present). To facilitate physical
528 * layer processing, requisite control information is also sent along with the
530 * @sa TfUiTfuCntrlReq
533 * @param tfuDatReq pointer to TfuDatReqInfo
543 **********************************************************/
549 TfuDatReqInfo * datReq
552 S16 PtLiTfuDatReq(pst, spId, datReq)
555 TfuDatReqInfo * datReq;
569 /***********************************************************
571 * Func : PtLiTfuDelDatReq
574 * @brief This Primitive carries cellId and UeId for which datReq need to be deleted.
575 * @details This primitive is used to send delDatReq to CL to delete the PDUs of
576 * UE which has been deleted in MAC due to ueId change or anyother scenario
578 * @details The data being sent in this primitive is meant to be transmitted on
579 * @sa TfUiTfuDelDatReq
582 * @param tfuDelDatReq pointer to TfuDelDatReqInfo
592 **********************************************************/
598 TfuDelDatReqInfo * delDatReq
601 S16 PtLiTfuDelDatReq(pst, spId, delDatReq)
604 TfuDelDatReqInfo * DelDatReq;
617 #endif /*--ifdef PTRGLITFU--*/
621 #endif /* __cplusplus */
623 /**********************************************************************
626 **********************************************************************/