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 **********************************************************/
211 TfuDelDatReqInfo * delDatReq
215 return ((*RgLiTfuDelDatReqMt[pst->selector])(pst, spId, delDatReq));
220 #endif /*--ifdef RG--*/
226 /***********************************************************
228 * Func : PtLiTfuBndReq
231 * Desc : This API is used to send a Bind Request from MAC to PHY.
232 * @param pst Pointer to the post structure.
233 * @param suId SAP ID of the service user.
234 * @param spId SAP ID of the service provider.
235 * @return ROK/RFAILED
244 **********************************************************/
263 /***********************************************************
265 * Func : PtLiTfuSchBndReq
268 * Desc : This API is used to send a Bind Request from Scheduler to PHY.
269 * @param pst Pointer to the post structure.
270 * @param suId SAP ID of the service user.
271 * @param spId SAP ID of the service provider.
272 * @return ROK/RFAILED
281 **********************************************************/
300 /***********************************************************
302 * Func : PtLiTfuUbndReq
305 * Desc : This API is used to send an Unbind Request from MAC to PHY.
306 * @param pst Pointer to the post structure.
307 * @param suId SAP ID of the service provider.
308 * @param reason Reason for Unbind request.
309 * @return ROK/RFAILED
318 **********************************************************/
337 /***********************************************************
339 * Func : PtLiTfuSchUbndReq
342 * Desc : This API is used to send an Unbind Request from Scheduler to PHY.
343 * @param pst Pointer to the post structure.
344 * @param suId SAP ID of the service provider.
345 * @param reason Reason for Unbind request.
346 * @return ROK/RFAILED
355 **********************************************************/
356 S16 PtLiTfuSchUbndReq
374 /***********************************************************
376 * Func : PtLiTfuRecpReq
379 * Desc : This primitive is sent from Scheduler to PHY.
380 * @details This primitive provides PHY with all the information required by
381 * PHY to decode transmissions from the UE on either PUCCH or PUSCH.
382 * -# On PUCCH UE can transmit the following
388 * -# On PUSCH UE can transmit the following
391 * -# Data + HARQ Feedback
392 * This primitive carries all the information for the expected subframe for all
393 * the UEs that have been scheduled to transmit.
394 * @param pst Pointer to the post structure.
395 * @param spId SAP ID of the service provider.
396 * @param recpReq Pointer to the TfuRecpReqInfo structure.
397 * @return ROK/RFAILED
406 **********************************************************/
411 TfuRecpReqInfo * recpReq
425 /***********************************************************
427 * Func : PtLiTfuCntrlReq
430 * Desc : This Primitive is sent from Scheduler to PHY. It provides PHY with
431 * all the control information
432 * @details This primitive carries the information sent on the following
440 * @param cntrlReq pointer to TfuCntrlReqInfo
441 * @return ROK/RFAILED
450 **********************************************************/
455 TfuCntrlReqInfo * cntrlReq
469 /***********************************************************
471 * Func : PtLiTfuDatReq
474 * Desc : This Primitive carries the Data PDUs from MAC to PHY for
476 * @details The data being sent in this primitive is meant to be transmitted on
477 * the downlink channel PDSCH and PBCH (if present). To facilitate physical
478 * layer processing, requisite control information is also sent along with the
480 * @sa TfUiTfuCntrlReq
483 * @param tfuDatReq pointer to TfuDatReqInfo
493 **********************************************************/
498 TfuDatReqInfo * datReq
512 /***********************************************************
514 * Func : PtLiTfuDelDatReq
517 * @brief This Primitive carries cellId and UeId for which datReq need to be deleted.
518 * @details This primitive is used to send delDatReq to CL to delete the PDUs of
519 * UE which has been deleted in MAC due to ueId change or anyother scenario
521 * @details The data being sent in this primitive is meant to be transmitted on
522 * @sa TfUiTfuDelDatReq
525 * @param tfuDelDatReq pointer to TfuDelDatReqInfo
535 **********************************************************/
540 TfuDelDatReqInfo * delDatReq
553 #endif /*--ifdef PTRGLITFU--*/
557 #endif /* __cplusplus */
559 /**********************************************************************
562 **********************************************************************/