RLC-MAC Interface APIs and Memory configuration Changes
[o-du/l2.git] / src / cm / rgu.x
1 /*******************************************************************************
2 ################################################################################
3 #   Copyright (c) [2017-2019] [Radisys]                                        #
4 #                                                                              #
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                                    #
8 #                                                                              #
9 #       http://www.apache.org/licenses/LICENSE-2.0                             #
10 #                                                                              #
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 *******************************************************************************/
18
19 /**********************************************************************
20      Name:    Upper Layer Interface
21
22      Type:    C header file
23
24      Desc:    Structures, variables and typedefs required by 
25               RGU interface
26
27      File:    rgu.x
28
29 *********************************************************************21*/
30
31 \f
32 #ifndef __RGUX__
33 #define __RGUX__
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37
38 /** 
39   @file rgu.x 
40   @brief Structure declarations and definitions for RGU interface.
41  */
42
43 /***********************************************************************
44                           typedefs and data structures
45  ***********************************************************************/
46
47 /**
48  * @brief PDU information given on a logical channel.
49  */
50 typedef struct rguPduInfo
51 {
52    U8     numPdu;                 /*!< Number of PDUs */ 
53    Buffer *mBuf[RGU_MAX_PDU];     /*!< numPdu data buffers */
54 } RguPduInfo;
55
56
57 /**
58  * @brief Buffer Occupancy Report for dedicated logical channel.
59  */
60 typedef struct rguDBoReport
61 {
62    S32  bo;                /*!< Buffer occupancy reported by RLC */
63 #ifdef CCPU_OPT
64    U16  estRlcHdrSz;       /*!< Estimated RLC header size */
65    Bool staPduPrsnt;       /*!< Indicates whether the BO includes
66                                 a status PDU as well */
67 #endif
68    U32  staPduBo;          /*!< Indicates the Status PDU BO. 
69                                 This is included in bo */
70    U32  oldestSduArrTime;
71 } RguDBoReport;
72
73 /**
74  * @brief DatReq from RLC to MAC for Common Channels (BCCH, PCCH and CCCH).
75  */
76 typedef struct rguCDatReqInfo
77 {
78    CmLteCellId     cellId;          /*!< CELL ID */
79    CmLteLcId       lcId;            /*!< Logical channel ID */
80    CmLteLcType     lcType;          /*!< Logical channel Type */
81    U32             transId;         /*!< Transaction ID */
82 #ifdef EMTC_ENABLE
83    U8              pnb;            /*Paging narrowBand on which UE performs Paging*/
84 #endif
85    union{
86    CmLteTimingInfo timeToTx;        /*!< Actual time when PHY transmits
87                                          this, applicable to BCCH and PCCH only */
88    CmLteRnti rnti;                  /*!< Temporary CRNTI:Applicable for CCCH. */
89    }u;
90    Buffer          *pdu;            /*!< PDU to be transmitted */
91 } RguCDatReqInfo;
92 /**
93  * @brief DatReq Information of a logical channel.
94  */
95 typedef struct rguLchDatReq
96 {
97    CmLteLcId    lcId;                /*!< Logical channel ID */
98    RguDBoReport boReport;            /*!< BO for the logical channel */
99    RguPduInfo   pdu;                 /*!< PDU to be transmitted*/
100    Bool         setMaxUlPrio;
101 #ifdef L2_OPTMZ
102    Bool         freeBuff;            /*!< TRUE if Buffer is to be freed by MAC
103                                           It is set for UM bearer*/
104 #endif
105 } RguLchDatReq;
106
107 /*rgu_x_001.main_3 - ADD - L2M Support */
108 #ifdef LTE_L2_MEAS
109 /**
110  * @brief Structure to store logical channels to SN mapping */
111 typedef struct rguLchmapInfo
112 {
113    CmLteLcId lChId;                  /*!< Logical channel Id */
114    U16       snList[RGU_MAX_LC];     /*!< Set of sequence numbers */
115 }RguLchMapInfo;
116 /**
117  * @brief Sequence Number mapping info per TB 
118  * */
119 typedef struct rguSnMapInfo
120 {
121    U32            tbId;               /*!< TB id for which sn info map */
122    U8             numLch;             /*!< Number of Ded Logical Channels */
123    RguLchMapInfo  lchMap[RGU_MAX_LC]; /*!< LC to SN Mapping Info*/
124 } RguSnMapInfo;
125
126 /*
127  *  @brief Structure to hold harq status Indication to RLC
128  *  */
129 typedef struct rguHarqStatusInd
130 {
131    CmLteCellId   cellId;                    /*!< Cell Id*/
132    CmLteRnti     ueId;                      /*!< ue Id*/
133    U8            numTbs;                    /*!< Number of Tbs present */
134  
135    U32           tbId[RGU_MAX_TB];          /*!< tbId provided by RLC in
136                                                  DatReq  */                                                                                 
137    U16           status[RGU_MAX_TB];        /*!< Status back to RLC ACK/NACK*/
138 } RguHarqStatusInd;
139
140 /*
141  *  @brief Structure to hold rguHarqStatusInd and pst structure
142  *  */
143 typedef struct rguHarqStaInd
144 {
145     RguHarqStatusInd  hqStatusInd;            
146     Pst               pst;
147 } RguHarqStaInd;
148
149 /*
150  *  @brief UL Throughput Measurement Request from RLC to MAC regarding configuration
151  *  of an LC for a particular UE to provide Timing Info.
152  *  */
153 typedef struct rguL2MUlThrpMeasReqInfo
154 {
155    CmLteCellId   cellId;                    /*!< Cell Id*/
156    CmLteRnti     rnti;                      /*!< UE Id*/
157    U8            numLcId;                   /*!< Number of LC Ids configured */
158    U8            lcId[RGU_MAX_LC];          /*!< LC ID indices that are 
159                                               configured */
160    Bool          enbMeas;                   /*!< Indication to enable/disable 
161                                                measurement for the LC ID*/
162 } RguL2MUlThrpMeasReqInfo;
163
164 #endif /* LTE_L2_MEAS */
165 /**
166  * @brief DatReq info for each TB of a UE.
167  */
168 typedef struct rguDatReqTb
169 {
170    U8           nmbLch;              /*!< Number of logical channels of a UE 
171                                           that have data for this TB */
172    RguLchDatReq lchData[RGU_MAX_LC]; /*!< Data Buffers and BO of  
173                                           logical channels for this TB */
174 /* rgu_x_001.main_3 - ADD - L2M Support */
175 #ifdef LTE_L2_MEAS
176    U32          tbId;                /*!< RLC's internal tbId maintained
177                                           per UE */  
178 #endif /* LTE_L2_MEAS */
179 }RguDatReqTb;
180
181 /**
182  * @brief DatReq from RLC to MAC for dedicated channels of an UE.
183  */
184 typedef struct rguDDatReqPerUe
185 {
186    CmLteRnti     rnti;         /*!< UE ID */
187    U32           transId;      /*!< Transaction ID */
188    U8            nmbOfTbs;     /*!< Number of TBs. Relevant for MIMO */
189    RguDatReqTb   datReqTb[2];  /*!< DatReq info for MAX 2 TBs */ 
190 } RguDDatReqPerUe;
191
192 /**
193  * @brief DatReq from RLC to MAC for dedicated channels of all UEs in a TTI.
194  */
195 typedef struct rguDDatReqInfo
196 {
197    CmLteCellId        cellId;                        /*!< CELL ID */
198    U8                 nmbOfUeGrantPerTti;                 /*!< Number of TBs. Relevant for MIMO */
199    RguDDatReqPerUe    datReq[RGU_MAX_NUM_UE_PER_TTI];    /*!< Pointer to DatReq for MAX UEs configured Per TTI */ 
200 } RguDDatReqInfo;
201
202 /**
203  * @brief DatInd from MAC to RLC on CCCH.
204  */
205 typedef struct rguCDatIndInfo
206 {
207    CmLteCellId cellId;               /*!< Cell ID */
208    CmLteRnti   rnti;                 /*!< RNTI */
209    CmLteLcId   lcId;                 /*!< Logical channel instance */
210    Buffer      *pdu;                 /*!< PDU received always one */
211 } RguCDatIndInfo;
212
213 #ifdef MAC_RLC_UL_RBUF
214 typedef struct rguDedDatInd1
215 {
216    Void *msg;
217 }RguDedDatInd1;
218 #endif 
219
220 /* rgu_x_001.main_3 - ADD - L2M & R9 Support */
221 #ifdef LTE_L2_MEAS
222
223 /** 
224  *  * Segment Indication ID from MAC to RLC */
225 typedef enum rguL2MUlThrpSegInd
226 {
227    RGU_L2M_ULTHRP_NOTDEF = 0,/**< Specifies No Indication */
228    RGU_L2M_ULTHRP_FIRST = 1,        /**< Specifies First Segment Indication */
229    RGU_L2M_ULTHRP_LAST = 2,        /**< Specifies Last Segment Indication */
230    RGU_L2M_ULTHRP_INTERIM = 3    /**< Specifies Interim Segment Indication */
231 }RguL2MUlThrpSegInd;
232
233 /**
234  * @brief Scheduled IP Throughput Timing Info from MAC to RLC.
235  */
236 typedef struct rgL2MeasUlThrpTimInfo 
237 {
238    U32                 thrpTimeUl;      /*!< Difference in Timing values T1, T2 */
239    RguL2MUlThrpSegInd  firstLastSegInd;         /*!< Indication of Data Burst */
240 }RgL2MeasUlThrpTimInfo;
241
242 #endif
243 /**
244  * @brief DatInd Information for a logical channel.
245  */
246 typedef struct rguLchDatInd
247 {
248    CmLteLcId    lcId;                /*!< Logical channel instance */
249    RguPduInfo   pdu;                 /*!< PDU received */
250    /* rgu_x_001.main_3 - ADD - L2M & R9 Support */
251 }RguLchDatInd;
252
253 /**
254  * @brief Data Indication from MAC to RLC for dedicated channels of an UE.
255  */
256 typedef struct rguDDatIndInfo
257 {
258    CmLteCellId  cellId;              /*!< CELL ID */
259    CmLteRnti    rnti;                /*!< UE ID */
260    U8           numLch;              /*!< Number of logical channels within
261                                        the UE that has data */
262    RguLchDatInd lchData[RGU_MAX_LC]; /*!< Data buffers of logical channels */
263 #ifdef LTE_L2_MEAS
264    U32          ttiCnt;              /*!< The Current TTI in the Cell */
265    U8           burstInd;            /*!< Indicates the Burst Start or End */
266 #endif
267 } RguDDatIndInfo;
268
269 /**
270  * @brief Status Response from RLC to MAC  for common logical channel.
271  */
272 typedef struct rguCStaRspInfo
273 {
274    CmLteCellId  cellId;         /*!< CELL ID */
275    CmLteLcId    lcId;           /*!< Logical channel ID */ 
276    CmLteLcType  lcType;         /*!< Logical channel type */
277    S32 bo;                      /*!< Buffer occupancy reported by RLC */
278 #ifdef EMTC_ENABLE
279    U8          emtcDiReason;   /*!< Reason for DI message to send. */
280    U8          pnb;            /*paging narrowBand on which UE will perform paging*/
281 #endif
282    union                        /*!< lcType in the primitive is 
283                                      the union selector */
284    {
285       CmLteTimingInfo timeToTx; /*!< Timing info for the BO, applicable for
286                                    BCCH and PCCH */
287       CmLteRnti       rnti;     /*!< Temporary CRNTI, only for CCCH */
288    } u;
289 } RguCStaRspInfo;
290
291 /**
292  * @brief Status Response from RLC to MAC  for dedicated logical channel.
293  */
294 typedef struct rguDStaRspInfo
295 {
296    Pst          post; 
297    CmLteCellId  cellId;     /*!< CELL ID */
298    CmLteRnti    rnti;       /*!< UE ID */
299    CmLteLcId    lcId;       /*!< Logical channel ID */
300    RguDBoReport boReport;   /*!< BO report for this common channel */
301 } RguDStaRspInfo;
302
303 /**
304  * @brief Status Indication from MAC to RLC for common logical channel.
305  */
306 typedef struct rguCStaIndInfo
307 {
308    CmLteCellId cellId;       /*!< CELL ID */
309    CmLteLcId   lcId;         /*!< Logical channel ID */
310    U32         transId;      /*!< Transaction ID */
311    CmLteRnti   rnti;         /*!< Temporary CRNTI */
312 #ifdef EMTC_ENABLE
313    Bool                isEmtcPaging;      /*!< To Identify whether Paging is EMTC or Lagecy */
314    CmLteTimingInfo     pagingTimingInfo; /*!< paging TimingInfo information */
315 #endif
316 } RguCStaIndInfo;
317
318 /**
319  * @brief StaInd info for each logical channel of an UE.
320  */
321 typedef struct rguLchStaInd
322 {
323    CmLteLcId   lcId;         /*!< Logical channel ID */
324    S16         totBufSize;  /*!< Total buffer size in bytes 
325                                 scheduled by MAC */
326 } RguLchStaInd;
327
328 /**
329  * @brief StaInd info for each TB of a UE.
330  */
331 typedef struct rguStaIndTb
332 {
333    U8           nmbLch;               /*!< Number of logical channels scheduled
334                                            for this TB */
335    RguLchStaInd lchStaInd[RGU_MAX_LC];/*!< Buffer size allocated for scheduled 
336                                            logical channels for this TB */
337 #ifdef LTE_L2_MEAS
338    U32          tbId;                /*!< RLC internal TB id */                                           
339    U16          status;              /*!< Status back to RLC ACK/NACK/RGU_NACK_LOSS */
340 #endif
341 }RguStaIndTb;
342 /**
343  * @brief StaInd from MAC to RLC for dedicated logical channels of an UE.
344  */
345 typedef struct rguDStaIndPerUe
346 {
347    CmLteRnti     rnti;        /*!< UE ID */
348    U32           transId;     /*!< Transaction ID */
349    U8            nmbOfTbs;    /*!< Number of TBs. Relevant for MIMO */
350    RguStaIndTb   staIndTb[2]; /*!< StaInd info for MAX 2 TBs */
351    Bool          fillCtrlPdu; /*!< Flag to fill RLC control PDU */
352 } RguDStaIndPerUe;
353
354 /**
355  * @brief StaInd from MAC to RLC for dedicated logical channels of all UEs Per TTI.
356  */
357 typedef struct rguDStaIndInfo
358 {
359    CmLteCellId      cellId;                       /*!< CELL ID */
360    U8               nmbOfUeGrantPerTti;                /*!< Number of TBs. Relevant for MIMO */
361    RguDStaIndPerUe  staInd[RGU_MAX_NUM_UE_PER_TTI];   /*!< StaInd info for MAX number of UEs per TTI */
362 } RguDStaIndInfo;
363
364 /**
365  * @brief flowCntrl info per LC.
366  */
367 typedef struct rguLcFlowCntrlInfo
368 {
369   CmLteLcId   lcId; 
370   U32         pktAdmitCnt; 
371   U32         maxBo4FlowCtrl; /*!< MAX BO of Queued SDUs at RLC beyond which Flow is Controlled */
372 }RguLcFlowCntrlInfo;
373
374 /**
375  * @brief flowCntrl info per UE.
376  */
377 typedef struct rguUeFlowCntrlInfo 
378 {
379   CmLteRnti            ueId;
380   U32                  numLcs;
381   RguLcFlowCntrlInfo   lcInfo[RGU_MAX_LC];
382 }RguUeFlowCntrlInfo;  
383
384 /**
385  * @brief flowCntrlInd from MAC to RLC for dedicated logical channels of all UEs Per TTI.
386  */
387 typedef struct rguFlowCntrlInd
388 {
389    CmLteCellId         cellId;                       /*!< CELL ID */
390    U32                 numUes;
391    RguUeFlowCntrlInfo  ueFlowCntrlInfo[RGU_MAX_NUM_UE_PER_TTI];
392 }RguFlowCntrlInd;  
393 typedef struct rguInfoRingElem 
394 {
395   SpId         spId;
396   U8           event;
397   Void         *msg;
398 }RguInfoRingElem;
399
400 /* Buffer occupancy status information */
401 typedef struct rlcMacBOStatus
402 {
403    CmLteCellId  cellId;     /*!< CELL ID */
404    CmLteRnti    rnti;       /*!< UE ID */
405    Bool         commCh;     /*!< Common or Dedicated Channel */
406    CmLteLcId    lcId;       /*!< Logical channel ID */
407    S32          bo;         /*!< Buffer occupancy reported by RLC */
408 }RlcMacBOStatus;
409
410 /* Schedule result report from RLC to MAC */
411 typedef struct rlcMacLchSta
412 {
413    Bool         commCh;     /*!<Common or Dedicated Channel */
414    RguLchStaInd lchStaInd;  /*!<Buffer size allocated for logical channel */
415 }RlcMacLchSta;
416
417 typedef struct rlcMacSchedRep
418 {
419    CmLteTimingInfo timeToTx;  /*!< Air interface time */
420    CmLteCellId  cellId;       /*!< CELL ID */
421    CmLteRnti    rnti;         /*!< Temporary CRNTI */
422    U8           nmbLch;       /*!< Number of logical channels scheduled */
423    RlcMacLchSta lchSta[RGU_MAX_LC];  /*!< Scheduled info of logical channels */
424 }RlcMacSchedRep;
425
426 /* UL Data i.e. RLC PDU info from RLC to MAC */
427 typedef struct rlcMacPduInfo
428 {
429    Bool         commCh;   /*!<Common or Dedicated Channel */
430    CmLteLcId    lcId;     /*!< Logical channel ID */
431    MsgLen       pduLen;   /*!< PDU Length */
432    Buffer       *pduBuf;  /*!< RLC PDU buffer */
433 }RlcMacPduInfo;
434
435 typedef struct rlcMacData
436 {  
437    CmLteTimingInfo timeToTx;  /*!< Air interface time */
438    CmLteCellId     cellId;       /*!< CELL ID */
439    CmLteRnti       rnti;         /*!< Temporary CRNTI */ 
440    U8              nmbPdu;       /*!< Number of RLC PDUs */
441    RlcMacPduInfo   pduInfo[RGU_MAX_PDU];
442 }RlcMacData;
443
444
445 /***********************************************************************
446           type definitions for upper layer interface - RLC primitives
447  ***********************************************************************/
448 /** @brief Bind Request from RLC to MAC to bind the interface SAPs */
449 typedef S16 (*RguBndReq) ARGS((
450    Pst*                 pst,
451    SuId                 suId,
452    SpId                 spId));
453 /** @brief Unbind Request from RLC to MAC to unbind the interface SAPs */
454 typedef S16 (*RguUbndReq) ARGS((
455    Pst*                 pst,
456    SpId                 spId,
457    Reason               reason));
458 /** @brief Bind Confirmation from MAC to RLC for the bind/unbind 
459  * request for the interface SAPs */
460 typedef S16 (*RguBndCfm) ARGS((
461    Pst*                 pst,
462    SuId                 suId,
463    U8                   status));
464 /** @brief Data Request from RLC to MAC for forwarding SDUs on common
465  * channel for transmission */
466 typedef S16 (*RguCDatReq) ARGS((
467    Pst*                 pst,
468    SpId                 spId,
469    RguCDatReqInfo  *    datReq));
470 /** @brief Data Request from RLC to MAC for forwarding SDUs on 
471  * dedicated channel for transmission */
472 typedef S16 (*RguDDatReq) ARGS((
473    Pst*                 pst,
474    SpId                 spId,
475    RguDDatReqInfo  *    datReq));
476 /** @brief Data Indication from MAC to RLC to 
477  * forward the data received for common channels */
478 typedef S16 (*RguCDatInd) ARGS((
479    Pst*                 pst,
480    SuId                 suId,
481    RguCDatIndInfo  *    datInd));
482 /** @brief Data Indication from MAC to RLC to 
483  * forward the data received for dedicated channels */
484 typedef S16 (*RguDDatInd) ARGS((
485    Pst*                 pst,
486    SuId                 suId,
487    RguDDatIndInfo  *    datInd));
488 /** @brief Status Response from RLC to MAC to 
489  * inform the BO report for common channels */
490 typedef S16 (*RguCStaRsp) ARGS((
491    Pst*                 pst,
492    SpId                 spId,
493    RguCStaRspInfo  *    staRsp));
494 /** @brief Status Repsonse from RLC to MAC to 
495  * inform the BO report for dedicated channels */
496 typedef S16 (*RguDStaRsp) ARGS((
497    Pst*                 pst,
498    SpId                 spId,
499    RguDStaRspInfo  *    staRsp));
500 /** @brief Status Indication from MAC to RLC  
501  * as a response to the staRsp primitive from RLC */
502 typedef S16 (*RguCStaInd) ARGS((
503    Pst*                 pst,
504    SuId                 suId,
505    RguCStaIndInfo  *    staInd));
506 /** @brief Status Indication from MAC to RLC  
507  * as a response to the staRsp primitive from RLC */
508 typedef S16 (*RguDStaInd) ARGS((
509    Pst*                 pst,
510    SuId                 suId,
511    RguDStaIndInfo  *    staInd));
512
513 typedef S16 (*RguFlowCntrlIndInfo) ARGS((
514    Pst                  *pst,
515    SuId                 suId,
516    RguFlowCntrlInd      *flowCntrlInd));
517
518 /* rgu_x_001.main_3 - ADD - L2M & R9 Support */
519 #ifdef LTE_L2_MEAS
520 /** @brief HARQ Status Indication from MAC to RLC  
521  * as a response to Data Req primitive from RLC */
522 typedef S16 (*RguHqStaInd) ARGS((
523    Pst*                 pst,
524    SuId                 suId,
525    RguHarqStatusInd     *harqStatusInd));
526 /** @brief LCID measurement status from RLC to MAC  
527  * so as to provide Timing Info in DDatInd */
528 typedef S16 (*RguL2MUlThrpMeasReq) ARGS((
529    Pst*                 pst,
530    SpId                 spId,
531    RguL2MUlThrpMeasReqInfo  *l2mUlThrpMeasReq));
532
533 #endif /* LTE_L2_MEAS */
534
535
536 #ifdef RG
537 /** @brief Bind Request from RLC to MAC to bind the interface SAPs
538  * @param pst Pointer to the post structure.
539  * @param suId SAP ID of the service user.
540  * @param spId SAP ID of the service provider.
541  * @return ROK/RFAILED
542 */
543 EXTERN S16 RgUiRguBndReq ARGS((Pst* pst,SuId suId,SpId spId));
544 /** @brief Unbind Request from RLC to MAC to unbind the interface SAPs 
545  * @param pst Pointer to the post structure.
546  * @param spId SAP ID of the service provider.
547  * @param reason Reason for unbind request.
548  * @return ROK/RFAILED
549 */
550 EXTERN S16 RgUiRguUbndReq ARGS((Pst* pst,SpId spId,Reason reason));
551 /** @brief Bind Confirmation from MAC to RLC for the bind and unbind 
552  * request for the interface SAPs 
553  * @param pst Pointer to the post structure.
554  * @param suId SAP ID of the service user.
555  * @param status Status of the bind request. 
556  * @return ROK/RFAILED
557 */
558 EXTERN S16 RgUiRguBndCfm ARGS((Pst* pst,SuId suId,U8 status));
559 /** @brief Data Request from RLC to MAC for forwarding SDUs on common
560  * channel for transmission 
561  * @param pst Pointer to the post structure.
562  * @param spId SAP ID of the service provider.
563  * @param datReq Data request for common channels (BCCH, PCCH and CCCH).
564  * @return ROK/RFAILED
565 */
566 EXTERN S16 RgUiRguCDatReq ARGS((Pst* pst,SpId spId,RguCDatReqInfo *datReq));
567 /** @brief Data Request from RLC to MAC for forwarding SDUs on 
568  * dedicated channel for transmission 
569  * @param pst Pointer to the post structure.
570  * @param spId SAP ID of the service provider.
571  * @param datReq Data request for dedicated channels (DCCH and DTCH).
572  * @return ROK/RFAILED
573 */
574 EXTERN S16 RgUiRguDDatReq ARGS((Pst* pst,SpId spId,RguDDatReqInfo  *datReq));
575 /** @brief Data Indication from MAC to RLC to 
576  * forward the data received for common channels
577  * @param pst Pointer to the post structure.
578  * @param suId SAP ID of the service user.
579  * @param datInd Data indication on CCCH.
580  * @return ROK/RFAILED
581 */
582 EXTERN S16 RgUiRguCDatInd ARGS((Pst* pst,SuId suId,RguCDatIndInfo  *datInd));
583 /** @brief Data Indication from MAC to RLC to 
584  * forward the data received for dedicated channels
585  * @param pst Pointer to the post structure.
586  * @param suId SAP ID of the service user.
587  * @param datInd Data indication on dedicated channels (DCCH and DTCH).
588  * @return ROK/RFAILED
589 */
590 EXTERN S16 RgUiRguDDatInd ARGS((Pst* pst,SuId suId,RguDDatIndInfo  *datInd));
591 /** @brief Status Response from RLC to MAC to 
592  * inform the BO report for common channels
593  * @param pst Pointer to the post structure.
594  * @param spId SAP ID of the service provider.
595  * @param staRsp Status response for common channels (BCCH, PCCH and CCCH).
596  * @return ROK/RFAILED
597 */
598 EXTERN S16 RgUiRguCStaRsp ARGS((Pst* pst,SpId spId,RguCStaRspInfo  *staRsp));
599 /** @brief Status Response from RLC to MAC to 
600  * inform the BO report for dedicated channels
601  * @param pst Pointer to the post structure.
602  * @param spId SAP ID of the service provider.
603  * @param staRsp Status response for dedicated channels (DCCH and DTCH).
604  * @return ROK/RFAILED
605 */
606 EXTERN S16 RgUiRguDStaRsp ARGS((Pst* pst,SpId spId,RguDStaRspInfo  *staRsp));
607 /** @brief Status Indication from MAC to RLC  
608  * as a response to the staRsp primitive from RLC.
609  * @param pst Pointer to the post structure.
610  * @param suId SAP ID of the service user.
611  * @param staInd Status indication on common channels (BCCH, PCCH and CCCH).
612  * @return ROK/RFAILED
613 */
614 EXTERN S16 RgUiRguCStaInd ARGS((Pst* pst,SuId suId,RguCStaIndInfo  *staInd));
615 /** @brief Status Indication from MAC to RLC  
616  * as a response to the staRsp primitive from RLC.
617  * @param pst Pointer to the post structure.
618  * @param suId SAP ID of the service user.
619  * @param staInd Status indication on dedicated channels (DCCH and DTCH).
620  * @return ROK/RFAILED
621 */
622 EXTERN S16 RgUiRguDStaInd ARGS((Pst* pst,SuId suId,RguDStaIndInfo  *staInd));
623 /** @brief flow control indication from MAC to RLC */  
624 EXTERN S16 RgUiRguFlowCntrlInd ARGS((Pst *pst, SuId suId, 
625 RguFlowCntrlInd *flowCntrlInd)); 
626 /*rgu_x_001.main_3 - ADD - L2M & R9 Support */
627 #ifdef LTE_L2_MEAS
628 /** @brief HARQ Status Indication from MAC to RLC  
629  * as a response to the Data Req from RLC.
630  * Informs HARQ feedback for the TB with sn mapping info. */
631 EXTERN S16 RgUiRguHqStaInd ARGS((Pst* pst,SuId suId,
632 RguHarqStatusInd *harqStatusInd));
633
634
635
636 /** @brief Request for measuring the timing Info for a LC from RLC to MAC  
637  * When the status is ON then Timing Info for data bursts 
638  * shall be captured and provided to RLC on DDatInd. */
639 EXTERN S16 RgUiRguL2MUlThrpMeasReq ARGS((Pst* pst,SpId spId,
640 RguL2MUlThrpMeasReqInfo  *l2mUlThrpMeasReq));
641
642 #endif /* LTE_L2_MEAS */
643
644 #endif
645
646 #ifdef KW
647 /** @brief Request from RLC to MAC to bind the interface saps */
648 EXTERN S16 KwLiRguBndReq ARGS((
649    Pst*                 pst,
650    SuId                 suId,
651    SpId                 spId
652 ));
653 /** @brief Request from RLC to MAC to Unbind the interface saps */
654 EXTERN S16 KwLiRguUbndReq ARGS((
655    Pst*                 pst,
656    SpId                 spId,
657    Reason               reason
658 ));
659 /** @brief Confirmation from MAC to RLC for the bind/Unbind 
660  * request for the interface saps */
661 EXTERN S16 KwLiRguBndCfm ARGS((
662    Pst*                 pst,
663    SuId                 suId,
664    U8                   status
665 ));
666 /** @brief Request from RLC to MAC for forwarding SDUs on common
667  * channel for transmission */
668 EXTERN S16 KwLiRguCDatReq ARGS((
669    Pst*                 pst,
670    SpId                 spId,
671    RguCDatReqInfo  *    datReq
672 ));
673 /** @brief Request from RLC to MAC for forwarding SDUs on 
674  * dedicated channel for transmission */
675 EXTERN S16 RlcMacSendDlData ARGS((
676    Pst*                 pst,
677    SpId                 spId,
678    RlcMacData  *    datReq
679 ));
680
681 /** @brief Handler toprocess UL data from MAC and
682  * forwarding to appropriate common/dedicated
683  * channel's handler */
684 EXTERN S16 RlcMacProcUlData ARGS((
685    Pst*           pst,
686    SuId           suId,
687    RlcMacData   *ulData
688 ));
689
690 /** @brief Data Indication from MAC to RLC to 
691  * forward the data received for common channels*/
692 EXTERN S16 KwLiRguCDatInd ARGS((
693    Pst*                 pst,
694    SuId                 suId,
695    RguCDatIndInfo  *    datInd
696 ));
697 /** @brief Data Indication from MAC to RLC to 
698  * forward the data received for dedicated channels*/
699 EXTERN S16 KwLiRguDDatInd ARGS((
700    Pst*                 pst,
701    SuId                 suId,
702    RguDDatIndInfo  *    datInd
703 ));
704 /** @brief Primitive invoked from RLC to MAC to 
705  * inform the BO report for common channels*/
706 EXTERN S16 KwLiRguCStaRsp ARGS((
707    Pst*                 pst,
708    SpId                 spId,
709    RguCStaRspInfo  *    staRsp
710 ));
711 /** @brief Primitive invoked from RLC to MAC to 
712  * inform the BO report for dedicated channels*/
713 EXTERN S16 RlcMacSendBOStatus ARGS((
714    Pst*                 pst,
715    SpId                 spId,
716    RlcMacBOStatus*      boSta
717 ));
718
719 /**@brief Primitive invoked from MAC to RLC to
720  * inform scheduling result for logical channels */
721 EXTERN S16 RlcMacProcSchedRep ARGS((
722    Pst*                 pst,
723    SuId                 suId,
724    RlcMacSchedRep       *schRep
725 ));
726 /** @brief Status Indication from MAC to RLC  
727  * as a response to the staRsp primitive from RLC.
728  * Informs RLC of the totalBufferSize and Timing Info 
729  * for the transmission on common channels. */
730 EXTERN S16 KwLiRguCStaInd ARGS((
731    Pst*                 pst,
732    SuId                 suId,
733    RguCStaIndInfo  *    staInd
734 ));
735 /** @brief Status Indication from MAC to RLC  
736  * as a response to the staRsp primitive from RLC.
737  * Informs RLC of the totalBufferSize and Timing Info 
738  * for the transmission on dedicated channels. */
739 EXTERN S16 KwLiRguDStaInd ARGS((
740    Pst*                 pst,
741    SuId                 suId,
742    RguDStaIndInfo  *    staInd
743 ));
744
745 #ifdef LTE_L2_MEAS
746 /** @brief HARQ Status Indication from MAC to RLC  
747  * as a response to the Data Req from RLC.
748  * Informs HARQ feedback for the PDU with sn. */
749 EXTERN S16 KwLiRguHqStaInd ARGS((
750    Pst*                 pst,
751    SuId                 suId,
752    RguHarqStatusInd     *harqStatusInd));
753
754
755 /** @brief Request for measuring the timing Info for a LC from RLC to MAC  
756  * When the status is ON then Timing Info for data bursts 
757  * shall be captured and provided to RLC on DDatInd. */
758 EXTERN S16 KwLiRguL2MUlThrpMeasReq ARGS((
759    Pst*                 pst,
760    SpId                 spId,
761    RguL2MUlThrpMeasReqInfo *l2mUlThrpMeasReq));
762
763 #endif /* LTE_L2_MEAS */
764
765 /** @brief flowCntrl Indication from MAC to RLC  */
766 EXTERN S16 KwLiRguFlowCntrlInd ARGS((
767 Pst              *pst, 
768 SuId             suId, 
769 RguFlowCntrlInd  *flowCntrlInd
770 ));
771 #endif
772
773 #ifdef LCRGU
774 /** @brief Request from RLC to MAC to bind the interface saps */
775 EXTERN S16 cmPkRguBndReq ARGS((
776    Pst*                 pst,
777    SuId                 suId,
778    SpId                 spId
779 ));
780 /** @brief Request from RLC to MAC to bind the interface saps */
781 EXTERN S16 cmUnpkRguBndReq ARGS((
782    RguBndReq            func,
783    Pst*                 pst,
784    Buffer               *mBuf
785 ));
786 /** @brief Request from RLC to MAC to Unbind the interface saps */
787 EXTERN S16 cmPkRguUbndReq ARGS((
788    Pst*                 pst,
789    SpId                 spId,
790    Reason               reason
791 ));
792 /** @brief Request from RLC to MAC to Unbind the interface saps */
793 EXTERN S16 cmUnpkRguUbndReq ARGS((
794    RguUbndReq           func,
795    Pst*                 pst,
796    Buffer               *mBuf
797 ));
798 /** @brief Confirmation from MAC to RLC for the bind/Unbind 
799  * request for the interface saps */
800 EXTERN S16 cmPkRguBndCfm ARGS((
801    Pst*                 pst,
802    SuId                 suId,
803    U8                   status
804 ));
805 /** @brief Confirmation from MAC to RLC for the bind/Unbind 
806  * request for the interface saps */
807 EXTERN S16 cmUnpkRguBndCfm ARGS((
808    RguBndCfm            func,
809    Pst*                 pst,
810    Buffer               *mBuf
811 ));
812 /** @brief Request from RLC to MAC for forwarding SDUs on common
813  * channel for transmission */
814 EXTERN S16 cmPkRguCDatReq ARGS((
815    Pst*                 pst,
816    SpId                 spId,
817    RguCDatReqInfo  *    datReq
818 ));
819 /** @brief Request from RLC to MAC for forwarding SDUs on common
820  * channel for transmission */
821 EXTERN S16 cmUnpkRguCDatReq ARGS((
822    RguCDatReq           func,
823    Pst*                 pst,
824    Buffer               *mBuf
825 ));
826 /** @brief Request from RLC to MAC for forwarding SDUs on 
827  * dedicated channel for transmission */
828 EXTERN S16 packSendDlData ARGS((
829    Pst*                 pst,
830    SpId                 spId,
831    RlcMacData      *    datReq
832 ));
833 /** @brief Request from RLC to MAC for forwarding SDUs on 
834  * dedicated channel for transmission */
835 EXTERN S16 unpackSendDlData ARGS((
836    RguDDatReq           func,
837    Pst*                 pst,
838    Buffer               *mBuf
839 ));
840 /** @brief Data Indication from MAC to RLC to 
841  * forward the data received for common channels*/
842 EXTERN S16 cmPkRguCDatInd ARGS((
843    Pst*                 pst,
844    SuId                 suId,
845    RguCDatIndInfo  *    datInd
846 ));
847 /** @brief Data Indication from MAC to RLC to 
848  * forward the data received for common channels*/
849 EXTERN S16 cmUnpkRguCDatInd ARGS((
850    RguCDatInd           func,
851    Pst*                 pst,
852    Buffer               *mBuf
853 ));
854 /** @brief Data Indication from MAC to RLC to 
855  * forward the data received for dedicated channels*/
856 EXTERN S16 packRcvdUlData ARGS((
857    Pst*                 pst,
858    SuId                 suId,
859    RlcMacData  *    ulData
860 ));
861 /** @brief Data Indication from MAC to RLC to 
862  * forward the data received for dedicated channels*/
863 EXTERN S16 unpackRcvdUlData ARGS((
864    RguDDatInd           func,
865    Pst*                 pst,
866    Buffer               *mBuf
867 ));
868 /** @brief Primitive invoked from RLC to MAC to 
869  * inform the BO report for common channels*/
870 EXTERN S16 cmPkRguCStaRsp ARGS((
871    Pst*                 pst,
872    SpId                 spId,
873    RguCStaRspInfo  *    staRsp
874 ));
875 /** @brief Primitive invoked from RLC to MAC to 
876  * inform the BO report for common channels*/
877 EXTERN S16 cmUnpkRguCStaRsp ARGS((
878    RguCStaRsp           func,
879    Pst*                 pst,
880    Buffer               *mBuf
881 ));
882 /** @brief Primitive invoked from RLC to MAC to 
883  * inform the BO report for dedicated channels*/
884 EXTERN S16 packSendBOStatus ARGS((
885    Pst*                 pst,
886    SpId                 spId,
887    RlcMacBOStatus*      boStatus
888 ));
889 /** @brief Primitive invoked from RLC to MAC to 
890  * inform the BO report for dedicated channels*/
891 EXTERN S16 unpackSendBOStatus ARGS((
892    RguDStaRsp           func,
893    Pst*                 pst,
894    Buffer               *mBuf
895 ));
896 /** @brief Status Indication from MAC to RLC  
897  * as a response to the staRsp primitive from RLC.
898  * Informs RLC of the totalBufferSize and Timing Info 
899  * for the transmission on common channels. */
900 EXTERN S16 cmPkRguCStaInd ARGS((
901    Pst*                 pst,
902    SuId                 suId,
903    RguCStaIndInfo  *    staInd
904 ));
905 /** @brief Status Indication from MAC to RLC  
906  * as a response to the staRsp primitive from RLC.
907  * Informs RLC of the totalBufferSize and Timing Info 
908  * for the transmission on common channels. */
909 EXTERN S16 cmUnpkRguCStaInd ARGS((
910    RguCStaInd           func,
911    Pst*                 pst,
912    Buffer               *mBuf
913 ));
914 /** @brief Status Indication from MAC to RLC  
915  * as a response to the staRsp primitive from RLC.
916  * Informs RLC of the totalBufferSize and Timing Info 
917  * for the transmission on dedicated channels. */
918 EXTERN S16 packSchedRep ARGS((
919    Pst*                 pst,
920    SuId                 suId,
921    RlcMacSchedRep  *    staInd
922 ));
923 EXTERN S16 cmPkRguFlowCntrlInfo ARGS((
924 RguFlowCntrlInd *param, 
925 Buffer           *mBuf
926 ));
927 EXTERN S16 cmPkRguUeFlowCntrlInfo ARGS((
928 RguUeFlowCntrlInfo *param,
929 Buffer           *mBuf
930 ));
931 EXTERN S16 cmPkRguLcFlowCntrlInfo ARGS((
932 RguLcFlowCntrlInfo *param,
933 Buffer           *mBuf
934 ));
935 EXTERN S16 cmUnpkRguLcFlowCntrlInfo ARGS((
936 RguLcFlowCntrlInfo *param,
937 Buffer           *mBuf
938 ));
939 EXTERN S16 cmUnpkRguUeFlowCntrlInfo ARGS((
940 RguUeFlowCntrlInfo *param,
941 Buffer           *mBuf
942 ));
943 EXTERN S16 cmUnpkRguFlowCntrlInfo ARGS((
944 RguFlowCntrlInd *param, 
945 Buffer           *mBuf
946 ));
947 /** @brief Status Indication from MAC to RLC  
948  * as a response to the staRsp primitive from RLC.
949  * Informs RLC of the totalBufferSize and Timing Info 
950  * for the transmission on dedicated channels. */
951 EXTERN S16 unpackSchedRep ARGS((
952    RguDStaInd           func,
953    Pst*                 pst,
954    Buffer               *mBuf
955 ));
956 EXTERN S16 cmPkRguPduInfo ARGS((
957    RguPduInfo           *param,
958    Buffer               *mBuf
959 ));
960 EXTERN S16 cmUnpkRguPduInfo ARGS((
961    RguPduInfo           *param,
962    Buffer               *mBuf
963 ));
964 EXTERN S16 cmPkRguDBoReport ARGS((
965    RguDBoReport         *param,
966    Buffer               *mBuf
967 ));
968 EXTERN S16 cmUnpkRguDBoReport ARGS((
969    RguDBoReport         *param,
970    Buffer               *mBuf
971 ));
972
973 EXTERN S16 cmPkRguCDatReqInfo ARGS((
974    RguCDatReqInfo       *param,
975    Buffer               *mBuf
976 ));
977 EXTERN S16 cmUnpkRguCDatReqInfo ARGS((
978    RguCDatReqInfo       *param,
979    Buffer               *mBuf
980 ));
981 EXTERN S16 cmPkRguLchDatReq ARGS((
982    RguLchDatReq         *param,
983    Buffer               *mBuf
984 ));
985 EXTERN S16 cmUnpkRguLchDatReq ARGS((
986    RguLchDatReq         *param,
987    Buffer               *mBuf
988 ));
989 EXTERN S16 cmPkRguDatReqTb ARGS((
990    RguDatReqTb          *param,
991    Buffer               *mBuf
992 ));
993 EXTERN S16 cmPkRguStaIndTb ARGS((
994    RguStaIndTb          *param,
995    Buffer               *mBuf
996 ));
997 EXTERN S16 cmUnpkRguStaIndTb ARGS((
998    RguStaIndTb          *param,
999    Buffer               *mBuf
1000 ));
1001 /* rgu_x_001.main_3 - ADD - L2M Support */
1002 #ifdef LTE_L2_MEAS
1003 EXTERN S16 cmPkRguDDatReqInfo ARGS((
1004    Pst                  *pst,
1005    RguDDatReqInfo       *param,
1006    Buffer               *mBuf
1007 ));
1008 EXTERN S16 cmUnpkRguDDatReqInfo ARGS((
1009    Pst                  *pst,
1010    RguDDatReqInfo       *param,
1011    Buffer               *mBuf
1012 ));
1013 EXTERN S16 cmUnpkRguDatReqTb ARGS((
1014    Pst                  *pst,
1015    RguDatReqTb          *param,
1016    Buffer               *mBuf
1017 ));
1018 #else
1019 EXTERN S16 cmPkRguDDatReqInfo ARGS((
1020    RguDDatReqInfo       *param,
1021    Buffer               *mBuf
1022 ));
1023 EXTERN S16 cmUnpkRguDDatReqInfo ARGS((
1024    RguDDatReqInfo       *param,
1025    Buffer               *mBuf
1026 ));
1027 EXTERN S16 cmUnpkRguDatReqTb ARGS((
1028    RguDatReqTb          *param,
1029    Buffer               *mBuf
1030 ));
1031 #endif
1032 EXTERN S16 cmPkRguCDatIndInfo ARGS((
1033    RguCDatIndInfo       *param,
1034    Buffer               *mBuf
1035 ));
1036 EXTERN S16 cmUnpkRguCDatIndInfo ARGS((
1037    RguCDatIndInfo       *param,
1038    Buffer               *mBuf
1039 ));
1040 EXTERN S16 cmPkRguLchDatInd ARGS((
1041    RguLchDatInd         *param,
1042    Buffer               *mBuf
1043 ));
1044 EXTERN S16 cmUnpkRguLchDatInd ARGS((
1045    RguLchDatInd         *param,
1046    Buffer               *mBuf
1047 ));
1048 EXTERN S16 packRlcMacDataInfo ARGS((
1049    RlcMacData         *param,
1050    Buffer               *mBuf
1051 ));
1052 EXTERN S16 unpackRlcMacDataInfo ARGS((
1053    RlcMacData       *param,
1054    Buffer               *mBuf
1055 ));
1056
1057 EXTERN S16 cmPkRguCStaRspInfo ARGS((
1058    RguCStaRspInfo       *param,
1059    Buffer               *mBuf
1060 ));
1061 EXTERN S16 cmUnpkRguCStaRspInfo ARGS((
1062    RguCStaRspInfo       *param,
1063    Buffer               *mBuf
1064 ));
1065 EXTERN S16 packBOStatusInfo ARGS((
1066    RlcMacBOStatus       *param,
1067    Buffer               *mBuf
1068 ));
1069 EXTERN S16 unpackBOStatusInfo ARGS((
1070    RlcMacBOStatus       *param,
1071    Buffer               *mBuf
1072 ));
1073 EXTERN S16 cmPkRguCStaIndInfo ARGS((
1074    RguCStaIndInfo       *param,
1075    Buffer               *mBuf
1076 ));
1077 EXTERN S16 cmUnpkRguCStaIndInfo ARGS((
1078    RguCStaIndInfo       *param,
1079    Buffer               *mBuf
1080 ));
1081 EXTERN S16 cmPkRguLchStaInd ARGS((
1082    RguLchStaInd         *param,
1083    Buffer               *mBuf
1084 ));
1085 EXTERN S16 cmUnpkRguLchStaInd ARGS((
1086    RguLchStaInd         *param,
1087    Buffer               *mBuf
1088 ));
1089 EXTERN S16 packSchedRepInfo ARGS((
1090    RlcMacSchedRep       *param,
1091    Buffer               *mBuf
1092 ));
1093 EXTERN S16 unpackSchedRepInfo ARGS((
1094    RlcMacSchedRep       *param,
1095    Buffer               *mBuf
1096 ));
1097   
1098 /*rgu_x_001.main_3 - ADD - L2M  & R9 Support */
1099 #ifdef LTE_L2_MEAS
1100 /** @brief Request from MAC to RLC for forwarding HARQ Status */
1101
1102 EXTERN S16 cmPkRguHqStaInd ARGS((
1103    Pst*                 pst,
1104    SpId                 spId,
1105    RguHarqStatusInd     *harqStatusInd));
1106
1107 /** @brief Request from MAC to RLC forwarding HARQ status  */
1108 EXTERN S16 cmUnpkRguHqStaInd ARGS((
1109    RguHqStaInd          func,
1110    Pst*                 pst,
1111    Buffer               *mBuf
1112 ));
1113
1114 /** @brief Primitive invoked from RLC to MAC to 
1115  *  * inform the On/Off Status of LC Id*/
1116 EXTERN S16 cmPkRguL2MUlThrpMeasReq ARGS((
1117    Pst*                 pst,
1118    SpId                 spId,
1119    RguL2MUlThrpMeasReqInfo*    measReq
1120 ));
1121
1122 /** @brief Primitive invoked from RLC to MAC to 
1123  *  * inform the On/Off Status of LC Id*/
1124 EXTERN S16 cmUnpkRguL2MUlThrpMeasReq ARGS((
1125    RguL2MUlThrpMeasReq  func,
1126    Pst*                 pst,
1127    Buffer               *mBuf
1128 ));
1129
1130 EXTERN S16 cmPkRguL2MUlThrpMeasReqInfo ARGS((
1131    RguL2MUlThrpMeasReqInfo *param,
1132    Buffer               *mBuf
1133 ));
1134
1135 EXTERN S16 cmUnpkRguL2MUlThrpMeasReqInfo ARGS((
1136    RguL2MUlThrpMeasReqInfo       *param,
1137    Buffer               *mBuf
1138 ));
1139
1140 #endif /* LTE_L2_MEAS */
1141 EXTERN S16 cmUnpkRguFlowCntrlInd ARGS((
1142    RguFlowCntrlIndInfo  func,
1143    Pst                  *pst,
1144    Buffer               *mBuf
1145  ));
1146
1147 EXTERN S16 cmPkRguFlowCntrlInd ARGS((
1148    Pst* pst,
1149    SuId suId,
1150    RguFlowCntrlInd  *flowCntrlInd
1151  ));
1152 #endif
1153
1154 #ifdef __cplusplus
1155 }
1156 #endif
1157 #endif /* __RGUX__ */
1158
1159 /********************************************************************30**
1160
1161          End of file
1162 **********************************************************************/