Building mib PDU and SSB changes at scheduler
[o-du/l2.git] / src / 5gnrmac / rg_lim.c
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  
21      Name:     LTE-MAC layer
22   
23      Type:     C source file
24   
25      Desc:     C source code for Entry point fucntions
26   
27      File:     rg_lim.c 
28   
29 **********************************************************************/
30
31 /** @file rg_lim.c.
32 @brief It has APIs exposed by Lower Interface Modulue of MAC. It acts as an 
33 Interface handler for lower interface APIs.
34 */
35 static const char* RLOG_MODULE_NAME="MAC";
36 static int RLOG_FILE_ID=182;
37 static int RLOG_MODULE_ID=4096;
38 /* header include files -- defines (.h) */
39 #include "envopt.h"        /* environment options */
40 #include "envdep.h"        /* environment dependent */
41 #include "envind.h"        /* environment independent */
42 #include "gen.h"           /* general layer */
43 #include "ssi.h"           /* system services */
44 #include "cm5.h"           /* common timers defines */
45 #include "cm_hash.h"       /* common hash list defines */
46 #include "cm_llist.h"      /* common linked list defines */
47 #include "cm_mblk.h"       /* memory management */
48 #include "cm_tkns.h"       /* common tokens */
49 #include "cm_lte.h"       /* common tokens */
50 #include "rgu.h"           /* RGU defines */
51 #include "tfu.h"           /* RGU defines */
52 #include "lrg.h"           /* layer management defines for LTE-MAC */
53 #include "crg.h"           /* layer management defines for LTE-MAC */
54 #include "rg_sch_inf.h"           /* layer management defines for LTE-MAC */
55 #include "rg_env.h"        /* customisable defines and macros for MAC */
56 #include "rg.h"            /* defines and macros for MAC */
57 #include "du_log.h"
58
59 /* header/extern include files (.x) */
60 #include "gen.x"           /* general layer typedefs */
61 #include "ssi.x"           /* system services typedefs */
62 #include "cm5.x"           /* common timers */
63 #include "cm_hash.x"       /* common hash list */
64 #include "cm_lib.x"        /* common library */
65 #include "cm_llist.x"      /* common linked list */
66 #include "cm_mblk.x"       /* memory management */
67 #include "cm_tkns.x"       /* common tokens */
68 #include "cm_lte.x"       /* common tokens */
69 #include "rgu.x"           /* RGU types */
70 #include "tfu.x"           /* RGU types */
71 #include "lrg.x"           /* layer management typedefs for MAC */
72 #include "crg.x"           /* layer management typedefs for MAC */
73 #include "rg_sch_inf.x"    /* SCH interface typedefs */
74 #include "rg_prg.x"    /* PRG interface typedefs */
75 #include "du_app_mac_inf.h"
76 #include "rg.x"            /* typedefs for MAC */
77
78 #include "mac_sch_interface.h"
79 /* local defines */
80
81 /* local typedefs */
82  
83 /* local externs */
84 PRIVATE S16  rgLIMValidateSap ARGS((Inst inst,SuId suId));
85 PRIVATE Void rgLIMUtlFreeDatIndEvnt ARGS((TfuDatIndInfo *datInd,
86                                           Bool error));
87
88 /* function pointers for packing slot ind from mac to sch */
89 //S16 packMacSchSlotInd(Pst *pst, SlotIndInfo *slotInd);
90
91 MacSchSlotIndFunc macSchSlotIndOpts[] =
92 {
93    packMacSchSlotInd,  
94    macSchSlotInd,                                             
95    packMacSchSlotInd
96 }; 
97
98 #ifdef RG_UNUSED
99 PRIVATE Void rgLIMUtlFreeDatReqEvnt ARGS((TfuDatReqInfo *datReq,
100                                           Bool error));
101 #endif
102 /* forward references */
103
104 /**
105  * @brief This API is invoked to send TFU SAP bind request to PHY.
106  *
107  * @details
108  *
109  *     Function : rgLIMTfuBndReq
110  *      
111  *      This API is invoked to send TFU SAP bind request to PHY. It fills in 
112  *      the Pst structure, spId and suId values and invokes bind request
113  *      primitive at TFU.
114  *           
115  *  @param[in]  Inst        inst
116  *  @param[in]  SuId            suId 
117  *  @param[in]  SpId            spId
118  *  @return  S16
119  *      -# ROK 
120  *      -# RFAILED 
121  **/
122 #ifdef ANSI
123 PUBLIC S16 rgLIMTfuBndReq
124 (
125 Inst    inst,
126 SuId    suId, 
127 SpId    spId
128 )
129 #else
130 PUBLIC S16 rgLIMTfuBndReq(inst,suId, spId)
131 Inst    inst;
132 SuId    suId; 
133 SpId    spId;
134 #endif
135 {
136    S16         ret;
137    RgLowSapCb  *tfuSap;
138    Pst         pst;
139
140    TRC2(rgLIMTfuBndReq);
141
142    /* Get the lower SAP control block from the layer control block. */
143    tfuSap = &(rgCb[inst].tfuSap);
144    (Void)cmMemcpy ((U8*)&pst, (U8*)&(tfuSap->sapCfg.sapPst), sizeof(Pst));
145    if((ret = RgLiTfuBndReq (&pst, suId, spId)) != ROK)
146    {
147       RLOG0(L_ERROR,"Call to RgLiTfuBndReq() failed");
148    }
149    RETVALUE(ret);
150 }  /* rgLIMTfuBndReq */
151
152
153 /**
154  * @brief This API is invoked to send TFU SAP unbind request to PHY.
155  *
156  * @details
157  *
158  *     Function : rgLIMTfuBndReq
159  *      
160  *      This API is invoked to send TFU SAP unbind request to PHY. It fills in 
161  *      the Pst structure and spId value and invokes unbind request
162  *      primitive at TFU.
163  *           
164  *  @param[in]  Inst        inst
165  *  @param[in]  SpId            spId
166  *  @param[in]  Reason          reason 
167  *  @return  S16
168  *      -# ROK 
169  *      -# RFAILED 
170  **/
171 #ifdef ANSI
172 PUBLIC S16 rgLIMTfuUbndReq
173 (
174 Inst    inst,
175 SpId    spId, 
176 Reason  reason
177 )
178 #else
179 PUBLIC S16 rgLIMTfuUbndReq(inst,spId, reason)
180 Inst    inst;
181 SpId    spId; 
182 Reason  reason;
183 #endif
184 {
185    S16         ret;
186    RgLowSapCb  *tfuSap;
187    Pst         pst;
188
189    TRC2(rgLIMTfuUbndReq);
190
191    /* Get the lower SAP control block from the layer control block. */
192    tfuSap = &(rgCb[inst].tfuSap);
193    cmMemcpy ((U8*)&pst, (U8*)&(tfuSap->sapCfg.sapPst), sizeof(Pst));
194    if((ret = RgLiTfuUbndReq (&pst, tfuSap->sapCfg.spId, reason)) != ROK)
195    {
196       RLOG0(L_ERROR,"Call to RgLiTfuUbndReq() failed");
197    }
198    RETVALUE(ret);
199
200 }  /* rgLIMTfuUbndReq */
201
202
203 /**
204  * @brief Bind confirm API for TFU SAP 
205  *
206  * @details
207  *
208  *     Function : RgLiTfuBndCfm
209  *      
210  *      This API is invoked by PHY to confirm TFU SAP bind. 
211  *     
212  *           
213  *  @param[in]  Pst   *pst 
214  *  @param[in]  SuId  suId 
215  *  @param[in]  U8    status
216  *  @return  S16
217  *      -# ROK 
218  *      -# RFAILED 
219  **/
220 #ifdef ANSI
221 PUBLIC S16 RgLiTfuBndCfm 
222 (
223 Pst     *pst,
224 SuId    suId, 
225 U8      status
226 )
227 #else
228 PUBLIC S16 RgLiTfuBndCfm(pst, suId, status)
229 Pst     *pst; 
230 SuId    suId; 
231 U8      status;
232 #endif
233 {
234    Inst inst;
235    S16 ret;
236    RgLowSapCb  *tfuSap;
237
238    TRC3(RgLiTfuBndCfm);
239
240
241    RG_IS_INST_VALID(pst->dstInst);
242    inst = pst->dstInst - RG_INST_START;
243    /* Lets validate suId first */
244    /* CA_Change */
245    tfuSap = &(rgCb[inst].tfuSap);
246
247    if (suId != tfuSap->sapCfg.suId)
248    {
249       RLOG2(L_ERROR,"Incorrect SuId. Configured (%d) Recieved (%d)",
250             tfuSap->sapCfg.suId, suId);
251       RETVALUE(RFAILED);
252    }
253    ret = rgLMMBndCfm (pst, suId, status);
254    RETVALUE(ret);
255 }  /* RgLiTfuBndCfm */
256
257  /** @brief This function Validates the SAP information received along with the
258   * primitive from the lower layer. 
259   * Function:
260   *   Validates SAP information.
261  *  @param[in]  Inst        inst
262   * @param  suId The SAP Id
263   * @return 
264   *   -# ROK
265   *   -# RFAILED
266   */
267 #ifdef ANSI
268 PRIVATE S16 rgLIMValidateSap
269 (
270  Inst    inst,
271  SuId    suId
272 )
273 #else
274 PRIVATE S16 rgLIMValidateSap(inst,suId)
275  Inst    inst;
276  SuId    suId;
277 #endif
278 {
279    RgLowSapCb  *tfuSap;
280
281    TRC2(rgLIMValidateSap)
282
283    tfuSap = &(rgCb[inst].tfuSap);
284
285    /* First lets check the suId */
286    if( suId != tfuSap->sapCfg.suId)
287    {
288       RLOG2(L_ERROR,"Incorrect SuId. Configured (%d) Recieved (%d)",
289             tfuSap->sapCfg.suId, suId);
290       RETVALUE(RFAILED);
291    }
292    if (tfuSap->sapSta.sapState != LRG_BND)
293    {
294       RLOG1(L_ERROR,"Lower SAP not enabled SuId (%d)",
295             tfuSap->sapCfg.suId);
296       RETVALUE(RFAILED);
297    }
298    RETVALUE(ROK);
299 } /* end of rgLIMValidateSap */
300
301 /** @brief This function frees up the TfuDatIndInfo structure
302  *
303  * @details
304  *
305  *     Function: rgLIMUtlFreeDatIndEvnt 
306  *       - Function frees up the TfuDatIndInfo structure, in case of error it shall
307  *       free up the buffer's present in the datIndLst.
308  *
309  *         Processing steps:
310  * @param  [in] TfuDatIndInfo *datInd
311  * @param  [in] Bool          *error
312  * @return 
313  */
314 #ifdef ANSI
315 PRIVATE Void rgLIMUtlFreeDatIndEvnt 
316 (
317  TfuDatIndInfo *datInd,
318  Bool          error
319  )
320 #else
321 PRIVATE Void rgLIMUtlFreeDatIndEvnt(datInd, error)
322  TfuDatIndInfo *datInd;
323  Bool          error;
324 #endif
325 {
326
327    TfuDatInfo     *datInfo;
328    CmLList        *node;
329
330    TRC2(rgLIMUtlFreeDatIndEvnt);
331    /* Steps of freeing up the TfuDatInd.
332     * 1. loop through the datIndLst and free up all the buffers.
333     * 2. free up the whole event
334     */
335    if ((error == TRUE) && (datInd->datIndLst.count > 0))
336    {
337       node =  datInd->datIndLst.first;
338       while (node)
339       {
340          datInfo = (TfuDatInfo*)node->node;
341          RG_FREE_MSG(datInfo->mBuf);
342          node = node->next;
343       }
344    }
345    RG_FREE_MEM(datInd);
346    RETVOID;
347 } /* end of rgLIMUtlFreeDatIndEvnt*/
348
349 /**
350  * @brief Downlink data indication from PHY.
351  *
352  * @details
353  *
354  *     Function : RgLiTfuDatInd
355  *      
356  *      This API is invoked by PHY to send data indication to MAC on 
357  *      recieving data from UEs.
358  *           
359  *  @param[in]  Pst              *pst
360  *  @param[in]  SuId             suId 
361  *  @param[in]  TfuDatIndInfo    *datInd
362  *  @return  S16
363  *      -# ROK 
364  *      -# RFAILED 
365  **/
366 #ifdef ANSI
367 PUBLIC S16 RgLiTfuDatInd
368 (
369 Pst                *pst, 
370 SuId               suId, 
371 TfuDatIndInfo    *datInd
372 )
373 #else
374 PUBLIC S16 RgLiTfuDatInd(pst, suId, datInd)
375 Pst                *pst; 
376 SuId               suId; 
377 TfuDatIndInfo    *datInd;
378 #endif
379 {
380    Inst             inst;
381    S16              ret;
382    VOLATILE U32     startTime=0;
383
384    TRC3(RgLiTfuDatInd);
385
386   // printf("5GTF:: DatindRcvd\n");
387
388    RG_IS_INST_VALID(pst->dstInst);
389    inst = pst->dstInst - RG_INST_START;
390    /*starting Task*/
391    SStartTask(&startTime, PID_MAC_TFU_DATIND);
392
393 #ifndef NO_ERRCLS 
394    if ((ret = rgLIMValidateSap (inst,suId)) != ROK)
395    {
396       RLOG_ARG0(L_ERROR,DBG_CELLID,datInd->cellId,"SAP Validation failed");
397       rgLIMUtlFreeDatIndEvnt(datInd, TRUE);
398       RETVALUE(ret);
399    }
400 #endif
401    /* Now call the TOM (Tfu ownership module) primitive to process further */
402    rgCb[inst].tfuSap.sapSts.numPduRcvd += 
403                     datInd->datIndLst.count;
404    ret = rgTOMDatInd(inst,datInd);
405    /* Fix: sriky memory corruption precautions */
406    /* Free up the memory for the request structure */
407    if (ret == ROK)
408    {
409       rgLIMUtlFreeDatIndEvnt(datInd, FALSE);
410    }
411    else
412    {
413       rgLIMUtlFreeDatIndEvnt(datInd, TRUE);
414    }
415
416    /*stoping Task*/
417    SStopTask(startTime, PID_MAC_TFU_DATIND);
418
419    RETVALUE(ret);
420 }  /* RgLiTfuDatInd*/
421
422 #ifdef RG_UNUSED
423 /** @brief This function frees up the TfuDatReqInfo structure.
424  *
425  * @details
426  *
427  *     Function: rgLIMUtlFreeDatReqEvnt
428  *       - Function frees up the TfuDatReqInfo structure, in case of error it shall
429  *       free up the buffer's present in the PDUs list.
430  *
431  *         Processing steps:
432  * @param  [in] TfuDatReqInfo *datReq
433  * @param  [in] Bool          *error
434  * @return 
435  */
436 #ifdef ANSI
437 PRIVATE Void rgLIMUtlFreeDatReqEvnt
438 (
439  TfuDatReqInfo *datReq,
440  Bool          error
441  )
442 #else
443 PRIVATE Void rgLIMUtlFreeDatReqEvnt(datReq, error)
444  TfuDatReqInfo *datReq;
445  Bool          error;
446 #endif
447 {
448
449    TfuDatReqPduInfo *datInfo;
450    CmLList          *node;
451    U8               i;
452
453    TRC2(rgLIMUtlFreeDatReqEvnt);
454    /* Steps of freeing up the TfuDatReq.
455     * 1. Free the bch buffer.
456     * 2. loop through the pdus list and free up all the buffers.
457     * 3. free up the whole event
458     */
459    if (error)
460    {
461       if (datReq->bchDat.pres == PRSNT_NODEF)
462       {
463          RG_FREE_MSG(datReq->bchDat.val);
464       }
465       if (datReq->pdus.count > 0)
466       {
467          node =  datReq->pdus.first;
468          while (node)
469          {
470             datInfo = (TfuDatReqPduInfo*)node->node;
471             for (i=0; i<datInfo->nmbOfTBs; i++)
472             {
473                if (datInfo->mBuf[i] != NULLP)
474                {
475                   RG_FREE_MSG(datInfo->mBuf[i]);
476                }
477             }
478             node = node->next;
479          }
480       }
481    }
482    RG_FREE_MEM(datReq);
483    RETVOID;
484 } /* end of rgLIMUtlFreeDatReqEvnt*/
485 #endif
486 /**
487  * @brief This API is invoked to send Data to PHY.
488  *
489  * @details
490  *
491  *     Function : rgLIMTfuDatReq
492  *      
493  *      This API is invoked to send Data to PHY. It 
494  *      fills in the Pst structure, spId value and invokes Data
495  *      request primitive at TFU.
496  *           
497  *  @param[in]  Inst        inst
498  *  @param[in]  TfuDatReqInfo *datReq
499  *  @return  S16
500  *      -# ROK 
501  *      -# RFAILED 
502  **/
503 #ifdef ANSI
504 PUBLIC S16 rgLIMTfuDatReq 
505 (
506 Inst          inst,
507 TfuDatReqInfo *datReq
508 )
509 #else
510 PUBLIC S16 rgLIMTfuDatReq(inst,datReq)
511 Inst          inst;
512 TfuDatReqInfo *datReq;
513 #endif
514 {
515    S16         ret;
516    RgLowSapCb  *tfuSap;
517
518    TRC2(rgLIMTfuDatReq)
519
520    /* Get the lower SAP control block from the layer control block. */
521    tfuSap = &(rgCb[inst].tfuSap);
522
523 #ifndef NO_ERRCLS
524    if (tfuSap->sapSta.sapState != LRG_BND)
525    {
526       RLOG_ARG1(L_ERROR,DBG_CELLID,datReq->cellId,"Lower SAP not bound (%d)",
527             tfuSap->sapSta.sapState);
528 #ifdef RG_UNUSED
529       /* This case will never be hit if sap is not bound then we dont get TTI */
530       rgLIMUtlFreeDatReqEvnt(datReq, TRUE);
531 #endif
532       RETVALUE(RFAILED);
533    }
534 #endif
535
536    tfuSap->sapSts.numPduTxmit += datReq->pdus.count; 
537
538    /* Using existing pst - for optimization */
539    if((ret = RgLiTfuDatReq (&tfuSap->sapCfg.sapPst, tfuSap->sapCfg.spId, 
540                             datReq)) != ROK)
541    {
542       RLOG_ARG0(L_ERROR,DBG_CELLID,datReq->cellId,"Call to RgLiTfuDatReq() failed");
543    }
544    RETVALUE(ret);
545 }  /* rgLIMTfuDatReq*/
546
547 #ifdef L2_OPTMZ
548 /**
549  * @brief This API is invoked to send Data to PHY.
550  *
551  * @details
552  *
553  *     Function : rgLIMTfuDelDatReq
554  *      
555  *      This API is invoked to send Data to PHY. It 
556  *      fills in the Pst structure, spId value and invokes Data
557  *      request primitive at TFU.
558  *           
559  *  @param[in]  Inst        inst
560  *  @param[in]  TfuDelDatReqInfo *datReq
561  *  @return  S16
562  *      -# ROK 
563  *      -# RFAILED 
564  **/
565 #ifdef ANSI
566 PUBLIC S16 rgLIMTfuDelDatReq 
567 (
568 Inst          inst,
569 TfuDelDatReqInfo *delDatReq
570 )
571 #else
572 PUBLIC S16 rgLIMTfuDatReq(inst,delDatReq)
573 Inst          inst;
574 TfuDelDatReqInfo *delDatReq;
575 #endif
576 {
577    S16         ret;
578    RgLowSapCb  *tfuSap;
579
580    TRC2(rgLIMTfuDelDatReq)
581
582    /* Get the lower SAP control block from the layer control block. */
583    tfuSap = &(rgCb[inst].tfuSap);
584
585 #ifndef NO_ERRCLS
586    if (tfuSap->sapSta.sapState != LRG_BND)
587    {
588       RLOG_ARG1(L_ERROR,DBG_CELLID,delDatReq->cellId,"Lower SAP not bound (%d)",
589             tfuSap->sapSta.sapState);
590       RETVALUE(RFAILED);
591    }
592 #endif
593
594    if((ret = RgLiTfuDelDatReq (&tfuSap->sapCfg.sapPst, tfuSap->sapCfg.spId, 
595                             delDatReq)) != ROK)
596    {
597       RLOG_ARG0(L_ERROR,DBG_CELLID,delDatReq->cellId,"Call to RgLiTfuDelDatReq() failed");
598    }
599    RETVALUE(ret);
600 }  /* rgLIMTfuDatReq*/
601 #endif /*L2_OPTMZ */
602
603 /**
604  * @brief Transmission time interval indication from PHY.
605  *
606  * @details
607  *
608  *     Function : sendSlotIndMacToSch
609  * 
610  *      This API is invoked by MAC to send slot ind to scheduler.
611  *           
612  *  @param[in]  SlotIndInfo    *slotInd
613  *  @return  S16
614  *      -# ROK 
615  *      -# RFAILED 
616  **/
617 int sendSlotIndMacToSch(SlotIndInfo *slotInd)
618 {
619    int ret = ROK;
620    /* fill Pst structure to send to lwr_mac to MAC */
621    Pst pst;
622    pst.srcProcId = 0;
623    pst.dstProcId = 0;
624    pst.srcEnt = ENTRG;
625    pst.dstEnt = ENTRG;
626    pst.srcInst = 0;
627    pst.dstInst = 1;
628    pst.event = EVENT_SLOT_IND_TO_SCH;
629    pst.region = 0;
630    pst.pool =  0;
631    pst.selector = MAC_SELECTOR_TC;
632
633    return(*macSchSlotIndOpts[pst.selector])(&pst,slotInd);
634 }
635
636 /**
637  * @brief Transmission time interval indication from PHY.
638  *
639  * @details
640  *
641  *     Function : fapiMacSlotInd 
642  *      
643  *      This API is invoked by PHY to indicate TTI indication to MAC for a cell.
644  *           
645  *  @param[in]  Pst            *pst
646  *  @param[in]  SuId           suId 
647  *  @param[in]  SlotIndInfo    *slotInd
648  *  @return  S16
649  *      -# ROK 
650  *      -# RFAILED 
651  **/
652 PUBLIC S16 fapiMacSlotInd 
653 (
654 Pst                 *pst, 
655 SlotIndInfo         *slotInd
656 )
657 {
658    S16              ret;
659    VOLATILE U32     startTime=0;
660    Inst             inst;
661
662    RG_IS_INST_VALID(pst->dstInst);
663    inst = pst->dstInst - RG_INST_START;
664    /*starting Task*/
665    SStartTask(&startTime, PID_MAC_TTI_IND);
666
667    /* send slot indication to scheduler */
668    ret = sendSlotIndMacToSch(slotInd);
669    if(ret != ROK)
670    {
671       DU_LOG("\nsending of slot ind msg from MAC to SCH failed");
672       RETVALUE(ret);
673    }
674
675    /* Now call the TOM (Tfu ownership module) primitive to process further */
676    ret = macProcessSlotInd(inst,*slotInd);
677    if(ret != ROK)
678    {
679       DU_LOG("\nmacProcessSlotInd failed");
680       RETVALUE(ret);
681    }
682
683
684    /*stoping Task*/
685    SStopTask(startTime, PID_MAC_TTI_IND);
686
687    RETVALUE(ret);
688 }  /* fapiMacSlotInd */
689
690 #if defined(TENB_T2K3K_SPECIFIC_CHANGES) && defined(LTE_TDD)
691  /**
692  * @brief Transmission of non-rt indication from CL.
693  *
694  * @details
695  *
696  *     Function : RgLiTfuNonRtInd 
697  *      
698  *      This API is invoked by CL to indicate non-rt processing indication to MAC for a cell.
699  *           
700  *  @param[in]  Pst            *pst
701  *  @param[in]  SuId           suId 
702  *  @return  S16
703  *      -# ROK 
704  *      -# RFAILED 
705  **/
706 #ifdef ANSI
707 PUBLIC S16 RgLiTfuNonRtInd
708 (
709 Pst                 *pst,
710 SuId                suId
711 )
712 #else
713 PUBLIC S16 RgLiTfuNonRtInd(pst, suId)
714 Pst                 *pst;
715 SuId                suId;
716 #endif
717 {
718    TRC3(RgLiTfuNonRtInd);
719
720 #ifdef NO_ERRCLS
721    if (rgLIMValidateSap (pst->dstInst - RG_INST_START, suId) != ROK)
722    {
723       RGDBGERRNEW(pst->dstInst - RG_INST_START, (rgPBuf(pst->dstInst - RG_INST_START),"RgLiTfuNonRtInd() SAP Validation failed.\n"));
724       RETVALUE(RFAILED);
725    }
726 #endif
727    rgDHMFreeTbBufs(pst->dstInst - RG_INST_START);
728    RETVALUE(ROK);
729 }  /* RgLiTfuNonRtInd */
730
731 #endif
732 /**********************************************************************
733  
734          End of file
735 **********************************************************************/